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:
Charles Gagnon
2019-07-25 10:35:14 -07:00
committed by GitHub
parent 69845b29ef
commit b2b2840990
141 changed files with 651 additions and 630 deletions
+21 -1
View File
@@ -195,6 +195,10 @@ const useStrictFilter = [
'src/**' 'src/**'
]; ];
const sqlFilter = [
'src/sql/**'
];
// {{SQL CARBON EDIT}} // {{SQL CARBON EDIT}}
const copyrightHeaderLines = [ const copyrightHeaderLines = [
'/*---------------------------------------------------------------------------------------------', '/*---------------------------------------------------------------------------------------------',
@@ -284,6 +288,19 @@ function hygiene(some) {
this.emit('data', file); this.emit('data', file);
}); });
const localizeDoubleQuotes = es.through(function (file) {
const lines = file.__lines;
lines.forEach((line, i) => {
if (/localize\(['"].*['"],\s'.*'\)/.test(line)) {
console.error(file.relative + '(' + (i + 1) + ',1): Message parameter to localize calls should be double-quotes');
errorCount++;
}
});
this.emit('data', file);
});
// {{SQL CARBON EDIT}} END // {{SQL CARBON EDIT}} END
const formatting = es.map(function (file, cb) { const formatting = es.map(function (file, cb) {
@@ -352,7 +369,10 @@ function hygiene(some) {
.pipe(tsl) .pipe(tsl)
// {{SQL CARBON EDIT}} // {{SQL CARBON EDIT}}
.pipe(filter(useStrictFilter)) .pipe(filter(useStrictFilter))
.pipe(useStrict); .pipe(useStrict)
// Only look at files under the sql folder since we don't want to cause conflicts with VS code
.pipe(filter(sqlFilter))
.pipe(localizeDoubleQuotes);
const javascript = result const javascript = result
.pipe(filter(eslintFilter)) .pipe(filter(eslintFilter))
@@ -37,7 +37,7 @@ const defaultOptions: ICheckboxSelectColumnOptions = {
columnId: '_checkbox_selector', columnId: '_checkbox_selector',
cssClass: undefined, cssClass: undefined,
headerCssClass: undefined, headerCssClass: undefined,
toolTip: nls.localize('selectDeselectAll', 'Select/Deselect All'), toolTip: nls.localize('selectDeselectAll', "Select/Deselect All"),
width: 30 width: 30
}; };
@@ -310,7 +310,7 @@ export class RowDetailView<T extends Slick.SlickData> {
item._collapsed = true; item._collapsed = true;
item._isPadding = false; item._isPadding = false;
item._parent = parent; item._parent = parent;
item.name = parent.message ? parent.message : nls.localize('rowDetailView.loadError', 'Loading Error...'); item.name = parent.message ? parent.message : nls.localize('rowDetailView.loadError', "Loading Error...");
parent._child = item; parent._child = item;
return item; return item;
} }
@@ -126,7 +126,7 @@ export class AccountDialog extends Modal {
@ILogService logService: ILogService @ILogService logService: ILogService
) { ) {
super( super(
localize('linkedAccounts', 'Linked accounts'), localize('linkedAccounts', "Linked accounts"),
TelemetryKeys.Accounts, TelemetryKeys.Accounts,
telemetryService, telemetryService,
layoutService, layoutService,
@@ -164,7 +164,7 @@ export class AccountDialog extends Modal {
public render() { public render() {
super.render(); super.render();
attachModalDialogStyler(this, this._themeService); 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(); this.registerListeners();
} }
@@ -176,14 +176,14 @@ export class AccountDialog extends Modal {
this._noaccountViewContainer = DOM.$('div.no-account-view'); this._noaccountViewContainer = DOM.$('div.no-account-view');
const noAccountTitle = DOM.append(this._noaccountViewContainer, DOM.$('.no-account-view-label')); 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; noAccountTitle.innerText = noAccountLabel;
// Show the add account button for the first provider // 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 // 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')); const buttonSection = DOM.append(this._noaccountViewContainer, DOM.$('div.button-section'));
this._addAccountButton = new Button(buttonSection); 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(() => { this._register(this._addAccountButton.onDidClick(() => {
(<IProviderViewUiComponent>values(this._providerViewsMap)[0]).addAccountAction.run(); (<IProviderViewUiComponent>values(this._providerViewsMap)[0]).addAccountAction.run();
})); }));
@@ -12,7 +12,7 @@ import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMess
export class AccountDialogController { export class AccountDialogController {
// MEMBER VARIABLES //////////////////////////////////////////////////// // MEMBER VARIABLES ////////////////////////////////////////////////////
private _addAccountErrorTitle = localize('accountDialog.addAccountErrorTitle', 'Error adding account'); private _addAccountErrorTitle = localize('accountDialog.addAccountErrorTitle', "Error adding account");
private _accountDialog: AccountDialog; private _accountDialog: AccountDialog;
public get accountDialog(): AccountDialog { return this._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 { public renderElement(account: azdata.Account, index: number, templateData: AccountListTemplate): void {
super.renderElement(account, index, templateData); super.renderElement(account, index, templateData);
if (account.isStale) { 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 { } else {
templateData.content.innerText = ''; templateData.content.innerText = '';
} }
@@ -21,11 +21,11 @@ const account: IJSONSchema = {
type: 'object', type: 'object',
properties: { properties: {
id: { 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' type: 'string'
}, },
icon: { 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: [{ anyOf: [{
type: 'string' type: 'string'
}, },
@@ -33,11 +33,11 @@ const account: IJSONSchema = {
type: 'object', type: 'object',
properties: { properties: {
light: { 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' type: 'string'
}, },
dark: { 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' type: 'string'
} }
} }
@@ -74,8 +74,8 @@ export class AutoOAuthDialog extends Modal {
this.backButton.onDidClick(() => this.cancel()); this.backButton.onDidClick(() => this.cancel());
this._register(attachButtonStyler(this.backButton, this._themeService, { buttonBackground: SIDE_BAR_BACKGROUND, buttonHoverBackground: SIDE_BAR_BACKGROUND })); 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._copyAndOpenButton = this.addFooterButton(localize('copyAndOpen', "Copy & Open"), () => this.addAccount());
this._closeButton = this.addFooterButton(localize('oauthDialog.cancel', 'Cancel'), () => this.cancel()); this._closeButton = this.addFooterButton(localize('oauthDialog.cancel', "Cancel"), () => this.cancel());
this.registerListeners(); this.registerListeners();
this._userCodeInputBox.disable(); this._userCodeInputBox.disable();
this._websiteInputBox.disable(); this._websiteInputBox.disable();
@@ -90,8 +90,8 @@ export class AutoOAuthDialog extends Modal {
this._descriptionElement = append(body, $('.auto-oauth-description-section.new-section')); this._descriptionElement = append(body, $('.auto-oauth-description-section.new-section'));
const addAccountSection = append(body, $('.auto-oauth-info-section.new-section')); const addAccountSection = append(body, $('.auto-oauth-info-section.new-section'));
this._userCodeInputBox = this.createInputBoxHelper(addAccountSection, localize('userCode', 'User code')); this._userCodeInputBox = this.createInputBoxHelper(addAccountSection, localize('userCode', "User code"));
this._websiteInputBox = this.createInputBoxHelper(addAccountSection, localize('website', 'Website')); this._websiteInputBox = this.createInputBoxHelper(addAccountSection, localize('website', "Website"));
} }
private createInputBoxHelper(container: HTMLElement, label: string): InputBox { 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> { public openAutoOAuthDialog(providerId: string, title: string, message: string, userCode: string, uri: string): Thenable<void> {
if (this._providerId !== null) { if (this._providerId !== null) {
// If a oauth flyout is already open, return an error // 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); this._errorMessageService.showDialog(Severity.Error, '', errorMessage);
return Promise.reject(new Error('Auto OAuth dialog already open')); 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 = DOM.append(textDescriptionContainer, DOM.$('a.help-link'));
this._helpLink.setAttribute('href', firewallHelpUri); 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._helpLink.onclick = () => {
this._windowsService.openExternal(firewallHelpUri); this._windowsService.openExternal(firewallHelpUri);
}; };
@@ -140,7 +140,7 @@ export class FirewallRuleDialog extends Modal {
this._accountPickerService.renderAccountPicker(DOM.append(azureAccountSection, DOM.$('.dialog-input'))); this._accountPickerService.renderAccountPicker(DOM.append(azureAccountSection, DOM.$('.dialog-input')));
const firewallRuleSection = DOM.append(body, DOM.$('.firewall-rule-section.new-section')); 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); this.createLabelElement(firewallRuleSection, firewallRuleLabel, true);
const radioContainer = DOM.append(firewallRuleSection, DOM.$('.radio-section')); const radioContainer = DOM.append(firewallRuleSection, DOM.$('.radio-section'));
const form = DOM.append(radioContainer, DOM.$('form.firewall-rule')); 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('name', 'firewallRuleChoice');
this._IPAddressInput.setAttribute('value', 'ipAddress'); this._IPAddressInput.setAttribute('value', 'ipAddress');
const IPAddressDescription = DOM.append(IPAddressContainer, DOM.$('div.option-description')); 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')); this._IPAddressElement = DOM.append(IPAddressContainer, DOM.$('div.option-ip-address'));
const subnetIpRangeContainer = DOM.append(subnetIPRangeDiv, DOM.$('div.option-container')); 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('name', 'firewallRuleChoice');
this._subnetIPRangeInput.setAttribute('value', 'ipRange'); this._subnetIPRangeInput.setAttribute('value', 'ipRange');
const subnetIPRangeDescription = DOM.append(subnetIpRangeContainer, DOM.$('div.option-description')); 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 subnetIPRangeSection = DOM.append(subnetIPRangeDiv, DOM.$('.subnet-ip-range-input'));
const inputContainer = DOM.append(subnetIPRangeSection, DOM.$('.dialog-input-section')); const inputContainer = DOM.append(subnetIPRangeSection, DOM.$('.dialog-input-section'));
@@ -21,8 +21,8 @@ export class FirewallRuleDialogController {
private _connection: IConnectionProfile; private _connection: IConnectionProfile;
private _resourceProviderId: string; private _resourceProviderId: string;
private _addAccountErrorTitle = localize('firewallDialog.addAccountErrorTitle', 'Error adding account'); private _addAccountErrorTitle = localize('firewallDialog.addAccountErrorTitle', "Error adding account");
private _firewallRuleErrorTitle = localize('firewallRuleError', 'Firewall rule error'); private _firewallRuleErrorTitle = localize('firewallRuleError', "Firewall rule error");
private _deferredPromise: Deferred<boolean>; private _deferredPromise: Deferred<boolean>;
constructor( constructor(
@@ -20,7 +20,7 @@ import { ILogService } from 'vs/platform/log/common/log';
export class AddAccountAction extends Action { export class AddAccountAction extends Action {
// CONSTANTS /////////////////////////////////////////////////////////// // CONSTANTS ///////////////////////////////////////////////////////////
public static ID = 'account.addLinkedAccount'; public static ID = 'account.addLinkedAccount';
public static LABEL = localize('addAccount', 'Add an account'); public static LABEL = localize('addAccount', "Add an account");
// EVENTING //////////////////////////////////////////////////////////// // EVENTING ////////////////////////////////////////////////////////////
private _addAccountCompleteEmitter: Emitter<void>; private _addAccountCompleteEmitter: Emitter<void>;
@@ -67,7 +67,7 @@ export class AddAccountAction extends Action {
*/ */
export class RemoveAccountAction extends Action { export class RemoveAccountAction extends Action {
public static ID = 'account.removeAccount'; public static ID = 'account.removeAccount';
public static LABEL = localize('removeAccount', 'Remove account'); public static LABEL = localize('removeAccount', "Remove account");
constructor( constructor(
private _account: azdata.Account, private _account: azdata.Account,
@@ -82,8 +82,8 @@ export class RemoveAccountAction extends Action {
// Ask for Confirm // Ask for Confirm
const confirm: IConfirmation = { const confirm: IConfirmation = {
message: localize('confirmRemoveUserAccountMessage', "Are you sure you want to remove '{0}'?", this._account.displayInfo.displayName), message: localize('confirmRemoveUserAccountMessage', "Are you sure you want to remove '{0}'?", this._account.displayInfo.displayName),
primaryButton: localize('accountActions.yes', 'Yes'), primaryButton: localize('accountActions.yes', "Yes"),
secondaryButton: localize('accountActions.no', 'No'), secondaryButton: localize('accountActions.no', "No"),
type: 'question' type: 'question'
}; };
@@ -95,7 +95,7 @@ export class RemoveAccountAction extends Action {
// Must handle here as this is an independent action // Must handle here as this is an independent action
this._notificationService.notify({ this._notificationService.notify({
severity: Severity.Error, severity: Severity.Error,
message: localize('removeAccountFailed', 'Failed to remove account') message: localize('removeAccountFailed', "Failed to remove account")
}); });
return false; return false;
}); });
@@ -109,7 +109,7 @@ export class RemoveAccountAction extends Action {
*/ */
export class ApplyFilterAction extends Action { export class ApplyFilterAction extends Action {
public static ID = 'account.applyFilters'; public static ID = 'account.applyFilters';
public static LABEL = localize('applyFilters', 'Apply Filters'); public static LABEL = localize('applyFilters', "Apply Filters");
constructor( constructor(
id: string, id: string,
@@ -129,7 +129,7 @@ export class ApplyFilterAction extends Action {
*/ */
export class RefreshAccountAction extends Action { export class RefreshAccountAction extends Action {
public static ID = 'account.refresh'; 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; public account: azdata.Account;
constructor( constructor(
@@ -148,7 +148,7 @@ export class RefreshAccountAction extends Action {
} }
)); ));
} else { } 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); return Promise.reject(errorMessage);
} }
} }
@@ -446,7 +446,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
} }
let tokenFillSuccess = await this.fillInOrClearAzureToken(connection); let tokenFillSuccess = await this.fillInOrClearAzureToken(connection);
if (!tokenFillSuccess) { if (!tokenFillSuccess) {
throw new Error(nls.localize('connection.noAzureAccount', 'Failed to get Azure account token for connection')); throw new Error(nls.localize('connection.noAzureAccount', "Failed to get Azure account token for connection"));
} }
this.createNewConnection(uri, connection).then(connectionResult => { this.createNewConnection(uri, connection).then(connectionResult => {
if (connectionResult && connectionResult.connected) { if (connectionResult && connectionResult.connected) {
@@ -485,7 +485,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
}); });
} else { } else {
if (callbacks.onConnectReject) { if (callbacks.onConnectReject) {
callbacks.onConnectReject(nls.localize('connectionNotAcceptedError', 'Connection Not Accepted')); callbacks.onConnectReject(nls.localize('connectionNotAcceptedError', "Connection Not Accepted"));
} }
resolve(connectionResult); resolve(connectionResult);
} }
@@ -500,7 +500,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
private handleConnectionError(connection: IConnectionProfile, uri: string, options: IConnectionCompletionOptions, callbacks: IConnectionCallbacks, connectionResult: IConnectionResult) { private handleConnectionError(connection: IConnectionProfile, uri: string, options: IConnectionCompletionOptions, callbacks: IConnectionCallbacks, connectionResult: IConnectionResult) {
return new Promise<IConnectionResult>((resolve, reject) => { return new Promise<IConnectionResult>((resolve, reject) => {
let connectionNotAcceptedError = nls.localize('connectionNotAcceptedError', 'Connection Not Accepted'); let connectionNotAcceptedError = nls.localize('connectionNotAcceptedError', "Connection Not Accepted");
if (options.showFirewallRuleOnError && connectionResult.errorCode) { if (options.showFirewallRuleOnError && connectionResult.errorCode) {
this.handleFirewallRuleError(connection, connectionResult).then(success => { this.handleFirewallRuleError(connection, connectionResult).then(success => {
if (success) { if (success) {
@@ -1068,11 +1068,11 @@ export class ConnectionManagementService extends Disposable implements IConnecti
return new Promise<boolean>((resolve, reject) => { return new Promise<boolean>((resolve, reject) => {
// Setup our cancellation choices // Setup our cancellation choices
let choices: { key, value }[] = [ let choices: { key, value }[] = [
{ key: nls.localize('connectionService.yes', 'Yes'), value: true }, { key: nls.localize('connectionService.yes', "Yes"), value: true },
{ key: nls.localize('connectionService.no', 'No'), value: false } { key: nls.localize('connectionService.no', "No"), value: false }
]; ];
self._quickInputService.pick(choices.map(x => x.key), { placeHolder: nls.localize('cancelConnectionConfirmation', 'Are you sure you want to cancel this connection?'), ignoreFocusLost: true }).then((choice) => { self._quickInputService.pick(choices.map(x => x.key), { placeHolder: nls.localize('cancelConnectionConfirmation', "Are you sure you want to cancel this connection?"), ignoreFocusLost: true }).then((choice) => {
let confirm = choices.find(x => x.key === choice); let confirm = choices.find(x => x.key === choice);
resolve(confirm && confirm.value); resolve(confirm && confirm.value);
}); });
@@ -113,7 +113,7 @@ const dashboardPropertyFlavorContrib: IJSONSchema = {
type: 'object', type: 'object',
properties: { properties: {
id: { id: {
description: nls.localize('dashboard.properties.flavor.id', 'Id of the flavor'), description: nls.localize('dashboard.properties.flavor.id', "Id of the flavor"),
type: 'string' type: 'string'
}, },
condition: { condition: {
@@ -77,7 +77,7 @@ export interface IInsightRegistry {
} }
class InsightRegistry implements IInsightRegistry { class InsightRegistry implements IInsightRegistry {
private _insightSchema: IJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets.InsightsRegistry', 'Widget used in the dashboards'), properties: {}, additionalProperties: false }; private _insightSchema: IJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets.InsightsRegistry', "Widget used in the dashboards"), properties: {}, additionalProperties: false };
private _extensionInsights: { [x: string]: IInsightsConfig } = {}; private _extensionInsights: { [x: string]: IInsightsConfig } = {};
private _idToCtor: { [x: string]: Type<IInsightsView> } = {}; private _idToCtor: { [x: string]: Type<IInsightsView> } = {};
@@ -31,9 +31,9 @@ export interface IDashboardWidgetRegistry {
} }
class DashboardWidgetRegistry implements IDashboardWidgetRegistry { class DashboardWidgetRegistry implements IDashboardWidgetRegistry {
private _allSchema: CustomIJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets.all', 'Widget used in the dashboards'), properties: {}, extensionProperties: {}, additionalProperties: false }; private _allSchema: CustomIJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets.all', "Widget used in the dashboards"), properties: {}, extensionProperties: {}, additionalProperties: false };
private _dashboardWidgetSchema: CustomIJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets.database', 'Widget used in the dashboards'), properties: {}, extensionProperties: {}, additionalProperties: false }; private _dashboardWidgetSchema: CustomIJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets.database', "Widget used in the dashboards"), properties: {}, extensionProperties: {}, additionalProperties: false };
private _serverWidgetSchema: CustomIJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets.server', 'Widget used in the dashboards'), properties: {}, extensionProperties: {}, additionalProperties: false }; private _serverWidgetSchema: CustomIJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets.server', "Widget used in the dashboards"), properties: {}, extensionProperties: {}, additionalProperties: false };
/** /**
* Register a dashboard widget * Register a dashboard widget
@@ -37,8 +37,8 @@ export class DialogTab extends ModelViewPane {
} }
export class Dialog extends ModelViewPane { export class Dialog extends ModelViewPane {
private static readonly DONE_BUTTON_LABEL = localize('dialogModalDoneButtonLabel', 'Done'); private static readonly DONE_BUTTON_LABEL = localize('dialogModalDoneButtonLabel', "Done");
private static readonly CANCEL_BUTTON_LABEL = localize('dialogModalCancelButtonLabel', 'Cancel'); private static readonly CANCEL_BUTTON_LABEL = localize('dialogModalCancelButtonLabel', "Cancel");
public content: string | DialogTab[]; public content: string | DialogTab[];
public isWide: boolean; public isWide: boolean;
@@ -70,8 +70,8 @@ export class FileBrowserService implements IFileBrowserService {
let fileTree = this.convertFileTree(null, fileBrowserOpenedParams.fileTree.rootNode, fileBrowserOpenedParams.fileTree.selectedNode.fullPath, fileBrowserOpenedParams.ownerUri); let fileTree = this.convertFileTree(null, fileBrowserOpenedParams.fileTree.rootNode, fileBrowserOpenedParams.fileTree.selectedNode.fullPath, fileBrowserOpenedParams.ownerUri);
this._onAddFileTree.fire({ rootNode: fileTree.rootNode, selectedNode: fileTree.selectedNode, expandedNodes: fileTree.expandedNodes }); this._onAddFileTree.fire({ rootNode: fileTree.rootNode, selectedNode: fileTree.selectedNode, expandedNodes: fileTree.expandedNodes });
} else { } else {
let genericErrorMessage = localize('fileBrowserErrorMessage', 'An error occured while loading the file browser.'); let genericErrorMessage = localize('fileBrowserErrorMessage', "An error occured while loading the file browser.");
let errorDialogTitle = localize('fileBrowserErrorDialogTitle', 'File browser error'); let errorDialogTitle = localize('fileBrowserErrorDialogTitle', "File browser error");
let errorMessage = strings.isFalsyOrWhitespace(fileBrowserOpenedParams.message) ? genericErrorMessage : fileBrowserOpenedParams.message; let errorMessage = strings.isFalsyOrWhitespace(fileBrowserOpenedParams.message) ? genericErrorMessage : fileBrowserOpenedParams.message;
this._errorMessageService.showDialog(Severity.Error, errorDialogTitle, errorMessage); this._errorMessageService.showDialog(Severity.Error, errorDialogTitle, errorMessage);
} }
@@ -21,8 +21,8 @@ import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMessageService'; import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMessageService';
import { JobManagementView } from 'sql/workbench/parts/jobManagement/browser/jobManagementView'; import { JobManagementView } from 'sql/workbench/parts/jobManagement/browser/jobManagementView';
export const successLabel: string = nls.localize('jobaction.successLabel', 'Success'); export const successLabel: string = nls.localize('jobaction.successLabel', "Success");
export const errorLabel: string = nls.localize('jobaction.faillabel', 'Error'); export const errorLabel: string = nls.localize('jobaction.faillabel', "Error");
export enum JobActions { export enum JobActions {
Run = 'run', Run = 'run',
@@ -104,7 +104,7 @@ export class RunJobAction extends Action {
return new Promise<boolean>((resolve, reject) => { return new Promise<boolean>((resolve, reject) => {
this.jobManagementService.jobAction(ownerUri, jobName, JobActions.Run).then(async (result) => { this.jobManagementService.jobAction(ownerUri, jobName, JobActions.Run).then(async (result) => {
if (result.success) { if (result.success) {
let startMsg = nls.localize('jobSuccessfullyStarted', ': The job was successfully started.'); let startMsg = nls.localize('jobSuccessfullyStarted', ": The job was successfully started.");
this.notificationService.info(jobName + startMsg); this.notificationService.info(jobName + startMsg);
await refreshAction.run(context); await refreshAction.run(context);
resolve(true); resolve(true);
@@ -140,7 +140,7 @@ export class StopJobAction extends Action {
this.jobManagementService.jobAction(ownerUri, jobName, JobActions.Stop).then(async (result) => { this.jobManagementService.jobAction(ownerUri, jobName, JobActions.Stop).then(async (result) => {
if (result.success) { if (result.success) {
await refreshAction.run(context); await refreshAction.run(context);
let stopMsg = nls.localize('jobSuccessfullyStopped', ': The job was successfully stopped.'); let stopMsg = nls.localize('jobSuccessfullyStopped', ": The job was successfully stopped.");
this.notificationService.info(jobName + stopMsg); this.notificationService.info(jobName + stopMsg);
resolve(true); resolve(true);
} else { } else {
@@ -200,7 +200,7 @@ export class DeleteJobAction extends Action {
job.name, result.errorMessage ? result.errorMessage : 'Unknown error'); job.name, result.errorMessage ? result.errorMessage : 'Unknown error');
self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage); self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage);
} else { } else {
let successMessage = nls.localize('jobaction.deletedJob', 'The job was successfully deleted'); let successMessage = nls.localize('jobaction.deletedJob', "The job was successfully deleted");
self._notificationService.info(successMessage); self._notificationService.info(successMessage);
} }
}); });
@@ -268,7 +268,7 @@ export class DeleteStepAction extends Action {
self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage); self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage);
await refreshAction.run(actionInfo); await refreshAction.run(actionInfo);
} else { } else {
let successMessage = nls.localize('jobaction.deletedStep', 'The job step was successfully deleted'); let successMessage = nls.localize('jobaction.deletedStep', "The job step was successfully deleted");
self._notificationService.info(successMessage); self._notificationService.info(successMessage);
} }
}); });
@@ -357,7 +357,7 @@ export class DeleteAlertAction extends Action {
alert.name, result.errorMessage ? result.errorMessage : 'Unknown error'); alert.name, result.errorMessage ? result.errorMessage : 'Unknown error');
self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage); self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage);
} else { } else {
let successMessage = nls.localize('jobaction.deletedAlert', 'The alert was successfully deleted'); let successMessage = nls.localize('jobaction.deletedAlert', "The alert was successfully deleted");
self._notificationService.info(successMessage); self._notificationService.info(successMessage);
} }
}); });
@@ -443,7 +443,7 @@ export class DeleteOperatorAction extends Action {
operator.name, result.errorMessage ? result.errorMessage : 'Unknown error'); operator.name, result.errorMessage ? result.errorMessage : 'Unknown error');
self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage); self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage);
} else { } else {
let successMessage = nls.localize('joaction.deletedOperator', 'The operator was deleted successfully'); let successMessage = nls.localize('joaction.deletedOperator', "The operator was deleted successfully");
self._notificationService.info(successMessage); self._notificationService.info(successMessage);
} }
}); });
@@ -538,7 +538,7 @@ export class DeleteProxyAction extends Action {
proxy.accountName, result.errorMessage ? result.errorMessage : 'Unknown error'); proxy.accountName, result.errorMessage ? result.errorMessage : 'Unknown error');
self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage); self._errorMessageService.showDialog(Severity.Error, errorLabel, errorMessage);
} else { } else {
let successMessage = nls.localize('jobaction.deletedProxy', 'The proxy was deleted successfully'); let successMessage = nls.localize('jobaction.deletedProxy', "The proxy was deleted successfully");
self._notificationService.info(successMessage); self._notificationService.info(successMessage);
} }
}); });
@@ -13,36 +13,36 @@ export class JobManagementUtilities {
public static convertToStatusString(status: number): string { public static convertToStatusString(status: number): string {
switch (status) { switch (status) {
case (0): return nls.localize('agentUtilities.failed', 'Failed'); case (0): return nls.localize('agentUtilities.failed', "Failed");
case (1): return nls.localize('agentUtilities.succeeded', 'Succeeded'); case (1): return nls.localize('agentUtilities.succeeded', "Succeeded");
case (2): return nls.localize('agentUtilities.retry', 'Retry'); case (2): return nls.localize('agentUtilities.retry', "Retry");
case (3): return nls.localize('agentUtilities.canceled', 'Cancelled'); case (3): return nls.localize('agentUtilities.canceled', "Cancelled");
case (4): return nls.localize('agentUtilities.inProgress', 'In Progress'); case (4): return nls.localize('agentUtilities.inProgress', "In Progress");
case (5): return nls.localize('agentUtilities.statusUnknown', 'Status Unknown'); case (5): return nls.localize('agentUtilities.statusUnknown', "Status Unknown");
default: return nls.localize('agentUtilities.statusUnknown', 'Status Unknown'); default: return nls.localize('agentUtilities.statusUnknown', "Status Unknown");
} }
} }
public static convertToExecutionStatusString(status: number): string { public static convertToExecutionStatusString(status: number): string {
switch (status) { switch (status) {
case (1): return nls.localize('agentUtilities.executing', 'Executing'); case (1): return nls.localize('agentUtilities.executing', "Executing");
case (2): return nls.localize('agentUtilities.waitingForThread', 'Waiting for Thread'); case (2): return nls.localize('agentUtilities.waitingForThread', "Waiting for Thread");
case (3): return nls.localize('agentUtilities.betweenRetries', 'Between Retries'); case (3): return nls.localize('agentUtilities.betweenRetries', "Between Retries");
case (4): return nls.localize('agentUtilities.idle', 'Idle'); case (4): return nls.localize('agentUtilities.idle', "Idle");
case (5): return nls.localize('agentUtilities.suspended', 'Suspended'); case (5): return nls.localize('agentUtilities.suspended', "Suspended");
case (6): return nls.localize('agentUtilities.obsolete', '[Obsolete]'); case (6): return nls.localize('agentUtilities.obsolete', "[Obsolete]");
case (7): return 'PerformingCompletionActions'; case (7): return 'PerformingCompletionActions';
default: return nls.localize('agentUtilities.statusUnknown', 'Status Unknown'); default: return nls.localize('agentUtilities.statusUnknown', "Status Unknown");
} }
} }
public static convertToResponse(bool: boolean) { public static convertToResponse(bool: boolean) {
return bool ? nls.localize('agentUtilities.yes', 'Yes') : nls.localize('agentUtilities.no', 'No'); return bool ? nls.localize('agentUtilities.yes', "Yes") : nls.localize('agentUtilities.no', "No");
} }
public static convertToNextRun(date: string) { public static convertToNextRun(date: string) {
if (date.includes('1/1/0001')) { if (date.includes('1/1/0001')) {
return nls.localize('agentUtilities.notScheduled', 'Not Scheduled'); return nls.localize('agentUtilities.notScheduled', "Not Scheduled");
} else { } else {
return date; return date;
} }
@@ -50,7 +50,7 @@ export class JobManagementUtilities {
public static convertToLastRun(date: string) { public static convertToLastRun(date: string) {
if (date.includes('1/1/0001')) { if (date.includes('1/1/0001')) {
return nls.localize('agentUtilities.neverRun', 'Never Run'); return nls.localize('agentUtilities.neverRun', "Never Run");
} else { } else {
return date; return date;
} }
@@ -164,7 +164,7 @@ export class QueryModelService implements IQueryModelService {
public showCommitError(error: string): void { public showCommitError(error: string): void {
this._notificationService.notify({ this._notificationService.notify({
severity: Severity.Error, severity: Severity.Error,
message: nls.localize('commitEditFailed', 'Commit row failed: ') + error message: nls.localize('commitEditFailed', "Commit row failed: ") + error
}); });
} }
@@ -480,7 +480,7 @@ export class QueryModelService implements IQueryModelService {
return queryRunner.updateCell(ownerUri, rowId, columnId, newValue).then((result) => result, error => { return queryRunner.updateCell(ownerUri, rowId, columnId, newValue).then((result) => result, error => {
this._notificationService.notify({ this._notificationService.notify({
severity: Severity.Error, severity: Severity.Error,
message: nls.localize('updateCellFailed', 'Update cell failed: ') + error.message message: nls.localize('updateCellFailed', "Update cell failed: ") + error.message
}); });
return Promise.reject(error); return Promise.reject(error);
}); });
@@ -495,7 +495,7 @@ export class QueryModelService implements IQueryModelService {
return queryRunner.commitEdit(ownerUri).then(() => { }, error => { return queryRunner.commitEdit(ownerUri).then(() => { }, error => {
this._notificationService.notify({ this._notificationService.notify({
severity: Severity.Error, severity: Severity.Error,
message: nls.localize('commitEditFailed', 'Commit row failed: ') + error.message message: nls.localize('commitEditFailed', "Commit row failed: ") + error.message
}); });
return Promise.reject(error); return Promise.reject(error);
}); });
+1 -1
View File
@@ -467,7 +467,7 @@ export default class QueryRunner extends Disposable {
} }
resolve(result); resolve(result);
}, error => { }, error => {
// let errorMessage = nls.localize('query.moreRowsFailedError', 'Something went wrong getting more rows:'); // let errorMessage = nls.localize('query.moreRowsFailedError', "Something went wrong getting more rows:");
// self._notificationService.notify({ // self._notificationService.notify({
// severity: Severity.Error, // severity: Severity.Error,
// message: `${errorMessage} ${error}` // message: `${errorMessage} ${error}`
@@ -150,7 +150,7 @@ export class TaskService implements ITaskService {
} }
public beforeShutdown(): Promise<boolean> { public beforeShutdown(): Promise<boolean> {
const message = localize('InProgressWarning', '1 or more tasks are in progress. Are you sure you want to quit?'); const message = localize('InProgressWarning', "1 or more tasks are in progress. Are you sure you want to quit?");
const options = [ const options = [
localize('taskService.yes', "Yes"), localize('taskService.yes', "Yes"),
localize('taskService.no', "No") localize('taskService.no', "No")
+2 -2
View File
@@ -7,8 +7,8 @@ import { registerColor, foreground } from 'vs/platform/theme/common/colorRegistr
import { Color, RGBA } from 'vs/base/common/color'; import { Color, RGBA } from 'vs/base/common/color';
import * as nls from 'vs/nls'; import * as nls from 'vs/nls';
export const tableHeaderBackground = registerColor('table.headerBackground', { dark: new Color(new RGBA(51, 51, 52)), light: new Color(new RGBA(245, 245, 245)), hc: '#333334' }, nls.localize('tableHeaderBackground', 'Table header background color')); export const tableHeaderBackground = registerColor('table.headerBackground', { dark: new Color(new RGBA(51, 51, 52)), light: new Color(new RGBA(245, 245, 245)), hc: '#333334' }, nls.localize('tableHeaderBackground', "Table header background color"));
export const tableHeaderForeground = registerColor('table.headerForeground', { dark: new Color(new RGBA(229, 229, 229)), light: new Color(new RGBA(16, 16, 16)), hc: '#e5e5e5' }, nls.localize('tableHeaderForeground', 'Table header foreground color')); export const tableHeaderForeground = registerColor('table.headerForeground', { dark: new Color(new RGBA(229, 229, 229)), light: new Color(new RGBA(16, 16, 16)), hc: '#e5e5e5' }, nls.localize('tableHeaderForeground', "Table header foreground color"));
export const disabledInputBackground = registerColor('input.disabled.background', { dark: '#444444', light: '#dcdcdc', hc: Color.black }, nls.localize('disabledInputBoxBackground', "Disabled Input box background.")); export const disabledInputBackground = registerColor('input.disabled.background', { dark: '#444444', light: '#dcdcdc', hc: Color.black }, nls.localize('disabledInputBoxBackground', "Disabled Input box background."));
export const disabledInputForeground = registerColor('input.disabled.foreground', { dark: '#888888', light: '#888888', hc: foreground }, nls.localize('disabledInputBoxForeground', "Disabled Input box foreground.")); export const disabledInputForeground = registerColor('input.disabled.foreground', { dark: '#888888', light: '#888888', hc: foreground }, nls.localize('disabledInputBoxForeground', "Disabled Input box foreground."));
export const buttonFocusOutline = registerColor('button.focusOutline', { dark: '#eaeaea', light: '#666666', hc: null }, nls.localize('buttonFocusOutline', "Button outline color when focused.")); export const buttonFocusOutline = registerColor('button.focusOutline', { dark: '#eaeaea', light: '#666666', hc: null }, nls.localize('buttonFocusOutline', "Button outline color when focused."));
@@ -578,7 +578,7 @@ class ComponentWrapper implements azdata.Component {
public addItem(item: azdata.Component, itemLayout?: any, index?: number): void { public addItem(item: azdata.Component, itemLayout?: any, index?: number): void {
let itemImpl = item as ComponentWrapper; let itemImpl = item as ComponentWrapper;
if (!itemImpl) { if (!itemImpl) {
throw new Error(nls.localize('unknownComponentType', 'Unkown component type. Must use ModelBuilder to create objects')); throw new Error(nls.localize('unknownComponentType', "Unkown component type. Must use ModelBuilder to create objects"));
} }
let config = new InternalItemConfig(itemImpl, itemLayout); let config = new InternalItemConfig(itemImpl, itemLayout);
if (index !== undefined && index >= 0 && index < this.items.length) { if (index !== undefined && index >= 0 && index < this.items.length) {
@@ -586,7 +586,7 @@ class ComponentWrapper implements azdata.Component {
} else if (!index) { } else if (!index) {
this.itemConfigs.push(config); this.itemConfigs.push(config);
} else { } else {
throw new Error(nls.localize('invalidIndex', 'The index is invalid.')); throw new Error(nls.localize('invalidIndex', "The index is invalid."));
} }
this._proxy.$addToContainer(this._handle, this.id, config.toIItemConfig(), index).then(undefined, (err) => this.handleError(err)); this._proxy.$addToContainer(this._handle, this.id, config.toIItemConfig(), index).then(undefined, (err) => this.handleError(err));
} }
@@ -1458,7 +1458,7 @@ class ModelViewImpl implements azdata.ModelView {
this._component = component; this._component = component;
let componentImpl = <any>component as ComponentWrapper; let componentImpl = <any>component as ComponentWrapper;
if (!componentImpl) { if (!componentImpl) {
return Promise.reject(nls.localize('unknownConfig', 'Unkown component configuration, must use ModelBuilder to create a configuration object')); return Promise.reject(nls.localize('unknownConfig', "Unkown component configuration, must use ModelBuilder to create a configuration object"));
} }
return this._proxy.$initializeModel(this._handle, componentImpl.toComponentShape()); return this._proxy.$initializeModel(this._handle, componentImpl.toComponentShape());
} }
@@ -14,11 +14,11 @@ import * as azdata from 'azdata';
import { SqlMainContext, ExtHostModelViewDialogShape, MainThreadModelViewDialogShape, ExtHostModelViewShape, ExtHostBackgroundTaskManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol'; import { SqlMainContext, ExtHostModelViewDialogShape, MainThreadModelViewDialogShape, ExtHostModelViewShape, ExtHostBackgroundTaskManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
const DONE_LABEL = nls.localize('dialogDoneLabel', 'Done'); const DONE_LABEL = nls.localize('dialogDoneLabel', "Done");
const CANCEL_LABEL = nls.localize('dialogCancelLabel', 'Cancel'); const CANCEL_LABEL = nls.localize('dialogCancelLabel', "Cancel");
const GENERATE_SCRIPT_LABEL = nls.localize('generateScriptLabel', 'Generate script'); const GENERATE_SCRIPT_LABEL = nls.localize('generateScriptLabel', "Generate script");
const NEXT_LABEL = nls.localize('dialogNextLabel', 'Next'); const NEXT_LABEL = nls.localize('dialogNextLabel', "Next");
const PREVIOUS_LABEL = nls.localize('dialogPreviousLabel', 'Previous'); const PREVIOUS_LABEL = nls.localize('dialogPreviousLabel', "Previous");
class ModelViewPanelImpl implements azdata.window.ModelViewPanel { class ModelViewPanelImpl implements azdata.window.ModelViewPanel {
private _modelView: azdata.ModelView; private _modelView: azdata.ModelView;
@@ -212,7 +212,7 @@ export class ExtHostNotebook implements ExtHostNotebookShape {
//#region APIs called by extensions //#region APIs called by extensions
registerNotebookProvider(provider: azdata.nb.NotebookProvider): vscode.Disposable { registerNotebookProvider(provider: azdata.nb.NotebookProvider): vscode.Disposable {
if (!provider || !provider.providerId) { if (!provider || !provider.providerId) {
throw new Error(localize('providerRequired', 'A NotebookProvider with valid providerId must be passed to this method')); throw new Error(localize('providerRequired', "A NotebookProvider with valid providerId must be passed to this method"));
} }
const handle = this._addNewAdapter(provider); const handle = this._addNewAdapter(provider);
this._proxy.$registerNotebookProvider(provider.providerId, handle); this._proxy.$registerNotebookProvider(provider.providerId, handle);
@@ -263,7 +263,7 @@ export class ExtHostNotebook implements ExtHostNotebookShape {
private _withProvider<R>(handle: number, callback: (provider: azdata.nb.NotebookProvider) => R | PromiseLike<R>): Promise<R> { private _withProvider<R>(handle: number, callback: (provider: azdata.nb.NotebookProvider) => R | PromiseLike<R>): Promise<R> {
let provider = this._adapters.get(handle) as azdata.nb.NotebookProvider; let provider = this._adapters.get(handle) as azdata.nb.NotebookProvider;
if (provider === undefined) { if (provider === undefined) {
return Promise.reject(new Error(localize('errNoProvider', 'no notebook provider found'))); return Promise.reject(new Error(localize('errNoProvider', "no notebook provider found")));
} }
return Promise.resolve(callback(provider)); return Promise.resolve(callback(provider));
} }
@@ -271,7 +271,7 @@ export class ExtHostNotebook implements ExtHostNotebookShape {
private _withNotebookManager<R>(handle: number, callback: (manager: NotebookManagerAdapter) => R | PromiseLike<R>): Promise<R> { private _withNotebookManager<R>(handle: number, callback: (manager: NotebookManagerAdapter) => R | PromiseLike<R>): Promise<R> {
let manager = this._adapters.get(handle) as NotebookManagerAdapter; let manager = this._adapters.get(handle) as NotebookManagerAdapter;
if (manager === undefined) { if (manager === undefined) {
return Promise.reject(new Error(localize('errNoManager', 'No Manager found'))); return Promise.reject(new Error(localize('errNoManager', "No Manager found")));
} }
return this.callbackWithErrorWrap<R>(callback, manager); return this.callbackWithErrorWrap<R>(callback, manager);
} }
@@ -247,7 +247,7 @@ export class ExtHostNotebookDocumentsAndEditors implements ExtHostNotebookDocume
registerNavigationProvider(provider: azdata.nb.NavigationProvider): vscode.Disposable { registerNavigationProvider(provider: azdata.nb.NavigationProvider): vscode.Disposable {
if (!provider || !provider.providerId) { if (!provider || !provider.providerId) {
throw new Error(localize('providerRequired', 'A NotebookProvider with valid providerId must be passed to this method')); throw new Error(localize('providerRequired', "A NotebookProvider with valid providerId must be passed to this method"));
} }
const handle = this._addNewAdapter(provider); const handle = this._addNewAdapter(provider);
this._proxy.$registerNavigationProvider(provider.providerId, handle); this._proxy.$registerNavigationProvider(provider.providerId, handle);
+7 -7
View File
@@ -28,12 +28,12 @@ import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/la
export const MODAL_SHOWING_KEY = 'modalShowing'; export const MODAL_SHOWING_KEY = 'modalShowing';
export const MODAL_SHOWING_CONTEXT = new RawContextKey<Array<string>>(MODAL_SHOWING_KEY, []); export const MODAL_SHOWING_CONTEXT = new RawContextKey<Array<string>>(MODAL_SHOWING_KEY, []);
const INFO_ALT_TEXT = localize('infoAltText', 'Information'); const INFO_ALT_TEXT = localize('infoAltText', "Information");
const WARNING_ALT_TEXT = localize('warningAltText', 'Warning'); const WARNING_ALT_TEXT = localize('warningAltText', "Warning");
const ERROR_ALT_TEXT = localize('errorAltText', 'Error'); const ERROR_ALT_TEXT = localize('errorAltText', "Error");
const SHOW_DETAILS_TEXT = localize('showMessageDetails', 'Show Details'); const SHOW_DETAILS_TEXT = localize('showMessageDetails', "Show Details");
const COPY_TEXT = localize('copyMessage', 'Copy'); const COPY_TEXT = localize('copyMessage', "Copy");
const CLOSE_TEXT = localize('closeMessage', 'Close'); const CLOSE_TEXT = localize('closeMessage', "Close");
const MESSAGE_EXPANDED_MODE_CLASS = 'expanded'; const MESSAGE_EXPANDED_MODE_CLASS = 'expanded';
export interface IModalDialogStyles { export interface IModalDialogStyles {
@@ -300,7 +300,7 @@ export abstract class Modal extends Disposable implements IThemable {
private toggleMessageDetail() { private toggleMessageDetail() {
const isExpanded = DOM.hasClass(this._messageSummary, MESSAGE_EXPANDED_MODE_CLASS); const isExpanded = DOM.hasClass(this._messageSummary, MESSAGE_EXPANDED_MODE_CLASS);
DOM.toggleClass(this._messageSummary, MESSAGE_EXPANDED_MODE_CLASS, !isExpanded); DOM.toggleClass(this._messageSummary, MESSAGE_EXPANDED_MODE_CLASS, !isExpanded);
this._toggleMessageDetailButton.label = isExpanded ? SHOW_DETAILS_TEXT : localize('hideMessageDetails', 'Hide Details'); this._toggleMessageDetailButton.label = isExpanded ? SHOW_DETAILS_TEXT : localize('hideMessageDetails', "Hide Details");
if (this._messageDetailText) { if (this._messageDetailText) {
if (isExpanded) { if (isExpanded) {
@@ -106,8 +106,8 @@ export class OptionsDialog extends Modal {
this.backButton.onDidClick(() => this.cancel()); this.backButton.onDidClick(() => this.cancel());
attachButtonStyler(this.backButton, this._themeService, { buttonBackground: SIDE_BAR_BACKGROUND, buttonHoverBackground: SIDE_BAR_BACKGROUND }); attachButtonStyler(this.backButton, this._themeService, { buttonBackground: SIDE_BAR_BACKGROUND, buttonHoverBackground: SIDE_BAR_BACKGROUND });
} }
let okButton = this.addFooterButton(localize('optionsDialog.ok', 'OK'), () => this.ok()); let okButton = this.addFooterButton(localize('optionsDialog.ok', "OK"), () => this.ok());
let closeButton = this.addFooterButton(this.options.cancelLabel || localize('optionsDialog.cancel', 'Cancel'), () => this.cancel()); let closeButton = this.addFooterButton(this.options.cancelLabel || localize('optionsDialog.cancel', "Cancel"), () => this.cancel());
// Theme styler // Theme styler
attachButtonStyler(okButton, this._themeService); attachButtonStyler(okButton, this._themeService);
attachButtonStyler(closeButton, this._themeService); attachButtonStyler(closeButton, this._themeService);
@@ -25,8 +25,8 @@ export function createOptionElement(option: azdata.ServiceOption, rowContainer:
let optionValue = getOptionValueAndCategoryValues(option, options, possibleInputs); let optionValue = getOptionValueAndCategoryValues(option, options, possibleInputs);
let optionWidget: any; let optionWidget: any;
let inputElement: HTMLElement; let inputElement: HTMLElement;
let missingErrorMessage = localize('optionsDialog.missingRequireField', ' is required.'); let missingErrorMessage = localize('optionsDialog.missingRequireField', " is required.");
let invalidInputMessage = localize('optionsDialog.invalidInput', 'Invalid input. Numeric value expected.'); let invalidInputMessage = localize('optionsDialog.invalidInput', "Invalid input. Numeric value expected.");
if (option.valueType === ServiceOptionType.number) { if (option.valueType === ServiceOptionType.number) {
optionWidget = new InputBox(rowContainer, contextViewService, { optionWidget = new InputBox(rowContainer, contextViewService, {
@@ -279,7 +279,7 @@ export abstract class ContainerBase<T> extends ComponentBase {
} else if (!index) { } else if (!index) {
this.items.push(new ItemDescriptor(componentDescriptor, config)); this.items.push(new ItemDescriptor(componentDescriptor, config));
} else { } else {
throw new Error(nls.localize('invalidIndex', 'The index is invalid.')); throw new Error(nls.localize('invalidIndex', "The index is invalid."));
} }
this.modelStore.eventuallyRunOnComponent(componentDescriptor.id, component => component.registerEventHandler(event => { this.modelStore.eventuallyRunOnComponent(componentDescriptor.id, component => component.registerEventHandler(event => {
if (event.eventType === ComponentEventType.validityChanged) { if (event.eventType === ComponentEventType.validityChanged) {
@@ -62,7 +62,7 @@ export default class InputBoxComponent extends ComponentBase implements ICompone
return undefined; return undefined;
} else { } else {
return { return {
content: this.inputElement.inputElement.validationMessage || nls.localize('invalidValueError', 'Invalid value'), content: this.inputElement.inputElement.validationMessage || nls.localize('invalidValueError', "Invalid value"),
type: MessageType.ERROR type: MessageType.ERROR
}; };
} }
@@ -25,7 +25,7 @@ import * as nls from 'vs/nls';
` `
}) })
export default class LoadingComponent extends ComponentBase implements IComponent, OnDestroy, AfterViewInit { export default class LoadingComponent extends ComponentBase implements IComponent, OnDestroy, AfterViewInit {
private readonly _loadingTitle = nls.localize('loadingMessage', 'Loading'); private readonly _loadingTitle = nls.localize('loadingMessage', "Loading");
private _component: IComponentDescriptor; private _component: IComponentDescriptor;
@Input() descriptor: IComponentDescriptor; @Input() descriptor: IComponentDescriptor;
@@ -17,7 +17,7 @@ import * as nls from 'vs/nls';
` `
}) })
export default class LoadingSpinner { export default class LoadingSpinner {
private readonly _loadingTitle = nls.localize('loadingMessage', 'Loading'); private readonly _loadingTitle = nls.localize('loadingMessage', "Loading");
@Input() loading: boolean; @Input() loading: boolean;
} }
@@ -101,7 +101,7 @@ export class QueryTextEditor extends BaseTextEditor {
} }
protected getAriaLabel(): string { protected getAriaLabel(): string {
return nls.localize('queryTextEditorAriaLabel', 'modelview code editor for view model.'); return nls.localize('queryTextEditorAriaLabel', "modelview code editor for view model.");
} }
public layout(dimension?: DOM.Dimension) { public layout(dimension?: DOM.Dimension) {
@@ -24,26 +24,26 @@ Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions)
Registry.as<IConfigurationRegistry>(ConfigExtensions.Configuration).registerConfiguration({ Registry.as<IConfigurationRegistry>(ConfigExtensions.Configuration).registerConfiguration({
'id': 'previewFeatures', 'id': 'previewFeatures',
'title': nls.localize('previewFeatures.configTitle', 'Preview Features'), 'title': nls.localize('previewFeatures.configTitle', "Preview Features"),
'type': 'object', 'type': 'object',
'properties': { 'properties': {
'workbench.enablePreviewFeatures': { 'workbench.enablePreviewFeatures': {
'type': 'boolean', 'type': 'boolean',
'default': undefined, 'default': undefined,
'description': nls.localize('previewFeatures.configEnable', 'Enable unreleased preview features') 'description': nls.localize('previewFeatures.configEnable', "Enable unreleased preview features")
} }
} }
}); });
Registry.as<IConfigurationRegistry>(ConfigExtensions.Configuration).registerConfiguration({ Registry.as<IConfigurationRegistry>(ConfigExtensions.Configuration).registerConfiguration({
'id': 'showConnectDialogOnStartup', 'id': 'showConnectDialogOnStartup',
'title': nls.localize('showConnectDialogOnStartup', 'Show connect dialog on startup'), 'title': nls.localize('showConnectDialogOnStartup', "Show connect dialog on startup"),
'type': 'object', 'type': 'object',
'properties': { 'properties': {
'workbench.showConnectDialogOnStartup': { 'workbench.showConnectDialogOnStartup': {
'type': 'boolean', 'type': 'boolean',
'default': true, 'default': true,
'description': nls.localize('showConnectDialogOnStartup', 'Show connect dialog on startup') 'description': nls.localize('showConnectDialogOnStartup', "Show connect dialog on startup")
} }
} }
}); });
+17 -17
View File
@@ -44,7 +44,7 @@ export interface ManageActionContext extends BaseActionContext {
// --- actions // --- actions
export class NewQueryAction extends Task { export class NewQueryAction extends Task {
public static ID = 'newQuery'; public static ID = 'newQuery';
public static LABEL = nls.localize('newQueryAction.newQuery', 'New Query'); public static LABEL = nls.localize('newQueryAction.newQuery', "New Query");
public static ICON = 'new-query'; public static ICON = 'new-query';
constructor() { constructor() {
@@ -69,7 +69,7 @@ export class NewQueryAction extends Task {
export class ScriptSelectAction extends Action { export class ScriptSelectAction extends Action {
public static ID = 'selectTop'; public static ID = 'selectTop';
public static LABEL = nls.localize('scriptSelect', 'Select Top 1000'); public static LABEL = nls.localize('scriptSelect', "Select Top 1000");
constructor( constructor(
id: string, label: string, id: string, label: string,
@@ -93,7 +93,7 @@ export class ScriptSelectAction extends Action {
export class ScriptExecuteAction extends Action { export class ScriptExecuteAction extends Action {
public static ID = 'scriptExecute'; public static ID = 'scriptExecute';
public static LABEL = nls.localize('scriptExecute', 'Script as Execute'); public static LABEL = nls.localize('scriptExecute', "Script as Execute");
constructor( constructor(
id: string, label: string, id: string, label: string,
@@ -120,7 +120,7 @@ export class ScriptExecuteAction extends Action {
export class ScriptAlterAction extends Action { export class ScriptAlterAction extends Action {
public static ID = 'scriptAlter'; public static ID = 'scriptAlter';
public static LABEL = nls.localize('scriptAlter', 'Script as Alter'); public static LABEL = nls.localize('scriptAlter', "Script as Alter");
constructor( constructor(
id: string, label: string, id: string, label: string,
@@ -147,7 +147,7 @@ export class ScriptAlterAction extends Action {
export class EditDataAction extends Action { export class EditDataAction extends Action {
public static ID = 'editData'; public static ID = 'editData';
public static LABEL = nls.localize('editData', 'Edit Data'); public static LABEL = nls.localize('editData', "Edit Data");
constructor( constructor(
id: string, label: string, id: string, label: string,
@@ -198,7 +198,7 @@ export class ScriptCreateAction extends Action {
export class ScriptDeleteAction extends Action { export class ScriptDeleteAction extends Action {
public static ID = 'scriptDelete'; public static ID = 'scriptDelete';
public static LABEL = nls.localize('scriptDelete', 'Script as Drop'); public static LABEL = nls.localize('scriptDelete', "Script as Drop");
constructor( constructor(
id: string, label: string, id: string, label: string,
@@ -227,7 +227,7 @@ export const BackupFeatureName = 'backup';
export class BackupAction extends Task { export class BackupAction extends Task {
public static readonly ID = BackupFeatureName; public static readonly ID = BackupFeatureName;
public static readonly LABEL = nls.localize('backupAction.backup', 'Backup'); public static readonly LABEL = nls.localize('backupAction.backup', "Backup");
public static readonly ICON = BackupFeatureName; public static readonly ICON = BackupFeatureName;
constructor() { constructor() {
@@ -243,7 +243,7 @@ export class BackupAction extends Task {
const configurationService = accessor.get<IConfigurationService>(IConfigurationService); const configurationService = accessor.get<IConfigurationService>(IConfigurationService);
const previewFeaturesEnabled: boolean = configurationService.getValue('workbench')['enablePreviewFeatures']; const previewFeaturesEnabled: boolean = configurationService.getValue('workbench')['enablePreviewFeatures'];
if (!previewFeaturesEnabled) { if (!previewFeaturesEnabled) {
return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.isPreviewFeature', 'You must enable preview features in order to use backup')); return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.isPreviewFeature', "You must enable preview features in order to use backup"));
} }
const connectionManagementService = accessor.get<IConnectionManagementService>(IConnectionManagementService); const connectionManagementService = accessor.get<IConnectionManagementService>(IConnectionManagementService);
@@ -255,11 +255,11 @@ export class BackupAction extends Task {
if (profile) { if (profile) {
const serverInfo = connectionManagementService.getServerInfo(profile.id); const serverInfo = connectionManagementService.getServerInfo(profile.id);
if (serverInfo && serverInfo.isCloud && profile.providerName === mssqlProviderName) { if (serverInfo && serverInfo.isCloud && profile.providerName === mssqlProviderName) {
return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.commandNotSupported', 'Backup command is not supported for Azure SQL databases.')); return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.commandNotSupported', "Backup command is not supported for Azure SQL databases."));
} }
if (!profile.databaseName && profile.providerName === mssqlProviderName) { if (!profile.databaseName && profile.providerName === mssqlProviderName) {
return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.commandNotSupportedForServer', 'Backup command is not supported in Server Context. Please select a Database and try again.')); return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.commandNotSupportedForServer', "Backup command is not supported in Server Context. Please select a Database and try again."));
} }
} }
@@ -274,7 +274,7 @@ export const RestoreFeatureName = 'restore';
export class RestoreAction extends Task { export class RestoreAction extends Task {
public static readonly ID = RestoreFeatureName; public static readonly ID = RestoreFeatureName;
public static readonly LABEL = nls.localize('restoreAction.restore', 'Restore'); public static readonly LABEL = nls.localize('restoreAction.restore', "Restore");
public static readonly ICON = RestoreFeatureName; public static readonly ICON = RestoreFeatureName;
constructor() { constructor() {
@@ -290,7 +290,7 @@ export class RestoreAction extends Task {
const configurationService = accessor.get<IConfigurationService>(IConfigurationService); const configurationService = accessor.get<IConfigurationService>(IConfigurationService);
const previewFeaturesEnabled: boolean = configurationService.getValue('workbench')['enablePreviewFeatures']; const previewFeaturesEnabled: boolean = configurationService.getValue('workbench')['enablePreviewFeatures'];
if (!previewFeaturesEnabled) { if (!previewFeaturesEnabled) {
return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.isPreviewFeature', 'You must enable preview features in order to use restore')); return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.isPreviewFeature', "You must enable preview features in order to use restore"));
} }
let connectionManagementService = accessor.get<IConnectionManagementService>(IConnectionManagementService); let connectionManagementService = accessor.get<IConnectionManagementService>(IConnectionManagementService);
@@ -302,11 +302,11 @@ export class RestoreAction extends Task {
if (profile) { if (profile) {
const serverInfo = connectionManagementService.getServerInfo(profile.id); const serverInfo = connectionManagementService.getServerInfo(profile.id);
if (serverInfo && serverInfo.isCloud && profile.providerName === mssqlProviderName) { if (serverInfo && serverInfo.isCloud && profile.providerName === mssqlProviderName) {
return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.commandNotSupported', 'Restore command is not supported for Azure SQL databases.')); return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.commandNotSupported', "Restore command is not supported for Azure SQL databases."));
} }
if (!profile.databaseName && profile.providerName === mssqlProviderName) { if (!profile.databaseName && profile.providerName === mssqlProviderName) {
return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.commandNotSupportedForServer', 'Restore command is not supported in Server Context. Please select a Database and try again.')); return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.commandNotSupportedForServer', "Restore command is not supported in Server Context. Please select a Database and try again."));
} }
} }
@@ -319,7 +319,7 @@ export class RestoreAction extends Task {
export class ManageAction extends Action { export class ManageAction extends Action {
public static ID = 'manage'; public static ID = 'manage';
public static LABEL = nls.localize('manage', 'Manage'); public static LABEL = nls.localize('manage', "Manage");
constructor( constructor(
id: string, label: string, id: string, label: string,
@@ -341,7 +341,7 @@ export class ManageAction extends Action {
export class InsightAction extends Action { export class InsightAction extends Action {
public static ID = 'showInsight'; public static ID = 'showInsight';
public static LABEL = nls.localize('showDetails', 'Show Details'); public static LABEL = nls.localize('showDetails', "Show Details");
constructor( constructor(
id: string, label: string, id: string, label: string,
@@ -358,7 +358,7 @@ export class InsightAction extends Action {
export class ConfigureDashboardAction extends Task { export class ConfigureDashboardAction extends Task {
public static readonly ID = 'configureDashboard'; public static readonly ID = 'configureDashboard';
public static readonly LABEL = nls.localize('configureDashboard', 'Learn How To Configure The Dashboard'); public static readonly LABEL = nls.localize('configureDashboard', "Learn How To Configure The Dashboard");
public static readonly ICON = 'configure-dashboard'; public static readonly ICON = 'configure-dashboard';
private static readonly configHelpUri = 'https://aka.ms/sqldashboardconfig'; private static readonly configHelpUri = 'https://aka.ms/sqldashboardconfig';
+8 -8
View File
@@ -69,15 +69,15 @@ export function GetScriptOperationName(operation: ScriptOperation) {
let defaultName: string = ScriptOperation[operation]; let defaultName: string = ScriptOperation[operation];
switch (operation) { switch (operation) {
case ScriptOperation.Select: case ScriptOperation.Select:
return nls.localize('selectOperationName', 'Select'); return nls.localize('selectOperationName', "Select");
case ScriptOperation.Create: case ScriptOperation.Create:
return nls.localize('createOperationName', 'Create'); return nls.localize('createOperationName', "Create");
case ScriptOperation.Insert: case ScriptOperation.Insert:
return nls.localize('insertOperationName', 'Insert'); return nls.localize('insertOperationName', "Insert");
case ScriptOperation.Update: case ScriptOperation.Update:
return nls.localize('updateOperationName', 'Update'); return nls.localize('updateOperationName', "Update");
case ScriptOperation.Delete: case ScriptOperation.Delete:
return nls.localize('deleteOperationName', 'Delete'); return nls.localize('deleteOperationName', "Delete");
default: default:
// return the raw, non-localized string name // return the raw, non-localized string name
return defaultName; return defaultName;
@@ -109,7 +109,7 @@ export function scriptSelect(connectionProfile: IConnectionProfile, metadata: az
reject(editorError); reject(editorError);
}); });
} else { } else {
let errMsg: string = nls.localize('scriptSelectNotFound', 'No script was returned when calling select script on object '); let errMsg: string = nls.localize('scriptSelectNotFound', "No script was returned when calling select script on object ");
reject(errMsg.concat(metadata.metadataTypeName)); reject(errMsg.concat(metadata.metadataTypeName));
} }
}, scriptError => { }, scriptError => {
@@ -144,7 +144,7 @@ export function scriptEditSelect(connectionProfile: IConnectionProfile, metadata
reject(editorError); reject(editorError);
}); });
} else { } else {
let errMsg: string = nls.localize('scriptSelectNotFound', 'No script was returned when calling select script on object '); let errMsg: string = nls.localize('scriptSelectNotFound', "No script was returned when calling select script on object ");
reject(errMsg.concat(metadata.metadataTypeName)); reject(errMsg.concat(metadata.metadataTypeName));
} }
}, scriptError => { }, scriptError => {
@@ -197,7 +197,7 @@ export function script(connectionProfile: IConnectionProfile, metadata: azdata.O
messageDetail = operationResult.errorDetails; messageDetail = operationResult.errorDetails;
} }
if (errorMessageService) { if (errorMessageService) {
let title = nls.localize('scriptingFailed', 'Scripting Failed'); let title = nls.localize('scriptingFailed', "Scripting Failed");
errorMessageService.showDialog(Severity.Error, title, scriptNotFoundMsg, messageDetail); errorMessageService.showDialog(Severity.Error, title, scriptNotFoundMsg, messageDetail);
} }
reject(scriptNotFoundMsg); reject(scriptNotFoundMsg);
@@ -76,7 +76,8 @@ export default () => `
<div class="section learn"> <div class="section learn">
<h2 class="caption">${escape(localize('welcomePage.learn', "Learn"))}</h2> <h2 class="caption">${escape(localize('welcomePage.learn', "Learn"))}</h2>
<div class="list"> <div class="list">
<div class="item showCommands"><button data-href="command:workbench.action.showCommands"><h3 class="caption">${escape(localize('welcomePage.showCommands', "Find and run all commands"))}</h3> <span class="detail">${escape(localize('welcomePage.showCommandsDescription', "Rapidly access and search commands from the Command Palette ({0})")).replace('{0}', '<span class="shortcut" data-command="workbench.action.showCommands"></span>')}</span></button></div> <div class="item showCommands"><button data-href="command:workbench.action.showCommands"><h3 class="caption">${escape(localize('welcomePage.showCommands', "Find and run all commands"))}</h3> <span class="detail">${escape(localize('welcomePage.showCommandsDescription', "Rapidly access and search commands from the Command Palette ({0})"))
.replace('{0}', '<span class="shortcut" data-command="workbench.action.showCommands"></span>')}</span></button></div>
<div class="item showInterfaceOverview"><button data-href="https://aka.ms/azdata-blog"><h3 class="caption">${escape(localize('welcomePage.azdataBlog', "Discover what's new in the latest release"))}</h3> <span class="detail">${escape(localize('welcomePage.azdataBlogDescription', "New monthly blog posts each month showcasing our new features"))}</span></button></div> <div class="item showInterfaceOverview"><button data-href="https://aka.ms/azdata-blog"><h3 class="caption">${escape(localize('welcomePage.azdataBlog', "Discover what's new in the latest release"))}</h3> <span class="detail">${escape(localize('welcomePage.azdataBlogDescription', "New monthly blog posts each month showcasing our new features"))}</span></button></div>
<div class="item showInteractivePlayground"><button data-href="https://twitter.com/azuredatastudio"><h3 class="caption">${escape(localize('welcomePage.followTwitter', "Follow us on Twitter"))}</h3> <span class="detail">${escape(localize('welcomePage.followTwitterDescription', "Keep up to date with how the community is using Azure Data Studio and to talk directly with the engineers."))}</span></button></div> <div class="item showInteractivePlayground"><button data-href="https://twitter.com/azuredatastudio"><h3 class="caption">${escape(localize('welcomePage.followTwitter', "Follow us on Twitter"))}</h3> <span class="detail">${escape(localize('welcomePage.followTwitterDescription', "Keep up to date with how the community is using Azure Data Studio and to talk directly with the engineers."))}</span></button></div>
</div> </div>
@@ -79,34 +79,34 @@ interface MssqlBackupInfo {
} }
const LocalizedStrings = { const LocalizedStrings = {
BACKUP_NAME: localize('backup.backupName', 'Backup name'), BACKUP_NAME: localize('backup.backupName', "Backup name"),
RECOVERY_MODEL: localize('backup.recoveryModel', 'Recovery model'), RECOVERY_MODEL: localize('backup.recoveryModel', "Recovery model"),
BACKUP_TYPE: localize('backup.backupType', 'Backup type'), BACKUP_TYPE: localize('backup.backupType', "Backup type"),
BACKUP_DEVICE: localize('backup.backupDevice', 'Backup files'), BACKUP_DEVICE: localize('backup.backupDevice', "Backup files"),
ALGORITHM: localize('backup.algorithm', 'Algorithm'), ALGORITHM: localize('backup.algorithm', "Algorithm"),
CERTIFICATE_OR_ASYMMETRIC_KEY: localize('backup.certificateOrAsymmetricKey', 'Certificate or Asymmetric key'), CERTIFICATE_OR_ASYMMETRIC_KEY: localize('backup.certificateOrAsymmetricKey', "Certificate or Asymmetric key"),
MEDIA: localize('backup.media', 'Media'), MEDIA: localize('backup.media', "Media"),
MEDIA_OPTION: localize('backup.mediaOption', 'Backup to the existing media set'), MEDIA_OPTION: localize('backup.mediaOption', "Backup to the existing media set"),
MEDIA_OPTION_FORMAT: localize('backup.mediaOptionFormat', 'Backup to a new media set'), MEDIA_OPTION_FORMAT: localize('backup.mediaOptionFormat', "Backup to a new media set"),
EXISTING_MEDIA_APPEND: localize('backup.existingMediaAppend', 'Append to the existing backup set'), EXISTING_MEDIA_APPEND: localize('backup.existingMediaAppend', "Append to the existing backup set"),
EXISTING_MEDIA_OVERWRITE: localize('backup.existingMediaOverwrite', 'Overwrite all existing backup sets'), EXISTING_MEDIA_OVERWRITE: localize('backup.existingMediaOverwrite', "Overwrite all existing backup sets"),
NEW_MEDIA_SET_NAME: localize('backup.newMediaSetName', 'New media set name'), NEW_MEDIA_SET_NAME: localize('backup.newMediaSetName', "New media set name"),
NEW_MEDIA_SET_DESCRIPTION: localize('backup.newMediaSetDescription', 'New media set description'), NEW_MEDIA_SET_DESCRIPTION: localize('backup.newMediaSetDescription', "New media set description"),
CHECKSUM_CONTAINER: localize('backup.checksumContainer', 'Perform checksum before writing to media'), CHECKSUM_CONTAINER: localize('backup.checksumContainer', "Perform checksum before writing to media"),
VERIFY_CONTAINER: localize('backup.verifyContainer', 'Verify backup when finished'), VERIFY_CONTAINER: localize('backup.verifyContainer', "Verify backup when finished"),
CONTINUE_ON_ERROR_CONTAINER: localize('backup.continueOnErrorContainer', 'Continue on error'), CONTINUE_ON_ERROR_CONTAINER: localize('backup.continueOnErrorContainer', "Continue on error"),
EXPIRATION: localize('backup.expiration', 'Expiration'), EXPIRATION: localize('backup.expiration', "Expiration"),
SET_BACKUP_RETAIN_DAYS: localize('backup.setBackupRetainDays', 'Set backup retain days'), SET_BACKUP_RETAIN_DAYS: localize('backup.setBackupRetainDays', "Set backup retain days"),
COPY_ONLY: localize('backup.copyOnly', 'Copy-only backup'), COPY_ONLY: localize('backup.copyOnly', "Copy-only backup"),
ADVANCED_CONFIGURATION: localize('backup.advancedConfiguration', 'Advanced Configuration'), ADVANCED_CONFIGURATION: localize('backup.advancedConfiguration', "Advanced Configuration"),
COMPRESSION: localize('backup.compression', 'Compression'), COMPRESSION: localize('backup.compression', "Compression"),
SET_BACKUP_COMPRESSION: localize('backup.setBackupCompression', 'Set backup compression'), SET_BACKUP_COMPRESSION: localize('backup.setBackupCompression', "Set backup compression"),
ENCRYPTION: localize('backup.encryption', 'Encryption'), ENCRYPTION: localize('backup.encryption', "Encryption"),
TRANSACTION_LOG: localize('backup.transactionLog', 'Transaction log'), TRANSACTION_LOG: localize('backup.transactionLog', "Transaction log"),
TRUNCATE_TRANSACTION_LOG: localize('backup.truncateTransactionLog', 'Truncate the transaction log'), TRUNCATE_TRANSACTION_LOG: localize('backup.truncateTransactionLog', "Truncate the transaction log"),
BACKUP_TAIL: localize('backup.backupTail', 'Backup the tail of the log'), BACKUP_TAIL: localize('backup.backupTail', "Backup the tail of the log"),
RELIABILITY: localize('backup.reliability', 'Reliability'), RELIABILITY: localize('backup.reliability', "Reliability"),
MEDIA_NAME_REQUIRED_ERROR: localize('backup.mediaNameRequired', 'Media name is required'), MEDIA_NAME_REQUIRED_ERROR: localize('backup.mediaNameRequired', "Media name is required"),
NO_ENCRYPTOR_WARNING: localize('backup.noEncryptorWarning', "No certificate or asymmetric key is available") NO_ENCRYPTOR_WARNING: localize('backup.noEncryptorWarning', "No certificate or asymmetric key is available")
}; };
@@ -293,11 +293,11 @@ export class BackupComponent {
// Set backup path add/remove buttons // Set backup path add/remove buttons
this.addPathButton = new Button(this.addPathElement.nativeElement); this.addPathButton = new Button(this.addPathElement.nativeElement);
this.addPathButton.label = '+'; this.addPathButton.label = '+';
this.addPathButton.title = localize('addFile', 'Add a file'); this.addPathButton.title = localize('addFile', "Add a file");
this.removePathButton = new Button(this.removePathElement.nativeElement); this.removePathButton = new Button(this.removePathElement.nativeElement);
this.removePathButton.label = '-'; this.removePathButton.label = '-';
this.removePathButton.title = localize('removeFile', 'Remove files'); this.removePathButton.title = localize('removeFile', "Remove files");
// Set compression // Set compression
this.compressionSelectBox = new SelectBox(this.compressionOptions, this.compressionOptions[0], this.contextViewService, undefined, { ariaLabel: this.localizedStrings.SET_BACKUP_COMPRESSION }); this.compressionSelectBox = new SelectBox(this.compressionOptions, this.compressionOptions[0], this.contextViewService, undefined, { ariaLabel: this.localizedStrings.SET_BACKUP_COMPRESSION });
@@ -325,7 +325,7 @@ export class BackupComponent {
}); });
// Set backup retain days // Set backup retain days
let invalidInputMessage = localize('backupComponent.invalidInput', 'Invalid input. Value must be greater than or equal 0.'); let invalidInputMessage = localize('backupComponent.invalidInput', "Invalid input. Value must be greater than or equal 0.");
this.backupRetainDaysBox = new InputBox(this.backupDaysElement.nativeElement, this.backupRetainDaysBox = new InputBox(this.backupDaysElement.nativeElement,
this.contextViewService, this.contextViewService,
{ {
@@ -401,21 +401,21 @@ export class BackupComponent {
private addFooterButtons(): void { private addFooterButtons(): void {
// Set script footer button // Set script footer button
this.scriptButton = new Button(this.scriptButtonElement.nativeElement); this.scriptButton = new Button(this.scriptButtonElement.nativeElement);
this.scriptButton.label = localize('backupComponent.script', 'Script'); this.scriptButton.label = localize('backupComponent.script', "Script");
this.addButtonClickHandler(this.scriptButton, () => this.onScript()); this.addButtonClickHandler(this.scriptButton, () => this.onScript());
this._toDispose.push(attachButtonStyler(this.scriptButton, this.themeService)); this._toDispose.push(attachButtonStyler(this.scriptButton, this.themeService));
this.scriptButton.enabled = false; this.scriptButton.enabled = false;
// Set backup footer button // Set backup footer button
this.backupButton = new Button(this.backupButtonElement.nativeElement); this.backupButton = new Button(this.backupButtonElement.nativeElement);
this.backupButton.label = localize('backupComponent.backup', 'Backup'); this.backupButton.label = localize('backupComponent.backup', "Backup");
this.addButtonClickHandler(this.backupButton, () => this.onOk()); this.addButtonClickHandler(this.backupButton, () => this.onOk());
this._toDispose.push(attachButtonStyler(this.backupButton, this.themeService)); this._toDispose.push(attachButtonStyler(this.backupButton, this.themeService));
this.backupEnabled = false; this.backupEnabled = false;
// Set cancel footer button // Set cancel footer button
this.cancelButton = new Button(this.cancelButtonElement.nativeElement); this.cancelButton = new Button(this.cancelButtonElement.nativeElement);
this.cancelButton.label = localize('backupComponent.cancel', 'Cancel'); this.cancelButton.label = localize('backupComponent.cancel', "Cancel");
this.addButtonClickHandler(this.cancelButton, () => this.onCancel()); this.addButtonClickHandler(this.cancelButton, () => this.onCancel());
this._toDispose.push(attachButtonStyler(this.cancelButton, this.themeService)); this._toDispose.push(attachButtonStyler(this.cancelButton, this.themeService));
} }
@@ -481,7 +481,7 @@ export class BackupComponent {
// show warning message if latest backup file path contains url // show warning message if latest backup file path contains url
if (this.containsBackupToUrl) { if (this.containsBackupToUrl) {
this.pathListBox.setValidation(false, { content: localize('backup.containsBackupToUrlError', 'Only backup to file is supported'), type: MessageType.WARNING }); this.pathListBox.setValidation(false, { content: localize('backup.containsBackupToUrlError', "Only backup to file is supported"), type: MessageType.WARNING });
this.pathListBox.focus(); this.pathListBox.focus();
} }
} }
@@ -695,7 +695,7 @@ export class BackupComponent {
this.backupEnabled = false; this.backupEnabled = false;
// show input validation error // show input validation error
this.pathListBox.setValidation(false, { content: localize('backup.backupFileRequired', 'Backup file path is required'), type: MessageType.ERROR }); this.pathListBox.setValidation(false, { content: localize('backup.backupFileRequired', "Backup file path is required"), type: MessageType.ERROR });
this.pathListBox.focus(); this.pathListBox.focus();
} }
@@ -23,17 +23,17 @@ export const recoveryModelSimple = 'Simple';
export const recoveryModelFull = 'Full'; export const recoveryModelFull = 'Full';
// Constants for UI strings // Constants for UI strings
export const labelDatabase = localize('backup.labelDatabase', 'Database'); export const labelDatabase = localize('backup.labelDatabase', "Database");
export const labelFilegroup = localize('backup.labelFilegroup', 'Files and filegroups'); export const labelFilegroup = localize('backup.labelFilegroup', "Files and filegroups");
export const labelFull = localize('backup.labelFull', 'Full'); export const labelFull = localize('backup.labelFull', "Full");
export const labelDifferential = localize('backup.labelDifferential', 'Differential'); export const labelDifferential = localize('backup.labelDifferential', "Differential");
export const labelLog = localize('backup.labelLog', 'Transaction Log'); export const labelLog = localize('backup.labelLog', "Transaction Log");
export const labelDisk = localize('backup.labelDisk', 'Disk'); export const labelDisk = localize('backup.labelDisk', "Disk");
export const labelUrl = localize('backup.labelUrl', 'Url'); export const labelUrl = localize('backup.labelUrl', "Url");
export const defaultCompression = localize('backup.defaultCompression', 'Use the default server setting'); export const defaultCompression = localize('backup.defaultCompression', "Use the default server setting");
export const compressionOn = localize('backup.compressBackup', 'Compress backup'); export const compressionOn = localize('backup.compressBackup', "Compress backup");
export const compressionOff = localize('backup.doNotCompress', 'Do not compress backup'); export const compressionOff = localize('backup.doNotCompress', "Do not compress backup");
export const aes128 = 'AES 128'; export const aes128 = 'AES 128';
export const aes192 = 'AES 192'; export const aes192 = 'AES 192';
@@ -43,7 +43,7 @@ export class CreateInsightAction extends Action {
public run(context: IChartActionContext): Promise<boolean> { public run(context: IChartActionContext): Promise<boolean> {
let uriString: string = this.getActiveUriString(); let uriString: string = this.getActiveUriString();
if (!uriString) { if (!uriString) {
this.showError(localize('createInsightNoEditor', 'Cannot create insight as the active editor is not a SQL Editor')); this.showError(localize('createInsightNoEditor', "Cannot create insight as the active editor is not a SQL Editor"));
return Promise.resolve(false); return Promise.resolve(false);
} }
@@ -62,7 +62,7 @@ export class CreateInsightAction extends Action {
}; };
let widgetConfig = { let widgetConfig = {
name: localize('myWidgetName', 'My-Widget'), name: localize('myWidgetName', "My-Widget"),
gridItemConfig: { gridItemConfig: {
sizex: 2, sizex: 2,
sizey: 1 sizey: 1
@@ -119,7 +119,7 @@ export class CopyAction extends Action {
if (context.insight instanceof Graph) { if (context.insight instanceof Graph) {
let data = context.insight.getCanvasData(); let data = context.insight.getCanvasData();
if (!data) { if (!data) {
this.showError(localize('chartNotFound', 'Could not find chart to save')); this.showError(localize('chartNotFound', "Could not find chart to save"));
return Promise.resolve(false); return Promise.resolve(false);
} }
@@ -157,7 +157,7 @@ export class SaveImageAction extends Action {
return this.promptForFilepath().then(filePath => { return this.promptForFilepath().then(filePath => {
let data = (<Graph>context.insight).getCanvasData(); let data = (<Graph>context.insight).getCanvasData();
if (!data) { if (!data) {
this.showError(localize('chartNotFound', 'Could not find chart to save')); this.showError(localize('chartNotFound', "Could not find chart to save"));
return false; return false;
} }
if (filePath) { if (filePath) {
@@ -190,7 +190,7 @@ export class SaveImageAction extends Action {
let filepathPlaceHolder = resolveCurrentDirectory(this.getActiveUriString(), getRootPath(this.workspaceContextService)); let filepathPlaceHolder = resolveCurrentDirectory(this.getActiveUriString(), getRootPath(this.workspaceContextService));
filepathPlaceHolder = join(filepathPlaceHolder, 'chart.png'); filepathPlaceHolder = join(filepathPlaceHolder, 'chart.png');
return this.windowService.showSaveDialog({ return this.windowService.showSaveDialog({
title: localize('chartViewer.saveAsFileTitle', 'Choose Results File'), title: localize('chartViewer.saveAsFileTitle', "Choose Results File"),
defaultPath: normalize(filepathPlaceHolder) defaultPath: normalize(filepathPlaceHolder)
}); });
} }
@@ -35,16 +35,16 @@ export interface IChartOptions {
} }
const dataDirectionOption: IChartOption = { const dataDirectionOption: IChartOption = {
label: localize('dataDirectionLabel', 'Data Direction'), label: localize('dataDirectionLabel', "Data Direction"),
type: ControlType.combo, type: ControlType.combo,
displayableOptions: [localize('verticalLabel', 'Vertical'), localize('horizontalLabel', 'Horizontal')], displayableOptions: [localize('verticalLabel', "Vertical"), localize('horizontalLabel', "Horizontal")],
options: [DataDirection.Vertical, DataDirection.Horizontal], options: [DataDirection.Vertical, DataDirection.Horizontal],
configEntry: 'dataDirection', configEntry: 'dataDirection',
default: DataDirection.Horizontal default: DataDirection.Horizontal
}; };
const columnsAsLabelsInput: IChartOption = { const columnsAsLabelsInput: IChartOption = {
label: localize('columnsAsLabelsLabel', 'Use column names as labels'), label: localize('columnsAsLabelsLabel', "Use column names as labels"),
type: ControlType.checkbox, type: ControlType.checkbox,
configEntry: 'columnsAsLabels', configEntry: 'columnsAsLabels',
default: true, default: true,
@@ -54,7 +54,7 @@ const columnsAsLabelsInput: IChartOption = {
}; };
const labelFirstColumnInput: IChartOption = { const labelFirstColumnInput: IChartOption = {
label: localize('labelFirstColumnLabel', 'Use first column as row label'), label: localize('labelFirstColumnLabel', "Use first column as row label"),
type: ControlType.checkbox, type: ControlType.checkbox,
configEntry: 'labelFirstColumn', configEntry: 'labelFirstColumn',
default: false, default: false,
@@ -64,7 +64,7 @@ const labelFirstColumnInput: IChartOption = {
}; };
const legendInput: IChartOption = { const legendInput: IChartOption = {
label: localize('legendLabel', 'Legend Position'), label: localize('legendLabel', "Legend Position"),
type: ControlType.combo, type: ControlType.combo,
options: Object.values(LegendPosition), options: Object.values(LegendPosition),
configEntry: 'legendPosition', configEntry: 'legendPosition',
@@ -72,66 +72,66 @@ const legendInput: IChartOption = {
}; };
const yAxisLabelInput: IChartOption = { const yAxisLabelInput: IChartOption = {
label: localize('yAxisLabel', 'Y Axis Label'), label: localize('yAxisLabel', "Y Axis Label"),
type: ControlType.input, type: ControlType.input,
configEntry: 'yAxisLabel', configEntry: 'yAxisLabel',
default: undefined default: undefined
}; };
const yAxisMinInput: IChartOption = { const yAxisMinInput: IChartOption = {
label: localize('yAxisMinVal', 'Y Axis Minimum Value'), label: localize('yAxisMinVal', "Y Axis Minimum Value"),
type: ControlType.numberInput, type: ControlType.numberInput,
configEntry: 'yAxisMin', configEntry: 'yAxisMin',
default: undefined default: undefined
}; };
const yAxisMaxInput: IChartOption = { const yAxisMaxInput: IChartOption = {
label: localize('yAxisMaxVal', 'Y Axis Maximum Value'), label: localize('yAxisMaxVal', "Y Axis Maximum Value"),
type: ControlType.numberInput, type: ControlType.numberInput,
configEntry: 'yAxisMax', configEntry: 'yAxisMax',
default: undefined default: undefined
}; };
const xAxisLabelInput: IChartOption = { const xAxisLabelInput: IChartOption = {
label: localize('xAxisLabel', 'X Axis Label'), label: localize('xAxisLabel', "X Axis Label"),
type: ControlType.input, type: ControlType.input,
configEntry: 'xAxisLabel', configEntry: 'xAxisLabel',
default: undefined default: undefined
}; };
const xAxisMinInput: IChartOption = { const xAxisMinInput: IChartOption = {
label: localize('xAxisMinVal', 'X Axis Minimum Value'), label: localize('xAxisMinVal', "X Axis Minimum Value"),
type: ControlType.numberInput, type: ControlType.numberInput,
configEntry: 'xAxisMin', configEntry: 'xAxisMin',
default: undefined default: undefined
}; };
const xAxisMaxInput: IChartOption = { const xAxisMaxInput: IChartOption = {
label: localize('xAxisMaxVal', 'X Axis Maximum Value'), label: localize('xAxisMaxVal', "X Axis Maximum Value"),
type: ControlType.numberInput, type: ControlType.numberInput,
configEntry: 'xAxisMax', configEntry: 'xAxisMax',
default: undefined default: undefined
}; };
const xAxisMinDateInput: IChartOption = { const xAxisMinDateInput: IChartOption = {
label: localize('xAxisMinDate', 'X Axis Minimum Date'), label: localize('xAxisMinDate', "X Axis Minimum Date"),
type: ControlType.dateInput, type: ControlType.dateInput,
configEntry: 'xAxisMin', configEntry: 'xAxisMin',
default: undefined default: undefined
}; };
const xAxisMaxDateInput: IChartOption = { const xAxisMaxDateInput: IChartOption = {
label: localize('xAxisMaxDate', 'X Axis Maximum Date'), label: localize('xAxisMaxDate', "X Axis Maximum Date"),
type: ControlType.dateInput, type: ControlType.dateInput,
configEntry: 'xAxisMax', configEntry: 'xAxisMax',
default: undefined default: undefined
}; };
const dataTypeInput: IChartOption = { const dataTypeInput: IChartOption = {
label: localize('dataTypeLabel', 'Data Type'), label: localize('dataTypeLabel', "Data Type"),
type: ControlType.combo, type: ControlType.combo,
options: [DataType.Number, DataType.Point], options: [DataType.Number, DataType.Point],
displayableOptions: [localize('numberLabel', 'Number'), localize('pointLabel', 'Point')], displayableOptions: [localize('numberLabel', "Number"), localize('pointLabel', "Point")],
configEntry: 'dataType', configEntry: 'dataType',
default: DataType.Number default: DataType.Number
}; };
@@ -139,7 +139,7 @@ const dataTypeInput: IChartOption = {
export const ChartOptions: IChartOptions = { export const ChartOptions: IChartOptions = {
general: [ general: [
{ {
label: localize('chartTypeLabel', 'Chart Type'), label: localize('chartTypeLabel', "Chart Type"),
type: ControlType.combo, type: ControlType.combo,
options: insightRegistry.getAllIds(), options: insightRegistry.getAllIds(),
configEntry: 'type', configEntry: 'type',
@@ -205,13 +205,13 @@ export const ChartOptions: IChartOptions = {
[InsightType.Image]: [ [InsightType.Image]: [
{ {
configEntry: 'encoding', configEntry: 'encoding',
label: localize('encodingOption', 'Encoding'), label: localize('encodingOption', "Encoding"),
type: ControlType.input, type: ControlType.input,
default: 'hex' default: 'hex'
}, },
{ {
configEntry: 'imageFormat', configEntry: 'imageFormat',
label: localize('imageFormatOption', 'Image Format'), label: localize('imageFormatOption', "Image Format"),
type: ControlType.input, type: ControlType.input,
default: 'jpeg' default: 'jpeg'
} }
@@ -11,7 +11,7 @@ import { localize } from 'vs/nls';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
export class ChartTab implements IPanelTab { export class ChartTab implements IPanelTab {
public readonly title = localize('chartTabTitle', 'Chart'); public readonly title = localize('chartTabTitle', "Chart");
public readonly identifier = 'ChartTab'; public readonly identifier = 'ChartTab';
public readonly view: ChartView; public readonly view: ChartView;
@@ -32,7 +32,7 @@ export class AdvancedPropertiesController {
public get advancedDialog() { public get advancedDialog() {
if (!this._advancedDialog) { if (!this._advancedDialog) {
this._advancedDialog = this._instantiationService.createInstance( this._advancedDialog = this._instantiationService.createInstance(
OptionsDialog, localize('connectionAdvancedProperties', 'Advanced Properties'), TelemetryKeys.ConnectionAdvancedProperties, { hasBackButton: true, cancelLabel: localize('advancedProperties.discard', 'Discard') }); OptionsDialog, localize('connectionAdvancedProperties', "Advanced Properties"), TelemetryKeys.ConnectionAdvancedProperties, { hasBackButton: true, cancelLabel: localize('advancedProperties.discard', "Discard") });
this._advancedDialog.onCloseEvent(() => this._onCloseAdvancedProperties()); this._advancedDialog.onCloseEvent(() => this._onCloseAdvancedProperties());
this._advancedDialog.onOk(() => this.handleOnOk()); this._advancedDialog.onOk(() => this.handleOnOk());
this._advancedDialog.render(); this._advancedDialog.render();
@@ -119,17 +119,17 @@ configurationRegistry.registerConfiguration({
'sql.maxRecentConnections': { 'sql.maxRecentConnections': {
'type': 'number', 'type': 'number',
'default': 25, 'default': 25,
'description': localize('sql.maxRecentConnectionsDescription', 'The maximum number of recently used connections to store in the connection list.') 'description': localize('sql.maxRecentConnectionsDescription', "The maximum number of recently used connections to store in the connection list.")
}, },
'sql.defaultEngine': { 'sql.defaultEngine': {
'type': 'string', 'type': 'string',
'description': localize('sql.defaultEngineDescription', 'Default SQL Engine to use. This drives default language provider in .sql files and the default to use when creating a new connection. Valid option is currently MSSQL'), 'description': localize('sql.defaultEngineDescription', "Default SQL Engine to use. This drives default language provider in .sql files and the default to use when creating a new connection. Valid option is currently MSSQL"),
'default': 'MSSQL' 'default': 'MSSQL'
}, },
'connection.parseClipboardForConnectionString': { 'connection.parseClipboardForConnectionString': {
'type': 'boolean', 'type': 'boolean',
'default': true, 'default': true,
'description': localize('connection.parseClipboardForConnectionStringDescription', 'Attempt to parse the contents of the clipboard when the connection dialog is opened or a paste is performed.') 'description': localize('connection.parseClipboardForConnectionStringDescription', "Attempt to parse the contents of the clipboard when the connection dialog is opened or a paste is performed.")
} }
} }
}); });
@@ -25,7 +25,7 @@ import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/co
export class ClearRecentConnectionsAction extends Action { export class ClearRecentConnectionsAction extends Action {
public static ID = 'clearRecentConnectionsAction'; public static ID = 'clearRecentConnectionsAction';
public static LABEL = nls.localize('ClearRecentlyUsedLabel', 'Clear List'); public static LABEL = nls.localize('ClearRecentlyUsedLabel', "Clear List");
public static ICON = 'search-action clear-search-results'; public static ICON = 'search-action clear-search-results';
private _onRecentConnectionsRemoved = new Emitter<void>(); private _onRecentConnectionsRemoved = new Emitter<void>();
@@ -65,7 +65,7 @@ export class ClearRecentConnectionsAction extends Action {
const actions: INotificationActions = { primary: [] }; const actions: INotificationActions = { primary: [] };
this._notificationService.notify({ this._notificationService.notify({
severity: Severity.Info, severity: Severity.Info,
message: nls.localize('ClearedRecentConnections', 'Recent connections list cleared'), message: nls.localize('ClearedRecentConnections', "Recent connections list cleared"),
actions actions
}); });
this._onRecentConnectionsRemoved.fire(); this._onRecentConnectionsRemoved.fire();
@@ -78,11 +78,11 @@ export class ClearRecentConnectionsAction extends Action {
const self = this; const self = this;
return new Promise<boolean>((resolve, reject) => { return new Promise<boolean>((resolve, reject) => {
let choices: { key, value }[] = [ let choices: { key, value }[] = [
{ key: nls.localize('connectionAction.yes', 'Yes'), value: true }, { key: nls.localize('connectionAction.yes', "Yes"), value: true },
{ key: nls.localize('connectionAction.no', 'No'), value: false } { key: nls.localize('connectionAction.no', "No"), value: false }
]; ];
self._quickInputService.pick(choices.map(x => x.key), { placeHolder: nls.localize('ClearRecentlyUsedLabel', 'Clear List'), ignoreFocusLost: true }).then((choice) => { self._quickInputService.pick(choices.map(x => x.key), { placeHolder: nls.localize('ClearRecentlyUsedLabel', "Clear List"), ignoreFocusLost: true }).then((choice) => {
let confirm = choices.find(x => x.key === choice); let confirm = choices.find(x => x.key === choice);
resolve(confirm && confirm.value); resolve(confirm && confirm.value);
}); });
@@ -91,9 +91,9 @@ export class ClearRecentConnectionsAction extends Action {
private promptConfirmationMessage(): Promise<IConfirmationResult> { private promptConfirmationMessage(): Promise<IConfirmationResult> {
let confirm: IConfirmation = { let confirm: IConfirmation = {
message: nls.localize('clearRecentConnectionMessage', 'Are you sure you want to delete all the connections from the list?'), message: nls.localize('clearRecentConnectionMessage', "Are you sure you want to delete all the connections from the list?"),
primaryButton: nls.localize('connectionDialog.yes', 'Yes'), primaryButton: nls.localize('connectionDialog.yes', "Yes"),
secondaryButton: nls.localize('connectionDialog.no', 'No'), secondaryButton: nls.localize('connectionDialog.no', "No"),
type: 'question' type: 'question'
}; };
@@ -111,7 +111,7 @@ export class ClearRecentConnectionsAction extends Action {
export class ClearSingleRecentConnectionAction extends Action { export class ClearSingleRecentConnectionAction extends Action {
public static ID = 'clearSingleRecentConnectionAction'; public static ID = 'clearSingleRecentConnectionAction';
public static LABEL = nls.localize('delete', 'Delete'); public static LABEL = nls.localize('delete', "Delete");
private _onRecentConnectionRemoved = new Emitter<void>(); private _onRecentConnectionRemoved = new Emitter<void>();
public onRecentConnectionRemoved: Event<void> = this._onRecentConnectionRemoved.event; public onRecentConnectionRemoved: Event<void> = this._onRecentConnectionRemoved.event;
@@ -69,7 +69,7 @@ const ConnectionProviderContrib: IJSONSchema = {
description: localize('schema.displayName', "Display Name for the provider") description: localize('schema.displayName', "Display Name for the provider")
}, },
iconPath: { iconPath: {
description: localize('schema.iconPath', 'Icon path for the server type'), description: localize('schema.iconPath', "Icon path for the server type"),
oneOf: [ oneOf: [
{ {
type: 'array', type: 'array',
@@ -5,6 +5,6 @@
import { localize } from 'vs/nls'; import { localize } from 'vs/nls';
export const onDidConnectMessage = localize('onDidConnectMessage', 'Connected to'); export const onDidConnectMessage = localize('onDidConnectMessage', "Connected to");
export const onDidDisconnectMessage = localize('onDidDisconnectMessage', 'Disconnected'); export const onDidDisconnectMessage = localize('onDidDisconnectMessage', "Disconnected");
export const unsavedGroupLabel = localize('unsavedGroupLabel', 'Unsaved Connections'); export const unsavedGroupLabel = localize('unsavedGroupLabel', "Unsaved Connections");
@@ -58,16 +58,16 @@ ExtensionsRegistry.registerExtensionPoint<IDashboardContainerContrib | IDashboar
function handleCommand(dashboardContainer: IDashboardContainerContrib, extension: IExtensionPointUser<any>) { function handleCommand(dashboardContainer: IDashboardContainerContrib, extension: IExtensionPointUser<any>) {
const { id, container } = dashboardContainer; const { id, container } = dashboardContainer;
if (!id) { if (!id) {
extension.collector.error(localize('dashboardContainer.contribution.noIdError', 'No id in dashboard container specified for extension.')); extension.collector.error(localize('dashboardContainer.contribution.noIdError', "No id in dashboard container specified for extension."));
return; return;
} }
if (!container) { if (!container) {
extension.collector.error(localize('dashboardContainer.contribution.noContainerError', 'No container in dashboard container specified for extension.')); extension.collector.error(localize('dashboardContainer.contribution.noContainerError', "No container in dashboard container specified for extension."));
return; return;
} }
if (Object.keys(container).length !== 1) { if (Object.keys(container).length !== 1) {
extension.collector.error(localize('dashboardContainer.contribution.moreThanOneDashboardContainersError', 'Exactly 1 dashboard container must be defined per space.')); extension.collector.error(localize('dashboardContainer.contribution.moreThanOneDashboardContainersError', "Exactly 1 dashboard container must be defined per space."));
return; return;
} }
@@ -77,7 +77,7 @@ ExtensionsRegistry.registerExtensionPoint<IDashboardContainerContrib | IDashboar
const containerTypeFound = containerTypes.find(c => (c === containerkey)); const containerTypeFound = containerTypes.find(c => (c === containerkey));
if (!containerTypeFound) { if (!containerTypeFound) {
extension.collector.error(localize('dashboardTab.contribution.unKnownContainerType', 'Unknown container type defines in dashboard container for extension.')); extension.collector.error(localize('dashboardTab.contribution.unKnownContainerType', "Unknown container type defines in dashboard container for extension."));
return; return;
} }
@@ -28,7 +28,7 @@ export function validateGridContainerContribution(extension: IExtensionPointUser
const widgetOrWebviewKey = allKeys.find(key => key === 'widget' || key === 'webview'); const widgetOrWebviewKey = allKeys.find(key => key === 'widget' || key === 'webview');
if (!widgetOrWebviewKey) { if (!widgetOrWebviewKey) {
result = false; result = false;
extension.collector.error(nls.localize('gridContainer.invalidInputs', 'widgets or webviews are expected inside widgets-container for extension.')); extension.collector.error(nls.localize('gridContainer.invalidInputs', "widgets or webviews are expected inside widgets-container for extension."));
return; return;
} }
}); });
@@ -26,7 +26,7 @@ const navSectionContainerSchema: IJSONSchema = {
description: nls.localize('dashboard.container.left-nav-bar.id', "Unique identifier for this nav section. Will be passed to the extension for any requests.") description: nls.localize('dashboard.container.left-nav-bar.id', "Unique identifier for this nav section. Will be passed to the extension for any requests.")
}, },
icon: { icon: {
description: nls.localize('dashboard.container.left-nav-bar.icon', '(Optional) Icon which is used to represent this nav section in the UI. Either a file path or a themeable configuration'), description: nls.localize('dashboard.container.left-nav-bar.icon', "(Optional) Icon which is used to represent this nav section in the UI. Either a file path or a themeable configuration"),
anyOf: [{ anyOf: [{
type: 'string' type: 'string'
}, },
@@ -34,11 +34,11 @@ const navSectionContainerSchema: IJSONSchema = {
type: 'object', type: 'object',
properties: { properties: {
light: { light: {
description: nls.localize('dashboard.container.left-nav-bar.icon.light', 'Icon path when a light theme is used'), description: nls.localize('dashboard.container.left-nav-bar.icon.light', "Icon path when a light theme is used"),
type: 'string' type: 'string'
}, },
dark: { dark: {
description: nls.localize('dashboard.container.left-nav-bar.icon.dark', 'Icon path when a dark theme is used'), description: nls.localize('dashboard.container.left-nav-bar.icon.dark', "Icon path when a dark theme is used"),
type: 'string' type: 'string'
} }
} }
@@ -101,17 +101,17 @@ export function validateNavSectionContributionAndRegisterIcon(extension: IExtens
navSectionConfigs.forEach(section => { navSectionConfigs.forEach(section => {
if (!section.title) { if (!section.title) {
result = false; result = false;
extension.collector.error(nls.localize('navSection.missingTitle_error', 'No title in nav section specified for extension.')); extension.collector.error(nls.localize('navSection.missingTitle_error', "No title in nav section specified for extension."));
} }
if (!section.container) { if (!section.container) {
result = false; result = false;
extension.collector.error(nls.localize('navSection.missingContainer_error', 'No container in nav section specified for extension.')); extension.collector.error(nls.localize('navSection.missingContainer_error', "No container in nav section specified for extension."));
} }
if (Object.keys(section.container).length !== 1) { if (Object.keys(section.container).length !== 1) {
result = false; result = false;
extension.collector.error(nls.localize('navSection.moreThanOneDashboardContainersError', 'Exactly 1 dashboard container must be defined per space.')); extension.collector.error(nls.localize('navSection.moreThanOneDashboardContainersError', "Exactly 1 dashboard container must be defined per space."));
} }
if (isValidIcon(section.icon, extension)) { if (isValidIcon(section.icon, extension)) {
@@ -130,7 +130,7 @@ export function validateNavSectionContributionAndRegisterIcon(extension: IExtens
break; break;
case NAV_SECTION: case NAV_SECTION:
result = false; result = false;
extension.collector.error(nls.localize('navSection.invalidContainer_error', 'NAV_SECTION within NAV_SECTION is an invalid container for extension.')); extension.collector.error(nls.localize('navSection.invalidContainer_error', "NAV_SECTION within NAV_SECTION is an invalid container for extension."));
break; break;
} }
@@ -28,7 +28,7 @@ export function validateWidgetContainerContribution(extension: IExtensionPointUs
const widgetKey = allKeys.find(key => key === 'widget'); const widgetKey = allKeys.find(key => key === 'widget');
if (!widgetKey) { if (!widgetKey) {
result = false; result = false;
extension.collector.error(nls.localize('widgetContainer.invalidInputs', 'The list of widgets is expected inside widgets-container for extension.')); extension.collector.error(nls.localize('widgetContainer.invalidInputs', "The list of widgets is expected inside widgets-container for extension."));
} }
}); });
return result; return result;
@@ -54,7 +54,7 @@ export class EditDashboardAction extends Action {
export class RefreshWidgetAction extends Action { export class RefreshWidgetAction extends Action {
private static readonly ID = 'refreshWidget'; private static readonly ID = 'refreshWidget';
private static readonly LABEL = nls.localize('refreshWidget', 'Refresh'); private static readonly LABEL = nls.localize('refreshWidget', "Refresh");
private static readonly ICON = 'refresh'; private static readonly ICON = 'refresh';
constructor( constructor(
@@ -77,7 +77,7 @@ export class RefreshWidgetAction extends Action {
export class ToggleMoreWidgetAction extends Action { export class ToggleMoreWidgetAction extends Action {
private static readonly ID = 'toggleMore'; private static readonly ID = 'toggleMore';
private static readonly LABEL = nls.localize('toggleMore', 'Toggle More'); private static readonly LABEL = nls.localize('toggleMore', "Toggle More");
private static readonly ICON = 'toggle-more'; private static readonly ICON = 'toggle-more';
constructor( constructor(
@@ -64,7 +64,7 @@ export abstract class DashboardPage extends AngularDisposable implements IConfig
public readonly editEnabled: Event<boolean> = this._editEnabled.event; public readonly editEnabled: Event<boolean> = this._editEnabled.event;
// tslint:disable:no-unused-variable // tslint:disable:no-unused-variable
private readonly homeTabTitle: string = nls.localize('home', 'Home'); private readonly homeTabTitle: string = nls.localize('home', "Home");
// a set of config modifiers // a set of config modifiers
private readonly _configModifiers: Array<(item: Array<WidgetConfig>, collection: IConfigModifierCollection, context: string) => Array<WidgetConfig>> = [ private readonly _configModifiers: Array<(item: Array<WidgetConfig>, collection: IConfigModifierCollection, context: string) => Array<WidgetConfig>> = [
@@ -109,7 +109,7 @@ export abstract class DashboardPage extends AngularDisposable implements IConfig
if (!this.dashboardService.connectionManagementService.connectionInfo) { if (!this.dashboardService.connectionManagementService.connectionInfo) {
this.notificationService.notify({ this.notificationService.notify({
severity: Severity.Error, severity: Severity.Error,
message: nls.localize('missingConnectionInfo', 'No connection information could be found for this dashboard') message: nls.localize('missingConnectionInfo', "No connection information could be found for this dashboard")
}); });
} else { } else {
let tempWidgets = this.dashboardService.getSettings<Array<WidgetConfig>>([this.context, 'widgets'].join('.')); let tempWidgets = this.dashboardService.getSettings<Array<WidgetConfig>>([this.context, 'widgets'].join('.'));
@@ -42,11 +42,11 @@ const tabSchema: IJSONSchema = {
type: 'string' type: 'string'
}, },
when: { when: {
description: localize('azdata.extension.contributes.tab.when', 'Condition which must be true to show this item'), description: localize('azdata.extension.contributes.tab.when', "Condition which must be true to show this item"),
type: 'string' type: 'string'
}, },
provider: { provider: {
description: localize('azdata.extension.contributes.tab.provider', 'Defines the connection types this tab is compatible with. Defaults to "MSSQL" if not set'), description: localize('azdata.extension.contributes.tab.provider', "Defines the connection types this tab is compatible with. Defaults to 'MSSQL' if not set"),
type: ['string', 'array'] type: ['string', 'array']
}, },
@@ -88,16 +88,16 @@ ExtensionsRegistry.registerExtensionPoint<IDashboardTabContrib | IDashboardTabCo
} }
const publisher = extension.description.publisher; const publisher = extension.description.publisher;
if (!title) { if (!title) {
extension.collector.error(localize('dashboardTab.contribution.noTitleError', 'No title specified for extension.')); extension.collector.error(localize('dashboardTab.contribution.noTitleError', "No title specified for extension."));
return; return;
} }
if (!description) { if (!description) {
extension.collector.warn(localize('dashboardTab.contribution.noDescriptionWarning', 'No description specified to show.')); extension.collector.warn(localize('dashboardTab.contribution.noDescriptionWarning', "No description specified to show."));
} }
if (!container) { if (!container) {
extension.collector.error(localize('dashboardTab.contribution.noContainerError', 'No container specified for extension.')); extension.collector.error(localize('dashboardTab.contribution.noContainerError', "No container specified for extension."));
return; return;
} }
@@ -109,7 +109,7 @@ ExtensionsRegistry.registerExtensionPoint<IDashboardTabContrib | IDashboardTabCo
} }
if (Object.keys(container).length !== 1) { if (Object.keys(container).length !== 1) {
extension.collector.error(localize('dashboardTab.contribution.moreThanOneDashboardContainersError', 'Exactly 1 dashboard container must be defined per space')); extension.collector.error(localize('dashboardTab.contribution.moreThanOneDashboardContainersError', "Exactly 1 dashboard container must be defined per space"));
return; return;
} }
@@ -32,7 +32,7 @@ export function generateDashboardWidgetSchema(type?: 'database' | 'server', exte
type: 'string' type: 'string'
}, },
when: { when: {
description: localize('azdata.extension.contributes.widget.when', 'Condition which must be true to show this item'), description: localize('azdata.extension.contributes.widget.when', "Condition which must be true to show this item"),
type: 'string' type: 'string'
}, },
gridItemConfig: { gridItemConfig: {
@@ -118,7 +118,7 @@ export function generateDashboardGridLayoutSchema(type?: 'database' | 'server',
] ]
}, },
when: { when: {
description: localize('azdata.extension.contributes.widget.when', 'Condition which must be true to show this item'), description: localize('azdata.extension.contributes.widget.when', "Condition which must be true to show this item"),
type: 'string' type: 'string'
} }
} }
@@ -22,7 +22,7 @@ import { ILogService } from 'vs/platform/log/common/log';
export class DatabaseDashboardPage extends DashboardPage implements OnInit { export class DatabaseDashboardPage extends DashboardPage implements OnInit {
protected propertiesWidget: WidgetConfig = { protected propertiesWidget: WidgetConfig = {
name: nls.localize('databasePageName', 'DATABASE DASHBOARD'), name: nls.localize('databasePageName', "DATABASE DASHBOARD"),
widget: { widget: {
'properties-widget': undefined 'properties-widget': undefined
}, },
@@ -8,7 +8,7 @@ import * as nls from 'vs/nls';
import { generateDashboardWidgetSchema, generateDashboardTabSchema } from './dashboardPageContribution'; import { generateDashboardWidgetSchema, generateDashboardTabSchema } from './dashboardPageContribution';
export const databaseDashboardPropertiesSchema: IJSONSchema = { export const databaseDashboardPropertiesSchema: IJSONSchema = {
description: nls.localize('dashboardDatabaseProperties', 'Enable or disable the properties widget'), description: nls.localize('dashboardDatabaseProperties', "Enable or disable the properties widget"),
default: true, default: true,
oneOf: <IJSONSchema[]>[ oneOf: <IJSONSchema[]>[
{ type: 'boolean' }, { type: 'boolean' },
@@ -28,51 +28,51 @@ export const databaseDashboardPropertiesSchema: IJSONSchema = {
type: 'number' type: 'number'
}, },
properties: { properties: {
description: nls.localize('dashboard.databaseproperties', 'Property values to show'), description: nls.localize('dashboard.databaseproperties', "Property values to show"),
type: 'array', type: 'array',
items: { items: {
type: 'object', type: 'object',
properties: { properties: {
displayName: { displayName: {
type: 'string', type: 'string',
description: nls.localize('dashboard.databaseproperties.displayName', 'Display name of the property') description: nls.localize('dashboard.databaseproperties.displayName', "Display name of the property")
}, },
value: { value: {
type: 'string', type: 'string',
description: nls.localize('dashboard.databaseproperties.value', 'Value in the Database Info Object') description: nls.localize('dashboard.databaseproperties.value', "Value in the Database Info Object")
}, },
ignore: { ignore: {
type: 'array', type: 'array',
description: nls.localize('dashboard.databaseproperties.ignore', 'Specify specific values to ignore'), description: nls.localize('dashboard.databaseproperties.ignore', "Specify specific values to ignore"),
items: 'string' items: 'string'
} }
} }
}, },
default: [ default: [
{ {
displayName: nls.localize('recoveryModel', 'Recovery Model'), displayName: nls.localize('recoveryModel', "Recovery Model"),
value: 'recoveryModel' value: 'recoveryModel'
}, },
{ {
displayName: nls.localize('lastDatabaseBackup', 'Last Database Backup'), displayName: nls.localize('lastDatabaseBackup', "Last Database Backup"),
value: 'lastBackupDate', value: 'lastBackupDate',
ignore: [ ignore: [
'1/1/0001 12:00:00 AM' '1/1/0001 12:00:00 AM'
] ]
}, },
{ {
displayName: nls.localize('lastLogBackup', 'Last Log Backup'), displayName: nls.localize('lastLogBackup', "Last Log Backup"),
value: 'lastLogBackupDate', value: 'lastLogBackupDate',
ignore: [ ignore: [
'1/1/0001 12:00:00 AM' '1/1/0001 12:00:00 AM'
] ]
}, },
{ {
displayName: nls.localize('compatibilityLevel', 'Compatibility Level'), displayName: nls.localize('compatibilityLevel', "Compatibility Level"),
value: 'compatibilityLevel' value: 'compatibilityLevel'
}, },
{ {
displayName: nls.localize('owner', 'Owner'), displayName: nls.localize('owner', "Owner"),
value: 'owner' value: 'owner'
} }
] ]
@@ -85,7 +85,7 @@ export const databaseDashboardPropertiesSchema: IJSONSchema = {
export const databaseDashboardSettingSchema: IJSONSchema = { export const databaseDashboardSettingSchema: IJSONSchema = {
type: ['array'], type: ['array'],
description: nls.localize('dashboardDatabase', 'Customizes the database dashboard page'), description: nls.localize('dashboardDatabase', "Customizes the database dashboard page"),
items: generateDashboardWidgetSchema('database'), items: generateDashboardWidgetSchema('database'),
default: [ default: [
{ {
@@ -119,7 +119,7 @@ export const databaseDashboardSettingSchema: IJSONSchema = {
export const databaseDashboardTabsSchema: IJSONSchema = { export const databaseDashboardTabsSchema: IJSONSchema = {
type: ['array'], type: ['array'],
description: nls.localize('dashboardDatabaseTabs', 'Customizes the database dashboard tabs'), description: nls.localize('dashboardDatabaseTabs', "Customizes the database dashboard tabs"),
items: generateDashboardTabSchema('database'), items: generateDashboardTabSchema('database'),
default: [ default: [
] ]
@@ -23,7 +23,7 @@ import { mssqlProviderName } from 'sql/platform/connection/common/constants';
export class ServerDashboardPage extends DashboardPage implements OnInit { export class ServerDashboardPage extends DashboardPage implements OnInit {
protected propertiesWidget: WidgetConfig = { protected propertiesWidget: WidgetConfig = {
name: nls.localize('serverPageName', 'SERVER DASHBOARD'), name: nls.localize('serverPageName', "SERVER DASHBOARD"),
widget: { widget: {
'properties-widget': undefined 'properties-widget': undefined
}, },
@@ -17,7 +17,7 @@ export interface IPropertiesConfig {
} }
export const serverDashboardPropertiesSchema: IJSONSchema = { export const serverDashboardPropertiesSchema: IJSONSchema = {
description: nls.localize('dashboardServerProperties', 'Enable or disable the properties widget'), description: nls.localize('dashboardServerProperties', "Enable or disable the properties widget"),
default: true, default: true,
oneOf: [ oneOf: [
{ type: 'boolean' }, { type: 'boolean' },
@@ -35,36 +35,36 @@ export const serverDashboardPropertiesSchema: IJSONSchema = {
type: 'number' type: 'number'
}, },
properties: { properties: {
description: nls.localize('dashboard.serverproperties', 'Property values to show'), description: nls.localize('dashboard.serverproperties', "Property values to show"),
type: 'array', type: 'array',
items: { items: {
type: 'object', type: 'object',
properties: { properties: {
displayName: { displayName: {
type: 'string', type: 'string',
description: nls.localize('dashboard.serverproperties.displayName', 'Display name of the property') description: nls.localize('dashboard.serverproperties.displayName', "Display name of the property")
}, },
value: { value: {
type: 'string', type: 'string',
description: nls.localize('dashboard.serverproperties.value', 'Value in the Server Info Object') description: nls.localize('dashboard.serverproperties.value', "Value in the Server Info Object")
} }
} }
}, },
default: [ default: [
{ {
displayName: nls.localize('version', 'Version'), displayName: nls.localize('version', "Version"),
value: 'serverVersion' value: 'serverVersion'
}, },
{ {
displayName: nls.localize('edition', 'Edition'), displayName: nls.localize('edition', "Edition"),
value: 'serverEdition' value: 'serverEdition'
}, },
{ {
displayName: nls.localize('computerName', 'Computer Name'), displayName: nls.localize('computerName', "Computer Name"),
value: 'machineName' value: 'machineName'
}, },
{ {
displayName: nls.localize('osVersion', 'OS Version'), displayName: nls.localize('osVersion', "OS Version"),
value: 'osVersion' value: 'osVersion'
} }
] ]
@@ -109,14 +109,14 @@ const defaultVal = [
export const serverDashboardSettingSchema: IJSONSchema = { export const serverDashboardSettingSchema: IJSONSchema = {
type: ['array'], type: ['array'],
description: nls.localize('dashboardServer', 'Customizes the server dashboard page'), description: nls.localize('dashboardServer', "Customizes the server dashboard page"),
items: generateDashboardWidgetSchema('server'), items: generateDashboardWidgetSchema('server'),
default: defaultVal default: defaultVal
}; };
export const serverDashboardTabsSchema: IJSONSchema = { export const serverDashboardTabsSchema: IJSONSchema = {
type: ['array'], type: ['array'],
description: nls.localize('dashboardServerTabs', 'Customizes the Server dashboard tabs'), description: nls.localize('dashboardServerTabs', "Customizes the Server dashboard tabs"),
items: generateDashboardTabSchema('server'), items: generateDashboardTabSchema('server'),
default: [] default: []
}; };
@@ -41,7 +41,7 @@ export class BreadcrumbService implements IBreadcrumbService {
private getBreadcrumbsLink(page: BreadcrumbClass): MenuItem[] { private getBreadcrumbsLink(page: BreadcrumbClass): MenuItem[] {
this.itemBreadcrums = []; this.itemBreadcrums = [];
const profile = this.commonService.connectionManagementService.connectionInfo.connectionProfile; const profile = this.commonService.connectionManagementService.connectionInfo.connectionProfile;
this.itemBreadcrums.push({ label: nls.localize('homeCrumb', 'Home') }); this.itemBreadcrums.push({ label: nls.localize('homeCrumb', "Home") });
switch (page) { switch (page) {
case BreadcrumbClass.DatabasePage: case BreadcrumbClass.DatabasePage:
this.itemBreadcrums.push(this.getServerBreadcrumb(profile)); this.itemBreadcrums.push(this.getServerBreadcrumb(profile));
@@ -74,7 +74,7 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
ngOnInit() { ngOnInit() {
this._inited = true; this._inited = true;
const placeholderLabel = this._config.context === 'database' ? nls.localize('seachObjects', 'Search by name of type (a:, t:, v:, f:, or sp:)') : nls.localize('searchDatabases', 'Search databases'); const placeholderLabel = this._config.context === 'database' ? nls.localize('seachObjects', "Search by name of type (a:, t:, v:, f:, or sp:)") : nls.localize('searchDatabases', "Search databases");
const inputOptions: IInputOptions = { const inputOptions: IInputOptions = {
placeholder: placeholderLabel, placeholder: placeholderLabel,
@@ -229,7 +229,7 @@ export class InsightsWidget extends DashboardWidget implements IDashboardWidget,
this._cd.detectChanges(); this._cd.detectChanges();
if (result.rowCount === 0) { if (result.rowCount === 0) {
this.showError(nls.localize('noResults', 'No results to show')); this.showError(nls.localize('noResults', "No results to show"));
return; return;
} }
@@ -12,11 +12,11 @@ const insightRegistry = Registry.as<IInsightRegistry>(InsightExtensions.InsightC
export const insightsSchema: IJSONSchema = { export const insightsSchema: IJSONSchema = {
type: 'object', type: 'object',
description: nls.localize('insightWidgetDescription', 'Adds a widget that can query a server or database and display the results in multiple ways - as a chart, summarized count, and more'), description: nls.localize('insightWidgetDescription', "Adds a widget that can query a server or database and display the results in multiple ways - as a chart, summarized count, and more"),
properties: { properties: {
cacheId: { cacheId: {
type: 'string', type: 'string',
description: nls.localize('insightIdDescription', 'Unique Identifier used for cacheing the results of the insight.') description: nls.localize('insightIdDescription', "Unique Identifier used for caching the results of the insight.")
}, },
type: { type: {
type: 'object', type: 'object',
@@ -26,15 +26,15 @@ export const insightsSchema: IJSONSchema = {
}, },
query: { query: {
type: ['string', 'array'], type: ['string', 'array'],
description: nls.localize('insightQueryDescription', 'SQL query to run. This should return exactly 1 resultset.') description: nls.localize('insightQueryDescription', "SQL query to run. This should return exactly 1 resultset.")
}, },
queryFile: { queryFile: {
type: 'string', type: 'string',
description: nls.localize('insightQueryFileDescription', '[Optional] path to a file that contains a query. Use if "query" is not set') description: nls.localize('insightQueryFileDescription', "[Optional] path to a file that contains a query. Use if 'query' is not set")
}, },
autoRefreshInterval: { autoRefreshInterval: {
type: 'number', type: 'number',
description: nls.localize('insightAutoRefreshIntervalDescription', '[Optional] Auto refresh interval in minutes, if not set, there will be no auto refresh') description: nls.localize('insightAutoRefreshIntervalDescription', "[Optional] Auto refresh interval in minutes, if not set, there will be no auto refresh")
}, },
details: { details: {
type: 'object', type: 'object',
@@ -97,15 +97,15 @@ export const insightsSchema: IJSONSchema = {
}, },
database: { database: {
type: 'string', type: 'string',
description: nls.localize('actionDatabaseDescription', 'Target database for the action; can use the format "${columnName}" to use a data driven column name.') description: nls.localize('actionDatabaseDescription', "Target database for the action; can use the format '${ columnName }' to use a data driven column name.")
}, },
server: { server: {
type: 'string', type: 'string',
description: nls.localize('actionServerDescription', 'Target server for the action; can use the format "${columnName}" to use a data driven column name.') description: nls.localize('actionServerDescription', "Target server for the action; can use the format '${ columnName }' to use a data driven column name.")
}, },
user: { user: {
type: 'string', type: 'string',
description: nls.localize('actionUserDescription', 'Target user for the action; can use the format "${columnName}" to use a data driven column name.') description: nls.localize('actionUserDescription', "Target user for the action; can use the format '${ columnName }' to use a data driven column name.")
} }
} }
} }
@@ -118,7 +118,7 @@ const insightType: IJSONSchema = {
type: 'object', type: 'object',
properties: { properties: {
id: { id: {
description: nls.localize('carbon.extension.contributes.insightType.id', 'Identifier of the insight'), description: nls.localize('carbon.extension.contributes.insightType.id', "Identifier of the insight"),
type: 'string' type: 'string'
}, },
contrib: insightsSchema contrib: insightsSchema
@@ -49,7 +49,7 @@ export abstract class ChartInsight extends Disposable implements IInsightsView {
protected _config: IChartConfig; protected _config: IChartConfig;
protected _data: IInsightData; protected _data: IInsightData;
protected readonly CHART_ERROR_MESSAGE = nls.localize('chartErrorMessage', 'Chart cannot be displayed with the given data'); protected readonly CHART_ERROR_MESSAGE = nls.localize('chartErrorMessage', "Chart cannot be displayed with the given data");
protected abstract get chartType(): ChartType; protected abstract get chartType(): ChartType;
@@ -8,38 +8,38 @@ import * as nls from 'vs/nls';
export const chartInsightSchema: IJSONSchema = { export const chartInsightSchema: IJSONSchema = {
type: 'object', type: 'object',
description: nls.localize('chartInsightDescription', 'Displays results of a query as a chart on the dashboard'), description: nls.localize('chartInsightDescription', "Displays results of a query as a chart on the dashboard"),
properties: { properties: {
colorMap: { colorMap: {
type: 'object', type: 'object',
description: nls.localize('colorMapDescription', 'Maps "column name" -> color. for example add "column1": red to ensure this column uses a red color ') description: nls.localize('colorMapDescription', "Maps 'column name' -> color. for example add 'column1': red to ensure this column uses a red color ")
}, },
legendPosition: { legendPosition: {
type: 'string', type: 'string',
description: nls.localize('legendDescription', 'Indicates preferred position and visibility of the chart legend. These are the column names from your query, and map to the label of each chart entry'), description: nls.localize('legendDescription', "Indicates preferred position and visibility of the chart legend. These are the column names from your query, and map to the label of each chart entry"),
default: 'none', default: 'none',
enum: ['top', 'bottom', 'left', 'right', 'none'] enum: ['top', 'bottom', 'left', 'right', 'none']
}, },
labelFirstColumn: { labelFirstColumn: {
type: 'boolean', type: 'boolean',
description: nls.localize('labelFirstColumnDescription', 'If dataDirection is horizontal, setting this to true uses the first columns value for the legend.'), description: nls.localize('labelFirstColumnDescription', "If dataDirection is horizontal, setting this to true uses the first columns value for the legend."),
default: false default: false
}, },
columnsAsLabels: { columnsAsLabels: {
type: 'boolean', type: 'boolean',
description: nls.localize('columnsAsLabels', 'If dataDirection is vertical, setting this to true will use the columns names for the legend.'), description: nls.localize('columnsAsLabels', "If dataDirection is vertical, setting this to true will use the columns names for the legend."),
default: false default: false
}, },
dataDirection: { dataDirection: {
type: 'string', type: 'string',
description: nls.localize('dataDirectionDescription', 'Defines whether the data is read from a column (vertical) or a row (horizontal). For time series this is ignored as direction must be vertical.'), description: nls.localize('dataDirectionDescription', "Defines whether the data is read from a column (vertical) or a row (horizontal). For time series this is ignored as direction must be vertical."),
default: 'vertical', default: 'vertical',
enum: ['vertical', 'horizontal'], enum: ['vertical', 'horizontal'],
enumDescriptions: ['When vertical, the first column is used to define the x-axis labels, with other columns expected to be numerical.', 'When horizontal, the column names are used as the x-axis labels.'] enumDescriptions: ['When vertical, the first column is used to define the x-axis labels, with other columns expected to be numerical.', 'When horizontal, the column names are used as the x-axis labels.']
}, },
showTopNData: { showTopNData: {
type: 'number', type: 'number',
description: nls.localize('showTopNData', 'If showTopNData is set, showing only top N data in the chart.') description: nls.localize('showTopNData', "If showTopNData is set, showing only top N data in the chart.")
} }
} }
}; };
@@ -16,7 +16,7 @@ const properties: IJSONSchema = {
properties: { properties: {
dataType: { dataType: {
type: 'string', type: 'string',
description: nls.localize('dataTypeDescription', 'Indicates data property of a data set for a chart.'), description: nls.localize('dataTypeDescription', "Indicates data property of a data set for a chart."),
default: 'number', default: 'number',
enum: ['number', 'point'], enum: ['number', 'point'],
enumDescriptions: ['Set "number" if the data values are contained in 1 column.', 'Set "point" if the data is an {x,y} combination requiring 2 columns for each value.'] enumDescriptions: ['Set "number" if the data values are contained in 1 column.', 'Set "point" if the data is an {x,y} combination requiring 2 columns for each value.']
@@ -12,7 +12,7 @@ import * as nls from 'vs/nls';
const countInsightSchema: IJSONSchema = { const countInsightSchema: IJSONSchema = {
type: 'null', type: 'null',
description: nls.localize('countInsightDescription', 'For each column in a resultset, displays the value in row 0 as a count followed by the column name. Supports "1 Healthy", "3 Unhealthy" for example, where "Healthy" is the column name and 1 is the value in row 1 cell 1') description: nls.localize('countInsightDescription', "For each column in a resultset, displays the value in row 0 as a count followed by the column name. Supports '1 Healthy', '3 Unhealthy' for example, where 'Healthy' is the column name and 1 is the value in row 1 cell 1")
}; };
registerInsight('count', '', countInsightSchema, CountInsight); registerInsight('count', '', countInsightSchema, CountInsight);
@@ -12,17 +12,17 @@ import * as nls from 'vs/nls';
const imageInsightSchema: IJSONSchema = { const imageInsightSchema: IJSONSchema = {
type: 'object', type: 'object',
description: nls.localize('imageInsightDescription', 'Displays an image, for example one returned by an R query using ggplot2'), description: nls.localize('imageInsightDescription', "Displays an image, for example one returned by an R query using ggplot2"),
properties: { properties: {
imageFormat: { imageFormat: {
type: 'string', type: 'string',
description: nls.localize('imageFormatDescription', 'What format is expected - is this a JPEG, PNG or other format?'), description: nls.localize('imageFormatDescription', "What format is expected - is this a JPEG, PNG or other format?"),
default: 'jpeg', default: 'jpeg',
enum: ['jpeg', 'png'] enum: ['jpeg', 'png']
}, },
encoding: { encoding: {
type: 'string', type: 'string',
description: nls.localize('encodingDescription', 'Is this encoded as hex, base64 or some other format?'), description: nls.localize('encodingDescription', "Is this encoded as hex, base64 or some other format?"),
default: 'hex', default: 'hex',
enum: ['hex', 'base64'] enum: ['hex', 'base64']
}, },
@@ -12,7 +12,7 @@ import * as nls from 'vs/nls';
const tableInsightSchema: IJSONSchema = { const tableInsightSchema: IJSONSchema = {
type: 'null', type: 'null',
description: nls.localize('tableInsightDescription', 'Displays the results in a simple table') description: nls.localize('tableInsightDescription', "Displays the results in a simple table")
}; };
registerInsight('table', '', tableInsightSchema, TableInsight); registerInsight('table', '', tableInsightSchema, TableInsight);
@@ -7,8 +7,8 @@ import { ProviderProperties } from './propertiesWidget.component';
import * as nls from 'vs/nls'; import * as nls from 'vs/nls';
import { mssqlProviderName } from 'sql/platform/connection/common/constants'; import { mssqlProviderName } from 'sql/platform/connection/common/constants';
const azureEditionDisplayName = nls.localize('azureEdition', 'Edition'); const azureEditionDisplayName = nls.localize('azureEdition', "Edition");
const azureType = nls.localize('azureType', 'Type'); const azureType = nls.localize('azureType', "Type");
export const properties: Array<ProviderProperties> = [ export const properties: Array<ProviderProperties> = [
{ {
@@ -23,47 +23,47 @@ export const properties: Array<ProviderProperties> = [
}, },
databaseProperties: [ databaseProperties: [
{ {
displayName: nls.localize('recoveryModel', 'Recovery Model'), displayName: nls.localize('recoveryModel', "Recovery Model"),
value: 'recoveryModel' value: 'recoveryModel'
}, },
{ {
displayName: nls.localize('lastDatabaseBackup', 'Last Database Backup'), displayName: nls.localize('lastDatabaseBackup', "Last Database Backup"),
value: 'lastBackupDate', value: 'lastBackupDate',
ignore: [ ignore: [
'1/1/0001 12:00:00 AM' '1/1/0001 12:00:00 AM'
] ]
}, },
{ {
displayName: nls.localize('lastLogBackup', 'Last Log Backup'), displayName: nls.localize('lastLogBackup', "Last Log Backup"),
value: 'lastLogBackupDate', value: 'lastLogBackupDate',
ignore: [ ignore: [
'1/1/0001 12:00:00 AM' '1/1/0001 12:00:00 AM'
] ]
}, },
{ {
displayName: nls.localize('compatibilityLevel', 'Compatibility Level'), displayName: nls.localize('compatibilityLevel', "Compatibility Level"),
value: 'compatibilityLevel' value: 'compatibilityLevel'
}, },
{ {
displayName: nls.localize('owner', 'Owner'), displayName: nls.localize('owner', "Owner"),
value: 'owner' value: 'owner'
} }
], ],
serverProperties: [ serverProperties: [
{ {
displayName: nls.localize('version', 'Version'), displayName: nls.localize('version', "Version"),
value: 'serverVersion' value: 'serverVersion'
}, },
{ {
displayName: nls.localize('edition', 'Edition'), displayName: nls.localize('edition', "Edition"),
value: 'serverEdition' value: 'serverEdition'
}, },
{ {
displayName: nls.localize('computerName', 'Computer Name'), displayName: nls.localize('computerName', "Computer Name"),
value: 'machineName' value: 'machineName'
}, },
{ {
displayName: nls.localize('osVersion', 'OS Version'), displayName: nls.localize('osVersion', "OS Version"),
value: 'osVersion' value: 'osVersion'
} }
] ]
@@ -81,21 +81,21 @@ export const properties: Array<ProviderProperties> = [
value: 'azureEdition' value: 'azureEdition'
}, },
{ {
displayName: nls.localize('serviceLevelObjective', 'Pricing Tier'), displayName: nls.localize('serviceLevelObjective', "Pricing Tier"),
value: 'serviceLevelObjective' value: 'serviceLevelObjective'
}, },
{ {
displayName: nls.localize('compatibilityLevel', 'Compatibility Level'), displayName: nls.localize('compatibilityLevel', "Compatibility Level"),
value: 'compatibilityLevel' value: 'compatibilityLevel'
}, },
{ {
displayName: nls.localize('owner', 'Owner'), displayName: nls.localize('owner', "Owner"),
value: 'owner' value: 'owner'
} }
], ],
serverProperties: [ serverProperties: [
{ {
displayName: nls.localize('version', 'Version'), displayName: nls.localize('version', "Version"),
value: 'serverVersion' value: 'serverVersion'
}, },
{ {
@@ -31,15 +31,15 @@ const viewDescriptor: IJSONSchema = {
type: 'object', type: 'object',
properties: { properties: {
id: { id: {
description: localize('vscode.extension.contributes.view.id', 'Identifier of the view. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`.'), description: localize('vscode.extension.contributes.view.id', "Identifier of the view. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`."),
type: 'string' type: 'string'
}, },
name: { name: {
description: localize('vscode.extension.contributes.view.name', 'The human-readable name of the view. Will be shown'), description: localize('vscode.extension.contributes.view.name', "The human-readable name of the view. Will be shown"),
type: 'string' type: 'string'
}, },
when: { when: {
description: localize('vscode.extension.contributes.view.when', 'Condition which must be true to show this view'), description: localize('vscode.extension.contributes.view.when', "Condition which must be true to show this view"),
type: 'string' type: 'string'
}, },
} }
@@ -133,15 +133,15 @@ class DataExplorerContainerExtensionHandler implements IWorkbenchContribution {
for (let descriptor of viewDescriptors) { for (let descriptor of viewDescriptors) {
if (typeof descriptor.id !== 'string') { if (typeof descriptor.id !== 'string') {
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'id')); collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", "id"));
return false; return false;
} }
if (typeof descriptor.name !== 'string') { if (typeof descriptor.name !== 'string') {
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'name')); collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", "name"));
return false; return false;
} }
if (descriptor.when && typeof descriptor.when !== 'string') { if (descriptor.when && typeof descriptor.when !== 'string') {
collector.error(localize('optstring', "property `{0}` can be omitted or must be of type `string`", 'when')); collector.error(localize('optstring', "property `{0}` can be omitted or must be of type `string`", "when"));
return false; return false;
} }
} }
@@ -28,7 +28,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 4, order: 4,
command: { command: {
id: DISCONNECT_COMMAND_ID, id: DISCONNECT_COMMAND_ID,
title: localize('disconnect', 'Disconnect') title: localize('disconnect', "Disconnect")
}, },
when: ContextKeyExpr.and(NodeContextKey.IsConnected, when: ContextKeyExpr.and(NodeContextKey.IsConnected,
new ContextKeyNotEqualsExpr('nodeType', NodeType.Folder)) new ContextKeyNotEqualsExpr('nodeType', NodeType.Folder))
@@ -39,7 +39,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 3, order: 3,
command: { command: {
id: DISCONNECT_COMMAND_ID, id: DISCONNECT_COMMAND_ID,
title: localize('disconnect', 'Disconnect') title: localize('disconnect', "Disconnect")
}, },
when: ContextKeyExpr.and(NodeContextKey.IsConnected, when: ContextKeyExpr.and(NodeContextKey.IsConnected,
MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
@@ -52,7 +52,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 2, order: 2,
command: { command: {
id: NEW_QUERY_COMMAND_ID, id: NEW_QUERY_COMMAND_ID,
title: localize('newQuery', 'New Query') title: localize('newQuery', "New Query")
}, },
when: MssqlNodeContext.IsDatabaseOrServer when: MssqlNodeContext.IsDatabaseOrServer
}); });
@@ -63,7 +63,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 1, order: 1,
command: { command: {
id: MANAGE_COMMAND_ID, id: MANAGE_COMMAND_ID,
title: localize('manage', 'Manage') title: localize('manage', "Manage")
}, },
when: MssqlNodeContext.IsDatabaseOrServer when: MssqlNodeContext.IsDatabaseOrServer
}); });
@@ -75,7 +75,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 6, order: 6,
command: { command: {
id: REFRESH_COMMAND_ID, id: REFRESH_COMMAND_ID,
title: localize('refresh', 'Refresh') title: localize('refresh', "Refresh")
}, },
when: NodeContextKey.IsConnectable when: NodeContextKey.IsConnectable
}); });
@@ -87,7 +87,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 3, order: 3,
command: { command: {
id: NEW_NOTEBOOK_COMMAND_ID, id: NEW_NOTEBOOK_COMMAND_ID,
title: localize('newNotebook', 'New Notebook') title: localize('newNotebook', "New Notebook")
}, },
when: ContextKeyExpr.and(NodeContextKey.IsConnectable, when: ContextKeyExpr.and(NodeContextKey.IsConnectable,
MssqlNodeContext.IsDatabaseOrServer, MssqlNodeContext.IsDatabaseOrServer,
@@ -100,7 +100,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 7, order: 7,
command: { command: {
id: DATA_TIER_WIZARD_COMMAND_ID, id: DATA_TIER_WIZARD_COMMAND_ID,
title: localize('dacFx', 'Data-tier Application Wizard') title: localize('dacFx', "Data-tier Application Wizard")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.IsDatabaseOrServer) MssqlNodeContext.IsDatabaseOrServer)
@@ -112,7 +112,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 7, order: 7,
command: { command: {
id: DATA_TIER_WIZARD_COMMAND_ID, id: DATA_TIER_WIZARD_COMMAND_ID,
title: localize('dacFx', 'Data-tier Application Wizard') title: localize('dacFx', "Data-tier Application Wizard")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.NodeType.isEqualTo(NodeType.Folder), MssqlNodeContext.NodeType.isEqualTo(NodeType.Folder),
@@ -125,7 +125,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 8, order: 8,
command: { command: {
id: PROFILER_COMMAND_ID, id: PROFILER_COMMAND_ID,
title: localize('profiler', 'Launch Profiler') title: localize('profiler', "Launch Profiler")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.NodeType.isEqualTo(NodeType.Server)) MssqlNodeContext.NodeType.isEqualTo(NodeType.Server))
@@ -137,7 +137,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 10, order: 10,
command: { command: {
id: IMPORT_COMMAND_ID, id: IMPORT_COMMAND_ID,
title: localize('flatFileImport', 'Import Wizard') title: localize('flatFileImport', "Import Wizard")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database)) MssqlNodeContext.NodeType.isEqualTo(NodeType.Database))
@@ -149,7 +149,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 9, order: 9,
command: { command: {
id: SCHEMA_COMPARE_COMMAND_ID, id: SCHEMA_COMPARE_COMMAND_ID,
title: localize('schemaCompare', 'Schema Compare') title: localize('schemaCompare', "Schema Compare")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database)) MssqlNodeContext.NodeType.isEqualTo(NodeType.Database))
@@ -161,7 +161,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 4, order: 4,
command: { command: {
id: BACKUP_COMMAND_ID, id: BACKUP_COMMAND_ID,
title: localize('backup', 'Backup') title: localize('backup', "Backup")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database)) MssqlNodeContext.NodeType.isEqualTo(NodeType.Database))
@@ -173,7 +173,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 5, order: 5,
command: { command: {
id: RESTORE_COMMAND_ID, id: RESTORE_COMMAND_ID,
title: localize('restore', 'Restore') title: localize('restore', "Restore")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database)) MssqlNodeContext.NodeType.isEqualTo(NodeType.Database))
@@ -185,7 +185,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 11, order: 11,
command: { command: {
id: GENERATE_SCRIPTS_COMMAND_ID, id: GENERATE_SCRIPTS_COMMAND_ID,
title: localize('generateScripts', 'Generate Scripts...') title: localize('generateScripts', "Generate Scripts...")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database), MssqlNodeContext.NodeType.isEqualTo(NodeType.Database),
@@ -198,7 +198,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 12, order: 12,
command: { command: {
id: PROPERTIES_COMMAND_ID, id: PROPERTIES_COMMAND_ID,
title: localize('properties', 'Properties') title: localize('properties', "Properties")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.NodeType.isEqualTo(NodeType.Server), ContextKeyExpr.not('isCloud'), MssqlNodeContext.NodeType.isEqualTo(NodeType.Server), ContextKeyExpr.not('isCloud'),
@@ -210,7 +210,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 12, order: 12,
command: { command: {
id: PROPERTIES_COMMAND_ID, id: PROPERTIES_COMMAND_ID,
title: localize('properties', 'Properties') title: localize('properties', "Properties")
}, },
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName), when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
MssqlNodeContext.IsWindows, MssqlNodeContext.IsWindows,
@@ -225,7 +225,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 3, order: 3,
command: { command: {
id: SCRIPT_AS_CREATE_COMMAND_ID, id: SCRIPT_AS_CREATE_COMMAND_ID,
title: localize('scriptAsCreate', 'Script as Create') title: localize('scriptAsCreate', "Script as Create")
}, },
when: MssqlNodeContext.CanScriptAsCreateOrDelete when: MssqlNodeContext.CanScriptAsCreateOrDelete
}); });
@@ -236,7 +236,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 4, order: 4,
command: { command: {
id: SCRIPT_AS_DELETE_COMMAND_ID, id: SCRIPT_AS_DELETE_COMMAND_ID,
title: localize('scriptAsDelete', 'Script as Drop') title: localize('scriptAsDelete', "Script as Drop")
}, },
when: MssqlNodeContext.CanScriptAsCreateOrDelete when: MssqlNodeContext.CanScriptAsCreateOrDelete
}); });
@@ -247,7 +247,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 1, order: 1,
command: { command: {
id: SCRIPT_AS_SELECT_COMMAND_ID, id: SCRIPT_AS_SELECT_COMMAND_ID,
title: localize('scriptAsSelect', 'Select Top 1000') title: localize('scriptAsSelect', "Select Top 1000")
}, },
when: MssqlNodeContext.CanScriptAsSelect when: MssqlNodeContext.CanScriptAsSelect
}); });
@@ -258,7 +258,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 5, order: 5,
command: { command: {
id: SCRIPT_AS_EXECUTE_COMMAND_ID, id: SCRIPT_AS_EXECUTE_COMMAND_ID,
title: localize('scriptAsExecute', 'Script as Execute') title: localize('scriptAsExecute', "Script as Execute")
}, },
when: MssqlNodeContext.CanScriptAsExecute when: MssqlNodeContext.CanScriptAsExecute
}); });
@@ -269,7 +269,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 5, order: 5,
command: { command: {
id: SCRIPT_AS_ALTER_COMMAND_ID, id: SCRIPT_AS_ALTER_COMMAND_ID,
title: localize('scriptAsAlter', 'Script as Alter') title: localize('scriptAsAlter', "Script as Alter")
}, },
when: MssqlNodeContext.CanScriptAsAlter when: MssqlNodeContext.CanScriptAsAlter
}); });
@@ -280,7 +280,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
order: 2, order: 2,
command: { command: {
id: EDIT_DATA_COMMAND_ID, id: EDIT_DATA_COMMAND_ID,
title: localize('editData', 'Edit Data') title: localize('editData', "Edit Data")
}, },
when: MssqlNodeContext.CanEditData when: MssqlNodeContext.CanEditData
}); });
@@ -70,7 +70,7 @@ export class RefreshTableAction extends EditDataAction {
@INotificationService private _notificationService: INotificationService, @INotificationService private _notificationService: INotificationService,
) { ) {
super(editor, RefreshTableAction.ID, RefreshTableAction.EnabledClass, _connectionManagementService); super(editor, RefreshTableAction.ID, RefreshTableAction.EnabledClass, _connectionManagementService);
this.label = nls.localize('editData.run', 'Run'); this.label = nls.localize('editData.run', "Run");
} }
public run(): Promise<void> { public run(): Promise<void> {
@@ -91,7 +91,7 @@ export class RefreshTableAction extends EditDataAction {
}, error => { }, error => {
this._notificationService.notify({ this._notificationService.notify({
severity: Severity.Error, severity: Severity.Error,
message: nls.localize('disposeEditFailure', 'Dispose Edit Failed With Error: ') + error message: nls.localize('disposeEditFailure', "Dispose Edit Failed With Error: ") + error
}); });
}); });
} }
@@ -113,7 +113,7 @@ export class StopRefreshTableAction extends EditDataAction {
) { ) {
super(editor, StopRefreshTableAction.ID, StopRefreshTableAction.EnabledClass, _connectionManagementService); super(editor, StopRefreshTableAction.ID, StopRefreshTableAction.EnabledClass, _connectionManagementService);
this.enabled = false; this.enabled = false;
this.label = nls.localize('editData.stop', 'Stop'); this.label = nls.localize('editData.stop', "Stop");
} }
public run(): Promise<void> { public run(): Promise<void> {
@@ -235,8 +235,8 @@ export class ShowQueryPaneAction extends EditDataAction {
private static EnabledClass = 'filterLabel'; private static EnabledClass = 'filterLabel';
public static ID = 'showQueryPaneAction'; public static ID = 'showQueryPaneAction';
private readonly showSqlLabel = nls.localize('editData.showSql', 'Show SQL Pane'); private readonly showSqlLabel = nls.localize('editData.showSql', "Show SQL Pane");
private readonly closeSqlLabel = nls.localize('editData.closeSql', 'Close SQL Pane'); private readonly closeSqlLabel = nls.localize('editData.closeSql', "Close SQL Pane");
constructor(editor: EditDataEditor, constructor(editor: EditDataEditor,
@IQueryModelService private _queryModelService: IQueryModelService, @IQueryModelService private _queryModelService: IQueryModelService,
@@ -323,7 +323,7 @@ export class EditDataEditor extends BaseEditor {
// Create HTML Elements for the taskbar // Create HTML Elements for the taskbar
let separator = Taskbar.createTaskbarSeparator(); let separator = Taskbar.createTaskbarSeparator();
let textSeparator = Taskbar.createTaskbarText(nls.localize('maxRowTaskbar', 'Max Rows:')); let textSeparator = Taskbar.createTaskbarText(nls.localize('maxRowTaskbar', "Max Rows:"));
this._spinnerElement = Taskbar.createTaskbarSpinner(); this._spinnerElement = Taskbar.createTaskbarSpinner();
@@ -166,7 +166,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
this.notificationService.notify({ this.notificationService.notify({
severity: Severity.Error, severity: Severity.Error,
message: nls.localize('connectionFailure', 'Edit Data Session Failed To Connect') message: nls.localize('connectionFailure', "Edit Data Session Failed To Connect")
}); });
} }
} }
@@ -33,7 +33,7 @@ export class EditDataGridActionProvider extends GridActionProvider {
export class DeleteRowAction extends Action { export class DeleteRowAction extends Action {
public static ID = 'grid.deleteRow'; public static ID = 'grid.deleteRow';
public static LABEL = localize('deleteRow', 'Delete Row'); public static LABEL = localize('deleteRow', "Delete Row");
constructor( constructor(
id: string, id: string,
@@ -51,7 +51,7 @@ export class DeleteRowAction extends Action {
export class RevertRowAction extends Action { export class RevertRowAction extends Action {
public static ID = 'grid.revertRow'; public static ID = 'grid.revertRow';
public static LABEL = localize('revertRow', 'Revert Current Row'); public static LABEL = localize('revertRow', "Revert Current Row");
constructor( constructor(
id: string, id: string,
@@ -37,16 +37,16 @@ export class AlertsViewComponent extends JobManagementView implements OnInit, On
private columns: Array<Slick.Column<any>> = [ private columns: Array<Slick.Column<any>> = [
{ {
name: nls.localize('jobAlertColumns.name', 'Name'), name: nls.localize('jobAlertColumns.name', "Name"),
field: 'name', field: 'name',
formatter: (row, cell, value, columnDef, dataContext) => this.renderName(row, cell, value, columnDef, dataContext), formatter: (row, cell, value, columnDef, dataContext) => this.renderName(row, cell, value, columnDef, dataContext),
width: 500, width: 500,
id: 'name' id: 'name'
}, },
{ name: nls.localize('jobAlertColumns.lastOccurrenceDate', 'Last Occurrence'), field: 'lastOccurrenceDate', width: 150, id: 'lastOccurrenceDate' }, { name: nls.localize('jobAlertColumns.lastOccurrenceDate', "Last Occurrence"), field: 'lastOccurrenceDate', width: 150, id: 'lastOccurrenceDate' },
{ name: nls.localize('jobAlertColumns.enabled', 'Enabled'), field: 'enabled', width: 80, id: 'enabled' }, { name: nls.localize('jobAlertColumns.enabled', "Enabled"), field: 'enabled', width: 80, id: 'enabled' },
{ name: nls.localize('jobAlertColumns.delayBetweenResponses', 'Delay Between Responses (in secs)'), field: 'delayBetweenResponses', width: 200, id: 'delayBetweenResponses' }, { name: nls.localize('jobAlertColumns.delayBetweenResponses', "Delay Between Responses (in secs)"), field: 'delayBetweenResponses', width: 200, id: 'delayBetweenResponses' },
{ name: nls.localize('jobAlertColumns.categoryName', 'Category Name'), field: 'categoryName', width: 250, id: 'categoryName' }, { name: nls.localize('jobAlertColumns.categoryName', "Category Name"), field: 'categoryName', width: 250, id: 'categoryName' },
]; ];
private options: Slick.GridOptions<any> = { private options: Slick.GridOptions<any> = {
@@ -222,9 +222,9 @@ export class JobHistoryComponent extends JobManagementView implements OnInit {
}); });
self._stepRows.unshift(new JobStepsViewRow()); self._stepRows.unshift(new JobStepsViewRow());
self._stepRows[0].rowID = 'stepsColumn' + self._agentJobInfo.jobId; self._stepRows[0].rowID = 'stepsColumn' + self._agentJobInfo.jobId;
self._stepRows[0].stepId = nls.localize('stepRow.stepID', 'Step ID'); self._stepRows[0].stepId = nls.localize('stepRow.stepID', "Step ID");
self._stepRows[0].stepName = nls.localize('stepRow.stepName', 'Step Name'); self._stepRows[0].stepName = nls.localize('stepRow.stepName', "Step Name");
self._stepRows[0].message = nls.localize('stepRow.message', 'Message'); self._stepRows[0].message = nls.localize('stepRow.message', "Message");
this._showSteps = self._stepRows.length > 1; this._showSteps = self._stepRows.length > 1;
} else { } else {
self._showSteps = false; self._showSteps = false;
@@ -105,7 +105,7 @@ export class JobStepsViewComponent extends JobManagementView implements OnInit,
renderer: this._treeRenderer renderer: this._treeRenderer
}, { verticalScrollMode: ScrollbarVisibility.Visible, horizontalScrollMode: ScrollbarVisibility.Visible }); }, { verticalScrollMode: ScrollbarVisibility.Visible, horizontalScrollMode: ScrollbarVisibility.Visible });
this._register(attachListStyler(this._tree, this.themeService)); this._register(attachListStyler(this._tree, this.themeService));
const stepsTooltip = nls.localize('agent.steps', 'Steps'); const stepsTooltip = nls.localize('agent.steps', "Steps");
jQuery('.steps-header > .steps-icon').attr('title', stepsTooltip); jQuery('.steps-header > .steps-icon').attr('title', stepsTooltip);
this._telemetryService.publicLog(TelemetryKeys.JobStepsView); this._telemetryService.publicLog(TelemetryKeys.JobStepsView);
} }
@@ -52,22 +52,22 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
private columns: Array<Slick.Column<any>> = [ private columns: Array<Slick.Column<any>> = [
{ {
name: nls.localize('jobColumns.name', 'Name'), name: nls.localize('jobColumns.name', "Name"),
field: 'name', field: 'name',
formatter: (row, cell, value, columnDef, dataContext) => this.renderName(row, cell, value, columnDef, dataContext), formatter: (row, cell, value, columnDef, dataContext) => this.renderName(row, cell, value, columnDef, dataContext),
width: 150, width: 150,
id: 'name' id: 'name'
}, },
{ name: nls.localize('jobColumns.lastRun', 'Last Run'), field: 'lastRun', width: 80, id: 'lastRun' }, { name: nls.localize('jobColumns.lastRun', "Last Run"), field: 'lastRun', width: 80, id: 'lastRun' },
{ name: nls.localize('jobColumns.nextRun', 'Next Run'), field: 'nextRun', width: 80, id: 'nextRun' }, { name: nls.localize('jobColumns.nextRun', "Next Run"), field: 'nextRun', width: 80, id: 'nextRun' },
{ name: nls.localize('jobColumns.enabled', 'Enabled'), field: 'enabled', width: 60, id: 'enabled' }, { name: nls.localize('jobColumns.enabled', "Enabled"), field: 'enabled', width: 60, id: 'enabled' },
{ name: nls.localize('jobColumns.status', 'Status'), field: 'currentExecutionStatus', width: 50, id: 'currentExecutionStatus' }, { name: nls.localize('jobColumns.status', "Status"), field: 'currentExecutionStatus', width: 50, id: 'currentExecutionStatus' },
{ name: nls.localize('jobColumns.category', 'Category'), field: 'category', width: 100, id: 'category' }, { name: nls.localize('jobColumns.category', "Category"), field: 'category', width: 100, id: 'category' },
{ name: nls.localize('jobColumns.runnable', 'Runnable'), field: 'runnable', width: 70, id: 'runnable' }, { name: nls.localize('jobColumns.runnable', "Runnable"), field: 'runnable', width: 70, id: 'runnable' },
{ name: nls.localize('jobColumns.schedule', 'Schedule'), field: 'hasSchedule', width: 60, id: 'hasSchedule' }, { name: nls.localize('jobColumns.schedule', "Schedule"), field: 'hasSchedule', width: 60, id: 'hasSchedule' },
{ name: nls.localize('jobColumns.lastRunOutcome', 'Last Run Outcome'), field: 'lastRunOutcome', width: 100, id: 'lastRunOutcome' }, { name: nls.localize('jobColumns.lastRunOutcome', "Last Run Outcome"), field: 'lastRunOutcome', width: 100, id: 'lastRunOutcome' },
{ {
name: nls.localize('jobColumns.previousRuns', 'Previous Runs'), name: nls.localize('jobColumns.previousRuns', "Previous Runs"),
formatter: (row, cell, value, columnDef, dataContext) => this.renderChartsPostHistory(row, cell, value, columnDef, dataContext), formatter: (row, cell, value, columnDef, dataContext) => this.renderChartsPostHistory(row, cell, value, columnDef, dataContext),
field: 'previousRuns', field: 'previousRuns',
width: 100, width: 100,
@@ -610,10 +610,10 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
if (self._agentViewComponent.expanded.has(job.jobId)) { if (self._agentViewComponent.expanded.has(job.jobId)) {
let lastJobHistory = jobHistories[jobHistories.length - 1]; let lastJobHistory = jobHistories[jobHistories.length - 1];
let item = self.dataView.getItemById(job.jobId + '.error'); let item = self.dataView.getItemById(job.jobId + '.error');
let noStepsMessage = nls.localize('jobsView.noSteps', 'No Steps available for this job.'); let noStepsMessage = nls.localize('jobsView.noSteps', "No Steps available for this job.");
let errorMessage = lastJobHistory ? lastJobHistory.message : noStepsMessage; let errorMessage = lastJobHistory ? lastJobHistory.message : noStepsMessage;
if (item) { if (item) {
item['name'] = nls.localize('jobsView.error', 'Error: ') + errorMessage; item['name'] = nls.localize('jobsView.error', "Error: ") + errorMessage;
self._agentViewComponent.setExpanded(job.jobId, item['name']); self._agentViewComponent.setExpanded(job.jobId, item['name']);
self.dataView.updateItem(job.jobId + '.error', item); self.dataView.updateItem(job.jobId + '.error', item);
} }
@@ -38,14 +38,14 @@ export class OperatorsViewComponent extends JobManagementView implements OnInit,
private columns: Array<Slick.Column<any>> = [ private columns: Array<Slick.Column<any>> = [
{ {
name: nls.localize('jobOperatorsView.name', 'Name'), name: nls.localize('jobOperatorsView.name', "Name"),
field: 'name', field: 'name',
formatter: (row, cell, value, columnDef, dataContext) => this.renderName(row, cell, value, columnDef, dataContext), formatter: (row, cell, value, columnDef, dataContext) => this.renderName(row, cell, value, columnDef, dataContext),
width: 200, width: 200,
id: 'name' id: 'name'
}, },
{ name: nls.localize('jobOperatorsView.emailAddress', 'Email Address'), field: 'emailAddress', width: 200, id: 'emailAddress' }, { name: nls.localize('jobOperatorsView.emailAddress', "Email Address"), field: 'emailAddress', width: 200, id: 'emailAddress' },
{ name: nls.localize('jobOperatorsView.enabled', 'Enabled'), field: 'enabled', width: 200, id: 'enabled' }, { name: nls.localize('jobOperatorsView.enabled', "Enabled"), field: 'enabled', width: 200, id: 'enabled' },
]; ];
private options: Slick.GridOptions<any> = { private options: Slick.GridOptions<any> = {
@@ -41,15 +41,15 @@ export class ProxiesViewComponent extends JobManagementView implements OnInit, O
private columns: Array<Slick.Column<any>> = [ private columns: Array<Slick.Column<any>> = [
{ {
name: nls.localize('jobProxiesView.accountName', 'Account Name'), name: nls.localize('jobProxiesView.accountName', "Account Name"),
field: 'accountName', field: 'accountName',
formatter: (row, cell, value, columnDef, dataContext) => this.renderName(row, cell, value, columnDef, dataContext), formatter: (row, cell, value, columnDef, dataContext) => this.renderName(row, cell, value, columnDef, dataContext),
width: 200, width: 200,
id: 'accountName' id: 'accountName'
}, },
{ name: nls.localize('jobProxiesView.credentialName', 'Credential Name'), field: 'credentialName', width: 200, id: 'credentialName' }, { name: nls.localize('jobProxiesView.credentialName', "Credential Name"), field: 'credentialName', width: 200, id: 'credentialName' },
{ name: nls.localize('jobProxiesView.description', 'Description'), field: 'description', width: 200, id: 'description' }, { name: nls.localize('jobProxiesView.description', "Description"), field: 'description', width: 200, id: 'description' },
{ name: nls.localize('jobProxiesView.isEnabled', 'Enabled'), field: 'isEnabled', width: 200, id: 'isEnabled' } { name: nls.localize('jobProxiesView.isEnabled', "Enabled"), field: 'isEnabled', width: 200, id: 'isEnabled' }
]; ];
private options: Slick.GridOptions<any> = { private options: Slick.GridOptions<any> = {
@@ -26,7 +26,7 @@ export class NotebookConnection {
constructor(private _connectionProfile: IConnectionProfile) { constructor(private _connectionProfile: IConnectionProfile) {
if (!this._connectionProfile) { if (!this._connectionProfile) {
throw new Error(localize('connectionInfoMissing', 'connectionInfo is required')); throw new Error(localize('connectionInfoMissing', "connectionInfo is required"));
} }
} }
@@ -29,14 +29,14 @@ export class CellToggleMoreActions {
constructor( constructor(
@IInstantiationService private instantiationService: IInstantiationService) { @IInstantiationService private instantiationService: IInstantiationService) {
this._actions.push( this._actions.push(
instantiationService.createInstance(DeleteCellAction, 'delete', localize('delete', 'Delete')), instantiationService.createInstance(DeleteCellAction, 'delete', localize('delete', "Delete")),
instantiationService.createInstance(AddCellFromContextAction, 'codeBefore', localize('codeBefore', 'Insert Code Before'), CellTypes.Code, false), instantiationService.createInstance(AddCellFromContextAction, 'codeBefore', localize('codeBefore', "Insert Code Before"), CellTypes.Code, false),
instantiationService.createInstance(AddCellFromContextAction, 'codeAfter', localize('codeAfter', 'Insert Code After'), CellTypes.Code, true), instantiationService.createInstance(AddCellFromContextAction, 'codeAfter', localize('codeAfter', "Insert Code After"), CellTypes.Code, true),
instantiationService.createInstance(AddCellFromContextAction, 'markdownBefore', localize('markdownBefore', 'Insert Text Before'), CellTypes.Markdown, false), instantiationService.createInstance(AddCellFromContextAction, 'markdownBefore', localize('markdownBefore', "Insert Text Before"), CellTypes.Markdown, false),
instantiationService.createInstance(AddCellFromContextAction, 'markdownAfter', localize('markdownAfter', 'Insert Text After'), CellTypes.Markdown, true), instantiationService.createInstance(AddCellFromContextAction, 'markdownAfter', localize('markdownAfter', "Insert Text After"), CellTypes.Markdown, true),
instantiationService.createInstance(RunCellsAction, 'runAllBefore', localize('runAllBefore', "Run Cells Before"), false), instantiationService.createInstance(RunCellsAction, 'runAllBefore', localize('runAllBefore', "Run Cells Before"), false),
instantiationService.createInstance(RunCellsAction, 'runAllAfter', localize('runAllAfter', "Run Cells After"), true), instantiationService.createInstance(RunCellsAction, 'runAllAfter', localize('runAllAfter', "Run Cells After"), true),
instantiationService.createInstance(ClearCellOutputAction, 'clear', localize('clear', 'Clear Output')) instantiationService.createInstance(ClearCellOutputAction, 'clear', localize('clear', "Clear Output"))
); );
} }
@@ -151,7 +151,7 @@ export class OutputComponent extends AngularDisposable implements OnInit, AfterV
this.errorText = undefined; this.errorText = undefined;
if (!mimeType) { if (!mimeType) {
this.errorText = localize('noMimeTypeFound', "No {0}renderer could be found for output. It has the following MIME types: {1}", this.errorText = localize('noMimeTypeFound', "No {0}renderer could be found for output. It has the following MIME types: {1}",
options.trusted ? '' : localize('safe', 'safe '), options.trusted ? '' : localize('safe', "safe "),
Object.keys(options.data).join(', ')); Object.keys(options.data).join(', '));
return; return;
} }
@@ -49,23 +49,23 @@ export class PlaceholderCellComponent extends CellView implements OnInit, OnChan
} }
get clickOn(): string { get clickOn(): string {
return localize('clickOn', 'Click on'); return localize('clickOn', "Click on");
} }
get plusCode(): string { get plusCode(): string {
return localize('plusCode', '+ Code'); return localize('plusCode', "+ Code");
} }
get or(): string { get or(): string {
return localize('or', 'or'); return localize('or', "or");
} }
get plusText(): string { get plusText(): string {
return localize('plusText', '+ Text'); return localize('plusText', "+ Text");
} }
get toAddCell(): string { get toAddCell(): string {
return localize('toAddCell', 'to add a code or text cell'); return localize('toAddCell', "to add a code or text cell");
} }
public addCell(cellType: string, event?: Event): void { public addCell(cellType: string, event?: Event): void {
@@ -169,7 +169,7 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges {
if (trustedChanged || contentChanged) { if (trustedChanged || contentChanged) {
this._lastTrustedMode = this.cellModel.trustedMode; this._lastTrustedMode = this.cellModel.trustedMode;
if (!this.cellModel.source && !this.isEditMode) { if (!this.cellModel.source && !this.isEditMode) {
this._content = localize('doubleClickEdit', 'Double-click to edit'); this._content = localize('doubleClickEdit', "Double-click to edit");
} else { } else {
this._content = this.cellModel.source; this._content = this.cellModel.source;
} }
@@ -82,7 +82,7 @@ configurationRegistry.registerConfiguration({
'notebook.useInProcMarkdown': { 'notebook.useInProcMarkdown': {
'type': 'boolean', 'type': 'boolean',
'default': true, 'default': true,
'description': localize('notebook.inProcMarkdown', 'Use in-process markdown viewer to render text cells more quickly (Experimental).') 'description': localize('notebook.inProcMarkdown', "Use in-process markdown viewer to render text cells more quickly (Experimental).")
} }
} }
}); });
@@ -199,9 +199,9 @@ export abstract class MultiStateAction<T> extends Action {
export class TrustedAction extends ToggleableAction { export class TrustedAction extends ToggleableAction {
// Constants // Constants
private static readonly trustedLabel = localize('trustLabel', 'Trusted'); private static readonly trustedLabel = localize('trustLabel', "Trusted");
private static readonly notTrustedLabel = localize('untrustLabel', 'Not Trusted'); private static readonly notTrustedLabel = localize('untrustLabel', "Not Trusted");
private static readonly alreadyTrustedMsg = localize('alreadyTrustedMsg', 'Notebook is already trusted.'); private static readonly alreadyTrustedMsg = localize('alreadyTrustedMsg', "Notebook is already trusted.");
private static readonly baseClass = 'notebook-button'; private static readonly baseClass = 'notebook-button';
private static readonly trustedCssClass = 'icon-trusted'; private static readonly trustedCssClass = 'icon-trusted';
private static readonly notTrustedCssClass = 'icon-notTrusted'; private static readonly notTrustedCssClass = 'icon-notTrusted';
@@ -287,7 +287,7 @@ export class CellModel implements ICellModel {
} catch (error) { } catch (error) {
let message: string; let message: string;
if (error.message === 'Canceled') { if (error.message === 'Canceled') {
message = localize('executionCanceled', 'Query execution was canceled'); message = localize('executionCanceled', "Query execution was canceled");
} else { } else {
message = getErrorMessage(error); message = getErrorMessage(error);
} }
@@ -306,17 +306,17 @@ export class CellModel implements ICellModel {
let model = this.options.notebook; let model = this.options.notebook;
let clientSession = model && model.clientSession; let clientSession = model && model.clientSession;
if (!clientSession) { if (!clientSession) {
this.sendNotification(notificationService, Severity.Error, localize('notebookNotReady', 'The session for this notebook is not yet ready')); this.sendNotification(notificationService, Severity.Error, localize('notebookNotReady', "The session for this notebook is not yet ready"));
return undefined; return undefined;
} else if (!clientSession.isReady || clientSession.status === 'dead') { } else if (!clientSession.isReady || clientSession.status === 'dead') {
this.sendNotification(notificationService, Severity.Info, localize('sessionNotReady', 'The session for this notebook will start momentarily')); this.sendNotification(notificationService, Severity.Info, localize('sessionNotReady', "The session for this notebook will start momentarily"));
await clientSession.kernelChangeCompleted; await clientSession.kernelChangeCompleted;
} }
if (!clientSession.kernel) { if (!clientSession.kernel) {
let defaultKernel = model && model.defaultKernel && model.defaultKernel.name; let defaultKernel = model && model.defaultKernel && model.defaultKernel.name;
if (!defaultKernel) { if (!defaultKernel) {
this.sendNotification(notificationService, Severity.Error, localize('noDefaultKernel', 'No kernel is available for this notebook')); this.sendNotification(notificationService, Severity.Error, localize('noDefaultKernel', "No kernel is available for this notebook"));
return undefined; return undefined;
} }
await clientSession.changeKernel({ await clientSession.changeKernel({
@@ -526,7 +526,7 @@ export interface ICellMagicMapper {
export namespace notebookConstants { export namespace notebookConstants {
export const SQL = 'SQL'; export const SQL = 'SQL';
export const SQL_CONNECTION_PROVIDER = mssqlProviderName; export const SQL_CONNECTION_PROVIDER = mssqlProviderName;
export const sqlKernel: string = localize('sqlKernel', 'SQL'); export const sqlKernel: string = localize('sqlKernel', "SQL");
export const sqlKernelSpec: nb.IKernelSpec = ({ export const sqlKernelSpec: nb.IKernelSpec = ({
name: sqlKernel, name: sqlKernel,
language: 'sql', language: 'sql',
@@ -18,7 +18,7 @@ export class NotebookContexts {
let defaultConnection: ConnectionProfile = <any>{ let defaultConnection: ConnectionProfile = <any>{
providerName: mssqlProviderName, providerName: mssqlProviderName,
id: '-1', id: '-1',
serverName: localize('selectConnection', 'Select Connection') serverName: localize('selectConnection', "Select Connection")
}; };
return { return {
@@ -32,7 +32,7 @@ export class NotebookContexts {
let localConnection: ConnectionProfile = <any>{ let localConnection: ConnectionProfile = <any>{
providerName: mssqlProviderName, providerName: mssqlProviderName,
id: '-1', id: '-1',
serverName: localize('localhost', 'localhost') serverName: localize('localhost', "localhost")
}; };
return { return {
@@ -107,7 +107,7 @@ export class NotebookContexts {
let newConnection = <ConnectionProfile><any>{ let newConnection = <ConnectionProfile><any>{
providerName: 'SQL', providerName: 'SQL',
id: '-2', id: '-2',
serverName: localize('addConnection', 'Add New Connection') serverName: localize('addConnection', "Add New Connection")
}; };
activeConnections.push(newConnection); activeConnections.push(newConnection);
} }
@@ -25,7 +25,7 @@ import { UNSAVED_GROUP_ID } from 'sql/platform/connection/common/constants';
export class RefreshAction extends Action { export class RefreshAction extends Action {
public static ID = 'objectExplorer.refresh'; public static ID = 'objectExplorer.refresh';
public static LABEL = localize('connectionTree.refresh', 'Refresh'); public static LABEL = localize('connectionTree.refresh', "Refresh");
private _tree: ITree; private _tree: ITree;
constructor( constructor(
@@ -85,7 +85,7 @@ export class RefreshAction extends Action {
export class DisconnectConnectionAction extends Action { export class DisconnectConnectionAction extends Action {
public static ID = 'objectExplorer.disconnect'; public static ID = 'objectExplorer.disconnect';
public static LABEL = localize('DisconnectAction', 'Disconnect'); public static LABEL = localize('DisconnectAction', "Disconnect");
constructor( constructor(
id: string, id: string,
@@ -129,7 +129,7 @@ export class DisconnectConnectionAction extends Action {
*/ */
export class AddServerAction extends Action { export class AddServerAction extends Action {
public static ID = 'registeredServers.addConnection'; public static ID = 'registeredServers.addConnection';
public static LABEL = localize('connectionTree.addConnection', 'New Connection'); public static LABEL = localize('connectionTree.addConnection', "New Connection");
constructor( constructor(
id: string, id: string,
@@ -168,7 +168,7 @@ export class AddServerAction extends Action {
*/ */
export class AddServerGroupAction extends Action { export class AddServerGroupAction extends Action {
public static ID = 'registeredServers.addServerGroup'; public static ID = 'registeredServers.addServerGroup';
public static LABEL = localize('connectionTree.addServerGroup', 'New Server Group'); public static LABEL = localize('connectionTree.addServerGroup', "New Server Group");
constructor( constructor(
id: string, id: string,
@@ -190,7 +190,7 @@ export class AddServerGroupAction extends Action {
*/ */
export class EditServerGroupAction extends Action { export class EditServerGroupAction extends Action {
public static ID = 'registeredServers.editServerGroup'; public static ID = 'registeredServers.editServerGroup';
public static LABEL = localize('connectionTree.editServerGroup', 'Edit Server Group'); public static LABEL = localize('connectionTree.editServerGroup', "Edit Server Group");
constructor( constructor(
id: string, id: string,
@@ -213,10 +213,10 @@ export class EditServerGroupAction extends Action {
*/ */
export class ActiveConnectionsFilterAction extends Action { export class ActiveConnectionsFilterAction extends Action {
public static ID = 'registeredServers.recentConnections'; public static ID = 'registeredServers.recentConnections';
public static LABEL = localize('activeConnections', 'Show Active Connections'); public static LABEL = localize('activeConnections', "Show Active Connections");
private static enabledClass = 'active-connections-action'; private static enabledClass = 'active-connections-action';
private static disabledClass = 'icon server-page'; private static disabledClass = 'icon server-page';
private static showAllConnectionsLabel = localize('showAllConnections', 'Show All Connections'); private static showAllConnectionsLabel = localize('showAllConnections', "Show All Connections");
private _isSet: boolean; private _isSet: boolean;
public static readonly ACTIVE = 'active'; public static readonly ACTIVE = 'active';
public get isSet(): boolean { public get isSet(): boolean {
@@ -263,7 +263,7 @@ export class ActiveConnectionsFilterAction extends Action {
*/ */
export class RecentConnectionsFilterAction extends Action { export class RecentConnectionsFilterAction extends Action {
public static ID = 'registeredServers.recentConnections'; public static ID = 'registeredServers.recentConnections';
public static LABEL = localize('recentConnections', 'Recent Connections'); public static LABEL = localize('recentConnections', "Recent Connections");
private static enabledClass = 'recent-connections-action'; private static enabledClass = 'recent-connections-action';
private static disabledClass = 'recent-connections-action-set'; private static disabledClass = 'recent-connections-action-set';
private _isSet: boolean; private _isSet: boolean;
@@ -306,7 +306,7 @@ export class RecentConnectionsFilterAction extends Action {
export class NewQueryAction extends Action { export class NewQueryAction extends Action {
public static ID = 'registeredServers.newQuery'; public static ID = 'registeredServers.newQuery';
public static LABEL = localize('registeredServers.newQuery', 'New Query'); public static LABEL = localize('registeredServers.newQuery', "New Query");
private _connectionProfile: IConnectionProfile; private _connectionProfile: IConnectionProfile;
get connectionProfile(): IConnectionProfile { get connectionProfile(): IConnectionProfile {
return this._connectionProfile; return this._connectionProfile;
@@ -343,8 +343,8 @@ export class NewQueryAction extends Action {
*/ */
export class DeleteConnectionAction extends Action { export class DeleteConnectionAction extends Action {
public static ID = 'registeredServers.deleteConnection'; public static ID = 'registeredServers.deleteConnection';
public static DELETE_CONNECTION_LABEL = localize('deleteConnection', 'Delete Connection'); public static DELETE_CONNECTION_LABEL = localize('deleteConnection', "Delete Connection");
public static DELETE_CONNECTION_GROUP_LABEL = localize('deleteConnectionGroup', 'Delete Group'); public static DELETE_CONNECTION_GROUP_LABEL = localize('deleteConnectionGroup', "Delete Group");
constructor( constructor(
id: string, id: string,
@@ -81,7 +81,7 @@ export class OEAction extends ExecuteCommandAction {
export class ManageConnectionAction extends Action { export class ManageConnectionAction extends Action {
public static ID = 'objectExplorer.manage'; public static ID = 'objectExplorer.manage';
public static LABEL = localize('ManageAction', 'Manage'); public static LABEL = localize('ManageAction', "Manage");
private _treeSelectionHandler: TreeSelectionHandler; private _treeSelectionHandler: TreeSelectionHandler;
@@ -57,7 +57,7 @@ export class ServerGroupDialog extends Modal {
@IClipboardService clipboardService: IClipboardService, @IClipboardService clipboardService: IClipboardService,
@ILogService logService: ILogService @ILogService logService: ILogService
) { ) {
super(localize('ServerGroupsDialogTitle', 'Server Groups'), TelemetryKeys.ServerGroups, telemetryService, layoutService, clipboardService, themeService, logService, contextKeyService); super(localize('ServerGroupsDialogTitle', "Server Groups"), TelemetryKeys.ServerGroups, telemetryService, layoutService, clipboardService, themeService, logService, contextKeyService);
} }
public render() { public render() {
@@ -225,7 +225,7 @@ export class ServerTreeRenderer implements IRenderer {
let label = connection.title; let label = connection.title;
if (!connection.isConnectionOptionsValid) { if (!connection.isConnectionOptionsValid) {
label = localize('loading', 'Loading...'); label = localize('loading', "Loading...");
} }
templateData.label.textContent = label; templateData.label.textContent = label;
@@ -90,7 +90,7 @@ export class OEShimService extends Disposable implements IOEShimService {
resolve(connProfile); resolve(connProfile);
}, },
onConnectCanceled: () => { onConnectCanceled: () => {
reject(new Error(localize('loginCanceled', 'User canceled'))); reject(new Error(localize('loginCanceled', "User canceled")));
}, },
onConnectReject: undefined, onConnectReject: undefined,
onConnectStart: undefined, onConnectStart: undefined,

Some files were not shown because too many files have changed in this diff Show More