Fix duplicate localization ids (#803)

* Add sqlops-core loc project

* Fix duplicate ids step 1

* Merge duplicate id changes.

* A few more duplicate ids
This commit is contained in:
Karl Burtram
2018-03-01 15:25:51 -08:00
committed by GitHub
parent 8114498fb5
commit c06f45cf0e
49 changed files with 107 additions and 89 deletions

View File

@@ -501,6 +501,10 @@ function prepareXlfFiles(projectName, extensionName) {
} }
exports.prepareXlfFiles = prepareXlfFiles; exports.prepareXlfFiles = prepareXlfFiles;
var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup';
// {{SQL CARBON EDIT}}
var sqlopsProject = 'sqlops-core';
function getResource(sourceFile) { function getResource(sourceFile) {
var resource; var resource;
if (/^vs\/platform/.test(sourceFile)) { if (/^vs\/platform/.test(sourceFile)) {
@@ -529,6 +533,12 @@ function getResource(sourceFile) {
else if (/^vs\/workbench/.test(sourceFile)) { else if (/^vs\/workbench/.test(sourceFile)) {
return { name: 'vs/workbench', project: workbenchProject }; return { name: 'vs/workbench', project: workbenchProject };
} }
// {{SQL CARBON EDIT}}
else if (/^sql/.test(sourceFile)) {
return { name: 'sql', project: sqlopsProject };
}
throw new Error("Could not identify the XLF bundle for " + sourceFile); throw new Error("Could not identify the XLF bundle for " + sourceFile);
} }
exports.getResource = getResource; exports.getResource = getResource;

View File

@@ -578,6 +578,9 @@ const editorProject: string = 'vscode-editor',
extensionsProject: string = 'vscode-extensions', extensionsProject: string = 'vscode-extensions',
setupProject: string = 'vscode-setup'; setupProject: string = 'vscode-setup';
// {{SQL CARBON EDIT}}
const sqlopsProject: string = 'sqlops-core';
export function getResource(sourceFile: string): Resource { export function getResource(sourceFile: string): Resource {
let resource: string; let resource: string;
@@ -601,6 +604,11 @@ export function getResource(sourceFile: string): Resource {
return { name: 'vs/workbench', project: workbenchProject }; return { name: 'vs/workbench', project: workbenchProject };
} }
// {{SQL CARBON EDIT}}
else if (/^sql/.test(sourceFile)) {
return { name: 'sql', project: sqlopsProject };
}
throw new Error(`Could not identify the XLF bundle for ${sourceFile}`); throw new Error(`Could not identify the XLF bundle for ${sourceFile}`);
} }

View File

@@ -84,8 +84,8 @@ export class OptionsDialog extends Modal {
private _onCloseEvent = new Emitter<void>(); private _onCloseEvent = new Emitter<void>();
public onCloseEvent: Event<void> = this._onCloseEvent.event; public onCloseEvent: Event<void> = this._onCloseEvent.event;
public okLabel: string = localize('ok', 'OK'); public okLabel: string = localize('optionsDialog.ok', 'OK');
public cancelLabel: string = localize('cancel', 'Cancel'); public cancelLabel: string = localize('optionsDialog.cancel', 'Cancel');
constructor( constructor(
title: string, title: string,

View File

@@ -28,8 +28,8 @@ export function createOptionElement(option: sqlops.ServiceOption, rowContainer:
let optionValue = this.getOptionValueAndCategoryValues(option, options, possibleInputs); let optionValue = this.getOptionValueAndCategoryValues(option, options, possibleInputs);
let optionWidget: any; let optionWidget: any;
let inputElement: HTMLElement; let inputElement: HTMLElement;
let missingErrorMessage = localize('missingRequireField', ' is required.'); let missingErrorMessage = localize('optionsDialog.missingRequireField', ' is required.');
let invalidInputMessage = localize('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.getHTMLElement(), contextViewService, { optionWidget = new InputBox(rowContainer.getHTMLElement(), contextViewService, {

View File

@@ -50,8 +50,8 @@ export class WebViewDialog extends Modal {
@IEnvironmentService private _environmentService: IEnvironmentService, @IEnvironmentService private _environmentService: IEnvironmentService,
) { ) {
super('', TelemetryKeys.WebView, _webViewPartService, telemetryService, contextKeyService, { isFlyout: false, hasTitleIcon: true }); super('', TelemetryKeys.WebView, _webViewPartService, telemetryService, contextKeyService, { isFlyout: false, hasTitleIcon: true });
this._okLabel = localize('OK', 'OK'); this._okLabel = localize('webViewDialog.ok', 'OK');
this._closeLabel = localize('close', 'Close'); this._closeLabel = localize('webViewDialog.close', 'Close');
} }
public set html(value: string) { public set html(value: string) {

View File

@@ -102,7 +102,7 @@ export class AccountDialog extends Modal {
super.render(); super.render();
attachModalDialogStyler(this, this._themeService); attachModalDialogStyler(this, this._themeService);
this._closeButton = this.addFooterButton(localize('close', 'Close'), () => this.close()); this._closeButton = this.addFooterButton(localize('accountDialog.close', 'Close'), () => this.close());
this.registerListeners(); this.registerListeners();
// Load the initial contents of the view model // Load the initial contents of the view model

View File

@@ -14,7 +14,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
export class AccountDialogController { export class AccountDialogController {
// MEMBER VARIABLES //////////////////////////////////////////////////// // MEMBER VARIABLES ////////////////////////////////////////////////////
private _addAccountErrorTitle = localize('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; }

View File

@@ -68,7 +68,7 @@ export class AutoOAuthDialog extends Modal {
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('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();

View File

@@ -92,8 +92,8 @@ export class RemoveAccountAction extends Action {
// Ask for Confirm // Ask for Confirm
let confirm: IConfirmation = { let 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('yes', 'Yes'), primaryButton: localize('accountActions.yes', 'Yes'),
secondaryButton: localize('no', 'No'), secondaryButton: localize('accountActions.no', 'No'),
type: 'question' type: 'question'
}; };

View File

@@ -92,8 +92,8 @@ export class FirewallRuleDialog extends Modal {
attachModalDialogStyler(this, this._themeService); attachModalDialogStyler(this, this._themeService);
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._createButton = this.addFooterButton(localize('ok', 'OK'), () => this.createFirewallRule()); this._createButton = this.addFooterButton(localize('firewall.ok', 'OK'), () => this.createFirewallRule());
this._closeButton = this.addFooterButton(localize('cancel', 'Cancel'), () => this.cancel()); this._closeButton = this.addFooterButton(localize('firewall.cancel', 'Cancel'), () => this.cancel());
this.registerListeners(); this.registerListeners();
} }

View File

@@ -22,7 +22,7 @@ export class FirewallRuleDialogController {
private _connection: IConnectionProfile; private _connection: IConnectionProfile;
private _resourceProviderId: string; private _resourceProviderId: string;
private _addAccountErrorTitle = localize('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>;

View File

@@ -62,13 +62,13 @@ export class AdminService implements IAdminService {
let providerId: string = this._connectionService.getProviderIdFromUri(uri); let providerId: string = this._connectionService.getProviderIdFromUri(uri);
if (!providerId) { if (!providerId) {
return TPromise.wrapError(new Error(localize('providerIdNotValidError', 'Connection is required in order to interact with adminservice'))); return TPromise.wrapError(new Error(localize('adminService.providerIdNotValidError', 'Connection is required in order to interact with adminservice')));
} }
let handler = this._providers[providerId]; let handler = this._providers[providerId];
if (handler) { if (handler) {
return action(handler); return action(handler);
} else { } else {
return TPromise.wrapError(new Error(localize('noHandlerRegistered', 'No Handler Registered'))); return TPromise.wrapError(new Error(localize('adminService.noHandlerRegistered', 'No Handler Registered')));
} }
} }

View File

@@ -45,8 +45,8 @@ export class ClearRecentConnectionsAction extends Action {
const self = this; const self = this;
return new TPromise<boolean>((resolve, reject) => { return new TPromise<boolean>((resolve, reject) => {
let choices: { key, value }[] = [ let choices: { key, value }[] = [
{ key: nls.localize('yes', 'Yes'), value: true }, { key: nls.localize('connectionAction.yes', 'Yes'), value: true },
{ key: nls.localize('no', 'No'), value: false } { key: nls.localize('connectionAction.no', 'No'), value: false }
]; ];
self._quickOpenService.pick(choices.map(x => x.key), { placeHolder: nls.localize('ClearRecentlyUsedLabel', 'Clear Recent Connections List'), ignoreFocusLost: true }).then((choice) => { self._quickOpenService.pick(choices.map(x => x.key), { placeHolder: nls.localize('ClearRecentlyUsedLabel', 'Clear Recent Connections List'), ignoreFocusLost: true }).then((choice) => {

View File

@@ -1054,8 +1054,8 @@ export class ConnectionManagementService implements IConnectionManagementService
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('yes', 'Yes'), value: true }, { key: nls.localize('connectionService.yes', 'Yes'), value: true },
{ key: nls.localize('no', 'No'), value: false } { key: nls.localize('connectionService.no', 'No'), value: false }
]; ];
self._quickOpenService.pick(choices.map(x => x.key), { placeHolder: nls.localize('cancelConnectionConfirmation', 'Are you sure you want to cancel this connection?'), ignoreFocusLost: true }).then((choice) => { self._quickOpenService.pick(choices.map(x => x.key), { placeHolder: nls.localize('cancelConnectionConfirmation', 'Are you sure you want to cancel this connection?'), ignoreFocusLost: true }).then((choice) => {

View File

@@ -39,7 +39,7 @@ export class AdvancedPropertiesController {
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 }); OptionsDialog, localize('connectionAdvancedProperties', 'Advanced properties'), TelemetryKeys.ConnectionAdvancedProperties, { hasBackButton: true });
this._advancedDialog.cancelLabel = localize('discard', 'Discard'); this._advancedDialog.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();

View File

@@ -184,8 +184,8 @@ export class ConnectionDialogWidget extends Modal {
public render() { public render() {
super.render(); super.render();
attachModalDialogStyler(this, this._themeService); attachModalDialogStyler(this, this._themeService);
let connectLabel = localize('connect', 'Connect'); let connectLabel = localize('connectionDialog.connect', 'Connect');
let cancelLabel = localize('cancel', 'Cancel'); let cancelLabel = localize('connectionDialog.cancel', 'Cancel');
this._connectButton = this.addFooterButton(connectLabel, () => this.connect()); this._connectButton = this.addFooterButton(connectLabel, () => this.connect());
this._connectButton.enabled = false; this._connectButton.enabled = false;
this._closeButton = this.addFooterButton(cancelLabel, () => this.cancel()); this._closeButton = this.addFooterButton(cancelLabel, () => this.cancel());
@@ -259,8 +259,8 @@ export class ConnectionDialogWidget extends Modal {
let confirm: IConfirmation = { let confirm: IConfirmation = {
message: localize('clearRecentConnectionMessage', 'Are you sure you want to delete all the connections from the list?'), message: localize('clearRecentConnectionMessage', 'Are you sure you want to delete all the connections from the list?'),
primaryButton: localize('yes', 'Yes'), primaryButton: localize('connectionDialog.yes', 'Yes'),
secondaryButton: localize('no', 'No'), secondaryButton: localize('connectionDialog.no', 'No'),
type: 'question' type: 'question'
}; };

View File

@@ -120,7 +120,7 @@ export class ConnectionWidget {
} }
private fillInConnectionForm(): void { private fillInConnectionForm(): void {
let errorMessage = localize('missingRequireField', ' is required.'); let errorMessage = localize('connectionWidget.missingRequireField', ' is required.');
let serverNameOption = this._optionsMaps[ConnectionOptionSpecialType.serverName]; let serverNameOption = this._optionsMaps[ConnectionOptionSpecialType.serverName];
let serverNameBuilder = DialogHelper.appendRow(this._tableContainer, serverNameOption.displayName, 'connection-label', 'connection-input'); let serverNameBuilder = DialogHelper.appendRow(this._tableContainer, serverNameOption.displayName, 'connection-label', 'connection-input');

View File

@@ -153,7 +153,7 @@ export class PinUnpinTabAction extends Action {
export class AddFeatureTabAction extends Action { export class AddFeatureTabAction extends Action {
private static readonly ID = 'openInstalledFeatures'; private static readonly ID = 'openInstalledFeatures';
private static readonly LABEL = nls.localize('openInstalledFeatures', "Open installed features"); private static readonly LABEL = nls.localize('addFeatureAction.openInstalledFeatures', "Open installed features");
private static readonly ICON = 'new'; private static readonly ICON = 'new';
private _disposables: IDisposable[] = []; private _disposables: IDisposable[] = [];

View File

@@ -121,7 +121,7 @@ export class NewDashboardTabDialog extends Modal {
@IContextKeyService contextKeyService: IContextKeyService @IContextKeyService contextKeyService: IContextKeyService
) { ) {
super( super(
localize('openInstalledFeatures', 'Open installed features'), localize('newDashboardTab.openInstalledFeatures', 'Open installed features'),
TelemetryKeys.AddNewDashboardTab, TelemetryKeys.AddNewDashboardTab,
partService, partService,
telemetryService, telemetryService,
@@ -147,8 +147,8 @@ export class NewDashboardTabDialog extends Modal {
super.render(); super.render();
attachModalDialogStyler(this, this._themeService); attachModalDialogStyler(this, this._themeService);
this._addNewTabButton = this.addFooterButton(localize('ok', 'OK'), () => this.addNewTabs()); this._addNewTabButton = this.addFooterButton(localize('newDashboardTab.ok', 'OK'), () => this.addNewTabs());
this._cancelButton = this.addFooterButton(localize('cancel', 'Cancel'), () => this.cancel()); this._cancelButton = this.addFooterButton(localize('newDashboardTab.cancel', 'Cancel'), () => this.cancel());
this.registerListeners(); this.registerListeners();
} }

View File

@@ -138,7 +138,7 @@ export function generateDashboardTabSchema(type?: 'database' | 'server'): IJSONS
properties: { properties: {
tabId: { tabId: {
type: 'string', type: 'string',
description: localize('sqlops.extension.contributes.dashboard.tab.id', "Unique identifier for this tab. Will be passed to the extension for any requests."), description: localize('sqlops.extension.contributes.dashboardPage.tab.id', "Unique identifier for this tab. Will be passed to the extension for any requests."),
enum: [], enum: [],
enumDescriptions: [], enumDescriptions: [],
errorMessage: localize('dashboardTabError', "Extension tab is unknown or not installed.") errorMessage: localize('dashboardTabError', "Extension tab is unknown or not installed.")

View File

@@ -285,7 +285,7 @@ export class BackupComponent {
this.mediaDescriptionBox = new InputBox(this.mediaDescriptionElement.nativeElement, this._bootstrapService.contextViewService); this.mediaDescriptionBox = new InputBox(this.mediaDescriptionElement.nativeElement, this._bootstrapService.contextViewService);
// Set backup retain days // Set backup retain days
let invalidInputMessage = localize('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._bootstrapService.contextViewService, this._bootstrapService.contextViewService,
{ {
@@ -367,21 +367,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('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._bootstrapService.themeService)); this._toDispose.push(attachButtonStyler(this.scriptButton, this._bootstrapService.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('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._bootstrapService.themeService)); this._toDispose.push(attachButtonStyler(this.backupButton, this._bootstrapService.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('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._bootstrapService.themeService)); this._toDispose.push(attachButtonStyler(this.cancelButton, this._bootstrapService.themeService));
} }

View File

@@ -126,10 +126,10 @@ export class RestoreDialog extends Modal {
@IContextKeyService contextKeyService: IContextKeyService @IContextKeyService contextKeyService: IContextKeyService
) { ) {
super(localize('RestoreDialogTitle', 'Restore database'), TelemetryKeys.Restore, partService, telemetryService, contextKeyService, { hasErrors: true, isWide: true, hasSpinner: true }); super(localize('RestoreDialogTitle', 'Restore database'), TelemetryKeys.Restore, partService, telemetryService, contextKeyService, { hasErrors: true, isWide: true, hasSpinner: true });
this._restoreTitle = localize('restoreTitle', 'Restore database'); this._restoreTitle = localize('restoreDialog.restoreTitle', 'Restore database');
this._databaseTitle = localize('database', 'Database'); this._databaseTitle = localize('restoreDialog.database', 'Database');
this._backupFileTitle = localize('backupFile', 'Backup file'); this._backupFileTitle = localize('restoreDialog.backupFile', 'Backup file');
this._restoreLabel = localize('restore', 'Restore'); this._restoreLabel = localize('restoreDialog.restore', 'Restore');
// view model // view model
this.viewModel = new RestoreViewModel(optionsMetadata); this.viewModel = new RestoreViewModel(optionsMetadata);
@@ -146,8 +146,8 @@ export class RestoreDialog extends Modal {
public render() { public render() {
super.render(); super.render();
attachModalDialogStyler(this, this._themeService); attachModalDialogStyler(this, this._themeService);
let cancelLabel = localize('cancel', 'Cancel'); let cancelLabel = localize('restoreDialog.cancel', 'Cancel');
this._scriptButton = this.addFooterButton(localize('script', 'Script'), () => this.restore(true)); this._scriptButton = this.addFooterButton(localize('restoreDialog.script', 'Script'), () => this.restore(true));
this._restoreButton = this.addFooterButton(this._restoreLabel, () => this.restore(false)); this._restoreButton = this.addFooterButton(this._restoreLabel, () => this.restore(false));
this._closeButton = this.addFooterButton(cancelLabel, () => this.cancel()); this._closeButton = this.addFooterButton(cancelLabel, () => this.cancel());
this.registerListeners(); this.registerListeners();

View File

@@ -68,7 +68,7 @@ export class RefreshTableAction extends EditDataAction {
@IMessageService private _messageService: IMessageService @IMessageService private _messageService: IMessageService
) { ) {
super(editor, RefreshTableAction.ID, RefreshTableAction.EnabledClass, _connectionManagementService); super(editor, RefreshTableAction.ID, RefreshTableAction.EnabledClass, _connectionManagementService);
this.label = nls.localize('refresh', 'Refresh'); this.label = nls.localize('editData.refresh', 'Refresh');
} }
public run(): TPromise<void> { public run(): TPromise<void> {
@@ -98,7 +98,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('stop', 'Stop'); this.label = nls.localize('editData.stop', 'Stop');
} }
public run(): TPromise<void> { public run(): TPromise<void> {

View File

@@ -103,9 +103,9 @@ export class FileBrowserDialog extends Modal {
}); });
}); });
this._okButton = this.addFooterButton(localize('ok', 'OK'), () => this.ok()); this._okButton = this.addFooterButton(localize('fileBrowser.ok', 'OK'), () => this.ok());
this._okButton.enabled = false; this._okButton.enabled = false;
this._cancelButton = this.addFooterButton(localize('discard', 'Discard'), () => this.close()); this._cancelButton = this.addFooterButton(localize('fileBrowser.discard', 'Discard'), () => this.close());
this.registerListeners(); this.registerListeners();
this.updateTheme(); this.updateTheme();

View File

@@ -79,7 +79,7 @@ export class FileBrowserTreeView {
}, { }, {
indentPixels: 10, indentPixels: 10,
twistiePixels: 12, twistiePixels: 12,
ariaLabel: nls.localize({ key: 'regTreeAriaLabel', comment: ['FileBrowserTree'] }, 'File browser tree') ariaLabel: nls.localize({ key: 'fileBrowser.regTreeAriaLabel', comment: ['FileBrowserTree'] }, 'File browser tree')
}); });
} }

View File

@@ -234,7 +234,7 @@ export class ChartViewerComponent implements OnInit, OnDestroy, IChartViewAction
filepathPlaceHolder = paths.join(filepathPlaceHolder, 'chart.png'); filepathPlaceHolder = paths.join(filepathPlaceHolder, 'chart.png');
let filePath: string = this._bootstrapService.windowService.showSaveDialog({ let filePath: string = this._bootstrapService.windowService.showSaveDialog({
title: nls.localize('saveAsFileTitle', 'Choose Results File'), title: nls.localize('chartViewer.saveAsFileTitle', 'Choose Results File'),
defaultPath: paths.normalize(filepathPlaceHolder, true) defaultPath: paths.normalize(filepathPlaceHolder, true)
}); });
return filePath; return filePath;

View File

@@ -39,8 +39,8 @@ import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { ICommandService } from 'vs/platform/commands/common/commands'; import { ICommandService } from 'vs/platform/commands/common/commands';
import { MenuRegistry, ExecuteCommandAction } from 'vs/platform/actions/common/actions'; import { MenuRegistry, ExecuteCommandAction } from 'vs/platform/actions/common/actions';
const labelDisplay = nls.localize("item", "Item"); const labelDisplay = nls.localize("insights.item", "Item");
const valueDisplay = nls.localize("value", "Value"); const valueDisplay = nls.localize("insights.value", "Value");
function stateFormatter(row: number, cell: number, value: any, columnDef: Slick.Column<ListResource>, resource: ListResource): string { function stateFormatter(row: number, cell: number, value: any, columnDef: Slick.Column<ListResource>, resource: ListResource): string {
// template // template

View File

@@ -24,7 +24,7 @@ import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiati
export class ProfilerConnect extends Action { export class ProfilerConnect extends Action {
public static ID = 'profiler.connect'; public static ID = 'profiler.connect';
public static LABEL = nls.localize('connect', "Connect"); public static LABEL = nls.localize('profiler.connect', "Connect");
private _connected: boolean = false; private _connected: boolean = false;
@@ -57,7 +57,7 @@ export class ProfilerConnect extends Action {
public set connected(value: boolean) { public set connected(value: boolean) {
this._connected = value; this._connected = value;
this._setClass(value ? 'disconnect' : 'connect'); this._setClass(value ? 'disconnect' : 'connect');
this._setLabel(value ? nls.localize('disconnect', 'Disconnected') : nls.localize('connect', "Connect")); this._setLabel(value ? nls.localize('profilerAction.disconnect', 'Disconnected') : nls.localize('profilerAction.connect', "Connect"));
} }
public get connected(): boolean { public get connected(): boolean {
@@ -108,7 +108,7 @@ export class ProfilerPause extends Action {
export class ProfilerStop extends Action { export class ProfilerStop extends Action {
public static ID = 'profiler.stop'; public static ID = 'profiler.stop';
public static LABEL = nls.localize('stop', "Stop"); public static LABEL = nls.localize('profilerStop.stop', "Stop");
constructor( constructor(
id: string, label: string, id: string, label: string,
@@ -229,7 +229,7 @@ export class ProfilerFindPrevious implements IEditorAction {
export class NewProfilerAction extends Task { export class NewProfilerAction extends Task {
public static readonly ID = 'newProfiler'; public static readonly ID = 'newProfiler';
public static readonly LABEL = nls.localize('newProfiler', 'New Profiler'); public static readonly LABEL = nls.localize('profilerAction.newProfiler', 'New Profiler');
public static readonly ICON = 'profile'; public static readonly ICON = 'profile';
private _connectionProfile: ConnectionProfile; private _connectionProfile: ConnectionProfile;

View File

@@ -17,7 +17,7 @@ import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
export class GlobalNewProfilerAction extends Action { export class GlobalNewProfilerAction extends Action {
public static ID = 'explorer.newProfiler'; public static ID = 'explorer.newProfiler';
public static LABEL = nls.localize('newProfiler', "New Profiler"); public static LABEL = nls.localize('profilerWorkbenchAction.newProfiler', "New Profiler");
constructor( constructor(
id: string, label: string, id: string, label: string,

View File

@@ -316,14 +316,14 @@ export class ProfilerColumnEditorDialog extends Modal {
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService @IContextKeyService contextKeyService: IContextKeyService
) { ) {
super(nls.localize('profiler', 'Profiler'), TelemetryKeys.Profiler, _partService, telemetryService, contextKeyService); super(nls.localize('profilerColumnDialog.profiler', 'Profiler'), TelemetryKeys.Profiler, _partService, telemetryService, contextKeyService);
} }
public render(): void { public render(): void {
super.render(); super.render();
this._register(attachModalDialogStyler(this, this._themeService)); this._register(attachModalDialogStyler(this, this._themeService));
this.addFooterButton(nls.localize('ok', "OK"), () => this.onAccept(undefined)); this.addFooterButton(nls.localize('profilerColumnDialog.ok', "OK"), () => this.onAccept(undefined));
this.addFooterButton(nls.localize('cancel', "Cancel"), () => this.onClose(undefined)); this.addFooterButton(nls.localize('profilerColumnDialog.cancel', "Cancel"), () => this.onClose(undefined));
} }
protected renderBody(container: HTMLElement): void { protected renderBody(container: HTMLElement): void {

View File

@@ -275,7 +275,7 @@ export class ProfilerEditor extends BaseEditor {
}, },
{ {
id: 'value', id: 'value',
name: nls.localize('value', "Value"), name: nls.localize('profilerEditor.value', "Value"),
field: 'value' field: 'value'
} }
], { forceFitColumns: true }); ], { forceFitColumns: true });

View File

@@ -88,7 +88,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
} }
public getName(): string { public getName(): string {
return nls.localize('profiler', 'Profiler'); return nls.localize('profilerInput.profiler', 'Profiler');
} }
public get data(): TableDataView<Slick.SlickData> { public get data(): TableDataView<Slick.SlickData> {

View File

@@ -20,7 +20,7 @@ export const msgStatusRunQueryInProgress = localize('msgStatusRunQueryInProgress
// /** Results Pane Labels */ // /** Results Pane Labels */
export const maximizeLabel = localize('maximizeLabel', 'Maximize'); export const maximizeLabel = localize('maximizeLabel', 'Maximize');
export const restoreLabel = localize('restoreLabel', 'Restore'); export const restoreLabel = localize('resultsPane.restoreLabel', 'Restore');
export const saveCSVLabel = localize('saveCSVLabel', 'Save as CSV'); export const saveCSVLabel = localize('saveCSVLabel', 'Save as CSV');
export const saveJSONLabel = localize('saveJSONLabel', 'Save as JSON'); export const saveJSONLabel = localize('saveJSONLabel', 'Save as JSON');
export const saveExcelLabel = localize('saveExcelLabel', 'Save as Excel'); export const saveExcelLabel = localize('saveExcelLabel', 'Save as Excel');

View File

@@ -143,7 +143,7 @@ export class ResultSerializer {
filepathPlaceHolder = path.join(filepathPlaceHolder, this.getResultsDefaultFilename(saveRequest)); filepathPlaceHolder = path.join(filepathPlaceHolder, this.getResultsDefaultFilename(saveRequest));
let filePath: string = this._windowService.showSaveDialog({ let filePath: string = this._windowService.showSaveDialog({
title: nls.localize('saveAsFileTitle', 'Choose Results File'), title: nls.localize('resultsSerializer.saveAsFileTitle', 'Choose Results File'),
defaultPath: paths.normalize(filepathPlaceHolder, true) defaultPath: paths.normalize(filepathPlaceHolder, true)
}); });
return filePath; return filePath;

View File

@@ -53,7 +53,7 @@ registry.registerWorkbenchAction(
OpenConnectionsViewletAction.LABEL, OpenConnectionsViewletAction.LABEL,
{ primary: KeyMod.CtrlCmd | KeyCode.Shift | KeyCode.KEY_C }), { primary: KeyMod.CtrlCmd | KeyCode.Shift | KeyCode.KEY_C }),
'View: Show Servers', 'View: Show Servers',
localize('view', "View") localize('registeredServers.view', "View")
); );
let configurationRegistry = <IConfigurationRegistry>Registry.as(Extensions.Configuration); let configurationRegistry = <IConfigurationRegistry>Registry.as(Extensions.Configuration);

View File

@@ -61,8 +61,8 @@ export class ServerGroupDialog extends Modal {
public render() { public render() {
super.render(); super.render();
attachModalDialogStyler(this, this._themeService); attachModalDialogStyler(this, this._themeService);
let okLabel = localize('ok', 'OK'); let okLabel = localize('serverGroup.ok', 'OK');
let cancelLabel = localize('cancel', 'Cancel'); let cancelLabel = localize('serverGroup.cancel', 'Cancel');
this._addServerButton = this.addFooterButton(okLabel, () => this.addGroup()); this._addServerButton = this.addFooterButton(okLabel, () => this.addGroup());
this._closeButton = this.addFooterButton(cancelLabel, () => this.cancel()); this._closeButton = this.addFooterButton(cancelLabel, () => this.cancel());
this.registerListeners(); this.registerListeners();

View File

@@ -18,8 +18,8 @@ export class ServerGroupViewModel {
private _domainModel: IConnectionProfileGroup; private _domainModel: IConnectionProfileGroup;
private _editMode: boolean; private _editMode: boolean;
private readonly _addServerGroupTitle: string = localize('addServerGroup', 'Add server group'); private readonly _addServerGroupTitle: string = localize('serverGroup.addServerGroup', 'Add server group');
private readonly _editServerGroupTitle: string = localize('editServerGroup', 'Edit server group'); private readonly _editServerGroupTitle: string = localize('serverGroup.editServerGroup', 'Edit server group');
private readonly _defaultColor: string = '#515151'; private readonly _defaultColor: string = '#515151';
constructor(domainModel?: IConnectionProfileGroup, colors?: string[]) { constructor(domainModel?: IConnectionProfileGroup, colors?: string[]) {

View File

@@ -26,7 +26,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi
export class RefreshAction extends Action { export class RefreshAction extends Action {
public static ID = 'objectExplorer.refresh'; public static ID = 'objectExplorer.refresh';
public static LABEL = localize('refresh', 'Refresh'); public static LABEL = localize('connectionTree.refresh', 'Refresh');
private _tree: ITree; private _tree: ITree;
constructor( constructor(
@@ -185,7 +185,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('addConnection', 'New Connection'); public static LABEL = localize('connectionTree.addConnection', 'New Connection');
constructor( constructor(
id: string, id: string,
@@ -223,7 +223,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('addServerGroup', 'New Server Group'); public static LABEL = localize('connectionTree.addServerGroup', 'New Server Group');
constructor( constructor(
id: string, id: string,
@@ -245,7 +245,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('editServerGroup', 'Edit Server Group'); public static LABEL = localize('connectionTree.editServerGroup', 'Edit Server Group');
constructor( constructor(
id: string, id: string,
@@ -361,7 +361,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('newQuery', 'New Query'); public static LABEL = localize('registeredServers.newQuery', 'New Query');
private _connectionProfile: ConnectionProfile; private _connectionProfile: ConnectionProfile;
get connectionProfile(): ConnectionProfile { get connectionProfile(): ConnectionProfile {
return this._connectionProfile; return this._connectionProfile;

View File

@@ -365,7 +365,7 @@ export class OEScriptDeleteAction extends ScriptDeleteAction {
export class DisconnectAction extends Action { export class DisconnectAction extends Action {
public static ID = 'objectExplorer.disconnect'; public static ID = 'objectExplorer.disconnect';
public static LABEL = localize('disconnect', 'Disconnect'); public static LABEL = localize('objectExplorAction.disconnect', 'Disconnect');
private _objectExplorerTreeNode: TreeNode; private _objectExplorerTreeNode: TreeNode;
private _container: HTMLElement; private _container: HTMLElement;
private _treeSelectionHandler: TreeSelectionHandler; private _treeSelectionHandler: TreeSelectionHandler;

View File

@@ -96,7 +96,7 @@ export class ServerTreeView {
this._activeConnectionsFilterAction.enabled = false; this._activeConnectionsFilterAction.enabled = false;
this._buttonSection = $('div.button-section').appendTo(container); this._buttonSection = $('div.button-section').appendTo(container);
var connectButton = new Button(this._buttonSection); var connectButton = new Button(this._buttonSection);
connectButton.label = localize('addConnection', 'Add Connection'); connectButton.label = localize('serverTree.addConnection', 'Add Connection');
this._toDispose.push(attachButtonStyler(connectButton, this._themeService)); this._toDispose.push(attachButtonStyler(connectButton, this._themeService));
this._toDispose.push(connectButton.onDidClick(() => { this._toDispose.push(connectButton.onDidClick(() => {
this._connectionManagementService.showConnectionDialog(); this._connectionManagementService.showConnectionDialog();

View File

@@ -55,7 +55,7 @@ export class TreeCreationUtils {
{ {
indentPixels: 10, indentPixels: 10,
twistiePixels: 20, twistiePixels: 20,
ariaLabel: nls.localize('regTreeAriaLabel', "Servers") ariaLabel: nls.localize('treeCreation.regTreeAriaLabel', "Servers")
}); });
} }
} }

View File

@@ -108,7 +108,7 @@ registry.registerWorkbenchAction(
TaskHistoryViewletAction.LABEL, TaskHistoryViewletAction.LABEL,
{ primary: KeyMod.CtrlCmd | KeyCode.KEY_T }), { primary: KeyMod.CtrlCmd | KeyCode.KEY_T }),
'View: Show Task History', 'View: Show Task History',
localize('view', "View") localize('taskHistory.view', "View")
); );
let configurationRegistry = <IConfigurationRegistry>Registry.as(Extensions.Configuration); let configurationRegistry = <IConfigurationRegistry>Registry.as(Extensions.Configuration);

View File

@@ -127,8 +127,8 @@ export class TaskService implements ITaskService {
public beforeShutdown(): TPromise<boolean> { public beforeShutdown(): TPromise<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('yes', "Yes"), localize('taskService.yes', "Yes"),
localize('no', "No") localize('taskService.no', "No")
]; ];
return new TPromise<boolean>((resolve, reject) => { return new TPromise<boolean>((resolve, reject) => {

View File

@@ -14,7 +14,7 @@ import Severity from 'vs/base/common/severity';
export class CancelAction extends Action { export class CancelAction extends Action {
public static ID = 'taskHistory.cancel'; public static ID = 'taskHistory.cancel';
public static LABEL = localize('cancel', 'Cancel'); public static LABEL = localize('cancelTask.cancel', 'Cancel');
constructor( constructor(
id: string, id: string,
@@ -48,7 +48,7 @@ export class CancelAction extends Action {
export class ScriptAction extends Action { export class ScriptAction extends Action {
public static ID = 'taskHistory.script'; public static ID = 'taskHistory.script';
public static LABEL = localize('script', 'Script'); public static LABEL = localize('taskAction.script', 'Script');
constructor( constructor(
id: string, id: string,

View File

@@ -94,7 +94,7 @@ export class TaskHistoryView {
}, { }, {
indentPixels: 10, indentPixels: 10,
twistiePixels: 20, twistiePixels: 20,
ariaLabel: nls.localize({ key: 'regTreeAriaLabel', comment: ['TaskHistory'] }, 'Task history') ariaLabel: nls.localize({ key: 'taskHistory.regTreeAriaLabel', comment: ['TaskHistory'] }, 'Task history')
}); });
} }

View File

@@ -26,7 +26,7 @@ export interface IInsightRegistry {
} }
class InsightRegistry implements IInsightRegistry { class InsightRegistry implements IInsightRegistry {
private _insightSchema: IJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets', '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> } = {};

View File

@@ -32,9 +32,9 @@ export interface IDashboardWidgetRegistry {
} }
class DashboardWidgetRegistry implements IDashboardWidgetRegistry { class DashboardWidgetRegistry implements IDashboardWidgetRegistry {
private _allSchema: CustomIJSONSchema = { type: 'object', description: nls.localize('schema.dashboardWidgets', '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', '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', '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

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('newQuery', 'New Query'); public static LABEL = nls.localize('newQueryAction.newQuery', 'New Query');
public static ICON = 'new-query'; public static ICON = 'new-query';
constructor() { constructor() {
@@ -281,7 +281,7 @@ export class ScriptDeleteAction extends Action {
export class BackupAction extends Task { export class BackupAction extends Task {
public static readonly ID = Constants.BackupFeatureName; public static readonly ID = Constants.BackupFeatureName;
public static readonly LABEL = nls.localize('backup', 'Backup'); public static readonly LABEL = nls.localize('backupAction.backup', 'Backup');
public static readonly ICON = Constants.BackupFeatureName; public static readonly ICON = Constants.BackupFeatureName;
constructor() { constructor() {
@@ -307,7 +307,7 @@ export class BackupAction extends Task {
export class RestoreAction extends Task { export class RestoreAction extends Task {
public static readonly ID = Constants.RestoreFeatureName; public static readonly ID = Constants.RestoreFeatureName;
public static readonly LABEL = nls.localize('restore', 'Restore'); public static readonly LABEL = nls.localize('restoreAction.restore', 'Restore');
public static readonly ICON = Constants.RestoreFeatureName; public static readonly ICON = Constants.RestoreFeatureName;
constructor() { constructor() {

View File

@@ -49,8 +49,8 @@ export class ErrorMessageDialog extends Modal {
@IContextKeyService contextKeyService: IContextKeyService @IContextKeyService contextKeyService: IContextKeyService
) { ) {
super('', TelemetryKeys.ErrorMessage, partService, telemetryService, contextKeyService, { isFlyout: false, hasTitleIcon: true }); super('', TelemetryKeys.ErrorMessage, partService, telemetryService, contextKeyService, { isFlyout: false, hasTitleIcon: true });
this._okLabel = localize('OK', 'OK'); this._okLabel = localize('errorMessageDialog.ok', 'OK');
this._closeLabel = localize('close', 'Close'); this._closeLabel = localize('errorMessageDialog.close', 'Close');
} }
protected renderBody(container: HTMLElement) { protected renderBody(container: HTMLElement) {