mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add double quotes for localize hygiene check (#6492)
* Add localize single quote hygiene task * Update localize calls * Update comment * Fix build failures and remove test code
This commit is contained in:
@@ -126,7 +126,7 @@ export class AccountDialog extends Modal {
|
||||
@ILogService logService: ILogService
|
||||
) {
|
||||
super(
|
||||
localize('linkedAccounts', 'Linked accounts'),
|
||||
localize('linkedAccounts', "Linked accounts"),
|
||||
TelemetryKeys.Accounts,
|
||||
telemetryService,
|
||||
layoutService,
|
||||
@@ -164,7 +164,7 @@ export class AccountDialog extends Modal {
|
||||
public render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
this._closeButton = this.addFooterButton(localize('accountDialog.close', 'Close'), () => this.close());
|
||||
this._closeButton = this.addFooterButton(localize('accountDialog.close', "Close"), () => this.close());
|
||||
this.registerListeners();
|
||||
}
|
||||
|
||||
@@ -176,14 +176,14 @@ export class AccountDialog extends Modal {
|
||||
|
||||
this._noaccountViewContainer = DOM.$('div.no-account-view');
|
||||
const noAccountTitle = DOM.append(this._noaccountViewContainer, DOM.$('.no-account-view-label'));
|
||||
const noAccountLabel = localize('accountDialog.noAccountLabel', 'There is no linked account. Please add an account.');
|
||||
const noAccountLabel = localize('accountDialog.noAccountLabel', "There is no linked account. Please add an account.");
|
||||
noAccountTitle.innerText = noAccountLabel;
|
||||
|
||||
// Show the add account button for the first provider
|
||||
// Todo: If we have more than 1 provider, need to show all add account buttons for all providers
|
||||
const buttonSection = DOM.append(this._noaccountViewContainer, DOM.$('div.button-section'));
|
||||
this._addAccountButton = new Button(buttonSection);
|
||||
this._addAccountButton.label = localize('accountDialog.addConnection', 'Add an account');
|
||||
this._addAccountButton.label = localize('accountDialog.addConnection', "Add an account");
|
||||
this._register(this._addAccountButton.onDidClick(() => {
|
||||
(<IProviderViewUiComponent>values(this._providerViewsMap)[0]).addAccountAction.run();
|
||||
}));
|
||||
|
||||
@@ -12,7 +12,7 @@ import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMess
|
||||
export class AccountDialogController {
|
||||
|
||||
// MEMBER VARIABLES ////////////////////////////////////////////////////
|
||||
private _addAccountErrorTitle = localize('accountDialog.addAccountErrorTitle', 'Error adding account');
|
||||
private _addAccountErrorTitle = localize('accountDialog.addAccountErrorTitle', "Error adding account");
|
||||
|
||||
private _accountDialog: AccountDialog;
|
||||
public get accountDialog(): AccountDialog { return this._accountDialog; }
|
||||
|
||||
@@ -115,7 +115,7 @@ export class AccountListRenderer extends AccountPickerListRenderer {
|
||||
public renderElement(account: azdata.Account, index: number, templateData: AccountListTemplate): void {
|
||||
super.renderElement(account, index, templateData);
|
||||
if (account.isStale) {
|
||||
templateData.content.innerText = localize('refreshCredentials', 'You need to refresh the credentials for this account.');
|
||||
templateData.content.innerText = localize('refreshCredentials', "You need to refresh the credentials for this account.");
|
||||
} else {
|
||||
templateData.content.innerText = '';
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ const account: IJSONSchema = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {
|
||||
description: localize('carbon.extension.contributes.account.id', 'Identifier of the account type'),
|
||||
description: localize('carbon.extension.contributes.account.id', "Identifier of the account type"),
|
||||
type: 'string'
|
||||
},
|
||||
icon: {
|
||||
description: localize('carbon.extension.contributes.account.icon', '(Optional) Icon which is used to represent the accpunt in the UI. Either a file path or a themable configuration'),
|
||||
description: localize('carbon.extension.contributes.account.icon', "(Optional) Icon which is used to represent the accpunt in the UI. Either a file path or a themable configuration"),
|
||||
anyOf: [{
|
||||
type: 'string'
|
||||
},
|
||||
@@ -33,11 +33,11 @@ const account: IJSONSchema = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
light: {
|
||||
description: localize('carbon.extension.contributes.account.icon.light', 'Icon path when a light theme is used'),
|
||||
description: localize('carbon.extension.contributes.account.icon.light', "Icon path when a light theme is used"),
|
||||
type: 'string'
|
||||
},
|
||||
dark: {
|
||||
description: localize('carbon.extension.contributes.account.icon.dark', 'Icon path when a dark theme is used'),
|
||||
description: localize('carbon.extension.contributes.account.icon.dark', "Icon path when a dark theme is used"),
|
||||
type: 'string'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ export class AutoOAuthDialog extends Modal {
|
||||
this.backButton.onDidClick(() => this.cancel());
|
||||
this._register(attachButtonStyler(this.backButton, this._themeService, { buttonBackground: SIDE_BAR_BACKGROUND, buttonHoverBackground: SIDE_BAR_BACKGROUND }));
|
||||
|
||||
this._copyAndOpenButton = this.addFooterButton(localize('copyAndOpen', 'Copy & Open'), () => this.addAccount());
|
||||
this._closeButton = this.addFooterButton(localize('oauthDialog.cancel', 'Cancel'), () => this.cancel());
|
||||
this._copyAndOpenButton = this.addFooterButton(localize('copyAndOpen', "Copy & Open"), () => this.addAccount());
|
||||
this._closeButton = this.addFooterButton(localize('oauthDialog.cancel', "Cancel"), () => this.cancel());
|
||||
this.registerListeners();
|
||||
this._userCodeInputBox.disable();
|
||||
this._websiteInputBox.disable();
|
||||
@@ -90,8 +90,8 @@ export class AutoOAuthDialog extends Modal {
|
||||
this._descriptionElement = append(body, $('.auto-oauth-description-section.new-section'));
|
||||
|
||||
const addAccountSection = append(body, $('.auto-oauth-info-section.new-section'));
|
||||
this._userCodeInputBox = this.createInputBoxHelper(addAccountSection, localize('userCode', 'User code'));
|
||||
this._websiteInputBox = this.createInputBoxHelper(addAccountSection, localize('website', 'Website'));
|
||||
this._userCodeInputBox = this.createInputBoxHelper(addAccountSection, localize('userCode', "User code"));
|
||||
this._websiteInputBox = this.createInputBoxHelper(addAccountSection, localize('website', "Website"));
|
||||
}
|
||||
|
||||
private createInputBoxHelper(container: HTMLElement, label: string): InputBox {
|
||||
|
||||
@@ -32,7 +32,7 @@ export class AutoOAuthDialogController {
|
||||
public openAutoOAuthDialog(providerId: string, title: string, message: string, userCode: string, uri: string): Thenable<void> {
|
||||
if (this._providerId !== null) {
|
||||
// If a oauth flyout is already open, return an error
|
||||
const errorMessage = localize('oauthFlyoutIsAlreadyOpen', 'Cannot start auto OAuth. An auto OAuth is already in progress.');
|
||||
const errorMessage = localize('oauthFlyoutIsAlreadyOpen', "Cannot start auto OAuth. An auto OAuth is already in progress.");
|
||||
this._errorMessageService.showDialog(Severity.Error, '', errorMessage);
|
||||
return Promise.reject(new Error('Auto OAuth dialog already open'));
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ export class FirewallRuleDialog extends Modal {
|
||||
|
||||
this._helpLink = DOM.append(textDescriptionContainer, DOM.$('a.help-link'));
|
||||
this._helpLink.setAttribute('href', firewallHelpUri);
|
||||
this._helpLink.innerHTML += localize('firewallRuleHelpDescription', 'Learn more about firewall settings');
|
||||
this._helpLink.innerHTML += localize('firewallRuleHelpDescription', "Learn more about firewall settings");
|
||||
this._helpLink.onclick = () => {
|
||||
this._windowsService.openExternal(firewallHelpUri);
|
||||
};
|
||||
@@ -140,7 +140,7 @@ export class FirewallRuleDialog extends Modal {
|
||||
this._accountPickerService.renderAccountPicker(DOM.append(azureAccountSection, DOM.$('.dialog-input')));
|
||||
|
||||
const firewallRuleSection = DOM.append(body, DOM.$('.firewall-rule-section.new-section'));
|
||||
const firewallRuleLabel = localize('filewallRule', 'Firewall rule');
|
||||
const firewallRuleLabel = localize('filewallRule', "Firewall rule");
|
||||
this.createLabelElement(firewallRuleSection, firewallRuleLabel, true);
|
||||
const radioContainer = DOM.append(firewallRuleSection, DOM.$('.radio-section'));
|
||||
const form = DOM.append(radioContainer, DOM.$('form.firewall-rule'));
|
||||
@@ -153,7 +153,7 @@ export class FirewallRuleDialog extends Modal {
|
||||
this._IPAddressInput.setAttribute('name', 'firewallRuleChoice');
|
||||
this._IPAddressInput.setAttribute('value', 'ipAddress');
|
||||
const IPAddressDescription = DOM.append(IPAddressContainer, DOM.$('div.option-description'));
|
||||
IPAddressDescription.innerText = localize('addIPAddressLabel', 'Add my client IP ');
|
||||
IPAddressDescription.innerText = localize('addIPAddressLabel', "Add my client IP ");
|
||||
this._IPAddressElement = DOM.append(IPAddressContainer, DOM.$('div.option-ip-address'));
|
||||
|
||||
const subnetIpRangeContainer = DOM.append(subnetIPRangeDiv, DOM.$('div.option-container'));
|
||||
@@ -162,7 +162,7 @@ export class FirewallRuleDialog extends Modal {
|
||||
this._subnetIPRangeInput.setAttribute('name', 'firewallRuleChoice');
|
||||
this._subnetIPRangeInput.setAttribute('value', 'ipRange');
|
||||
const subnetIPRangeDescription = DOM.append(subnetIpRangeContainer, DOM.$('div.option-description'));
|
||||
subnetIPRangeDescription.innerText = localize('addIpRangeLabel', 'Add my subnet IP range');
|
||||
subnetIPRangeDescription.innerText = localize('addIpRangeLabel', "Add my subnet IP range");
|
||||
const subnetIPRangeSection = DOM.append(subnetIPRangeDiv, DOM.$('.subnet-ip-range-input'));
|
||||
|
||||
const inputContainer = DOM.append(subnetIPRangeSection, DOM.$('.dialog-input-section'));
|
||||
|
||||
@@ -21,8 +21,8 @@ export class FirewallRuleDialogController {
|
||||
private _connection: IConnectionProfile;
|
||||
private _resourceProviderId: string;
|
||||
|
||||
private _addAccountErrorTitle = localize('firewallDialog.addAccountErrorTitle', 'Error adding account');
|
||||
private _firewallRuleErrorTitle = localize('firewallRuleError', 'Firewall rule error');
|
||||
private _addAccountErrorTitle = localize('firewallDialog.addAccountErrorTitle', "Error adding account");
|
||||
private _firewallRuleErrorTitle = localize('firewallRuleError', "Firewall rule error");
|
||||
private _deferredPromise: Deferred<boolean>;
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -20,7 +20,7 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
export class AddAccountAction extends Action {
|
||||
// CONSTANTS ///////////////////////////////////////////////////////////
|
||||
public static ID = 'account.addLinkedAccount';
|
||||
public static LABEL = localize('addAccount', 'Add an account');
|
||||
public static LABEL = localize('addAccount', "Add an account");
|
||||
|
||||
// EVENTING ////////////////////////////////////////////////////////////
|
||||
private _addAccountCompleteEmitter: Emitter<void>;
|
||||
@@ -67,7 +67,7 @@ export class AddAccountAction extends Action {
|
||||
*/
|
||||
export class RemoveAccountAction extends Action {
|
||||
public static ID = 'account.removeAccount';
|
||||
public static LABEL = localize('removeAccount', 'Remove account');
|
||||
public static LABEL = localize('removeAccount', "Remove account");
|
||||
|
||||
constructor(
|
||||
private _account: azdata.Account,
|
||||
@@ -82,8 +82,8 @@ export class RemoveAccountAction extends Action {
|
||||
// Ask for Confirm
|
||||
const confirm: IConfirmation = {
|
||||
message: localize('confirmRemoveUserAccountMessage', "Are you sure you want to remove '{0}'?", this._account.displayInfo.displayName),
|
||||
primaryButton: localize('accountActions.yes', 'Yes'),
|
||||
secondaryButton: localize('accountActions.no', 'No'),
|
||||
primaryButton: localize('accountActions.yes', "Yes"),
|
||||
secondaryButton: localize('accountActions.no', "No"),
|
||||
type: 'question'
|
||||
};
|
||||
|
||||
@@ -95,7 +95,7 @@ export class RemoveAccountAction extends Action {
|
||||
// Must handle here as this is an independent action
|
||||
this._notificationService.notify({
|
||||
severity: Severity.Error,
|
||||
message: localize('removeAccountFailed', 'Failed to remove account')
|
||||
message: localize('removeAccountFailed', "Failed to remove account")
|
||||
});
|
||||
return false;
|
||||
});
|
||||
@@ -109,7 +109,7 @@ export class RemoveAccountAction extends Action {
|
||||
*/
|
||||
export class ApplyFilterAction extends Action {
|
||||
public static ID = 'account.applyFilters';
|
||||
public static LABEL = localize('applyFilters', 'Apply Filters');
|
||||
public static LABEL = localize('applyFilters', "Apply Filters");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -129,7 +129,7 @@ export class ApplyFilterAction extends Action {
|
||||
*/
|
||||
export class RefreshAccountAction extends Action {
|
||||
public static ID = 'account.refresh';
|
||||
public static LABEL = localize('refreshAccount', 'Reenter your credentials');
|
||||
public static LABEL = localize('refreshAccount', "Reenter your credentials");
|
||||
public account: azdata.Account;
|
||||
|
||||
constructor(
|
||||
@@ -148,7 +148,7 @@ export class RefreshAccountAction extends Action {
|
||||
}
|
||||
));
|
||||
} else {
|
||||
const errorMessage = localize('NoAccountToRefresh', 'There is no account to refresh');
|
||||
const errorMessage = localize('NoAccountToRefresh', "There is no account to refresh");
|
||||
return Promise.reject(errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user