From 45341d786b6ac566d2bed971a6e8a2ac3db86891 Mon Sep 17 00:00:00 2001 From: Kim Santiago <31145923+kisantia@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:30:52 -0800 Subject: [PATCH] Move dacpac and schema compare localized strings (#9107) * move localized strings * move schema compare localized strings --- extensions/dacpac/src/localizedConstants.ts | 68 + extensions/dacpac/src/wizard/api/basePage.ts | 6 +- .../dacpac/src/wizard/api/dacFxConfigPage.ts | 16 +- extensions/dacpac/src/wizard/api/utils.ts | 20 +- .../src/wizard/dataTierApplicationWizard.ts | 34 +- .../src/wizard/pages/dacFxSummaryPage.ts | 22 +- .../src/wizard/pages/deployConfigPage.ts | 20 +- .../dacpac/src/wizard/pages/deployPlanPage.ts | 28 +- .../src/wizard/pages/exportConfigPage.ts | 8 +- .../src/wizard/pages/extractConfigPage.ts | 12 +- .../src/wizard/pages/importConfigPage.ts | 10 +- .../src/wizard/pages/selectOperationpage.ts | 12 +- .../src/dialogs/schemaCompareDialog.ts | 90 +- .../src/dialogs/schemaCompareOptionsDialog.ts | 1419 +++++++---------- .../schema-compare/src/localizedConstants.ts | 318 ++++ .../src/schemaCompareMainWindow.ts | 150 +- extensions/schema-compare/src/utils.ts | 11 +- 17 files changed, 1166 insertions(+), 1078 deletions(-) create mode 100644 extensions/dacpac/src/localizedConstants.ts create mode 100644 extensions/schema-compare/src/localizedConstants.ts diff --git a/extensions/dacpac/src/localizedConstants.ts b/extensions/dacpac/src/localizedConstants.ts new file mode 100644 index 0000000000..704deee1d3 --- /dev/null +++ b/extensions/dacpac/src/localizedConstants.ts @@ -0,0 +1,68 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the Source EULA. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vscode-nls'; +const localize = nls.loadMessageBundle(); + +// Labels +export const targetServer = localize('dacFx.targetServer', "Target Server"); +export const sourceServer = localize('dacFx.sourceServer', "Source Server"); +export const sourceDatabase = localize('dacFx.sourceDatabase', "Source Database"); +export const targetDatabase = localize('dacFx.targetDatabase', "Target Database"); +export const fileLocation = localize('dacfx.fileLocation', "File Location"); +export const selectFile = localize('dacfx.selectFile', "Select file"); +export const summaryTableTitle = localize('dacfx.summaryTableTitle', "Summary of settings"); +export const version = localize('dacfx.version', "Version"); +export const setting = localize('dacfx.setting', "Setting"); +export const value = localize('dacfx.value', "Value"); +export const databaseName = localize('dacFx.databaseName', "Database Name"); +export const open = localize('dacFxDeploy.openFile', "Open"); +export const upgradeExistingDatabase = localize('dacFx.upgradeExistingDatabase', "Upgrade Existing Database"); +export const newDatabase = localize('dacFx.newDatabase', "New Database"); +export function dataLossTextWithCount(count: number): string { return localize('dacfx.dataLossTextWithCount', "{0} of the deploy actions listed may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.", count); } +export const proceedDataLossMessage = localize('dacFx.proceedDataLoss', "Proceed despite possible data loss"); +export const noDataLossMessage = localize('dacfx.noDataLoss', "No data loss will occur from the listed deploy actions."); +export const dataLossMessage = localize('dacfx.dataLossText', "The deploy actions may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment."); +export const operation = localize('dacfx.operation', "Operation"); +export const operationTooltip = localize('dacfx.operationTooltip', "Operation(Create, Alter, Delete) that will occur during deployment"); +export const type = localize('dacfx.type', "Type"); +export const typeTooltip = localize('dacfx.typeTooltip', "Type of object that will be affected by deployment"); +export const object = localize('dacfx.object', "Object"); +export const objectTooltip = localize('dacfx.objecTooltip', "Name of object that will be affected by deployment"); +export const dataLoss = localize('dacfx.dataLoss', "Data Loss"); +export const dataLossTooltip = localize('dacfx.dataLossTooltip', "Operations that may result in data loss are marked with a warning sign"); +export const save = localize('dacfx.save', "Save"); +export const versionText = localize('dacFx.versionText', "Version (use x.x.x.x where x is a number)"); +export const deployDescription = localize('dacFx.deployDescription', "Deploy a data-tier application .dacpac file to an instance of SQL Server [Deploy Dacpac]"); +export const extractDescription = localize('dacFx.extractDescription', "Extract a data-tier application from an instance of SQL Server to a .dacpac file [Extract Dacpac]"); +export const importDescription = localize('dacFx.importDescription', "Create a database from a .bacpac file [Import Bacpac]"); +export const exportDescription = localize('dacFx.exportDescription', "Export the schema and data from a database to the logical .bacpac file format [Export Bacpac]"); +export const wizardTitle = localize('dacfx.wizardTitle', "Data-tier Application Wizard"); +export const selectOperationPageName = localize('dacFx.selectOperationPageName', "Select an Operation"); +export const deployConfigPageName = localize('dacFx.deployConfigPageName', "Select Deploy Dacpac Settings"); +export const deployPlanPageName = localize('dacFx.deployPlanPageName', "Review the deploy plan"); +export const summaryPageName = localize('dacFx.summaryPageName', "Summary"); +export const extractConfigPageName = localize('dacFx.extractConfigPageName', "Select Extract Dacpac Settings"); +export const importConfigPageName = localize('dacFx.importConfigPageName', "Select Import Bacpac Settings"); +export const exportConfigPageName = localize('dacFx.exportConfigPageName', "Select Export Bacpac Settings"); +export const deploy = localize('dacFx.deployButton', "Deploy"); +export const extract = localize('dacFx.extract', "Extract"); +export const importText = localize('dacFx.import', "Import"); +export const exportText = localize('dacFx.export', "Export"); +export const generateScript = localize('dacFx.generateScriptButton', "Generate Script"); +export const generatingScriptMessage = localize('dacfx.scriptGeneratingMessage', "You can view the status of script generation in the Tasks View once the wizard is closed. The generated script will open when complete."); +export const defaultText = localize('dacfx.default', "default"); + +// Error messages +export const databaseNameExistsErrorMessage = localize('dacfx.databaseNameExistsErrorMessage', "A database with the same name already exists on the instance of SQL Server"); +export const undefinedFilenameErrorMessage = localize('dacfx.undefinedFilenameErrorMessage', "Undefined name"); +export const filenameEndingIsPeriodErrorMessage = localize('dacfx.filenameEndingInPeriodErrorMessage', "File name cannot end with a period"); +export const whitespaceFilenameErrorMessage = localize('dacfx.whitespaceFilenameErrorMessage', "File name cannot be whitespace"); +export const invalidFileCharsErrorMessage = localize('dacfx.invalidFileCharsErrorMessage', "Invalid file characters"); +export const reservedWindowsFilenameErrorMessage = localize('dacfx.reservedWindowsFilenameErrorMessage', "This file name is reserved for use by Windows. Choose another name and try again"); +export const reservedValueErrorMessage = localize('dacfx.reservedValueErrorMessage', "Reserved file name. Choose another name and try again"); +export const trailingWhitespaceErrorMessage = localize('dacfx.trailingWhitespaceErrorMessage', "File name cannot end with a whitespace"); +export const tooLongFilenameErrorMessage = localize('dacfx.tooLongFilenameErrorMessage', "File name is over 255 characters"); +export function deployPlanErrorMessage(errorMessage: string): string { return localize('dacfx.deployPlanErrorMessage', "Generating deploy plan failed '{0}'", errorMessage ? errorMessage : 'Unknown'); } diff --git a/extensions/dacpac/src/wizard/api/basePage.ts b/extensions/dacpac/src/wizard/api/basePage.ts index 57e7b5fd93..1e13b8a68f 100644 --- a/extensions/dacpac/src/wizard/api/basePage.ts +++ b/extensions/dacpac/src/wizard/api/basePage.ts @@ -4,11 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; -import * as nls from 'vscode-nls'; +import * as loc from '../../localizedConstants'; import { DacFxDataModel } from './models'; -const localize = nls.loadMessageBundle(); - export abstract class BasePage { protected readonly wizardPage: azdata.window.WizardPage; @@ -75,7 +73,7 @@ export abstract class BasePage { let srv = c.options.server; if (!usr) { - usr = localize('basePage.defaultUser', "default"); + usr = loc.defaultText; } let finalName = `${srv} (${usr})`; diff --git a/extensions/dacpac/src/wizard/api/dacFxConfigPage.ts b/extensions/dacpac/src/wizard/api/dacFxConfigPage.ts index 80921bc592..5c82f9aa0d 100644 --- a/extensions/dacpac/src/wizard/api/dacFxConfigPage.ts +++ b/extensions/dacpac/src/wizard/api/dacFxConfigPage.ts @@ -4,17 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; -import * as nls from 'vscode-nls'; import * as vscode from 'vscode'; import * as os from 'os'; import * as path from 'path'; +import * as loc from '../../localizedConstants'; import { DataTierApplicationWizard, Operation } from '../dataTierApplicationWizard'; import { DacFxDataModel } from './models'; import { BasePage } from './basePage'; import { sanitizeStringForFilename, isValidBasename, isValidBasenameErrorMessage } from './utils'; -const localize = nls.loadMessageBundle(); - export abstract class DacFxConfigPage extends BasePage { protected readonly wizardPage: azdata.window.WizardPage; @@ -44,7 +42,7 @@ export abstract class DacFxConfigPage extends BasePage { } protected async createServerDropdown(isTargetServer: boolean): Promise { - const serverDropDownTitle = isTargetServer ? localize('dacFx.targetServerDropdownTitle', "Target Server") : localize('dacFx.sourceServerDropdownTitle', "Source Server"); + const serverDropDownTitle = isTargetServer ? loc.targetServer : loc.sourceServer; this.serverDropdown = this.view.modelBuilder.dropDown().withProperties({ required: true, ariaLabel: serverDropDownTitle @@ -87,7 +85,7 @@ export abstract class DacFxConfigPage extends BasePage { .withValidation(component => !this.databaseNameExists(component.value)) .withProperties({ required: true, - validationErrorMessage: localize('dacfx.databaseNameExistsErrorMessage', "A database with the same name already exists on the instance of SQL Server") + validationErrorMessage: loc.databaseNameExistsErrorMessage }).component(); this.databaseTextBox.ariaLabel = title; @@ -102,7 +100,7 @@ export abstract class DacFxConfigPage extends BasePage { } protected async createDatabaseDropdown(): Promise { - const databaseDropdownTitle = localize('dacFx.sourceDatabaseDropdownTitle', "Source Database"); + const databaseDropdownTitle = loc.sourceDatabase; this.databaseDropdown = this.view.modelBuilder.dropDown().withProperties({ ariaLabel: databaseDropdownTitle }).component(); @@ -174,11 +172,11 @@ export abstract class DacFxConfigPage extends BasePage { } }); - this.fileTextBox.ariaLabel = localize('dacfx.fileLocationAriaLabel', "File Location"); + this.fileTextBox.ariaLabel = loc.fileLocation; this.fileButton = this.view.modelBuilder.button().withProperties({ label: '•••', - title: localize('dacfx.selectFile', "Select file"), - ariaLabel: localize('dacfx.selectFile', "Select file") + title: loc.selectFile, + ariaLabel: loc.selectFile }).component(); } diff --git a/extensions/dacpac/src/wizard/api/utils.ts b/extensions/dacpac/src/wizard/api/utils.ts index c38b30c60c..315aaf03cd 100644 --- a/extensions/dacpac/src/wizard/api/utils.ts +++ b/extensions/dacpac/src/wizard/api/utils.ts @@ -4,12 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as os from 'os'; import * as path from 'path'; -import * as nls from 'vscode-nls'; +import * as loc from '../../localizedConstants'; const WINDOWS_INVALID_FILE_CHARS = /[\\/:\*\?"<>\|]/g; const UNIX_INVALID_FILE_CHARS = /[\\/]/g; const isWindows = os.platform() === 'win32'; const WINDOWS_FORBIDDEN_NAMES = /^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i; -const localize = nls.loadMessageBundle(); /** * Determines if a given character is a valid filename character @@ -99,38 +98,37 @@ export function isValidBasename(name: string | null | undefined): boolean { export function isValidBasenameErrorMessage(name: string | null | undefined): string { const invalidFileChars = isWindows ? WINDOWS_INVALID_FILE_CHARS : UNIX_INVALID_FILE_CHARS; if (!name) { - return localize('dacfx.undefinedFileNameErrorMessage', "Undefined name"); + return loc.undefinedFilenameErrorMessage; } if (isWindows && name[name.length - 1] === '.') { - return localize('dacfx.fileNameEndingInPeriodErrorMessage', "File name cannot end with a period"); // Windows: file cannot end with a "." + return loc.filenameEndingIsPeriodErrorMessage; // Windows: file cannot end with a "." } let basename = path.parse(name).name; if (!basename || basename.length === 0 || /^\s+$/.test(basename)) { - return localize('dacfx.whitespaceFilenameErrorMessage', "File name cannot be whitespace"); // require a name that is not just whitespace + return loc.whitespaceFilenameErrorMessage; // require a name that is not just whitespace } invalidFileChars.lastIndex = 0; if (invalidFileChars.test(basename)) { - return localize('dacfx.invalidFileCharsErrorMessage', "Invalid file characters"); // check for certain invalid file characters + return loc.invalidFileCharsErrorMessage; // check for certain invalid file characters } if (isWindows && WINDOWS_FORBIDDEN_NAMES.test(basename)) { - console.error('here'); - return localize('dacfx.reservedWindowsFileNameErrorMessage', "This file name is reserved for use by Windows. Choose another name and try again"); // check for certain invalid file names + return loc.reservedWindowsFilenameErrorMessage; // check for certain invalid file names } if (basename === '.' || basename === '..') { - return localize('dacfx.reservedValueErrorMessage', "Reserved file name. Choose another name and try again"); // check for reserved values + return loc.reservedWindowsFilenameErrorMessage; // check for reserved values } if (isWindows && basename.length !== basename.trim().length) { - return localize('dacfx.trailingWhitespaceErrorMessage', "File name cannot end with a whitespace"); // Windows: file cannot end with a whitespace + return loc.trailingWhitespaceErrorMessage; // Windows: file cannot end with a whitespace } if (basename.length > 255) { - return localize('dacfx.tooLongFileNameErrorMessage', "File name is over 255 characters"); // most file systems do not allow files > 255 length + return loc.tooLongFilenameErrorMessage; // most file systems do not allow files > 255 length } return ''; diff --git a/extensions/dacpac/src/wizard/dataTierApplicationWizard.ts b/extensions/dacpac/src/wizard/dataTierApplicationWizard.ts index dafc66fc4f..ea443bad47 100644 --- a/extensions/dacpac/src/wizard/dataTierApplicationWizard.ts +++ b/extensions/dacpac/src/wizard/dataTierApplicationWizard.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as nls from 'vscode-nls'; import * as azdata from 'azdata'; +import * as loc from '../localizedConstants'; import { SelectOperationPage } from './pages/selectOperationpage'; import { DeployConfigPage } from './pages/deployConfigPage'; import { DeployPlanPage } from './pages/deployPlanPage'; @@ -17,7 +17,6 @@ import { DacFxDataModel } from './api/models'; import { BasePage } from './api/basePage'; import * as mssql from '../../../mssql'; -const localize = nls.loadMessageBundle(); const msSqlProvider = 'MSSQL'; class Page { wizardPage: azdata.window.WizardPage; @@ -109,14 +108,14 @@ export class DataTierApplicationWizard { this.model.serverId = this.connection.connectionId; - this.wizard = azdata.window.createWizard(localize('dacfx.wizardTitle', "Data-tier Application Wizard")); - let selectOperationWizardPage = azdata.window.createWizardPage(localize('dacFx.selectOperationPageName', "Select an Operation")); - let deployConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.deployConfigPageName', "Select Deploy Dacpac Settings")); - let deployPlanWizardPage = azdata.window.createWizardPage(localize('dacFx.deployPlanPage', "Review the deploy plan")); - let summaryWizardPage = azdata.window.createWizardPage(localize('dacFx.summaryPageName', "Summary")); - let extractConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.extractConfigPageName', "Select Extract Dacpac Settings")); - let importConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.importConfigPageName', "Select Import Bacpac Settings")); - let exportConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.exportConfigPageName', "Select Export Bacpac Settings")); + this.wizard = azdata.window.createWizard(loc.wizardTitle); + let selectOperationWizardPage = azdata.window.createWizardPage(loc.selectOperationPageName); + let deployConfigWizardPage = azdata.window.createWizardPage(loc.deployConfigPageName); + let deployPlanWizardPage = azdata.window.createWizardPage(loc.deployPlanPageName); + let summaryWizardPage = azdata.window.createWizardPage(loc.summaryPageName); + let extractConfigWizardPage = azdata.window.createWizardPage(loc.extractConfigPageName); + let importConfigWizardPage = azdata.window.createWizardPage(loc.importConfigPageName); + let exportConfigWizardPage = azdata.window.createWizardPage(loc.exportConfigPageName); this.pages.set(PageName.selectOperation, new Page(selectOperationWizardPage)); this.pages.set(PageName.deployConfig, new Page(deployConfigWizardPage)); @@ -201,27 +200,27 @@ export class DataTierApplicationWizard { public setDoneButton(operation: Operation): void { switch (operation) { case Operation.deploy: { - this.wizard.doneButton.label = localize('dacFx.deployButton', "Deploy"); + this.wizard.doneButton.label = loc.deploy; this.selectedOperation = Operation.deploy; break; } case Operation.extract: { - this.wizard.doneButton.label = localize('dacFx.extractButton', "Extract"); + this.wizard.doneButton.label = loc.extract; this.selectedOperation = Operation.extract; break; } case Operation.import: { - this.wizard.doneButton.label = localize('dacFx.importButton', "Import"); + this.wizard.doneButton.label = loc.importText; this.selectedOperation = Operation.import; break; } case Operation.export: { - this.wizard.doneButton.label = localize('dacFx.exportButton', "Export"); + this.wizard.doneButton.label = loc.exportText; this.selectedOperation = Operation.export; break; } case Operation.generateDeployScript: { - this.wizard.doneButton.label = localize('dacFx.generateScriptButton', "Generate Script"); + this.wizard.doneButton.label = loc.generateScript; this.selectedOperation = Operation.generateDeployScript; break; } @@ -289,7 +288,7 @@ export class DataTierApplicationWizard { const service = await DataTierApplicationWizard.getService(msSqlProvider); const ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId); this.wizard.message = { - text: localize('dacfx.scriptGeneratingMessage', "You can view the status of script generation in the Tasks View once the wizard is closed. The generated script will open when complete."), + text: loc.generatingScriptMessage, level: azdata.window.MessageLevel.Information, description: '' }; @@ -343,8 +342,7 @@ export class DataTierApplicationWizard { const result = await service.generateDeployPlan(this.model.filePath, this.model.database, ownerUri, azdata.TaskExecutionMode.execute); if (!result || !result.success) { - vscode.window.showErrorMessage( - localize('alertData.deployPlanErrorMessage', "Generating deploy plan failed '{0}'", result.errorMessage ? result.errorMessage : 'Unknown')); + vscode.window.showErrorMessage(loc.deployPlanErrorMessage(result.errorMessage)); } return result.report; diff --git a/extensions/dacpac/src/wizard/pages/dacFxSummaryPage.ts b/extensions/dacpac/src/wizard/pages/dacFxSummaryPage.ts index cd1642b89f..46a44957be 100644 --- a/extensions/dacpac/src/wizard/pages/dacFxSummaryPage.ts +++ b/extensions/dacpac/src/wizard/pages/dacFxSummaryPage.ts @@ -4,13 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; -import * as nls from 'vscode-nls'; +import * as loc from '../../localizedConstants'; import { DacFxDataModel } from '../api/models'; import { DataTierApplicationWizard, Operation } from '../dataTierApplicationWizard'; import { BasePage } from '../api/basePage'; -const localize = nls.loadMessageBundle(); - export class DacFxSummaryPage extends BasePage { protected readonly wizardPage: azdata.window.WizardPage; @@ -32,7 +30,7 @@ export class DacFxSummaryPage extends BasePage { async start(): Promise { this.table = this.view.modelBuilder.table().withProperties({ - title: localize('dacfx.summaryTableTitle', "Summary of settings") + title: loc.summaryTableTitle }).component(); this.loader = this.view.modelBuilder.loadingComponent().withItem(this.table).component(); this.form = this.view.modelBuilder.formContainer().withFormItems( @@ -75,11 +73,11 @@ export class DacFxSummaryPage extends BasePage { private populateTable() { let data = []; - let targetServer = localize('dacfx.targetServerName', "Target Server"); - let targetDatabase = localize('dacfx.targetDatabaseName', "Target Database"); - let sourceServer = localize('dacfx.sourceServerName', "Source Server"); - let sourceDatabase = localize('dacfx.sourceDatabaseName', "Source Database"); - let fileLocation = localize('dacfx.fileLocation', "File Location"); + let targetServer = loc.targetServer; + let targetDatabase = loc.targetDatabase; + let sourceServer = loc.sourceServer; + let sourceDatabase = loc.sourceDatabase; + let fileLocation = loc.fileLocation; switch (this.instance.selectedOperation) { case Operation.deploy: { @@ -93,7 +91,7 @@ export class DacFxSummaryPage extends BasePage { data = [ [sourceServer, this.model.serverName], [sourceDatabase, this.model.database], - [localize('dacfxExtract.version', "Version"), this.model.version], + [loc.version, this.model.version], [fileLocation, this.model.filePath]]; break; } @@ -124,11 +122,11 @@ export class DacFxSummaryPage extends BasePage { data: data, columns: [ { - value: localize('dacfx.settingColumn', "Setting"), + value: loc.setting, cssClass: 'align-with-header' }, { - value: localize('dacfx.valueColumn', "Value"), + value: loc.value, cssClass: 'align-with-header' }], width: 700, diff --git a/extensions/dacpac/src/wizard/pages/deployConfigPage.ts b/extensions/dacpac/src/wizard/pages/deployConfigPage.ts index f84ef26b6b..7e045601e4 100644 --- a/extensions/dacpac/src/wizard/pages/deployConfigPage.ts +++ b/extensions/dacpac/src/wizard/pages/deployConfigPage.ts @@ -4,15 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; -import * as nls from 'vscode-nls'; import * as vscode from 'vscode'; import * as path from 'path'; +import * as loc from '../../localizedConstants'; import { DacFxDataModel } from '../api/models'; import { DataTierApplicationWizard, DeployOperationPath, Operation, DeployNewOperationPath, PageName } from '../dataTierApplicationWizard'; import { DacFxConfigPage } from '../api/dacFxConfigPage'; -const localize = nls.loadMessageBundle(); - export class DeployConfigPage extends DacFxConfigPage { protected readonly wizardPage: azdata.window.WizardPage; @@ -32,9 +30,9 @@ export class DeployConfigPage extends DacFxConfigPage { async start(): Promise { let serverComponent = await this.createServerDropdown(true); let fileBrowserComponent = await this.createFileBrowser(); - this.databaseComponent = await this.createDatabaseTextBox(localize('dacFx.databaseNameTextBox', "Database Name")); + this.databaseComponent = await this.createDatabaseTextBox(loc.databaseName); this.databaseDropdownComponent = await this.createDeployDatabaseDropdown(); - this.databaseDropdownComponent.title = localize('dacFx.databaseNameDropdown', "Database Name"); + this.databaseDropdownComponent.title = loc.databaseName; let radioButtons = await this.createRadiobuttons(); this.formBuilder = this.view.modelBuilder.formContainer() @@ -72,7 +70,7 @@ export class DeployConfigPage extends DacFxConfigPage { canSelectFolders: false, canSelectMany: false, defaultUri: vscode.Uri.file(this.getRootPath()), - openLabel: localize('dacFxDeploy.openFile', "Open"), + openLabel: loc.open, filters: { 'dacpac Files': ['dacpac'], } @@ -98,7 +96,7 @@ export class DeployConfigPage extends DacFxConfigPage { return { component: this.fileTextBox, - title: localize('dacFxDeploy.fileTextboxTitle', "File Location"), + title: loc.fileLocation, actions: [this.fileButton] }; } @@ -107,13 +105,13 @@ export class DeployConfigPage extends DacFxConfigPage { let upgradeRadioButton = this.view.modelBuilder.radioButton() .withProperties({ name: 'updateExisting', - label: localize('dacFx.upgradeRadioButtonLabel', "Upgrade Existing Database"), + label: loc.upgradeExistingDatabase, }).component(); let newRadioButton = this.view.modelBuilder.radioButton() .withProperties({ name: 'updateExisting', - label: localize('dacFx.newRadioButtonLabel', "New Database"), + label: loc.newDatabase, }).component(); upgradeRadioButton.onDidClick(() => { @@ -157,12 +155,12 @@ export class DeployConfigPage extends DacFxConfigPage { return { component: flexRadioButtonsModel, - title: localize('dacFx.targetDatabaseRadioButtonsTitle', "Target Database") + title: loc.targetDatabase }; } protected async createDeployDatabaseDropdown(): Promise { - const targetDatabaseTitle = localize('dacFx.targetDatabaseDropdownTitle', "Database Name"); + const targetDatabaseTitle = loc.databaseName; this.databaseDropdown = this.view.modelBuilder.dropDown().withProperties({ ariaLabel: targetDatabaseTitle }).component(); diff --git a/extensions/dacpac/src/wizard/pages/deployPlanPage.ts b/extensions/dacpac/src/wizard/pages/deployPlanPage.ts index afced403e4..b09a6e697e 100644 --- a/extensions/dacpac/src/wizard/pages/deployPlanPage.ts +++ b/extensions/dacpac/src/wizard/pages/deployPlanPage.ts @@ -4,14 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; -import * as nls from 'vscode-nls'; import * as parser from 'htmlparser2'; +import * as loc from '../../localizedConstants'; import { DacFxDataModel } from '../api/models'; import { DataTierApplicationWizard } from '../dataTierApplicationWizard'; import { DacFxConfigPage } from '../api/dacFxConfigPage'; -const localize = nls.loadMessageBundle(); - enum deployPlanXml { AlertElement = 'Alert', OperationElement = 'Operation', @@ -105,7 +103,7 @@ export class DeployPlanPage extends DacFxConfigPage { if (result.dataLossAlerts.size > 0) { // update message to list how many operations could result in data loss this.dataLossText.updateProperties({ - value: localize('dacfx.dataLossTextWithCount', "{0} of the deploy actions listed may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.", result.dataLossAlerts.size) + value: loc.dataLossTextWithCount(result.dataLossAlerts.size) }); this.dataLossCheckbox.enabled = true; } else { @@ -120,7 +118,7 @@ export class DeployPlanPage extends DacFxConfigPage { this.dataLossCheckbox = this.view.modelBuilder.checkBox() .withValidation(component => component.checked === true) .withProperties({ - label: localize('dacFx.dataLossCheckbox', "Proceed despite possible data loss"), + label: loc.proceedDataLossMessage, }).component(); return { @@ -133,7 +131,7 @@ export class DeployPlanPage extends DacFxConfigPage { private async createNoDataLossText(): Promise { let noDataLossText = this.view.modelBuilder.text() .withProperties({ - value: localize('dacfx.noDataLossText', "No data loss will occur from the listed deploy actions.") + value: loc.noDataLossMessage }).component(); return { @@ -146,7 +144,7 @@ export class DeployPlanPage extends DacFxConfigPage { let dataLossComponent = await this.createDataLossCheckbox(); this.dataLossText = this.view.modelBuilder.text() .withProperties({ - value: localize('dacfx.dataLossText', "The deploy actions may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.") + value: loc.dataLossMessage }).component(); return { @@ -179,31 +177,31 @@ export class DeployPlanPage extends DacFxConfigPage { private getTableColumns(dataloss: boolean): azdata.TableColumn[] { let columns: azdata.TableColumn[] = [ { - value: localize('dacfx.operationColumn', "Operation"), + value: loc.operation, width: 75, cssClass: 'align-with-header', - toolTip: localize('dacfx.operationTooltip', "Operation(Create, Alter, Delete) that will occur during deployment") + toolTip: loc.operationTooltip }, { - value: localize('dacfx.typeColumn', "Type"), + value: loc.type, width: 100, cssClass: 'align-with-header', - toolTip: localize('dacfx.typeTooltip', "Type of object that will be affected by deployment") + toolTip: loc.typeTooltip }, { - value: localize('dacfx.objectColumn', "Object"), + value: loc.object, width: 300, cssClass: 'align-with-header', - toolTip: localize('dacfx.objecTooltip', "Name of object that will be affected by deployment") + toolTip: loc.objectTooltip }]; if (dataloss) { columns.unshift( { - value: localize('dacfx.dataLossColumn', "Data Loss"), + value: loc.dataLoss, width: 50, cssClass: 'center-align', - toolTip: localize('dacfx.dataLossTooltip', "Operations that may result in data loss are marked with a warning sign") + toolTip: loc.dataLossTooltip }); } return columns; diff --git a/extensions/dacpac/src/wizard/pages/exportConfigPage.ts b/extensions/dacpac/src/wizard/pages/exportConfigPage.ts index 17c912cacb..310f9e4e3d 100644 --- a/extensions/dacpac/src/wizard/pages/exportConfigPage.ts +++ b/extensions/dacpac/src/wizard/pages/exportConfigPage.ts @@ -4,14 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; -import * as nls from 'vscode-nls'; import * as vscode from 'vscode'; +import * as loc from '../../localizedConstants'; import { DacFxDataModel } from '../api/models'; import { DataTierApplicationWizard } from '../dataTierApplicationWizard'; import { DacFxConfigPage } from '../api/dacFxConfigPage'; -const localize = nls.loadMessageBundle(); - export class ExportConfigPage extends DacFxConfigPage { protected readonly wizardPage: azdata.window.WizardPage; @@ -77,7 +75,7 @@ export class ExportConfigPage extends DacFxConfigPage { let fileUri = await vscode.window.showSaveDialog( { defaultUri: vscode.Uri.file(this.fileTextBox.value), - saveLabel: localize('dacfxExport.saveFile', "Save"), + saveLabel: loc.save, filters: { 'bacpac Files': ['bacpac'], } @@ -98,7 +96,7 @@ export class ExportConfigPage extends DacFxConfigPage { return { component: this.fileTextBox, - title: localize('dacFxExport.fileTextboxTitle', "File Location"), + title: loc.fileLocation, actions: [this.fileButton] }; } diff --git a/extensions/dacpac/src/wizard/pages/extractConfigPage.ts b/extensions/dacpac/src/wizard/pages/extractConfigPage.ts index aba6b1b0be..ca5d383544 100644 --- a/extensions/dacpac/src/wizard/pages/extractConfigPage.ts +++ b/extensions/dacpac/src/wizard/pages/extractConfigPage.ts @@ -4,14 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; -import * as nls from 'vscode-nls'; import * as vscode from 'vscode'; +import * as loc from '../../localizedConstants'; import { DacFxDataModel } from '../api/models'; import { DataTierApplicationWizard } from '../dataTierApplicationWizard'; import { DacFxConfigPage } from '../api/dacFxConfigPage'; -const localize = nls.loadMessageBundle(); - export class ExtractConfigPage extends DacFxConfigPage { protected readonly wizardPage: azdata.window.WizardPage; @@ -79,7 +77,7 @@ export class ExtractConfigPage extends DacFxConfigPage { let fileUri = await vscode.window.showSaveDialog( { defaultUri: vscode.Uri.file(this.fileTextBox.value), - saveLabel: localize('dacfxExtract.saveFile', "Save"), + saveLabel: loc.save, filters: { 'dacpac Files': ['dacpac'], } @@ -100,7 +98,7 @@ export class ExtractConfigPage extends DacFxConfigPage { return { component: this.fileTextBox, - title: localize('dacFxExtract.fileTextboxTitle', "File Location"), + title: loc.fileLocation, actions: [this.fileButton] }; } @@ -108,7 +106,7 @@ export class ExtractConfigPage extends DacFxConfigPage { private async createVersionTextBox(): Promise { this.versionTextBox = this.view.modelBuilder.inputBox().withProperties({ required: true, - ariaLabel: localize('dacFxExtract.versionTextBoxAriaLabel', "Version") + ariaLabel: loc.version }).component(); // default version @@ -121,7 +119,7 @@ export class ExtractConfigPage extends DacFxConfigPage { return { component: this.versionTextBox, - title: localize('dacFxExtract.versionTextboxTitle', "Version (use x.x.x.x where x is a number)"), + title: loc.versionText, }; } } diff --git a/extensions/dacpac/src/wizard/pages/importConfigPage.ts b/extensions/dacpac/src/wizard/pages/importConfigPage.ts index 8adfc86aab..89c7ce9dee 100644 --- a/extensions/dacpac/src/wizard/pages/importConfigPage.ts +++ b/extensions/dacpac/src/wizard/pages/importConfigPage.ts @@ -4,15 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; -import * as nls from 'vscode-nls'; import * as vscode from 'vscode'; import * as path from 'path'; +import * as loc from '../../localizedConstants'; import { DacFxDataModel } from '../api/models'; import { DataTierApplicationWizard } from '../dataTierApplicationWizard'; import { DacFxConfigPage } from '../api/dacFxConfigPage'; -const localize = nls.loadMessageBundle(); - export class ImportConfigPage extends DacFxConfigPage { protected readonly wizardPage: azdata.window.WizardPage; @@ -28,7 +26,7 @@ export class ImportConfigPage extends DacFxConfigPage { } async start(): Promise { - let databaseComponent = await this.createDatabaseTextBox(localize('dacfx.targetDatabaseAriaLabel', "Target Database")); + let databaseComponent = await this.createDatabaseTextBox(loc.targetDatabase); let serverComponent = await this.createServerDropdown(true); let fileBrowserComponent = await this.createFileBrowser(); @@ -63,7 +61,7 @@ export class ImportConfigPage extends DacFxConfigPage { canSelectFolders: false, canSelectMany: false, defaultUri: vscode.Uri.file(this.getRootPath()), - openLabel: localize('dacFxImport.openFile', "Open"), + openLabel: loc.open, filters: { 'bacpac Files': ['bacpac'], } @@ -89,7 +87,7 @@ export class ImportConfigPage extends DacFxConfigPage { return { component: this.fileTextBox, - title: localize('dacFxImport.fileTextboxTitle', "File Location"), + title: loc.fileLocation, actions: [this.fileButton] }; } diff --git a/extensions/dacpac/src/wizard/pages/selectOperationpage.ts b/extensions/dacpac/src/wizard/pages/selectOperationpage.ts index 8989612a4b..37636352bc 100644 --- a/extensions/dacpac/src/wizard/pages/selectOperationpage.ts +++ b/extensions/dacpac/src/wizard/pages/selectOperationpage.ts @@ -4,13 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as azdata from 'azdata'; -import * as nls from 'vscode-nls'; +import * as loc from '../../localizedConstants'; import { DacFxDataModel } from '../api/models'; import { DataTierApplicationWizard, Operation, DeployOperationPath, ExtractOperationPath, ImportOperationPath, ExportOperationPath, PageName } from '../dataTierApplicationWizard'; import { BasePage } from '../api/basePage'; -const localize = nls.loadMessageBundle(); - export class SelectOperationPage extends BasePage { protected readonly wizardPage: azdata.window.WizardPage; @@ -63,7 +61,7 @@ export class SelectOperationPage extends BasePage { this.deployRadioButton = this.view.modelBuilder.radioButton() .withProperties({ name: 'selectedOperation', - label: localize('dacFx.deployRadioButtonLabel', "Deploy a data-tier application .dacpac file to an instance of SQL Server [Deploy Dacpac]"), + label: loc.deployDescription, checked: true // Default to first radio button being selected }).component(); @@ -91,7 +89,7 @@ export class SelectOperationPage extends BasePage { this.extractRadioButton = this.view.modelBuilder.radioButton() .withProperties({ name: 'selectedOperation', - label: localize('dacFx.extractRadioButtonLabel', "Extract a data-tier application from an instance of SQL Server to a .dacpac file [Extract Dacpac]"), + label: loc.extractDescription, }).component(); this.extractRadioButton.onDidClick(() => { @@ -116,7 +114,7 @@ export class SelectOperationPage extends BasePage { this.importRadioButton = this.view.modelBuilder.radioButton() .withProperties({ name: 'selectedOperation', - label: localize('dacFx.importRadioButtonLabel', "Create a database from a .bacpac file [Import Bacpac]"), + label: loc.importDescription, }).component(); this.importRadioButton.onDidClick(() => { @@ -141,7 +139,7 @@ export class SelectOperationPage extends BasePage { this.exportRadioButton = this.view.modelBuilder.radioButton() .withProperties({ name: 'selectedOperation', - label: localize('dacFx.exportRadioButtonLabel', "Export the schema and data from a database to the logical .bacpac file format [Export Bacpac]"), + label: loc.exportDescription, }).component(); this.exportRadioButton.onDidClick(() => { diff --git a/extensions/schema-compare/src/dialogs/schemaCompareDialog.ts b/extensions/schema-compare/src/dialogs/schemaCompareDialog.ts index 4fcf33c3d1..8200270326 100644 --- a/extensions/schema-compare/src/dialogs/schemaCompareDialog.ts +++ b/extensions/schema-compare/src/dialogs/schemaCompareDialog.ts @@ -3,33 +3,15 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as nls from 'vscode-nls'; import * as azdata from 'azdata'; import * as vscode from 'vscode'; +import * as loc from '../localizedConstants'; import { SchemaCompareMainWindow } from '../schemaCompareMainWindow'; import { promises as fs } from 'fs'; import { TelemetryReporter, TelemetryViews } from '../telemetry'; import { getEndpointName, getRootPath } from '../utils'; import * as mssql from '../../../mssql'; -const localize = nls.loadMessageBundle(); -const OkButtonText: string = localize('schemaCompareDialog.ok', "OK"); -const CancelButtonText: string = localize('schemaCompareDialog.cancel', "Cancel"); -const SourceTitle: string = localize('schemaCompareDialog.SourceTitle', "Source"); -const TargetTitle: string = localize('schemaCompareDialog.TargetTitle', "Target"); -const FileTextBoxLabel: string = localize('schemaCompareDialog.fileTextBoxLabel', "File"); -const DacpacRadioButtonLabel: string = localize('schemaCompare.dacpacRadioButtonLabel', "Data-tier Application File (.dacpac)"); -const DatabaseRadioButtonLabel: string = localize('schemaCompare.databaseButtonLabel', "Database"); -const RadioButtonsLabel: string = localize('schemaCompare.radioButtonsLabel', "Type"); -const ServerDropdownLabel: string = localize('schemaCompareDialog.serverDropdownTitle', "Server"); -const DatabaseDropdownLabel: string = localize('schemaCompareDialog.databaseDropdownTitle', "Database"); -const NoActiveConnectionsLabel: string = localize('schemaCompare.noActiveConnectionsText', "No active connections"); -const SchemaCompareLabel: string = localize('schemaCompare.dialogTitle', "Schema Compare"); -const differentSourceMessage: string = localize('schemaCompareDialog.differentSourceMessage', "A different source schema has been selected. Compare to see the comparison?"); -const differentTargetMessage: string = localize('schemaCompareDialog.differentTargetMessage', "A different target schema has been selected. Compare to see the comparison?"); -const differentSourceTargetMessage: string = localize('schemaCompareDialog.differentSourceTargetMessage', "Different source and target schemas have been selected. Compare to see the comparison?"); -const YesButtonText: string = localize('schemaCompareDialog.Yes', "Yes"); -const NoButtonText: string = localize('schemaCompareDialog.No', "No"); const titleFontSize: number = 13; async function exists(path: string): Promise { @@ -78,7 +60,7 @@ export class SchemaCompareDialog { } protected initializeDialog(): void { - this.schemaCompareTab = azdata.window.createTab(SchemaCompareLabel); + this.schemaCompareTab = azdata.window.createTab(loc.SchemaCompareLabel); this.initializeSchemaCompareTab(); this.dialog.content = [this.schemaCompareTab]; } @@ -90,14 +72,14 @@ export class SchemaCompareDialog { this.connectionId = connection.connectionId; } - this.dialog = azdata.window.createModelViewDialog(SchemaCompareLabel); + this.dialog = azdata.window.createModelViewDialog(loc.SchemaCompareLabel); this.initializeDialog(); - this.dialog.okButton.label = OkButtonText; + this.dialog.okButton.label = loc.OkButtonText; this.dialog.okButton.enabled = false; this.dialog.okButton.onClick(async () => await this.execute()); - this.dialog.cancelButton.label = CancelButtonText; + this.dialog.cancelButton.label = loc.CancelButtonText; this.dialog.cancelButton.onClick(async () => await this.cancel()); azdata.window.openDialog(this.dialog); @@ -169,15 +151,15 @@ export class SchemaCompareDialog { && (sourceEndpointChanged || targetEndpointChanged)) { this.schemaCompareResult.setButtonsForRecompare(); - let message = differentSourceMessage; + let message = loc.differentSourceMessage; if (sourceEndpointChanged && targetEndpointChanged) { - message = differentSourceTargetMessage; + message = loc.differentSourceTargetMessage; } else if (targetEndpointChanged) { - message = differentTargetMessage; + message = loc.differentTargetMessage; } - vscode.window.showWarningMessage(message, YesButtonText, NoButtonText).then((result) => { - if (result === YesButtonText) { + vscode.window.showWarningMessage(message, loc.YesButtonText, loc.NoButtonText).then((result) => { + if (result === loc.YesButtonText) { this.schemaCompareResult.startCompare(); } }); @@ -200,7 +182,7 @@ export class SchemaCompareDialog { this.sourceTextBox = view.modelBuilder.inputBox().withProperties({ value: this.schemaCompareResult.sourceEndpointInfo ? this.schemaCompareResult.sourceEndpointInfo.packageFilePath : '', width: 275, - ariaLabel: localize('schemaCompareDialog.sourceTextBox', "Source file") + ariaLabel: loc.sourceFile }).component(); this.sourceTextBox.onTextChanged(async (e) => { @@ -210,7 +192,7 @@ export class SchemaCompareDialog { this.targetTextBox = view.modelBuilder.inputBox().withProperties({ value: this.schemaCompareResult.targetEndpointInfo ? this.schemaCompareResult.targetEndpointInfo.packageFilePath : '', width: 275, - ariaLabel: localize('schemaCompareDialog.targetTextBox', "Target file") + ariaLabel: loc.targetFile }).component(); this.targetTextBox.onTextChanged(async () => { @@ -275,10 +257,10 @@ export class SchemaCompareDialog { this.formBuilder = view.modelBuilder.formContainer() .withFormItems([ { - title: SourceTitle, + title: loc.SourceTitle, components: sourceComponents }, { - title: TargetTitle, + title: loc.TargetTitle, components: targetComponents } ], { @@ -305,14 +287,14 @@ export class SchemaCompareDialog { if (isTarget) { this.targetFileButton = view.modelBuilder.button().withProperties({ label: '•••', - title: localize('schemaCompare.selectTargetFile', "Select target file"), - ariaLabel: localize('schemaCompare.selectTargetFile', "Select target file") + title: loc.selectTargetFile, + ariaLabel: loc.selectTargetFile }).component(); } else { this.sourceFileButton = view.modelBuilder.button().withProperties({ label: '•••', - title: localize('schemaCompare.selectSourceFile', "Select source file"), - ariaLabel: localize('schemaCompare.selectSourceFile', "Select source file") + title: loc.selectSourceFile, + ariaLabel: loc.selectSourceFile }).component(); } @@ -329,7 +311,7 @@ export class SchemaCompareDialog { canSelectFolders: false, canSelectMany: false, defaultUri: vscode.Uri.file(defaultUri), - openLabel: localize('schemaCompare.openFile', "Open"), + openLabel: loc.open, filters: { 'dacpac Files': ['dacpac'], } @@ -346,7 +328,7 @@ export class SchemaCompareDialog { return { component: currentTextbox, - title: FileTextBoxLabel, + title: loc.FileTextBoxLabel, actions: [currentButton] }; } @@ -355,13 +337,13 @@ export class SchemaCompareDialog { this.sourceDacpacRadioButton = view.modelBuilder.radioButton() .withProperties({ name: 'source', - label: DacpacRadioButtonLabel + label: loc.DacpacRadioButtonLabel }).component(); this.sourceDatabaseRadioButton = view.modelBuilder.radioButton() .withProperties({ name: 'source', - label: DatabaseRadioButtonLabel + label: loc.DatabaseRadioButtonLabel }).component(); // show dacpac file browser @@ -402,7 +384,7 @@ export class SchemaCompareDialog { return { component: flexRadioButtonsModel, - title: RadioButtonsLabel + title: loc.RadioButtonsLabel }; } @@ -410,13 +392,13 @@ export class SchemaCompareDialog { let dacpacRadioButton = view.modelBuilder.radioButton() .withProperties({ name: 'target', - label: DacpacRadioButtonLabel + label: loc.DacpacRadioButtonLabel }).component(); let databaseRadioButton = view.modelBuilder.radioButton() .withProperties({ name: 'target', - label: DatabaseRadioButtonLabel + label: loc.DatabaseRadioButtonLabel }).component(); // show dacpac file browser @@ -458,7 +440,7 @@ export class SchemaCompareDialog { return { component: flexRadioButtonsModel, - title: RadioButtonsLabel + title: loc.RadioButtonsLabel }; } @@ -481,7 +463,7 @@ export class SchemaCompareDialog { { editable: true, fireOnTextChange: true, - ariaLabel: localize('schemaCompareDialog.sourceServerDropdown', "Source Server") + ariaLabel: loc.sourceServer } ).component(); this.sourceServerDropdown.onValueChanged(async (value) => { @@ -498,7 +480,7 @@ export class SchemaCompareDialog { return { component: this.sourceServerDropdown, - title: ServerDropdownLabel + title: loc.ServerDropdownLabel }; } @@ -507,7 +489,7 @@ export class SchemaCompareDialog { { editable: true, fireOnTextChange: true, - ariaLabel: localize('schemaCompareDialog.targetServerDropdown', "Target Server") + ariaLabel: loc.targetServer } ).component(); this.targetServerDropdown.onValueChanged(async (value) => { @@ -524,7 +506,7 @@ export class SchemaCompareDialog { return { component: this.targetServerDropdown, - title: ServerDropdownLabel + title: loc.ServerDropdownLabel }; } @@ -560,7 +542,7 @@ export class SchemaCompareDialog { let srv = c.options.server; if (!usr) { - usr = localize('schemaCompareDialog.defaultUser', "default"); + usr = loc.defaultText; } let finalName = `${srv} (${usr})`; @@ -605,7 +587,7 @@ export class SchemaCompareDialog { { editable: true, fireOnTextChange: true, - ariaLabel: localize('schemaCompareDialog.sourceDatabaseDropdown', "Source Database") + ariaLabel: loc.sourceDatabase } ).component(); this.sourceDatabaseDropdown.onValueChanged(async (value) => { @@ -615,7 +597,7 @@ export class SchemaCompareDialog { return { component: this.sourceDatabaseDropdown, - title: DatabaseDropdownLabel + title: loc.DatabaseDropdownLabel }; } @@ -624,7 +606,7 @@ export class SchemaCompareDialog { { editable: true, fireOnTextChange: true, - ariaLabel: localize('schemaCompareDialog.targetDatabaseDropdown', "Target Database") + ariaLabel: loc.targetDatabase } ).component(); this.targetDatabaseDropdown.onValueChanged(async (value) => { @@ -634,7 +616,7 @@ export class SchemaCompareDialog { return { component: this.targetDatabaseDropdown, - title: DatabaseDropdownLabel + title: loc.DatabaseDropdownLabel }; } @@ -684,7 +666,7 @@ export class SchemaCompareDialog { } protected async createNoActiveConnectionsText(view: azdata.ModelView): Promise { - let noActiveConnectionsText = view.modelBuilder.text().withProperties({ value: NoActiveConnectionsLabel }).component(); + let noActiveConnectionsText = view.modelBuilder.text().withProperties({ value: loc.NoActiveConnectionsLabel }).component(); return { component: noActiveConnectionsText, diff --git a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts index 3f4ff84636..ea3deae28b 100644 --- a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts +++ b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts @@ -3,253 +3,14 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as nls from 'vscode-nls'; import * as azdata from 'azdata'; import * as vscode from 'vscode'; import * as mssql from '../../../mssql'; +import * as loc from '../localizedConstants'; import { SchemaCompareMainWindow } from '../schemaCompareMainWindow'; import { isNullOrUndefined } from 'util'; -const localize = nls.loadMessageBundle(); - export class SchemaCompareOptionsDialog { - - //#region Localized strings - - private static readonly OkButtonText: string = localize('SchemaCompareOptionsDialog.Ok', "OK"); - private static readonly CancelButtonText: string = localize('SchemaCompareOptionsDialog.Cancel', "Cancel"); - private static readonly ResetButtonText: string = localize('SchemaCompareOptionsDialog.Reset', "Reset"); - private static readonly YesButtonText: string = localize('SchemaCompareOptionsDialog.Yes', "Yes"); - private static readonly NoButtonText: string = localize('SchemaCompareOptionsDialog.No', "No"); - private static readonly OptionsChangedMessage: string = localize('schemaCompareOptions.RecompareMessage', "Options have changed. Recompare to see the comparison?"); - private static readonly OptionsLabel: string = localize('SchemaCompare.SchemaCompareOptionsDialogLabel', "Schema Compare Options"); - private static readonly GeneralOptionsLabel: string = localize('SchemaCompare.GeneralOptionsLabel', "General Options"); - private static readonly ObjectTypesOptionsLabel: string = localize('SchemaCompare.ObjectTypesOptionsLabel', "Include Object Types"); - - private static readonly IgnoreTableOptions: string = localize('SchemaCompare.IgnoreTableOptions', "Ignore Table Options"); - private static readonly IgnoreSemicolonBetweenStatements: string = localize('SchemaCompare.IgnoreSemicolonBetweenStatements', "Ignore Semicolon Between Statements"); - private static readonly IgnoreRouteLifetime: string = localize('SchemaCompare.IgnoreRouteLifetime', "Ignore Route Lifetime"); - private static readonly IgnoreRoleMembership: string = localize('SchemaCompare.IgnoreRoleMembership', "Ignore Role Membership"); - private static readonly IgnoreQuotedIdentifiers: string = localize('SchemaCompare.IgnoreQuotedIdentifiers', "Ignore Quoted Identifiers"); - private static readonly IgnorePermissions: string = localize('SchemaCompare.IgnorePermissions', "Ignore Permissions"); - private static readonly IgnorePartitionSchemes: string = localize('SchemaCompare.IgnorePartitionSchemes', "Ignore Partition Schemes"); - private static readonly IgnoreObjectPlacementOnPartitionScheme: string = localize('SchemaCompare.IgnoreObjectPlacementOnPartitionScheme', "Ignore Object Placement On Partition Scheme"); - private static readonly IgnoreNotForReplication: string = localize('SchemaCompare.IgnoreNotForReplication', "Ignore Not For Replication"); - private static readonly IgnoreLoginSids: string = localize('SchemaCompare.IgnoreLoginSids', "Ignore Login Sids"); - private static readonly IgnoreLockHintsOnIndexes: string = localize('SchemaCompare.IgnoreLockHintsOnIndexes', "Ignore Lock Hints On Indexes"); - private static readonly IgnoreKeywordCasing: string = localize('SchemaCompare.IgnoreKeywordCasing', "Ignore Keyword Casing"); - private static readonly IgnoreIndexPadding: string = localize('SchemaCompare.IgnoreIndexPadding', "Ignore Index Padding"); - private static readonly IgnoreIndexOptions: string = localize('SchemaCompare.IgnoreIndexOptions', "Ignore Index Options"); - private static readonly IgnoreIncrement: string = localize('SchemaCompare.IgnoreIncrement', "Ignore Increment"); - private static readonly IgnoreIdentitySeed: string = localize('SchemaCompare.IgnoreIdentitySeed', "Ignore Identity Seed"); - private static readonly IgnoreUserSettingsObjects: string = localize('SchemaCompare.IgnoreUserSettingsObjects', "Ignore User Settings Objects"); - private static readonly IgnoreFullTextCatalogFilePath: string = localize('SchemaCompare.IgnoreFullTextCatalogFilePath', "Ignore Full Text Catalog FilePath"); - private static readonly IgnoreWhitespace: string = localize('SchemaCompare.IgnoreWhitespace', "Ignore Whitespace"); - private static readonly IgnoreWithNocheckOnForeignKeys: string = localize('SchemaCompare.IgnoreWithNocheckOnForeignKeys', "Ignore With Nocheck On ForeignKeys"); - private static readonly VerifyCollationCompatibility: string = localize('SchemaCompare.VerifyCollationCompatibility', "Verify Collation Compatibility"); - private static readonly UnmodifiableObjectWarnings: string = localize('SchemaCompare.UnmodifiableObjectWarnings', "Unmodifiable Object Warnings"); - private static readonly TreatVerificationErrorsAsWarnings: string = localize('SchemaCompare.TreatVerificationErrorsAsWarnings', "Treat Verification Errors As Warnings"); - private static readonly ScriptRefreshModule: string = localize('SchemaCompare.ScriptRefreshModule', "Script Refresh Module"); - private static readonly ScriptNewConstraintValidation: string = localize('SchemaCompare.ScriptNewConstraintValidation', "Script New Constraint Validation"); - private static readonly ScriptFileSize: string = localize('SchemaCompare.ScriptFileSize', "Script File Size"); - private static readonly ScriptDeployStateChecks: string = localize('SchemaCompare.ScriptDeployStateChecks', "Script Deploy StateChecks"); - private static readonly ScriptDatabaseOptions: string = localize('SchemaCompare.ScriptDatabaseOptions', "Script Database Options"); - private static readonly ScriptDatabaseCompatibility: string = localize('SchemaCompare.ScriptDatabaseCompatibility', "Script Database Compatibility"); - private static readonly ScriptDatabaseCollation: string = localize('SchemaCompare.ScriptDatabaseCollation', "Script Database Collation"); - private static readonly RunDeploymentPlanExecutors: string = localize('SchemaCompare.RunDeploymentPlanExecutors', "Run Deployment Plan Executors"); - private static readonly RegisterDataTierApplication: string = localize('SchemaCompare.RegisterDataTierApplication', "Register DataTier Application"); - private static readonly PopulateFilesOnFileGroups: string = localize('SchemaCompare.PopulateFilesOnFileGroups', "Populate Files On File Groups"); - private static readonly NoAlterStatementsToChangeClrTypes: string = localize('SchemaCompare.NoAlterStatementsToChangeClrTypes', "No Alter Statements To Change Clr Types"); - private static readonly IncludeTransactionalScripts: string = localize('SchemaCompare.IncludeTransactionalScripts', "Include Transactional Scripts"); - private static readonly IncludeCompositeObjects: string = localize('SchemaCompare.IncludeCompositeObjects', "Include Composite Objects"); - private static readonly AllowUnsafeRowLevelSecurityDataMovement: string = localize('SchemaCompare.AllowUnsafeRowLevelSecurityDataMovement', "Allow Unsafe Row Level Security Data Movement"); - private static readonly IgnoreWithNocheckOnCheckConstraints: string = localize('SchemaCompare.IgnoreWithNocheckOnCheckConstraints', "Ignore With No check On Check Constraints"); - private static readonly IgnoreFillFactor: string = localize('SchemaCompare.IgnoreFillFactor', "Ignore Fill Factor"); - private static readonly IgnoreFileSize: string = localize('SchemaCompare.IgnoreFileSize', "Ignore File Size"); - private static readonly IgnoreFilegroupPlacement: string = localize('SchemaCompare.IgnoreFilegroupPlacement', "Ignore Filegroup Placement"); - private static readonly DoNotAlterReplicatedObjects: string = localize('SchemaCompare.DoNotAlterReplicatedObjects', "Do Not Alter Replicated Objects"); - private static readonly DoNotAlterChangeDataCaptureObjects: string = localize('SchemaCompare.DoNotAlterChangeDataCaptureObjects', "Do Not Alter Change Data Capture Objects"); - private static readonly DisableAndReenableDdlTriggers: string = localize('SchemaCompare.DisableAndReenableDdlTriggers', "Disable And Reenable Ddl Triggers"); - private static readonly DeployDatabaseInSingleUserMode: string = localize('SchemaCompare.DeployDatabaseInSingleUserMode', "Deploy Database In Single User Mode"); - private static readonly CreateNewDatabase: string = localize('SchemaCompare.CreateNewDatabase', "Create New Database"); - private static readonly CompareUsingTargetCollation: string = localize('SchemaCompare.CompareUsingTargetCollation', "Compare Using Target Collation"); - private static readonly CommentOutSetVarDeclarations: string = localize('SchemaCompare.CommentOutSetVarDeclarations', "Comment Out Set Var Declarations"); - private static readonly BlockWhenDriftDetected: string = localize('SchemaCompare.BlockWhenDriftDetected', "Block When Drift Detected"); - private static readonly BlockOnPossibleDataLoss: string = localize('SchemaCompare.BlockOnPossibleDataLoss', "Block On Possible Data Loss"); - private static readonly BackupDatabaseBeforeChanges: string = localize('SchemaCompare.BackupDatabaseBeforeChanges', "Backup Database Before Changes"); - private static readonly AllowIncompatiblePlatform: string = localize('SchemaCompare.AllowIncompatiblePlatform', "Allow Incompatible Platform"); - private static readonly AllowDropBlockingAssemblies: string = localize('SchemaCompare.AllowDropBlockingAssemblies', "Allow Drop Blocking Assemblies"); - private static readonly DropConstraintsNotInSource: string = localize('SchemaCompare.DropConstraintsNotInSource', "Drop Constraints Not In Source"); - private static readonly DropDmlTriggersNotInSource: string = localize('SchemaCompare.DropDmlTriggersNotInSource', "Drop Dml Triggers Not In Source"); - private static readonly DropExtendedPropertiesNotInSource: string = localize('SchemaCompare.DropExtendedPropertiesNotInSource', "Drop Extended Properties Not In Source"); - private static readonly DropIndexesNotInSource: string = localize('SchemaCompare.DropIndexesNotInSource', "Drop Indexes Not In Source"); - private static readonly IgnoreFileAndLogFilePath: string = localize('SchemaCompare.IgnoreFileAndLogFilePath', "Ignore File And Log File Path"); - private static readonly IgnoreExtendedProperties: string = localize('SchemaCompare.IgnoreExtendedProperties', "Ignore Extended Properties"); - private static readonly IgnoreDmlTriggerState: string = localize('SchemaCompare.IgnoreDmlTriggerState', "Ignore Dml Trigger State"); - private static readonly IgnoreDmlTriggerOrder: string = localize('SchemaCompare.IgnoreDmlTriggerOrder', "Ignore Dml Trigger Order"); - private static readonly IgnoreDefaultSchema: string = localize('SchemaCompare.IgnoreDefaultSchema', "Ignore Default Schema"); - private static readonly IgnoreDdlTriggerState: string = localize('SchemaCompare.IgnoreDdlTriggerState', "Ignore Ddl Trigger State"); - private static readonly IgnoreDdlTriggerOrder: string = localize('SchemaCompare.IgnoreDdlTriggerOrder', "Ignore Ddl Trigger Order"); - private static readonly IgnoreCryptographicProviderFilePath: string = localize('SchemaCompare.IgnoreCryptographicProviderFilePath', "Ignore Cryptographic Provider FilePath"); - private static readonly VerifyDeployment: string = localize('SchemaCompare.VerifyDeployment', "Verify Deployment"); - private static readonly IgnoreComments: string = localize('SchemaCompare.IgnoreComments', "Ignore Comments"); - private static readonly IgnoreColumnCollation: string = localize('SchemaCompare.IgnoreColumnCollation', "Ignore Column Collation"); - private static readonly IgnoreAuthorizer: string = localize('SchemaCompare.IgnoreAuthorizer', "Ignore Authorizer"); - private static readonly IgnoreAnsiNulls: string = localize('SchemaCompare.IgnoreAnsiNulls', "Ignore AnsiNulls"); - private static readonly GenerateSmartDefaults: string = localize('SchemaCompare.GenerateSmartDefaults', "Generate SmartDefaults"); - private static readonly DropStatisticsNotInSource: string = localize('SchemaCompare.DropStatisticsNotInSource', "Drop Statistics Not In Source"); - private static readonly DropRoleMembersNotInSource: string = localize('SchemaCompare.DropRoleMembersNotInSource', "Drop Role Members Not In Source"); - private static readonly DropPermissionsNotInSource: string = localize('SchemaCompare.DropPermissionsNotInSource', "Drop Permissions Not In Source"); - private static readonly DropObjectsNotInSource: string = localize('SchemaCompare.DropObjectsNotInSource', "Drop Objects Not In Source"); - private static readonly IgnoreColumnOrder: string = localize('SchemaCompare.IgnoreColumnOrder', "Ignore Column Order"); - - private static readonly Aggregates: string = localize('SchemaCompare.Aggregates', "Aggregates"); - private static readonly ApplicationRoles: string = localize('SchemaCompare.ApplicationRoles', "Application Roles"); - private static readonly Assemblies: string = localize('SchemaCompare.Assemblies', "Assemblies"); - private static readonly AssemblyFiles: string = localize('SchemaCompare.AssemblyFiles', "Assembly Files"); - private static readonly AsymmetricKeys: string = localize('SchemaCompare.AsymmetricKeys', "Asymmetric Keys"); - private static readonly BrokerPriorities: string = localize('SchemaCompare.BrokerPriorities', "Broker Priorities"); - private static readonly Certificates: string = localize('SchemaCompare.Certificates', "Certificates"); - private static readonly ColumnEncryptionKeys: string = localize('SchemaCompare.ColumnEncryptionKeys', "Column Encryption Keys"); - private static readonly ColumnMasterKeys: string = localize('SchemaCompare.ColumnMasterKeys', "Column Master Keys"); - private static readonly Contracts: string = localize('SchemaCompare.Contracts', "Contracts"); - private static readonly DatabaseOptions: string = localize('SchemaCompare.DatabaseOptions', "Database Options"); - private static readonly DatabaseRoles: string = localize('SchemaCompare.DatabaseRoles', "Database Roles"); - private static readonly DatabaseTriggers: string = localize('SchemaCompare.DatabaseTriggers', "DatabaseTriggers"); - private static readonly Defaults: string = localize('SchemaCompare.Defaults', "Defaults"); - private static readonly ExtendedProperties: string = localize('SchemaCompare.ExtendedProperties', "Extended Properties"); - private static readonly ExternalDataSources: string = localize('SchemaCompare.ExternalDataSources', "External Data Sources"); - private static readonly ExternalFileFormats: string = localize('SchemaCompare.ExternalFileFormats', "External File Formats"); - private static readonly ExternalTables: string = localize('SchemaCompare.ExternalTables', "External Tables"); - private static readonly Filegroups: string = localize('SchemaCompare.Filegroups', "Filegroups"); - private static readonly Files: string = localize('SchemaCompare.Files', "Files"); - private static readonly FileTables: string = localize('SchemaCompare.FileTables', "File Tables"); - private static readonly FullTextCatalogs: string = localize('SchemaCompare.FullTextCatalogs', "Full Text Catalogs"); - private static readonly FullTextStoplists: string = localize('SchemaCompare.FullTextStoplists', "Full Text Stoplists"); - private static readonly MessageTypes: string = localize('SchemaCompare.MessageTypes', "Message Types"); - private static readonly PartitionFunctions: string = localize('SchemaCompare.PartitionFunctions', "Partition Functions"); - private static readonly PartitionSchemes: string = localize('SchemaCompare.PartitionSchemes', "Partition Schemes"); - private static readonly Permissions: string = localize('SchemaCompare.Permissions', "Permissions"); - private static readonly Queues: string = localize('SchemaCompare.Queues', "Queues"); - private static readonly RemoteServiceBindings: string = localize('SchemaCompare.RemoteServiceBindings', "Remote Service Bindings"); - private static readonly RoleMembership: string = localize('SchemaCompare.RoleMembership', "Role Membership"); - private static readonly Rules: string = localize('SchemaCompare.Rules', "Rules"); - private static readonly ScalarValuedFunctions: string = localize('SchemaCompare.ScalarValuedFunctions', "Scalar Valued Functions"); - private static readonly SearchPropertyLists: string = localize('SchemaCompare.SearchPropertyLists', "Search Property Lists"); - private static readonly SecurityPolicies: string = localize('SchemaCompare.SecurityPolicies', "Security Policies"); - private static readonly Sequences: string = localize('SchemaCompare.Sequences', "Sequences"); - private static readonly Services: string = localize('SchemaCompare.Services', "Services"); - private static readonly Signatures: string = localize('SchemaCompare.Signatures', "Signatures"); - private static readonly StoredProcedures: string = localize('SchemaCompare.StoredProcedures', "StoredProcedures"); - private static readonly SymmetricKeys: string = localize('SchemaCompare.SymmetricKeys', "SymmetricKeys"); - private static readonly Synonyms: string = localize('SchemaCompare.Synonyms', "Synonyms"); - private static readonly Tables: string = localize('SchemaCompare.Tables', "Tables"); - private static readonly TableValuedFunctions: string = localize('SchemaCompare.TableValuedFunctions', "Table Valued Functions"); - private static readonly UserDefinedDataTypes: string = localize('SchemaCompare.UserDefinedDataTypes', "User Defined Data Types"); - private static readonly UserDefinedTableTypes: string = localize('SchemaCompare.UserDefinedTableTypes', "User Defined Table Types"); - private static readonly ClrUserDefinedTypes: string = localize('SchemaCompare.ClrUserDefinedTypes', "Clr User Defined Types"); - private static readonly Users: string = localize('SchemaCompare.Users', "Users"); - private static readonly Views: string = localize('SchemaCompare.Views', "Views"); - private static readonly XmlSchemaCollections: string = localize('SchemaCompare.XmlSchemaCollections', "Xml Schema Collections"); - private static readonly Audits: string = localize('SchemaCompare.Audits', "Audits"); - private static readonly Credentials: string = localize('SchemaCompare.Credentials', "Credentials"); - private static readonly CryptographicProviders: string = localize('SchemaCompare.CryptographicProviders', "Cryptographic Providers"); - private static readonly DatabaseAuditSpecifications: string = localize('SchemaCompare.DatabaseAuditSpecifications', "Database Audit Specifications"); - private static readonly DatabaseEncryptionKeys: string = localize('SchemaCompare.DatabaseEncryptionKeys', "Database Encryption Keys"); - private static readonly DatabaseScopedCredentials: string = localize('SchemaCompare.DatabaseScopedCredentials', "Database Scoped Credentials"); - private static readonly Endpoints: string = localize('SchemaCompare.Endpoints', "Endpoints"); - private static readonly ErrorMessages: string = localize('SchemaCompare.ErrorMessages', "Error Messages"); - private static readonly EventNotifications: string = localize('SchemaCompare.EventNotifications', "Event Notifications"); - private static readonly EventSessions: string = localize('SchemaCompare.EventSessions', "Event Sessions"); - private static readonly LinkedServerLogins: string = localize('SchemaCompare.LinkedServerLogins', "Linked Server Logins"); - private static readonly LinkedServers: string = localize('SchemaCompare.LinkedServers', "Linked Servers"); - private static readonly Logins: string = localize('SchemaCompare.Logins', "Logins"); - private static readonly MasterKeys: string = localize('SchemaCompare.MasterKeys', "Master Keys"); - private static readonly Routes: string = localize('SchemaCompare.Routes', "Routes"); - private static readonly ServerAuditSpecifications: string = localize('SchemaCompare.ServerAuditSpecifications', "Server Audit Specifications"); - private static readonly ServerRoleMembership: string = localize('SchemaCompare.ServerRoleMembership', "Server Role Membership"); - private static readonly ServerRoles: string = localize('SchemaCompare.ServerRoles', "Server Roles"); - private static readonly ServerTriggers: string = localize('SchemaCompare.ServerTriggers', "Server Triggers"); - - private static readonly descriptionIgnoreTableOptions: string = localize('SchemaCompare.Description.IgnoreTableOptions', "Specifies whether differences in the table options will be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreSemicolonBetweenStatements: string = localize('SchemaCompare.Description.IgnoreSemicolonBetweenStatements', "Specifies whether differences in the semi-colons between T-SQL statements will be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreRouteLifetime: string = localize('SchemaCompare.Description.IgnoreRouteLifetime', "Specifies whether differences in the amount of time that SQL Server retains the route in the routing table should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreRoleMembership: string = localize('SchemaCompare.Description.IgnoreRoleMembership', "Specifies whether differences in the role membership of logins should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreQuotedIdentifiers: string = localize('SchemaCompare.Description.IgnoreQuotedIdentifiers', "Specifies whether differences in the quoted identifiers setting should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnorePermissions: string = localize('SchemaCompare.Description.IgnorePermissions', "Specifies whether permissions should be ignored."); - private static readonly descriptionIgnorePartitionSchemes: string = localize('SchemaCompare.Description.IgnorePartitionSchemes', "Specifies whether differences in partition schemes and functions should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreObjectPlacementOnPartitionScheme: string = localize('SchemaCompare.Description.IgnoreObjectPlacementOnPartitionScheme', "Specifies whether an object\'s placement on a partition scheme should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreNotForReplication: string = localize('SchemaCompare.Description.IgnoreNotForReplication', "Specifies whether the not for replication settings should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreLoginSids: string = localize('SchemaCompare.Description.IgnoreLoginSids', "Specifies whether differences in the security identification number (SID) should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreLockHintsOnIndexes: string = localize('SchemaCompare.Description.IgnoreLockHintsOnIndexes', "Specifies whether differences in the lock hints on indexes should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreKeywordCasing: string = localize('SchemaCompare.Description.IgnoreKeywordCasing', "Specifies whether differences in the casing of keywords should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreIndexPadding: string = localize('SchemaCompare.Description.IgnoreIndexPadding', "Specifies whether differences in the index padding should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreIndexOptions: string = localize('SchemaCompare.Description.IgnoreIndexOptions', "Specifies whether differences in the index options should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreIncrement: string = localize('SchemaCompare.Description.IgnoreIncrement', "Specifies whether differences in the increment for an identity column should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreIdentitySeed: string = localize('SchemaCompare.Description.IgnoreIdentitySeed', "Specifies whether differences in the seed for an identity column should be ignored or updated when you publish updates to a database."); - private static readonly descriptionIgnoreUserSettingsObjects: string = localize('SchemaCompare.Description.IgnoreUserSettingsObjects', "Specifies whether differences in the user settings objects will be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreFullTextCatalogFilePath: string = localize('SchemaCompare.Description.IgnoreFullTextCatalogFilePath', "Specifies whether differences in the file path for the full-text catalog should be ignored or whether a warning should be issued when you publish to a database."); - private static readonly descriptionIgnoreWhitespace: string = localize('SchemaCompare.Description.IgnoreWhitespace', "Specifies whether differences in white space will be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreWithNocheckOnForeignKeys: string = localize('SchemaCompare.Description.IgnoreWithNocheckOnForeignKeys', "Specifies whether differences in the value of the WITH NOCHECK clause for foreign keys will be ignored or updated when you publish to a database."); - private static readonly descriptionVerifyCollationCompatibility: string = localize('SchemaCompare.Description.VerifyCollationCompatibility', "Specifies whether collation compatibility is verified."); - private static readonly descriptionUnmodifiableObjectWarnings: string = localize('SchemaCompare.Description.UnmodifiableObjectWarnings', "Specifies whether warnings should be generated when differences are found in objects that cannot be modified, for example, if the file size or file paths were different for a file."); - private static readonly descriptionTreatVerificationErrorsAsWarnings: string = localize('SchemaCompare.Description.TreatVerificationErrorsAsWarnings', "Specifies whether errors encountered during publish verification should be treated as warnings. The check is performed against the generated deployment plan before the plan is executed against your target database. Plan verification detects problems such as the loss of target-only objects (such as indexes) that must be dropped to make a change. Verification will also detect situations where dependencies (such as a table or view) exist because of a reference to a composite project, but do not exist in the target database. You might choose to do this to get a complete list of all issues, instead of having the publish action stop on the first error."); - private static readonly descriptionScriptRefreshModule: string = localize('SchemaCompare.Description.ScriptRefreshModule', "Include refresh statements at the end of the publish script."); - private static readonly descriptionScriptNewConstraintValidation: string = localize('SchemaCompare.Description.ScriptNewConstraintValidation', "At the end of publish all of the constraints will be verified as one set, avoiding data errors caused by a check or foreign key constraint in the middle of publish. If set to False, your constraints will be published without checking the corresponding data."); - private static readonly descriptionScriptFileSize: string = localize('SchemaCompare.Description.ScriptFileSize', "Controls whether size is specified when adding a file to a filegroup."); - private static readonly descriptionScriptDeployStateChecks: string = localize('SchemaCompare.Description.ScriptDeployStateChecks', "Specifies whether statements are generated in the publish script to verify that the database name and server name match the names specified in the database project."); - private static readonly descriptionScriptDatabaseOptions: string = localize('SchemaCompare.Description.ScriptDatabaseOptions', "Specifies whether target database properties should be set or updated as part of the publish action."); - private static readonly descriptionScriptDatabaseCompatibility: string = localize('SchemaCompare.Description.ScriptDatabaseCompatibility', "Specifies whether differences in the database compatibility should be ignored or updated when you publish to a database."); - private static readonly descriptionScriptDatabaseCollation: string = localize('SchemaCompare.Description.ScriptDatabaseCollation', "Specifies whether differences in the database collation should be ignored or updated when you publish to a database."); - private static readonly descriptionRunDeploymentPlanExecutors: string = localize('SchemaCompare.Description.RunDeploymentPlanExecutors', "Specifies whether DeploymentPlanExecutor contributors should be run when other operations are executed."); - private static readonly descriptionRegisterDataTierApplication: string = localize('SchemaCompare.Description.RegisterDataTierApplication', "Specifies whether the schema is registered with the database server."); - private static readonly descriptionPopulateFilesOnFileGroups: string = localize('SchemaCompare.Description.PopulateFilesOnFileGroups', "Specifies whether a new file is also created when a new FileGroup is created in the target database."); - private static readonly descriptionNoAlterStatementsToChangeClrTypes: string = localize('SchemaCompare.Description.NoAlterStatementsToChangeClrTypes', "Specifies that publish should always drop and re-create an assembly if there is a difference instead of issuing an ALTER ASSEMBLY statement"); - private static readonly descriptionIncludeTransactionalScripts: string = localize('SchemaCompare.Description.IncludeTransactionalScripts', "Specifies whether transactional statements should be used where possible when you publish to a database."); - private static readonly descriptionIncludeCompositeObjects: string = localize('SchemaCompare.Description.IncludeCompositeObjects', "Include all composite elements as part of a single publish operation."); - private static readonly descriptionAllowUnsafeRowLevelSecurityDataMovement: string = localize('SchemaCompare.Description.AllowUnsafeRowLevelSecurityDataMovement', "Do not block data motion on a table which has Row Level Security if this property is set to true. Default is false."); - private static readonly descriptionIgnoreWithNocheckOnCheckConstraints: string = localize('SchemaCompare.Description.IgnoreWithNocheckOnCheckConstraints', "Specifies whether differences in the value of the WITH NOCHECK clause for check constraints will be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreFillFactor: string = localize('SchemaCompare.Description.IgnoreFillFactor', "Specifies whether differences in the fill factor for index storage should be ignored or whether a warning should be issued when you publish to a database."); - private static readonly descriptionIgnoreFileSize: string = localize('SchemaCompare.Description.IgnoreFileSize', "Specifies whether differences in the file sizes should be ignored or whether a warning should be issued when you publish to a database."); - private static readonly descriptionIgnoreFilegroupPlacement: string = localize('SchemaCompare.Description.IgnoreFilegroupPlacement', "Specifies whether differences in the placement of objects in FILEGROUPs should be ignored or updated when you publish to a database."); - private static readonly descriptionDoNotAlterReplicatedObjects: string = localize('SchemaCompare.Description.DoNotAlterReplicatedObjects', "Specifies whether objects that are replicated are identified during verification."); - private static readonly descriptionDoNotAlterChangeDataCaptureObjects: string = localize('SchemaCompare.Description.DoNotAlterChangeDataCaptureObjects', "If true, Change Data Capture objects are not altered."); - private static readonly descriptionDisableAndReenableDdlTriggers: string = localize('SchemaCompare.Description.DisableAndReenableDdlTriggers', "Specifies whether Data Definition Language (DDL) triggers are disabled at the beginning of the publish process and re-enabled at the end of the publish action."); - private static readonly descriptionDeployDatabaseInSingleUserMode: string = localize('SchemaCompare.Description.DeployDatabaseInSingleUserMode', "If true, the database is set to Single User Mode before deploying."); - private static readonly descriptionCreateNewDatabase: string = localize('SchemaCompare.Description.CreateNewDatabase', "Specifies whether the target database should be updated or whether it should be dropped and re-created when you publish to a database."); - private static readonly descriptionCompareUsingTargetCollation: string = localize('SchemaCompare.Description.CompareUsingTargetCollation', "This setting dictates how the database\'s collation is handled during deployment; by default the target database\'s collation will be updated if it does not match the collation specified by the source. When this option is set, the target database\'s (or server\'s) collation should be used."); - private static readonly descriptionCommentOutSetVarDeclarations: string = localize('SchemaCompare.Description.CommentOutSetVarDeclarations', "Specifies whether the declaration of SETVAR variables should be commented out in the generated publish script. You might choose to do this if you plan to specify the values on the command line when you publish by using a tool such as SQLCMD.EXE."); - private static readonly descriptionBlockWhenDriftDetected: string = localize('SchemaCompare.Description.BlockWhenDriftDetected', "Specifies whether to block updating a database whose schema no longer matches its registration or is unregistered."); - private static readonly descriptionBlockOnPossibleDataLoss: string = localize('SchemaCompare.Description.BlockOnPossibleDataLoss', "Specifies that the publish episode should be terminated if there is a possibility of data loss resulting from the publish operation."); - private static readonly descriptionBackupDatabaseBeforeChanges: string = localize('SchemaCompare.Description.BackupDatabaseBeforeChanges', "Backups the database before deploying any changes."); - private static readonly descriptionAllowIncompatiblePlatform: string = localize('SchemaCompare.Description.AllowIncompatiblePlatform', "Specifies whether to attempt the action despite incompatible SQL Server platforms."); - private static readonly descriptionAllowDropBlockingAssemblies: string = localize('SchemaCompare.Description.AllowDropBlockingAssemblies', "This property is used by SqlClr deployment to cause any blocking assemblies to be dropped as part of the deployment plan. By default, any blocking/referencing assemblies will block an assembly update if the referencing assembly needs to be dropped."); - private static readonly descriptionDropConstraintsNotInSource: string = localize('SchemaCompare.Description.DropConstraintsNotInSource', "Specifies whether constraints that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); - private static readonly descriptionDropDmlTriggersNotInSource: string = localize('SchemaCompare.Description.DropDmlTriggersNotInSource', "Specifies whether DML triggers that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); - private static readonly descriptionDropExtendedPropertiesNotInSource: string = localize('SchemaCompare.Description.DropExtendedPropertiesNotInSource', "Specifies whether extended properties that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); - private static readonly descriptionDropIndexesNotInSource: string = localize('SchemaCompare.Description.DropIndexesNotInSource', "Specifies whether indexes that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); - private static readonly descriptionIgnoreFileAndLogFilePath: string = localize('SchemaCompare.Description.IgnoreFileAndLogFilePath', "Specifies whether differences in the paths for files and log files should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreExtendedProperties: string = localize('SchemaCompare.Description.IgnoreExtendedProperties', "Specifies whether extended properties should be ignored."); - private static readonly descriptionIgnoreDmlTriggerState: string = localize('SchemaCompare.Description.IgnoreDmlTriggerState', "Specifies whether differences in the enabled or disabled state of DML triggers should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreDmlTriggerOrder: string = localize('SchemaCompare.Description.IgnoreDmlTriggerOrder', "Specifies whether differences in the order of Data Manipulation Language (DML) triggers should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreDefaultSchema: string = localize('SchemaCompare.Description.IgnoreDefaultSchema', "Specifies whether differences in the default schema should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreDdlTriggerState: string = localize('SchemaCompare.Description.IgnoreDdlTriggerState', "Specifies whether differences in the enabled or disabled state of Data Definition Language (DDL) triggers should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreDdlTriggerOrder: string = localize('SchemaCompare.Description.IgnoreDdlTriggerOrder', "Specifies whether differences in the order of Data Definition Language (DDL) triggers should be ignored or updated when you publish to a database or server."); - private static readonly descriptionIgnoreCryptographicProviderFilePath: string = localize('SchemaCompare.Description.IgnoreCryptographicProviderFilePath', "Specifies whether differences in the file path for the cryptographic provider should be ignored or updated when you publish to a database."); - private static readonly descriptionVerifyDeployment: string = localize('SchemaCompare.Description.VerifyDeployment', "Specifies whether checks should be performed before publishing that will stop the publish action if issues are present that might block successful publishing. For example, your publish action might stop if you have foreign keys on the target database that do not exist in the database project, and that will cause errors when you publish."); - private static readonly descriptionIgnoreComments: string = localize('SchemaCompare.Description.IgnoreComments', "Specifies whether differences in the comments should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreColumnCollation: string = localize('SchemaCompare.Description.IgnoreColumnCollation', "Specifies whether differences in the column collations should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreAuthorizer: string = localize('SchemaCompare.Description.IgnoreAuthorizer', "Specifies whether differences in the Authorizer should be ignored or updated when you publish to a database."); - private static readonly descriptionIgnoreAnsiNulls: string = localize('SchemaCompare.Description.IgnoreAnsiNulls', "Specifies whether differences in the ANSI NULLS setting should be ignored or updated when you publish to a database."); - private static readonly descriptionGenerateSmartDefaults: string = localize('SchemaCompare.Description.GenerateSmartDefaults', "Automatically provides a default value when updating a table that contains data with a column that does not allow null values."); - private static readonly descriptionDropStatisticsNotInSource: string = localize('SchemaCompare.Description.DropStatisticsNotInSource', "Specifies whether statistics that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); - private static readonly descriptionDropRoleMembersNotInSource: string = localize('SchemaCompare.Description.DropRoleMembersNotInSource', "Specifies whether role members that are not defined in the database snapshot (.dacpac) file will be dropped from the target database when you publish updates to a database. await this.execute()); - this.dialog.cancelButton.label = SchemaCompareOptionsDialog.CancelButtonText; + this.dialog.cancelButton.label = loc.CancelButtonText; this.dialog.cancelButton.onClick(async () => await this.cancel()); - let resetButton = azdata.window.createButton(SchemaCompareOptionsDialog.ResetButtonText); + let resetButton = azdata.window.createButton(loc.ResetButtonText); resetButton.onClick(async () => await this.reset()); this.dialog.customButtons = []; this.dialog.customButtons.push(resetButton); @@ -456,8 +217,8 @@ export class SchemaCompareOptionsDialog { this.schemaComparison.setDeploymentOptions(this.deploymentOptions); if (this.optionsChanged) { - vscode.window.showWarningMessage(SchemaCompareOptionsDialog.OptionsChangedMessage, SchemaCompareOptionsDialog.YesButtonText, SchemaCompareOptionsDialog.NoButtonText).then((result) => { - if (result === SchemaCompareOptionsDialog.YesButtonText) { + vscode.window.showWarningMessage(loc.OptionsChangedMessage, loc.YesButtonText, loc.NoButtonText).then((result) => { + if (result === loc.YesButtonText) { this.schemaComparison.startCompare(); } }); @@ -644,232 +405,232 @@ export class SchemaCompareOptionsDialog { private SetSchemaCompareOptionUtil(label: string, value: boolean) { switch (label) { - case SchemaCompareOptionsDialog.IgnoreTableOptions: + case loc.IgnoreTableOptions: this.deploymentOptions.ignoreTableOptions = value; break; - case SchemaCompareOptionsDialog.IgnoreSemicolonBetweenStatements: + case loc.IgnoreSemicolonBetweenStatements: this.deploymentOptions.ignoreSemicolonBetweenStatements = value; break; - case SchemaCompareOptionsDialog.IgnoreRouteLifetime: + case loc.IgnoreRouteLifetime: this.deploymentOptions.ignoreRouteLifetime = value; break; - case SchemaCompareOptionsDialog.IgnoreRoleMembership: + case loc.IgnoreRoleMembership: this.deploymentOptions.ignoreRoleMembership = value; break; - case SchemaCompareOptionsDialog.IgnoreQuotedIdentifiers: + case loc.IgnoreQuotedIdentifiers: this.deploymentOptions.ignoreQuotedIdentifiers = value; break; - case SchemaCompareOptionsDialog.IgnorePermissions: + case loc.IgnorePermissions: this.deploymentOptions.ignorePermissions = value; break; - case SchemaCompareOptionsDialog.IgnorePartitionSchemes: + case loc.IgnorePartitionSchemes: this.deploymentOptions.ignorePartitionSchemes = value; break; - case SchemaCompareOptionsDialog.IgnoreObjectPlacementOnPartitionScheme: + case loc.IgnoreObjectPlacementOnPartitionScheme: this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme = value; break; - case SchemaCompareOptionsDialog.IgnoreNotForReplication: + case loc.IgnoreNotForReplication: this.deploymentOptions.ignoreNotForReplication = value; break; - case SchemaCompareOptionsDialog.IgnoreLoginSids: + case loc.IgnoreLoginSids: this.deploymentOptions.ignoreLoginSids = value; break; - case SchemaCompareOptionsDialog.IgnoreLockHintsOnIndexes: + case loc.IgnoreLockHintsOnIndexes: this.deploymentOptions.ignoreLockHintsOnIndexes = value; break; - case SchemaCompareOptionsDialog.IgnoreKeywordCasing: + case loc.IgnoreKeywordCasing: this.deploymentOptions.ignoreKeywordCasing = value; break; - case SchemaCompareOptionsDialog.IgnoreIndexPadding: + case loc.IgnoreIndexPadding: this.deploymentOptions.ignoreIndexPadding = value; break; - case SchemaCompareOptionsDialog.IgnoreIndexOptions: + case loc.IgnoreIndexOptions: this.deploymentOptions.ignoreIndexOptions = value; break; - case SchemaCompareOptionsDialog.IgnoreIncrement: + case loc.IgnoreIncrement: this.deploymentOptions.ignoreIncrement = value; break; - case SchemaCompareOptionsDialog.IgnoreIdentitySeed: + case loc.IgnoreIdentitySeed: this.deploymentOptions.ignoreIdentitySeed = value; break; - case SchemaCompareOptionsDialog.IgnoreUserSettingsObjects: + case loc.IgnoreUserSettingsObjects: this.deploymentOptions.ignoreUserSettingsObjects = value; break; - case SchemaCompareOptionsDialog.IgnoreFullTextCatalogFilePath: + case loc.IgnoreFullTextCatalogFilePath: this.deploymentOptions.ignoreFullTextCatalogFilePath = value; break; - case SchemaCompareOptionsDialog.IgnoreWhitespace: + case loc.IgnoreWhitespace: this.deploymentOptions.ignoreWhitespace = value; break; - case SchemaCompareOptionsDialog.IgnoreWithNocheckOnForeignKeys: + case loc.IgnoreWithNocheckOnForeignKeys: this.deploymentOptions.ignoreWithNocheckOnForeignKeys = value; break; - case SchemaCompareOptionsDialog.VerifyCollationCompatibility: + case loc.VerifyCollationCompatibility: this.deploymentOptions.verifyCollationCompatibility = value; break; - case SchemaCompareOptionsDialog.UnmodifiableObjectWarnings: + case loc.UnmodifiableObjectWarnings: this.deploymentOptions.unmodifiableObjectWarnings = value; break; - case SchemaCompareOptionsDialog.TreatVerificationErrorsAsWarnings: + case loc.TreatVerificationErrorsAsWarnings: this.deploymentOptions.treatVerificationErrorsAsWarnings = value; break; - case SchemaCompareOptionsDialog.ScriptRefreshModule: + case loc.ScriptRefreshModule: this.deploymentOptions.scriptRefreshModule = value; break; - case SchemaCompareOptionsDialog.ScriptNewConstraintValidation: + case loc.ScriptNewConstraintValidation: this.deploymentOptions.scriptNewConstraintValidation = value; break; - case SchemaCompareOptionsDialog.ScriptFileSize: + case loc.ScriptFileSize: this.deploymentOptions.scriptFileSize = value; break; - case SchemaCompareOptionsDialog.ScriptDeployStateChecks: + case loc.ScriptDeployStateChecks: this.deploymentOptions.scriptDeployStateChecks = value; break; - case SchemaCompareOptionsDialog.ScriptDatabaseOptions: + case loc.ScriptDatabaseOptions: this.deploymentOptions.scriptDatabaseOptions = value; break; - case SchemaCompareOptionsDialog.ScriptDatabaseCompatibility: + case loc.ScriptDatabaseCompatibility: this.deploymentOptions.scriptDatabaseCompatibility = value; break; - case SchemaCompareOptionsDialog.ScriptDatabaseCollation: + case loc.ScriptDatabaseCollation: this.deploymentOptions.scriptDatabaseCollation = value; break; - case SchemaCompareOptionsDialog.RunDeploymentPlanExecutors: + case loc.RunDeploymentPlanExecutors: this.deploymentOptions.runDeploymentPlanExecutors = value; break; - case SchemaCompareOptionsDialog.RegisterDataTierApplication: + case loc.RegisterDataTierApplication: this.deploymentOptions.registerDataTierApplication = value; break; - case SchemaCompareOptionsDialog.PopulateFilesOnFileGroups: + case loc.PopulateFilesOnFileGroups: this.deploymentOptions.populateFilesOnFileGroups = value; break; - case SchemaCompareOptionsDialog.NoAlterStatementsToChangeClrTypes: + case loc.NoAlterStatementsToChangeClrTypes: this.deploymentOptions.noAlterStatementsToChangeClrTypes = value; break; - case SchemaCompareOptionsDialog.IncludeTransactionalScripts: + case loc.IncludeTransactionalScripts: this.deploymentOptions.includeTransactionalScripts = value; break; - case SchemaCompareOptionsDialog.IncludeCompositeObjects: + case loc.IncludeCompositeObjects: this.deploymentOptions.includeCompositeObjects = value; break; - case SchemaCompareOptionsDialog.AllowUnsafeRowLevelSecurityDataMovement: + case loc.AllowUnsafeRowLevelSecurityDataMovement: this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement = value; break; - case SchemaCompareOptionsDialog.IgnoreWithNocheckOnCheckConstraints: + case loc.IgnoreWithNocheckOnCheckConstraints: this.deploymentOptions.ignoreWithNocheckOnCheckConstraints = value; break; - case SchemaCompareOptionsDialog.IgnoreFillFactor: + case loc.IgnoreFillFactor: this.deploymentOptions.ignoreFillFactor = value; break; - case SchemaCompareOptionsDialog.IgnoreFileSize: + case loc.IgnoreFileSize: this.deploymentOptions.ignoreFileSize = value; break; - case SchemaCompareOptionsDialog.IgnoreFilegroupPlacement: + case loc.IgnoreFilegroupPlacement: this.deploymentOptions.ignoreFilegroupPlacement = value; break; - case SchemaCompareOptionsDialog.DoNotAlterReplicatedObjects: + case loc.DoNotAlterReplicatedObjects: this.deploymentOptions.doNotAlterReplicatedObjects = value; break; - case SchemaCompareOptionsDialog.DoNotAlterChangeDataCaptureObjects: + case loc.DoNotAlterChangeDataCaptureObjects: this.deploymentOptions.doNotAlterChangeDataCaptureObjects = value; break; - case SchemaCompareOptionsDialog.DisableAndReenableDdlTriggers: + case loc.DisableAndReenableDdlTriggers: this.deploymentOptions.disableAndReenableDdlTriggers = value; break; - case SchemaCompareOptionsDialog.DeployDatabaseInSingleUserMode: + case loc.DeployDatabaseInSingleUserMode: this.deploymentOptions.deployDatabaseInSingleUserMode = value; break; - case SchemaCompareOptionsDialog.CreateNewDatabase: + case loc.CreateNewDatabase: this.deploymentOptions.createNewDatabase = value; break; - case SchemaCompareOptionsDialog.CompareUsingTargetCollation: + case loc.CompareUsingTargetCollation: this.deploymentOptions.compareUsingTargetCollation = value; break; - case SchemaCompareOptionsDialog.CommentOutSetVarDeclarations: + case loc.CommentOutSetVarDeclarations: this.deploymentOptions.commentOutSetVarDeclarations = value; break; - case SchemaCompareOptionsDialog.BlockWhenDriftDetected: + case loc.BlockWhenDriftDetected: this.deploymentOptions.blockWhenDriftDetected = value; break; - case SchemaCompareOptionsDialog.BlockOnPossibleDataLoss: + case loc.BlockOnPossibleDataLoss: this.deploymentOptions.blockOnPossibleDataLoss = value; break; - case SchemaCompareOptionsDialog.BackupDatabaseBeforeChanges: + case loc.BackupDatabaseBeforeChanges: this.deploymentOptions.backupDatabaseBeforeChanges = value; break; - case SchemaCompareOptionsDialog.AllowIncompatiblePlatform: + case loc.AllowIncompatiblePlatform: this.deploymentOptions.allowIncompatiblePlatform = value; break; - case SchemaCompareOptionsDialog.AllowDropBlockingAssemblies: + case loc.AllowDropBlockingAssemblies: this.deploymentOptions.allowDropBlockingAssemblies = value; break; - case SchemaCompareOptionsDialog.DropConstraintsNotInSource: + case loc.DropConstraintsNotInSource: this.deploymentOptions.dropConstraintsNotInSource = value; break; - case SchemaCompareOptionsDialog.DropDmlTriggersNotInSource: + case loc.DropDmlTriggersNotInSource: this.deploymentOptions.dropDmlTriggersNotInSource = value; break; - case SchemaCompareOptionsDialog.DropExtendedPropertiesNotInSource: + case loc.DropExtendedPropertiesNotInSource: this.deploymentOptions.dropExtendedPropertiesNotInSource = value; break; - case SchemaCompareOptionsDialog.DropIndexesNotInSource: + case loc.DropIndexesNotInSource: this.deploymentOptions.dropIndexesNotInSource = value; break; - case SchemaCompareOptionsDialog.IgnoreFileAndLogFilePath: + case loc.IgnoreFileAndLogFilePath: this.deploymentOptions.ignoreFileAndLogFilePath = value; break; - case SchemaCompareOptionsDialog.IgnoreExtendedProperties: + case loc.IgnoreExtendedProperties: this.deploymentOptions.ignoreExtendedProperties = value; break; - case SchemaCompareOptionsDialog.IgnoreDmlTriggerState: + case loc.IgnoreDmlTriggerState: this.deploymentOptions.ignoreDmlTriggerState = value; break; - case SchemaCompareOptionsDialog.IgnoreDmlTriggerOrder: + case loc.IgnoreDmlTriggerOrder: this.deploymentOptions.ignoreDmlTriggerOrder = value; break; - case SchemaCompareOptionsDialog.IgnoreDefaultSchema: + case loc.IgnoreDefaultSchema: this.deploymentOptions.ignoreDefaultSchema = value; break; - case SchemaCompareOptionsDialog.IgnoreDdlTriggerState: + case loc.IgnoreDdlTriggerState: this.deploymentOptions.ignoreDdlTriggerState = value; break; - case SchemaCompareOptionsDialog.IgnoreDdlTriggerOrder: + case loc.IgnoreDdlTriggerOrder: this.deploymentOptions.ignoreDdlTriggerOrder = value; break; - case SchemaCompareOptionsDialog.IgnoreCryptographicProviderFilePath: + case loc.IgnoreCryptographicProviderFilePath: this.deploymentOptions.ignoreCryptographicProviderFilePath = value; break; - case SchemaCompareOptionsDialog.VerifyDeployment: + case loc.VerifyDeployment: this.deploymentOptions.verifyDeployment = value; break; - case SchemaCompareOptionsDialog.IgnoreComments: + case loc.IgnoreComments: this.deploymentOptions.ignoreComments = value; break; - case SchemaCompareOptionsDialog.IgnoreColumnCollation: + case loc.IgnoreColumnCollation: this.deploymentOptions.ignoreColumnCollation = value; break; - case SchemaCompareOptionsDialog.IgnoreAuthorizer: + case loc.IgnoreAuthorizer: this.deploymentOptions.ignoreAuthorizer = value; break; - case SchemaCompareOptionsDialog.IgnoreAnsiNulls: + case loc.IgnoreAnsiNulls: this.deploymentOptions.ignoreAnsiNulls = value; break; - case SchemaCompareOptionsDialog.GenerateSmartDefaults: + case loc.GenerateSmartDefaults: this.deploymentOptions.generateSmartDefaults = value; break; - case SchemaCompareOptionsDialog.DropStatisticsNotInSource: + case loc.DropStatisticsNotInSource: this.deploymentOptions.dropStatisticsNotInSource = value; break; - case SchemaCompareOptionsDialog.DropRoleMembersNotInSource: + case loc.DropRoleMembersNotInSource: this.deploymentOptions.dropRoleMembersNotInSource = value; break; - case SchemaCompareOptionsDialog.DropPermissionsNotInSource: + case loc.DropPermissionsNotInSource: this.deploymentOptions.dropPermissionsNotInSource = value; break; - case SchemaCompareOptionsDialog.DropObjectsNotInSource: + case loc.DropObjectsNotInSource: this.deploymentOptions.dropObjectsNotInSource = value; break; - case SchemaCompareOptionsDialog.IgnoreColumnOrder: + case loc.IgnoreColumnOrder: this.deploymentOptions.ignoreColumnOrder = value; break; } @@ -877,232 +638,232 @@ export class SchemaCompareOptionsDialog { private GetSchemaCompareOptionUtil(label): boolean { switch (label) { - case SchemaCompareOptionsDialog.IgnoreTableOptions: + case loc.IgnoreTableOptions: return this.deploymentOptions.ignoreTableOptions; - case SchemaCompareOptionsDialog.IgnoreSemicolonBetweenStatements: + case loc.IgnoreSemicolonBetweenStatements: return this.deploymentOptions.ignoreSemicolonBetweenStatements; - case SchemaCompareOptionsDialog.IgnoreRouteLifetime: + case loc.IgnoreRouteLifetime: return this.deploymentOptions.ignoreRouteLifetime; - case SchemaCompareOptionsDialog.IgnoreRoleMembership: + case loc.IgnoreRoleMembership: return this.deploymentOptions.ignoreRoleMembership; - case SchemaCompareOptionsDialog.IgnoreQuotedIdentifiers: + case loc.IgnoreQuotedIdentifiers: return this.deploymentOptions.ignoreQuotedIdentifiers; - case SchemaCompareOptionsDialog.IgnorePermissions: + case loc.IgnorePermissions: return this.deploymentOptions.ignorePermissions; - case SchemaCompareOptionsDialog.IgnorePartitionSchemes: + case loc.IgnorePartitionSchemes: return this.deploymentOptions.ignorePartitionSchemes; - case SchemaCompareOptionsDialog.IgnoreObjectPlacementOnPartitionScheme: + case loc.IgnoreObjectPlacementOnPartitionScheme: return this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme; - case SchemaCompareOptionsDialog.IgnoreNotForReplication: + case loc.IgnoreNotForReplication: return this.deploymentOptions.ignoreNotForReplication; - case SchemaCompareOptionsDialog.IgnoreLoginSids: + case loc.IgnoreLoginSids: return this.deploymentOptions.ignoreLoginSids; - case SchemaCompareOptionsDialog.IgnoreLockHintsOnIndexes: + case loc.IgnoreLockHintsOnIndexes: return this.deploymentOptions.ignoreLockHintsOnIndexes; - case SchemaCompareOptionsDialog.IgnoreKeywordCasing: + case loc.IgnoreKeywordCasing: return this.deploymentOptions.ignoreKeywordCasing; - case SchemaCompareOptionsDialog.IgnoreIndexPadding: + case loc.IgnoreIndexPadding: return this.deploymentOptions.ignoreIndexPadding; - case SchemaCompareOptionsDialog.IgnoreIndexOptions: + case loc.IgnoreIndexOptions: return this.deploymentOptions.ignoreIndexOptions; - case SchemaCompareOptionsDialog.IgnoreIncrement: + case loc.IgnoreIncrement: return this.deploymentOptions.ignoreIncrement; - case SchemaCompareOptionsDialog.IgnoreIdentitySeed: + case loc.IgnoreIdentitySeed: return this.deploymentOptions.ignoreIdentitySeed; - case SchemaCompareOptionsDialog.IgnoreUserSettingsObjects: + case loc.IgnoreUserSettingsObjects: return this.deploymentOptions.ignoreUserSettingsObjects; - case SchemaCompareOptionsDialog.IgnoreFullTextCatalogFilePath: + case loc.IgnoreFullTextCatalogFilePath: return this.deploymentOptions.ignoreFullTextCatalogFilePath; - case SchemaCompareOptionsDialog.IgnoreWhitespace: + case loc.IgnoreWhitespace: return this.deploymentOptions.ignoreWhitespace; - case SchemaCompareOptionsDialog.IgnoreWithNocheckOnForeignKeys: + case loc.IgnoreWithNocheckOnForeignKeys: return this.deploymentOptions.ignoreWithNocheckOnForeignKeys; - case SchemaCompareOptionsDialog.VerifyCollationCompatibility: + case loc.VerifyCollationCompatibility: return this.deploymentOptions.verifyCollationCompatibility; - case SchemaCompareOptionsDialog.UnmodifiableObjectWarnings: + case loc.UnmodifiableObjectWarnings: return this.deploymentOptions.unmodifiableObjectWarnings; - case SchemaCompareOptionsDialog.TreatVerificationErrorsAsWarnings: + case loc.TreatVerificationErrorsAsWarnings: return this.deploymentOptions.treatVerificationErrorsAsWarnings; - case SchemaCompareOptionsDialog.ScriptRefreshModule: + case loc.ScriptRefreshModule: return this.deploymentOptions.scriptRefreshModule; - case SchemaCompareOptionsDialog.ScriptNewConstraintValidation: + case loc.ScriptNewConstraintValidation: return this.deploymentOptions.scriptNewConstraintValidation; - case SchemaCompareOptionsDialog.ScriptFileSize: + case loc.ScriptFileSize: return this.deploymentOptions.scriptFileSize; - case SchemaCompareOptionsDialog.ScriptDeployStateChecks: + case loc.ScriptDeployStateChecks: return this.deploymentOptions.scriptDeployStateChecks; - case SchemaCompareOptionsDialog.ScriptDatabaseOptions: + case loc.ScriptDatabaseOptions: return this.deploymentOptions.scriptDatabaseOptions; - case SchemaCompareOptionsDialog.ScriptDatabaseCompatibility: + case loc.ScriptDatabaseCompatibility: return this.deploymentOptions.scriptDatabaseCompatibility; - case SchemaCompareOptionsDialog.ScriptDatabaseCollation: + case loc.ScriptDatabaseCollation: return this.deploymentOptions.scriptDatabaseCollation; - case SchemaCompareOptionsDialog.RunDeploymentPlanExecutors: + case loc.RunDeploymentPlanExecutors: return this.deploymentOptions.runDeploymentPlanExecutors; - case SchemaCompareOptionsDialog.RegisterDataTierApplication: + case loc.RegisterDataTierApplication: return this.deploymentOptions.registerDataTierApplication; - case SchemaCompareOptionsDialog.PopulateFilesOnFileGroups: + case loc.PopulateFilesOnFileGroups: return this.deploymentOptions.populateFilesOnFileGroups; - case SchemaCompareOptionsDialog.NoAlterStatementsToChangeClrTypes: + case loc.NoAlterStatementsToChangeClrTypes: return this.deploymentOptions.noAlterStatementsToChangeClrTypes; - case SchemaCompareOptionsDialog.IncludeTransactionalScripts: + case loc.IncludeTransactionalScripts: return this.deploymentOptions.includeTransactionalScripts; - case SchemaCompareOptionsDialog.IncludeCompositeObjects: + case loc.IncludeCompositeObjects: return this.deploymentOptions.includeCompositeObjects; - case SchemaCompareOptionsDialog.AllowUnsafeRowLevelSecurityDataMovement: + case loc.AllowUnsafeRowLevelSecurityDataMovement: return this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement; - case SchemaCompareOptionsDialog.IgnoreWithNocheckOnCheckConstraints: + case loc.IgnoreWithNocheckOnCheckConstraints: return this.deploymentOptions.ignoreWithNocheckOnCheckConstraints; - case SchemaCompareOptionsDialog.IgnoreFillFactor: + case loc.IgnoreFillFactor: return this.deploymentOptions.ignoreFillFactor; - case SchemaCompareOptionsDialog.IgnoreFileSize: + case loc.IgnoreFileSize: return this.deploymentOptions.ignoreFileSize; - case SchemaCompareOptionsDialog.IgnoreFilegroupPlacement: + case loc.IgnoreFilegroupPlacement: return this.deploymentOptions.ignoreFilegroupPlacement; - case SchemaCompareOptionsDialog.DoNotAlterReplicatedObjects: + case loc.DoNotAlterReplicatedObjects: return this.deploymentOptions.doNotAlterReplicatedObjects; - case SchemaCompareOptionsDialog.DoNotAlterChangeDataCaptureObjects: + case loc.DoNotAlterChangeDataCaptureObjects: return this.deploymentOptions.doNotAlterChangeDataCaptureObjects; - case SchemaCompareOptionsDialog.DisableAndReenableDdlTriggers: + case loc.DisableAndReenableDdlTriggers: return this.deploymentOptions.disableAndReenableDdlTriggers; - case SchemaCompareOptionsDialog.DeployDatabaseInSingleUserMode: + case loc.DeployDatabaseInSingleUserMode: return this.deploymentOptions.deployDatabaseInSingleUserMode; - case SchemaCompareOptionsDialog.CreateNewDatabase: + case loc.CreateNewDatabase: return this.deploymentOptions.createNewDatabase; - case SchemaCompareOptionsDialog.CompareUsingTargetCollation: + case loc.CompareUsingTargetCollation: return this.deploymentOptions.compareUsingTargetCollation; - case SchemaCompareOptionsDialog.CommentOutSetVarDeclarations: + case loc.CommentOutSetVarDeclarations: return this.deploymentOptions.commentOutSetVarDeclarations; - case SchemaCompareOptionsDialog.BlockWhenDriftDetected: + case loc.BlockWhenDriftDetected: return this.deploymentOptions.blockWhenDriftDetected; - case SchemaCompareOptionsDialog.BlockOnPossibleDataLoss: + case loc.BlockOnPossibleDataLoss: return this.deploymentOptions.blockOnPossibleDataLoss; - case SchemaCompareOptionsDialog.BackupDatabaseBeforeChanges: + case loc.BackupDatabaseBeforeChanges: return this.deploymentOptions.backupDatabaseBeforeChanges; - case SchemaCompareOptionsDialog.AllowIncompatiblePlatform: + case loc.AllowIncompatiblePlatform: return this.deploymentOptions.allowIncompatiblePlatform; - case SchemaCompareOptionsDialog.AllowDropBlockingAssemblies: + case loc.AllowDropBlockingAssemblies: return this.deploymentOptions.allowDropBlockingAssemblies; - case SchemaCompareOptionsDialog.DropConstraintsNotInSource: + case loc.DropConstraintsNotInSource: return this.deploymentOptions.dropConstraintsNotInSource; - case SchemaCompareOptionsDialog.DropDmlTriggersNotInSource: + case loc.DropDmlTriggersNotInSource: return this.deploymentOptions.dropDmlTriggersNotInSource; - case SchemaCompareOptionsDialog.DropExtendedPropertiesNotInSource: + case loc.DropExtendedPropertiesNotInSource: return this.deploymentOptions.dropExtendedPropertiesNotInSource; - case SchemaCompareOptionsDialog.DropIndexesNotInSource: + case loc.DropIndexesNotInSource: return this.deploymentOptions.dropIndexesNotInSource; - case SchemaCompareOptionsDialog.IgnoreFileAndLogFilePath: + case loc.IgnoreFileAndLogFilePath: return this.deploymentOptions.ignoreFileAndLogFilePath; - case SchemaCompareOptionsDialog.IgnoreExtendedProperties: + case loc.IgnoreExtendedProperties: return this.deploymentOptions.ignoreExtendedProperties; - case SchemaCompareOptionsDialog.IgnoreDmlTriggerState: + case loc.IgnoreDmlTriggerState: return this.deploymentOptions.ignoreDmlTriggerState; - case SchemaCompareOptionsDialog.IgnoreDmlTriggerOrder: + case loc.IgnoreDmlTriggerOrder: return this.deploymentOptions.ignoreDmlTriggerOrder; - case SchemaCompareOptionsDialog.IgnoreDefaultSchema: + case loc.IgnoreDefaultSchema: return this.deploymentOptions.ignoreDefaultSchema; - case SchemaCompareOptionsDialog.IgnoreDdlTriggerState: + case loc.IgnoreDdlTriggerState: return this.deploymentOptions.ignoreDdlTriggerState; - case SchemaCompareOptionsDialog.IgnoreDdlTriggerOrder: + case loc.IgnoreDdlTriggerOrder: return this.deploymentOptions.ignoreDdlTriggerOrder; - case SchemaCompareOptionsDialog.IgnoreCryptographicProviderFilePath: + case loc.IgnoreCryptographicProviderFilePath: return this.deploymentOptions.ignoreCryptographicProviderFilePath; - case SchemaCompareOptionsDialog.VerifyDeployment: + case loc.VerifyDeployment: return this.deploymentOptions.verifyDeployment; - case SchemaCompareOptionsDialog.IgnoreComments: + case loc.IgnoreComments: return this.deploymentOptions.ignoreComments; - case SchemaCompareOptionsDialog.IgnoreColumnCollation: + case loc.IgnoreColumnCollation: return this.deploymentOptions.ignoreColumnCollation; - case SchemaCompareOptionsDialog.IgnoreAuthorizer: + case loc.IgnoreAuthorizer: return this.deploymentOptions.ignoreAuthorizer; - case SchemaCompareOptionsDialog.IgnoreAnsiNulls: + case loc.IgnoreAnsiNulls: return this.deploymentOptions.ignoreAnsiNulls; - case SchemaCompareOptionsDialog.GenerateSmartDefaults: + case loc.GenerateSmartDefaults: return this.deploymentOptions.generateSmartDefaults; - case SchemaCompareOptionsDialog.DropStatisticsNotInSource: + case loc.DropStatisticsNotInSource: return this.deploymentOptions.dropStatisticsNotInSource; - case SchemaCompareOptionsDialog.DropRoleMembersNotInSource: + case loc.DropRoleMembersNotInSource: return this.deploymentOptions.dropRoleMembersNotInSource; - case SchemaCompareOptionsDialog.DropPermissionsNotInSource: + case loc.DropPermissionsNotInSource: return this.deploymentOptions.dropPermissionsNotInSource; - case SchemaCompareOptionsDialog.DropObjectsNotInSource: + case loc.DropObjectsNotInSource: return this.deploymentOptions.dropObjectsNotInSource; - case SchemaCompareOptionsDialog.IgnoreColumnOrder: + case loc.IgnoreColumnOrder: return this.deploymentOptions.ignoreColumnOrder; } return false; @@ -1117,139 +878,139 @@ export class SchemaCompareOptionsDialog { private GetSchemaCompareIncludedObjectsUtil(label): boolean { switch (label) { - case SchemaCompareOptionsDialog.Aggregates: + case loc.Aggregates: return !isNullOrUndefined(this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Aggregates)) ? false : true; - case SchemaCompareOptionsDialog.ApplicationRoles: + case loc.ApplicationRoles: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ApplicationRoles)) ? false : true; - case SchemaCompareOptionsDialog.Assemblies: + case loc.Assemblies: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Assemblies)) ? false : true; - case SchemaCompareOptionsDialog.AssemblyFiles: + case loc.AssemblyFiles: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.AssemblyFiles)) ? false : true; - case SchemaCompareOptionsDialog.AsymmetricKeys: + case loc.AsymmetricKeys: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.AsymmetricKeys)) ? false : true; - case SchemaCompareOptionsDialog.BrokerPriorities: + case loc.BrokerPriorities: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.BrokerPriorities)) ? false : true; - case SchemaCompareOptionsDialog.Certificates: + case loc.Certificates: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Certificates)) ? false : true; - case SchemaCompareOptionsDialog.ColumnEncryptionKeys: + case loc.ColumnEncryptionKeys: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ColumnEncryptionKeys)) ? false : true; - case SchemaCompareOptionsDialog.ColumnMasterKeys: + case loc.ColumnMasterKeys: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ColumnMasterKeys)) ? false : true; - case SchemaCompareOptionsDialog.Contracts: + case loc.Contracts: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Contracts)) ? false : true; - case SchemaCompareOptionsDialog.DatabaseOptions: + case loc.DatabaseOptions: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseOptions)) ? false : true; - case SchemaCompareOptionsDialog.DatabaseRoles: + case loc.DatabaseRoles: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseRoles)) ? false : true; - case SchemaCompareOptionsDialog.DatabaseTriggers: + case loc.DatabaseTriggers: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseTriggers)) ? false : true; - case SchemaCompareOptionsDialog.Defaults: + case loc.Defaults: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Defaults)) ? false : true; - case SchemaCompareOptionsDialog.ExtendedProperties: + case loc.ExtendedProperties: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExtendedProperties)) ? false : true; - case SchemaCompareOptionsDialog.ExternalDataSources: + case loc.ExternalDataSources: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExternalDataSources)) ? false : true; - case SchemaCompareOptionsDialog.ExternalFileFormats: + case loc.ExternalFileFormats: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExternalFileFormats)) ? false : true; - case SchemaCompareOptionsDialog.ExternalTables: + case loc.ExternalTables: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExternalTables)) ? false : true; - case SchemaCompareOptionsDialog.Filegroups: + case loc.Filegroups: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Filegroups)) ? false : true; - case SchemaCompareOptionsDialog.Files: + case loc.Files: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Files)) ? false : true; - case SchemaCompareOptionsDialog.FileTables: + case loc.FileTables: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.FileTables)) ? false : true; - case SchemaCompareOptionsDialog.FullTextCatalogs: + case loc.FullTextCatalogs: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.FullTextCatalogs)) ? false : true; - case SchemaCompareOptionsDialog.FullTextStoplists: + case loc.FullTextStoplists: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.FullTextStoplists)) ? false : true; - case SchemaCompareOptionsDialog.MessageTypes: + case loc.MessageTypes: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.MessageTypes)) ? false : true; - case SchemaCompareOptionsDialog.PartitionFunctions: + case loc.PartitionFunctions: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.PartitionFunctions)) ? false : true; - case SchemaCompareOptionsDialog.PartitionSchemes: + case loc.PartitionSchemes: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.PartitionSchemes)) ? false : true; - case SchemaCompareOptionsDialog.Permissions: + case loc.Permissions: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Permissions)) ? false : true; - case SchemaCompareOptionsDialog.Queues: + case loc.Queues: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Queues)) ? false : true; - case SchemaCompareOptionsDialog.RemoteServiceBindings: + case loc.RemoteServiceBindings: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.RemoteServiceBindings)) ? false : true; - case SchemaCompareOptionsDialog.RoleMembership: + case loc.RoleMembership: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.RoleMembership)) ? false : true; - case SchemaCompareOptionsDialog.Rules: + case loc.Rules: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Rules)) ? false : true; - case SchemaCompareOptionsDialog.ScalarValuedFunctions: + case loc.ScalarValuedFunctions: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ScalarValuedFunctions)) ? false : true; - case SchemaCompareOptionsDialog.SearchPropertyLists: + case loc.SearchPropertyLists: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.SearchPropertyLists)) ? false : true; - case SchemaCompareOptionsDialog.SecurityPolicies: + case loc.SecurityPolicies: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.SecurityPolicies)) ? false : true; - case SchemaCompareOptionsDialog.Sequences: + case loc.Sequences: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Sequences)) ? false : true; - case SchemaCompareOptionsDialog.Services: + case loc.Services: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Services)) ? false : true; - case SchemaCompareOptionsDialog.Signatures: + case loc.Signatures: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Signatures)) ? false : true; - case SchemaCompareOptionsDialog.StoredProcedures: + case loc.StoredProcedures: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.StoredProcedures)) ? false : true; - case SchemaCompareOptionsDialog.SymmetricKeys: + case loc.SymmetricKeys: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.SymmetricKeys)) ? false : true; - case SchemaCompareOptionsDialog.Synonyms: + case loc.Synonyms: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Synonyms)) ? false : true; - case SchemaCompareOptionsDialog.Tables: + case loc.Tables: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Tables)) ? false : true; - case SchemaCompareOptionsDialog.TableValuedFunctions: + case loc.TableValuedFunctions: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.TableValuedFunctions)) ? false : true; - case SchemaCompareOptionsDialog.UserDefinedDataTypes: + case loc.UserDefinedDataTypes: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.UserDefinedDataTypes)) ? false : true; - case SchemaCompareOptionsDialog.UserDefinedTableTypes: + case loc.UserDefinedTableTypes: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.UserDefinedTableTypes)) ? false : true; - case SchemaCompareOptionsDialog.ClrUserDefinedTypes: + case loc.ClrUserDefinedTypes: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ClrUserDefinedTypes)) ? false : true; - case SchemaCompareOptionsDialog.Users: + case loc.Users: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Users)) ? false : true; - case SchemaCompareOptionsDialog.Views: + case loc.Views: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Views)) ? false : true; - case SchemaCompareOptionsDialog.XmlSchemaCollections: + case loc.XmlSchemaCollections: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.XmlSchemaCollections)) ? false : true; - case SchemaCompareOptionsDialog.Audits: + case loc.Audits: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Audits)) ? false : true; - case SchemaCompareOptionsDialog.Credentials: + case loc.Credentials: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Credentials)) ? false : true; - case SchemaCompareOptionsDialog.CryptographicProviders: + case loc.CryptographicProviders: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.CryptographicProviders)) ? false : true; - case SchemaCompareOptionsDialog.DatabaseAuditSpecifications: + case loc.DatabaseAuditSpecifications: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseAuditSpecifications)) ? false : true; - case SchemaCompareOptionsDialog.DatabaseEncryptionKeys: + case loc.DatabaseEncryptionKeys: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseEncryptionKeys)) ? false : true; - case SchemaCompareOptionsDialog.DatabaseScopedCredentials: + case loc.DatabaseScopedCredentials: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseScopedCredentials)) ? false : true; - case SchemaCompareOptionsDialog.Endpoints: + case loc.Endpoints: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Endpoints)) ? false : true; - case SchemaCompareOptionsDialog.ErrorMessages: + case loc.ErrorMessages: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ErrorMessages)) ? false : true; - case SchemaCompareOptionsDialog.EventNotifications: + case loc.EventNotifications: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.EventNotifications)) ? false : true; - case SchemaCompareOptionsDialog.EventSessions: + case loc.EventSessions: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.EventSessions)) ? false : true; - case SchemaCompareOptionsDialog.LinkedServerLogins: + case loc.LinkedServerLogins: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.LinkedServerLogins)) ? false : true; - case SchemaCompareOptionsDialog.LinkedServers: + case loc.LinkedServers: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.LinkedServers)) ? false : true; - case SchemaCompareOptionsDialog.Logins: + case loc.Logins: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Logins)) ? false : true; - case SchemaCompareOptionsDialog.MasterKeys: + case loc.MasterKeys: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.MasterKeys)) ? false : true; - case SchemaCompareOptionsDialog.Routes: + case loc.Routes: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Routes)) ? false : true; - case SchemaCompareOptionsDialog.ServerAuditSpecifications: + case loc.ServerAuditSpecifications: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ServerAuditSpecifications)) ? false : true; - case SchemaCompareOptionsDialog.ServerRoleMembership: + case loc.ServerRoleMembership: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ServerRoleMembership)) ? false : true; - case SchemaCompareOptionsDialog.ServerRoles: + case loc.ServerRoles: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ServerRoles)) ? false : true; - case SchemaCompareOptionsDialog.ServerTriggers: + case loc.ServerTriggers: return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ServerTriggers)) ? false : true; } return false; @@ -1257,337 +1018,337 @@ export class SchemaCompareOptionsDialog { private SetSchemaCompareIncludedObjectsUtil(label: string, included: boolean) { switch (label) { - case SchemaCompareOptionsDialog.Aggregates: + case loc.Aggregates: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Aggregates); } return; - case SchemaCompareOptionsDialog.ApplicationRoles: + case loc.ApplicationRoles: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ApplicationRoles); } return; - case SchemaCompareOptionsDialog.Assemblies: + case loc.Assemblies: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Assemblies); } return; - case SchemaCompareOptionsDialog.AssemblyFiles: + case loc.AssemblyFiles: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.AssemblyFiles); } return; - case SchemaCompareOptionsDialog.AsymmetricKeys: + case loc.AsymmetricKeys: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.AsymmetricKeys); } return; - case SchemaCompareOptionsDialog.BrokerPriorities: + case loc.BrokerPriorities: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.BrokerPriorities); } return; - case SchemaCompareOptionsDialog.Certificates: + case loc.Certificates: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Certificates); } return; - case SchemaCompareOptionsDialog.ColumnEncryptionKeys: + case loc.ColumnEncryptionKeys: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ColumnEncryptionKeys); } return; - case SchemaCompareOptionsDialog.ColumnMasterKeys: + case loc.ColumnMasterKeys: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ColumnMasterKeys); } return; - case SchemaCompareOptionsDialog.Contracts: + case loc.Contracts: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Contracts); } return; - case SchemaCompareOptionsDialog.DatabaseOptions: + case loc.DatabaseOptions: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.DatabaseOptions); } return; - case SchemaCompareOptionsDialog.DatabaseRoles: + case loc.DatabaseRoles: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.DatabaseRoles); } return; - case SchemaCompareOptionsDialog.DatabaseTriggers: + case loc.DatabaseTriggers: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.DatabaseTriggers); } return; - case SchemaCompareOptionsDialog.Defaults: + case loc.Defaults: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Defaults); } return; - case SchemaCompareOptionsDialog.ExtendedProperties: + case loc.ExtendedProperties: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ExtendedProperties); } return; - case SchemaCompareOptionsDialog.ExternalDataSources: + case loc.ExternalDataSources: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ExternalDataSources); } return; - case SchemaCompareOptionsDialog.ExternalFileFormats: + case loc.ExternalFileFormats: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ExternalFileFormats); } return; - case SchemaCompareOptionsDialog.ExternalTables: + case loc.ExternalTables: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ExternalTables); } return; - case SchemaCompareOptionsDialog.Filegroups: + case loc.Filegroups: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Filegroups); } return; - case SchemaCompareOptionsDialog.Files: + case loc.Files: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Files); } return; - case SchemaCompareOptionsDialog.FileTables: + case loc.FileTables: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.FileTables); } return; - case SchemaCompareOptionsDialog.FullTextCatalogs: + case loc.FullTextCatalogs: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.FullTextCatalogs); } return; - case SchemaCompareOptionsDialog.FullTextStoplists: + case loc.FullTextStoplists: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.FullTextStoplists); } return; - case SchemaCompareOptionsDialog.MessageTypes: + case loc.MessageTypes: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.MessageTypes); } return; - case SchemaCompareOptionsDialog.PartitionFunctions: + case loc.PartitionFunctions: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.PartitionFunctions); } return; - case SchemaCompareOptionsDialog.PartitionSchemes: + case loc.PartitionSchemes: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.PartitionSchemes); } return; - case SchemaCompareOptionsDialog.Permissions: + case loc.Permissions: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Permissions); } return; - case SchemaCompareOptionsDialog.Queues: + case loc.Queues: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Queues); } return; - case SchemaCompareOptionsDialog.RemoteServiceBindings: + case loc.RemoteServiceBindings: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.RemoteServiceBindings); } return; - case SchemaCompareOptionsDialog.RoleMembership: + case loc.RoleMembership: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.RoleMembership); } return; - case SchemaCompareOptionsDialog.Rules: + case loc.Rules: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Rules); } return; - case SchemaCompareOptionsDialog.ScalarValuedFunctions: + case loc.ScalarValuedFunctions: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ScalarValuedFunctions); } return; - case SchemaCompareOptionsDialog.SearchPropertyLists: + case loc.SearchPropertyLists: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.SearchPropertyLists); } return; - case SchemaCompareOptionsDialog.SecurityPolicies: + case loc.SecurityPolicies: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.SecurityPolicies); } return; - case SchemaCompareOptionsDialog.Sequences: + case loc.Sequences: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Sequences); } return; - case SchemaCompareOptionsDialog.Services: + case loc.Services: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Services); } return; - case SchemaCompareOptionsDialog.Signatures: + case loc.Signatures: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Signatures); } return; - case SchemaCompareOptionsDialog.StoredProcedures: + case loc.StoredProcedures: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.StoredProcedures); } return; - case SchemaCompareOptionsDialog.SymmetricKeys: + case loc.SymmetricKeys: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.SymmetricKeys); } return; - case SchemaCompareOptionsDialog.Synonyms: + case loc.Synonyms: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Synonyms); } return; - case SchemaCompareOptionsDialog.Tables: + case loc.Tables: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Tables); } return; - case SchemaCompareOptionsDialog.TableValuedFunctions: + case loc.TableValuedFunctions: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.TableValuedFunctions); } return; - case SchemaCompareOptionsDialog.UserDefinedDataTypes: + case loc.UserDefinedDataTypes: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.UserDefinedDataTypes); } return; - case SchemaCompareOptionsDialog.UserDefinedTableTypes: + case loc.UserDefinedTableTypes: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.UserDefinedTableTypes); } return; - case SchemaCompareOptionsDialog.ClrUserDefinedTypes: + case loc.ClrUserDefinedTypes: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ClrUserDefinedTypes); } return; - case SchemaCompareOptionsDialog.Users: + case loc.Users: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Users); } return; - case SchemaCompareOptionsDialog.Views: + case loc.Views: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Views); } return; - case SchemaCompareOptionsDialog.XmlSchemaCollections: + case loc.XmlSchemaCollections: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.XmlSchemaCollections); } return; - case SchemaCompareOptionsDialog.Audits: + case loc.Audits: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Audits); } return; - case SchemaCompareOptionsDialog.Credentials: + case loc.Credentials: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Credentials); } return; - case SchemaCompareOptionsDialog.CryptographicProviders: + case loc.CryptographicProviders: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.CryptographicProviders); } return; - case SchemaCompareOptionsDialog.DatabaseAuditSpecifications: + case loc.DatabaseAuditSpecifications: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.DatabaseAuditSpecifications); } return; - case SchemaCompareOptionsDialog.DatabaseEncryptionKeys: + case loc.DatabaseEncryptionKeys: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.DatabaseEncryptionKeys); } return; - case SchemaCompareOptionsDialog.DatabaseScopedCredentials: + case loc.DatabaseScopedCredentials: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.DatabaseScopedCredentials); } return; - case SchemaCompareOptionsDialog.Endpoints: + case loc.Endpoints: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Endpoints); } return; - case SchemaCompareOptionsDialog.ErrorMessages: + case loc.ErrorMessages: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ErrorMessages); } return; - case SchemaCompareOptionsDialog.EventNotifications: + case loc.EventNotifications: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.EventNotifications); } return; - case SchemaCompareOptionsDialog.EventSessions: + case loc.EventSessions: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.EventSessions); } return; - case SchemaCompareOptionsDialog.LinkedServerLogins: + case loc.LinkedServerLogins: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.LinkedServerLogins); } return; - case SchemaCompareOptionsDialog.LinkedServers: + case loc.LinkedServers: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.LinkedServers); } return; - case SchemaCompareOptionsDialog.Logins: + case loc.Logins: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Logins); } return; - case SchemaCompareOptionsDialog.MasterKeys: + case loc.MasterKeys: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.MasterKeys); } return; - case SchemaCompareOptionsDialog.Routes: + case loc.Routes: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.Routes); } return; - case SchemaCompareOptionsDialog.ServerAuditSpecifications: + case loc.ServerAuditSpecifications: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ServerAuditSpecifications); } return; - case SchemaCompareOptionsDialog.ServerRoleMembership: + case loc.ServerRoleMembership: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ServerRoleMembership); } return; - case SchemaCompareOptionsDialog.ServerRoles: + case loc.ServerRoles: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ServerRoles); } return; - case SchemaCompareOptionsDialog.ServerTriggers: + case loc.ServerTriggers: if (!included) { this.excludedObjectTypes.push(mssql.SchemaObjectType.ServerTriggers); } @@ -1597,233 +1358,233 @@ export class SchemaCompareOptionsDialog { private GetDescription(label: string): string { switch (label) { - case SchemaCompareOptionsDialog.IgnoreTableOptions: - return SchemaCompareOptionsDialog.descriptionIgnoreTableOptions; + case loc.IgnoreTableOptions: + return loc.descriptionIgnoreTableOptions; - case SchemaCompareOptionsDialog.IgnoreSemicolonBetweenStatements: - return SchemaCompareOptionsDialog.descriptionIgnoreSemicolonBetweenStatements; + case loc.IgnoreSemicolonBetweenStatements: + return loc.descriptionIgnoreSemicolonBetweenStatements; - case SchemaCompareOptionsDialog.IgnoreRouteLifetime: - return SchemaCompareOptionsDialog.descriptionIgnoreRouteLifetime; + case loc.IgnoreRouteLifetime: + return loc.descriptionIgnoreRouteLifetime; - case SchemaCompareOptionsDialog.IgnoreRoleMembership: - return SchemaCompareOptionsDialog.descriptionIgnoreRoleMembership; + case loc.IgnoreRoleMembership: + return loc.descriptionIgnoreRoleMembership; - case SchemaCompareOptionsDialog.IgnoreQuotedIdentifiers: - return SchemaCompareOptionsDialog.descriptionIgnoreQuotedIdentifiers; + case loc.IgnoreQuotedIdentifiers: + return loc.descriptionIgnoreQuotedIdentifiers; - case SchemaCompareOptionsDialog.IgnorePermissions: - return SchemaCompareOptionsDialog.descriptionIgnorePermissions; + case loc.IgnorePermissions: + return loc.descriptionIgnorePermissions; - case SchemaCompareOptionsDialog.IgnorePartitionSchemes: - return SchemaCompareOptionsDialog.descriptionIgnorePartitionSchemes; + case loc.IgnorePartitionSchemes: + return loc.descriptionIgnorePartitionSchemes; - case SchemaCompareOptionsDialog.IgnoreObjectPlacementOnPartitionScheme: - return SchemaCompareOptionsDialog.descriptionIgnoreObjectPlacementOnPartitionScheme; + case loc.IgnoreObjectPlacementOnPartitionScheme: + return loc.descriptionIgnoreObjectPlacementOnPartitionScheme; - case SchemaCompareOptionsDialog.IgnoreNotForReplication: - return SchemaCompareOptionsDialog.descriptionIgnoreNotForReplication; + case loc.IgnoreNotForReplication: + return loc.descriptionIgnoreNotForReplication; - case SchemaCompareOptionsDialog.IgnoreLoginSids: - return SchemaCompareOptionsDialog.descriptionIgnoreLoginSids; + case loc.IgnoreLoginSids: + return loc.descriptionIgnoreLoginSids; - case SchemaCompareOptionsDialog.IgnoreLockHintsOnIndexes: - return SchemaCompareOptionsDialog.descriptionIgnoreLockHintsOnIndexes; + case loc.IgnoreLockHintsOnIndexes: + return loc.descriptionIgnoreLockHintsOnIndexes; - case SchemaCompareOptionsDialog.IgnoreKeywordCasing: - return SchemaCompareOptionsDialog.descriptionIgnoreKeywordCasing; + case loc.IgnoreKeywordCasing: + return loc.descriptionIgnoreKeywordCasing; - case SchemaCompareOptionsDialog.IgnoreIndexPadding: - return SchemaCompareOptionsDialog.descriptionIgnoreIndexPadding; + case loc.IgnoreIndexPadding: + return loc.descriptionIgnoreIndexPadding; - case SchemaCompareOptionsDialog.IgnoreIndexOptions: - return SchemaCompareOptionsDialog.descriptionIgnoreIndexOptions; + case loc.IgnoreIndexOptions: + return loc.descriptionIgnoreIndexOptions; - case SchemaCompareOptionsDialog.IgnoreIncrement: - return SchemaCompareOptionsDialog.descriptionIgnoreIncrement; + case loc.IgnoreIncrement: + return loc.descriptionIgnoreIncrement; - case SchemaCompareOptionsDialog.IgnoreIdentitySeed: - return SchemaCompareOptionsDialog.descriptionIgnoreIdentitySeed; + case loc.IgnoreIdentitySeed: + return loc.descriptionIgnoreIdentitySeed; - case SchemaCompareOptionsDialog.IgnoreUserSettingsObjects: - return SchemaCompareOptionsDialog.descriptionIgnoreUserSettingsObjects; + case loc.IgnoreUserSettingsObjects: + return loc.descriptionIgnoreUserSettingsObjects; - case SchemaCompareOptionsDialog.IgnoreFullTextCatalogFilePath: - return SchemaCompareOptionsDialog.descriptionIgnoreFullTextCatalogFilePath; + case loc.IgnoreFullTextCatalogFilePath: + return loc.descriptionIgnoreFullTextCatalogFilePath; - case SchemaCompareOptionsDialog.IgnoreWhitespace: - return SchemaCompareOptionsDialog.descriptionIgnoreWhitespace; + case loc.IgnoreWhitespace: + return loc.descriptionIgnoreWhitespace; - case SchemaCompareOptionsDialog.IgnoreWithNocheckOnForeignKeys: - return SchemaCompareOptionsDialog.descriptionIgnoreWithNocheckOnForeignKeys; + case loc.IgnoreWithNocheckOnForeignKeys: + return loc.descriptionIgnoreWithNocheckOnForeignKeys; - case SchemaCompareOptionsDialog.VerifyCollationCompatibility: - return SchemaCompareOptionsDialog.descriptionVerifyCollationCompatibility; + case loc.VerifyCollationCompatibility: + return loc.descriptionVerifyCollationCompatibility; - case SchemaCompareOptionsDialog.UnmodifiableObjectWarnings: - return SchemaCompareOptionsDialog.descriptionUnmodifiableObjectWarnings; + case loc.UnmodifiableObjectWarnings: + return loc.descriptionUnmodifiableObjectWarnings; - case SchemaCompareOptionsDialog.TreatVerificationErrorsAsWarnings: - return SchemaCompareOptionsDialog.descriptionTreatVerificationErrorsAsWarnings; + case loc.TreatVerificationErrorsAsWarnings: + return loc.descriptionTreatVerificationErrorsAsWarnings; - case SchemaCompareOptionsDialog.ScriptRefreshModule: - return SchemaCompareOptionsDialog.descriptionScriptRefreshModule; + case loc.ScriptRefreshModule: + return loc.descriptionScriptRefreshModule; - case SchemaCompareOptionsDialog.ScriptNewConstraintValidation: - return SchemaCompareOptionsDialog.descriptionScriptNewConstraintValidation; + case loc.ScriptNewConstraintValidation: + return loc.descriptionScriptNewConstraintValidation; - case SchemaCompareOptionsDialog.ScriptFileSize: - return SchemaCompareOptionsDialog.descriptionScriptFileSize; + case loc.ScriptFileSize: + return loc.descriptionScriptFileSize; - case SchemaCompareOptionsDialog.ScriptDeployStateChecks: - return SchemaCompareOptionsDialog.descriptionScriptDeployStateChecks; + case loc.ScriptDeployStateChecks: + return loc.descriptionScriptDeployStateChecks; - case SchemaCompareOptionsDialog.ScriptDatabaseOptions: - return SchemaCompareOptionsDialog.descriptionScriptDatabaseOptions; + case loc.ScriptDatabaseOptions: + return loc.descriptionScriptDatabaseOptions; - case SchemaCompareOptionsDialog.ScriptDatabaseCompatibility: - return SchemaCompareOptionsDialog.descriptionScriptDatabaseCompatibility; + case loc.ScriptDatabaseCompatibility: + return loc.descriptionScriptDatabaseCompatibility; - case SchemaCompareOptionsDialog.ScriptDatabaseCollation: - return SchemaCompareOptionsDialog.descriptionScriptDatabaseCollation; + case loc.ScriptDatabaseCollation: + return loc.descriptionScriptDatabaseCollation; - case SchemaCompareOptionsDialog.RunDeploymentPlanExecutors: - return SchemaCompareOptionsDialog.descriptionRunDeploymentPlanExecutors; + case loc.RunDeploymentPlanExecutors: + return loc.descriptionRunDeploymentPlanExecutors; - case SchemaCompareOptionsDialog.RegisterDataTierApplication: - return SchemaCompareOptionsDialog.descriptionRegisterDataTierApplication; + case loc.RegisterDataTierApplication: + return loc.descriptionRegisterDataTierApplication; - case SchemaCompareOptionsDialog.PopulateFilesOnFileGroups: - return SchemaCompareOptionsDialog.descriptionPopulateFilesOnFileGroups; + case loc.PopulateFilesOnFileGroups: + return loc.descriptionPopulateFilesOnFileGroups; - case SchemaCompareOptionsDialog.NoAlterStatementsToChangeClrTypes: - return SchemaCompareOptionsDialog.descriptionNoAlterStatementsToChangeClrTypes; + case loc.NoAlterStatementsToChangeClrTypes: + return loc.descriptionNoAlterStatementsToChangeClrTypes; - case SchemaCompareOptionsDialog.IncludeTransactionalScripts: - return SchemaCompareOptionsDialog.descriptionIncludeTransactionalScripts; + case loc.IncludeTransactionalScripts: + return loc.descriptionIncludeTransactionalScripts; - case SchemaCompareOptionsDialog.IncludeCompositeObjects: - return SchemaCompareOptionsDialog.descriptionIncludeCompositeObjects; + case loc.IncludeCompositeObjects: + return loc.descriptionIncludeCompositeObjects; - case SchemaCompareOptionsDialog.AllowUnsafeRowLevelSecurityDataMovement: - return SchemaCompareOptionsDialog.descriptionAllowUnsafeRowLevelSecurityDataMovement; + case loc.AllowUnsafeRowLevelSecurityDataMovement: + return loc.descriptionAllowUnsafeRowLevelSecurityDataMovement; - case SchemaCompareOptionsDialog.IgnoreWithNocheckOnCheckConstraints: - return SchemaCompareOptionsDialog.descriptionIgnoreWithNocheckOnCheckConstraints; + case loc.IgnoreWithNocheckOnCheckConstraints: + return loc.descriptionIgnoreWithNocheckOnCheckConstraints; - case SchemaCompareOptionsDialog.IgnoreFillFactor: - return SchemaCompareOptionsDialog.descriptionIgnoreFillFactor; + case loc.IgnoreFillFactor: + return loc.descriptionIgnoreFillFactor; - case SchemaCompareOptionsDialog.IgnoreFileSize: - return SchemaCompareOptionsDialog.descriptionIgnoreFileSize; + case loc.IgnoreFileSize: + return loc.descriptionIgnoreFileSize; - case SchemaCompareOptionsDialog.IgnoreFilegroupPlacement: - return SchemaCompareOptionsDialog.descriptionIgnoreFilegroupPlacement; + case loc.IgnoreFilegroupPlacement: + return loc.descriptionIgnoreFilegroupPlacement; - case SchemaCompareOptionsDialog.DoNotAlterReplicatedObjects: - return SchemaCompareOptionsDialog.descriptionDoNotAlterReplicatedObjects; + case loc.DoNotAlterReplicatedObjects: + return loc.descriptionDoNotAlterReplicatedObjects; - case SchemaCompareOptionsDialog.DoNotAlterChangeDataCaptureObjects: - return SchemaCompareOptionsDialog.descriptionDoNotAlterChangeDataCaptureObjects; + case loc.DoNotAlterChangeDataCaptureObjects: + return loc.descriptionDoNotAlterChangeDataCaptureObjects; - case SchemaCompareOptionsDialog.DisableAndReenableDdlTriggers: - return SchemaCompareOptionsDialog.descriptionDisableAndReenableDdlTriggers; + case loc.DisableAndReenableDdlTriggers: + return loc.descriptionDisableAndReenableDdlTriggers; - case SchemaCompareOptionsDialog.DeployDatabaseInSingleUserMode: - return SchemaCompareOptionsDialog.descriptionDeployDatabaseInSingleUserMode; + case loc.DeployDatabaseInSingleUserMode: + return loc.descriptionDeployDatabaseInSingleUserMode; - case SchemaCompareOptionsDialog.CreateNewDatabase: - return SchemaCompareOptionsDialog.descriptionCreateNewDatabase; + case loc.CreateNewDatabase: + return loc.descriptionCreateNewDatabase; - case SchemaCompareOptionsDialog.CompareUsingTargetCollation: - return SchemaCompareOptionsDialog.descriptionCompareUsingTargetCollation; + case loc.CompareUsingTargetCollation: + return loc.descriptionCompareUsingTargetCollation; - case SchemaCompareOptionsDialog.CommentOutSetVarDeclarations: - return SchemaCompareOptionsDialog.descriptionCommentOutSetVarDeclarations; + case loc.CommentOutSetVarDeclarations: + return loc.descriptionCommentOutSetVarDeclarations; - case SchemaCompareOptionsDialog.BlockWhenDriftDetected: - return SchemaCompareOptionsDialog.descriptionBlockWhenDriftDetected; + case loc.BlockWhenDriftDetected: + return loc.descriptionBlockWhenDriftDetected; - case SchemaCompareOptionsDialog.BlockOnPossibleDataLoss: - return SchemaCompareOptionsDialog.descriptionBlockOnPossibleDataLoss; + case loc.BlockOnPossibleDataLoss: + return loc.descriptionBlockOnPossibleDataLoss; - case SchemaCompareOptionsDialog.BackupDatabaseBeforeChanges: - return SchemaCompareOptionsDialog.descriptionBackupDatabaseBeforeChanges; + case loc.BackupDatabaseBeforeChanges: + return loc.descriptionBackupDatabaseBeforeChanges; - case SchemaCompareOptionsDialog.AllowIncompatiblePlatform: - return SchemaCompareOptionsDialog.descriptionAllowIncompatiblePlatform; + case loc.AllowIncompatiblePlatform: + return loc.descriptionAllowIncompatiblePlatform; - case SchemaCompareOptionsDialog.AllowDropBlockingAssemblies: - return SchemaCompareOptionsDialog.descriptionAllowDropBlockingAssemblies; + case loc.AllowDropBlockingAssemblies: + return loc.descriptionAllowDropBlockingAssemblies; - case SchemaCompareOptionsDialog.DropConstraintsNotInSource: - return SchemaCompareOptionsDialog.descriptionDropConstraintsNotInSource; + case loc.DropConstraintsNotInSource: + return loc.descriptionDropConstraintsNotInSource; - case SchemaCompareOptionsDialog.DropDmlTriggersNotInSource: - return SchemaCompareOptionsDialog.descriptionDropDmlTriggersNotInSource; + case loc.DropDmlTriggersNotInSource: + return loc.descriptionDropDmlTriggersNotInSource; - case SchemaCompareOptionsDialog.DropExtendedPropertiesNotInSource: - return SchemaCompareOptionsDialog.descriptionDropExtendedPropertiesNotInSource; + case loc.DropExtendedPropertiesNotInSource: + return loc.descriptionDropExtendedPropertiesNotInSource; - case SchemaCompareOptionsDialog.DropIndexesNotInSource: - return SchemaCompareOptionsDialog.descriptionDropIndexesNotInSource; + case loc.DropIndexesNotInSource: + return loc.descriptionDropIndexesNotInSource; - case SchemaCompareOptionsDialog.IgnoreFileAndLogFilePath: - return SchemaCompareOptionsDialog.descriptionIgnoreFileAndLogFilePath; + case loc.IgnoreFileAndLogFilePath: + return loc.descriptionIgnoreFileAndLogFilePath; - case SchemaCompareOptionsDialog.IgnoreExtendedProperties: - return SchemaCompareOptionsDialog.descriptionIgnoreExtendedProperties; + case loc.IgnoreExtendedProperties: + return loc.descriptionIgnoreExtendedProperties; - case SchemaCompareOptionsDialog.IgnoreDmlTriggerState: - return SchemaCompareOptionsDialog.descriptionIgnoreDmlTriggerState; + case loc.IgnoreDmlTriggerState: + return loc.descriptionIgnoreDmlTriggerState; - case SchemaCompareOptionsDialog.IgnoreDmlTriggerOrder: - return SchemaCompareOptionsDialog.descriptionIgnoreDmlTriggerOrder; + case loc.IgnoreDmlTriggerOrder: + return loc.descriptionIgnoreDmlTriggerOrder; - case SchemaCompareOptionsDialog.IgnoreDefaultSchema: - return SchemaCompareOptionsDialog.descriptionIgnoreDefaultSchema; + case loc.IgnoreDefaultSchema: + return loc.descriptionIgnoreDefaultSchema; - case SchemaCompareOptionsDialog.IgnoreDdlTriggerState: - return SchemaCompareOptionsDialog.descriptionIgnoreDdlTriggerState; + case loc.IgnoreDdlTriggerState: + return loc.descriptionIgnoreDdlTriggerState; - case SchemaCompareOptionsDialog.IgnoreDdlTriggerOrder: - return SchemaCompareOptionsDialog.descriptionIgnoreDdlTriggerOrder; + case loc.IgnoreDdlTriggerOrder: + return loc.descriptionIgnoreDdlTriggerOrder; - case SchemaCompareOptionsDialog.IgnoreCryptographicProviderFilePath: - return SchemaCompareOptionsDialog.descriptionIgnoreCryptographicProviderFilePath; + case loc.IgnoreCryptographicProviderFilePath: + return loc.descriptionIgnoreCryptographicProviderFilePath; - case SchemaCompareOptionsDialog.VerifyDeployment: - return SchemaCompareOptionsDialog.descriptionVerifyDeployment; + case loc.VerifyDeployment: + return loc.descriptionVerifyDeployment; - case SchemaCompareOptionsDialog.IgnoreComments: - return SchemaCompareOptionsDialog.descriptionIgnoreComments; + case loc.IgnoreComments: + return loc.descriptionIgnoreComments; - case SchemaCompareOptionsDialog.IgnoreColumnCollation: - return SchemaCompareOptionsDialog.descriptionIgnoreColumnCollation; + case loc.IgnoreColumnCollation: + return loc.descriptionIgnoreColumnCollation; - case SchemaCompareOptionsDialog.IgnoreAuthorizer: - return SchemaCompareOptionsDialog.descriptionIgnoreAuthorizer; + case loc.IgnoreAuthorizer: + return loc.descriptionIgnoreAuthorizer; - case SchemaCompareOptionsDialog.IgnoreAnsiNulls: - return SchemaCompareOptionsDialog.descriptionIgnoreAnsiNulls; + case loc.IgnoreAnsiNulls: + return loc.descriptionIgnoreAnsiNulls; - case SchemaCompareOptionsDialog.GenerateSmartDefaults: - return SchemaCompareOptionsDialog.descriptionGenerateSmartDefaults; + case loc.GenerateSmartDefaults: + return loc.descriptionGenerateSmartDefaults; - case SchemaCompareOptionsDialog.DropStatisticsNotInSource: - return SchemaCompareOptionsDialog.descriptionDropStatisticsNotInSource; + case loc.DropStatisticsNotInSource: + return loc.descriptionDropStatisticsNotInSource; - case SchemaCompareOptionsDialog.DropRoleMembersNotInSource: - return SchemaCompareOptionsDialog.descriptionDropRoleMembersNotInSource; + case loc.DropRoleMembersNotInSource: + return loc.descriptionDropRoleMembersNotInSource; - case SchemaCompareOptionsDialog.DropPermissionsNotInSource: - return SchemaCompareOptionsDialog.descriptionDropPermissionsNotInSource; + case loc.DropPermissionsNotInSource: + return loc.descriptionDropPermissionsNotInSource; - case SchemaCompareOptionsDialog.DropObjectsNotInSource: - return SchemaCompareOptionsDialog.descriptionDropObjectsNotInSource; + case loc.DropObjectsNotInSource: + return loc.descriptionDropObjectsNotInSource; - case SchemaCompareOptionsDialog.IgnoreColumnOrder: - return SchemaCompareOptionsDialog.descriptionIgnoreColumnOrder; + case loc.IgnoreColumnOrder: + return loc.descriptionIgnoreColumnOrder; } } } diff --git a/extensions/schema-compare/src/localizedConstants.ts b/extensions/schema-compare/src/localizedConstants.ts new file mode 100644 index 0000000000..42477ddc47 --- /dev/null +++ b/extensions/schema-compare/src/localizedConstants.ts @@ -0,0 +1,318 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the Source EULA. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vscode-nls'; +const localize = nls.loadMessageBundle(); + +// Labels +export const OkButtonText: string = localize('schemaCompareDialog.ok', "OK"); +export const CancelButtonText: string = localize('schemaCompareDialog.cancel', "Cancel"); +export const SourceTitle: string = localize('schemaCompareDialog.SourceTitle', "Source"); +export const TargetTitle: string = localize('schemaCompareDialog.TargetTitle', "Target"); +export const FileTextBoxLabel: string = localize('schemaCompareDialog.fileTextBoxLabel', "File"); +export const DacpacRadioButtonLabel: string = localize('schemaCompare.dacpacRadioButtonLabel', "Data-tier Application File (.dacpac)"); +export const DatabaseRadioButtonLabel: string = localize('schemaCompare.databaseButtonLabel', "Database"); +export const RadioButtonsLabel: string = localize('schemaCompare.radioButtonsLabel', "Type"); +export const ServerDropdownLabel: string = localize('schemaCompareDialog.serverDropdownTitle', "Server"); +export const DatabaseDropdownLabel: string = localize('schemaCompareDialog.databaseDropdownTitle', "Database"); +export const NoActiveConnectionsLabel: string = localize('schemaCompare.noActiveConnectionsText', "No active connections"); +export const SchemaCompareLabel: string = localize('schemaCompare.dialogTitle', "Schema Compare"); +export const differentSourceMessage: string = localize('schemaCompareDialog.differentSourceMessage', "A different source schema has been selected. Compare to see the comparison?"); +export const differentTargetMessage: string = localize('schemaCompareDialog.differentTargetMessage', "A different target schema has been selected. Compare to see the comparison?"); +export const differentSourceTargetMessage: string = localize('schemaCompareDialog.differentSourceTargetMessage', "Different source and target schemas have been selected. Compare to see the comparison?"); +export const YesButtonText: string = localize('schemaCompareDialog.Yes', "Yes"); +export const NoButtonText: string = localize('schemaCompareDialog.No', "No"); +export const sourceFile: string = localize('schemaCompareDialog.sourceTextBox', "Source file"); +export const targetFile: string = localize('schemaCompareDialog.targetTextBox', "Target file"); +export const sourceDatabase: string = localize('schemaCompareDialog.sourceDatabaseDropdown', "Source Database"); +export const targetDatabase: string = localize('schemaCompareDialog.targetDatabaseDropdown', "Target Database"); +export const sourceServer: string = localize('schemaCompareDialog.sourceServerDropdown', "Source Server"); +export const targetServer: string = localize('schemaCompareDialog.targetServerDropdown', "Target Server"); +export const defaultText: string = localize('schemaCompareDialog.defaultUser', "default"); +export const open: string = localize('schemaCompare.openFile', "Open"); +export const selectSourceFile: string = localize('schemaCompare.selectSourceFile', "Select source file"); +export const selectTargetFile: string = localize('schemaCompare.selectTargetFile', "Select target file"); +export const ResetButtonText: string = localize('SchemaCompareOptionsDialog.Reset', "Reset"); +export const OptionsChangedMessage: string = localize('schemaCompareOptions.RecompareMessage', "Options have changed. Recompare to see the comparison?"); +export const OptionsLabel: string = localize('SchemaCompare.SchemaCompareOptionsDialogLabel', "Schema Compare Options"); +export const GeneralOptionsLabel: string = localize('SchemaCompare.GeneralOptionsLabel', "General Options"); +export const ObjectTypesOptionsLabel: string = localize('SchemaCompare.ObjectTypesOptionsLabel', "Include Object Types"); +export const diffEditorTitle: string = localize('schemaCompare.CompareDetailsTitle', "Compare Details"); +export const applyConfirmation: string = localize('schemaCompare.ApplyConfirmation', "Are you sure you want to update the target?"); +export const reCompareToRefeshMessage: string = localize('schemaCompare.RecompareToRefresh', "Press Compare to refresh the comparison."); +export const generateScriptEnabledMessage: string = localize('schemaCompare.generateScriptEnabledButton', "Generate script to deploy changes to target"); +export const generateScriptNoChangesMessage: string = localize('schemaCompare.generateScriptNoChanges', "No changes to script"); +export const applyEnabledMessage: string = localize('schemaCompare.applyButtonEnabledTitle', "Apply changes to target"); +export const applyNoChangesMessage: string = localize('schemaCompare.applyNoChanges', "No changes to apply"); +export const includeExcludeInfoMessage: string = localize('schemaCompare.includeExcludeInfoMessage', "Please note that include/exclude operations can take a moment to calculate affected dependencies"); +export const sourceTitle: string = localize('schemaCompareDialog.SourceTitle', "Source"); +export const targetTitle: string = localize('schemaCompareDialog.TargetTitle', "Target"); +export const deleteAction: string = localize('schemaCompare.deleteAction', "Delete"); +export const changeAction: string = localize('schemaCompare.changeAction', "Change"); +export const addAction: string = localize('schemaCompare.addAction', "Add"); +export const differencesTableTitle: string = localize('schemaCompare.differencesTableTitle', "Comparison between Source and Target"); +export const waitText: string = localize('schemaCompare.waitText', "Initializing Comparison. This might take a moment."); +export const startText: string = localize('schemaCompare.startText', "To compare two schemas, first select a source schema and target schema, then press Compare."); +export const noDifferencesText: string = localize('schemaCompare.noDifferences', "No schema differences were found."); +export const type: string = localize('schemaCompare.typeColumn', "Type"); +export const sourceName: string = localize('schemaCompare.sourceNameColumn', "Source Name"); +export const include: string = localize('schemaCompare.includeColumnName', "Include"); +export const action: string = localize('schemaCompare.actionColumn', "Action"); +export const targetName: string = localize('schemaCompare.targetNameColumn', "Target Name"); +export const generateScriptDisabled: string = localize('schemaCompare.generateScriptButtonDisabledTitle', "Generate script is enabled when the target is a database"); +export const applyDisabled: string = localize('schemaCompare.applyButtonDisabledTitle', "Apply is enabled when the target is a database"); +export function cannotExcludeMessageDependent(diffEntryName: string, firstDependentName: string): string { return localize('schemaCompare.cannotExcludeMessageWithDependent', "Cannot exclude {0}. Included dependents exist, such as {1}", diffEntryName, firstDependentName); } +export function cannotIncludeMessageDependent(diffEntryName: string, firstDependentName: string): string { return localize('schemaCompare.cannotIncludeMessageWithDependent', "Cannot include {0}. Excluded dependents exist, such as {1}", diffEntryName, firstDependentName); } +export function cannotExcludeMessage(diffEntryName: string): string { return localize('schemaCompare.cannotExcludeMessage', "Cannot exclude {0}. Included dependents exist", diffEntryName); } +export function cannotIncludeMessage(diffEntryName: string): string { return localize('schemaCompare.cannotIncludeMessage', "Cannot include {0}. Excluded dependents exist", diffEntryName); } +export const compare: string = localize('schemaCompare.compareButton', "Compare"); +export const stop: string = localize('schemaCompare.cancelCompareButton', "Stop"); +export const generateScript: string = localize('schemaCompare.generateScriptButton', "Generate script"); +export const options: string = localize('schemaCompare.optionsButton', "Options"); +export const apply: string = localize('schemaCompare.updateButton', "Apply"); +export const switchDirection: string = localize('schemaCompare.switchDirectionButton', "Switch direction"); +export const switchDirectionDescription: string = localize('schemaCompare.switchButtonTitle', "Switch source and target"); +export const selectSource: string = localize('schemaCompare.sourceButtonTitle', "Select Source"); +export const selectTarget: string = localize('schemaCompare.targetButtonTitle', "Select Target"); +export const openScmp: string = localize('schemaCompare.openScmpButton', "Open .scmp file"); +export const openScmpDescription: string = localize('schemaCompare.openScmpButtonTitle', "Load source, target, and options saved in an .scmp file"); +export const saveScmp: string = localize('schemaCompare.saveScmpButton', "Save .scmp file"); +export const saveScmpDescription: string = localize('schemaCompare.saveScmpButtonTitle', "Save source and target, options, and excluded elements"); +export const save: string = localize('schemaCompare.saveFile', "Save"); +export function getConnectionString(caller: string): string { return localize('schemaCompare.GetConnectionString', "Do you want to connect to {0}?", caller); } + +// options +export const IgnoreTableOptions: string = localize('SchemaCompare.IgnoreTableOptions', "Ignore Table Options"); +export const IgnoreSemicolonBetweenStatements: string = localize('SchemaCompare.IgnoreSemicolonBetweenStatements', "Ignore Semicolon Between Statements"); +export const IgnoreRouteLifetime: string = localize('SchemaCompare.IgnoreRouteLifetime', "Ignore Route Lifetime"); +export const IgnoreRoleMembership: string = localize('SchemaCompare.IgnoreRoleMembership', "Ignore Role Membership"); +export const IgnoreQuotedIdentifiers: string = localize('SchemaCompare.IgnoreQuotedIdentifiers', "Ignore Quoted Identifiers"); +export const IgnorePermissions: string = localize('SchemaCompare.IgnorePermissions', "Ignore Permissions"); +export const IgnorePartitionSchemes: string = localize('SchemaCompare.IgnorePartitionSchemes', "Ignore Partition Schemes"); +export const IgnoreObjectPlacementOnPartitionScheme: string = localize('SchemaCompare.IgnoreObjectPlacementOnPartitionScheme', "Ignore Object Placement On Partition Scheme"); +export const IgnoreNotForReplication: string = localize('SchemaCompare.IgnoreNotForReplication', "Ignore Not For Replication"); +export const IgnoreLoginSids: string = localize('SchemaCompare.IgnoreLoginSids', "Ignore Login Sids"); +export const IgnoreLockHintsOnIndexes: string = localize('SchemaCompare.IgnoreLockHintsOnIndexes', "Ignore Lock Hints On Indexes"); +export const IgnoreKeywordCasing: string = localize('SchemaCompare.IgnoreKeywordCasing', "Ignore Keyword Casing"); +export const IgnoreIndexPadding: string = localize('SchemaCompare.IgnoreIndexPadding', "Ignore Index Padding"); +export const IgnoreIndexOptions: string = localize('SchemaCompare.IgnoreIndexOptions', "Ignore Index Options"); +export const IgnoreIncrement: string = localize('SchemaCompare.IgnoreIncrement', "Ignore Increment"); +export const IgnoreIdentitySeed: string = localize('SchemaCompare.IgnoreIdentitySeed', "Ignore Identity Seed"); +export const IgnoreUserSettingsObjects: string = localize('SchemaCompare.IgnoreUserSettingsObjects', "Ignore User Settings Objects"); +export const IgnoreFullTextCatalogFilePath: string = localize('SchemaCompare.IgnoreFullTextCatalogFilePath', "Ignore Full Text Catalog FilePath"); +export const IgnoreWhitespace: string = localize('SchemaCompare.IgnoreWhitespace', "Ignore Whitespace"); +export const IgnoreWithNocheckOnForeignKeys: string = localize('SchemaCompare.IgnoreWithNocheckOnForeignKeys', "Ignore With Nocheck On ForeignKeys"); +export const VerifyCollationCompatibility: string = localize('SchemaCompare.VerifyCollationCompatibility', "Verify Collation Compatibility"); +export const UnmodifiableObjectWarnings: string = localize('SchemaCompare.UnmodifiableObjectWarnings', "Unmodifiable Object Warnings"); +export const TreatVerificationErrorsAsWarnings: string = localize('SchemaCompare.TreatVerificationErrorsAsWarnings', "Treat Verification Errors As Warnings"); +export const ScriptRefreshModule: string = localize('SchemaCompare.ScriptRefreshModule', "Script Refresh Module"); +export const ScriptNewConstraintValidation: string = localize('SchemaCompare.ScriptNewConstraintValidation', "Script New Constraint Validation"); +export const ScriptFileSize: string = localize('SchemaCompare.ScriptFileSize', "Script File Size"); +export const ScriptDeployStateChecks: string = localize('SchemaCompare.ScriptDeployStateChecks', "Script Deploy StateChecks"); +export const ScriptDatabaseOptions: string = localize('SchemaCompare.ScriptDatabaseOptions', "Script Database Options"); +export const ScriptDatabaseCompatibility: string = localize('SchemaCompare.ScriptDatabaseCompatibility', "Script Database Compatibility"); +export const ScriptDatabaseCollation: string = localize('SchemaCompare.ScriptDatabaseCollation', "Script Database Collation"); +export const RunDeploymentPlanExecutors: string = localize('SchemaCompare.RunDeploymentPlanExecutors', "Run Deployment Plan Executors"); +export const RegisterDataTierApplication: string = localize('SchemaCompare.RegisterDataTierApplication', "Register DataTier Application"); +export const PopulateFilesOnFileGroups: string = localize('SchemaCompare.PopulateFilesOnFileGroups', "Populate Files On File Groups"); +export const NoAlterStatementsToChangeClrTypes: string = localize('SchemaCompare.NoAlterStatementsToChangeClrTypes', "No Alter Statements To Change Clr Types"); +export const IncludeTransactionalScripts: string = localize('SchemaCompare.IncludeTransactionalScripts', "Include Transactional Scripts"); +export const IncludeCompositeObjects: string = localize('SchemaCompare.IncludeCompositeObjects', "Include Composite Objects"); +export const AllowUnsafeRowLevelSecurityDataMovement: string = localize('SchemaCompare.AllowUnsafeRowLevelSecurityDataMovement', "Allow Unsafe Row Level Security Data Movement"); +export const IgnoreWithNocheckOnCheckConstraints: string = localize('SchemaCompare.IgnoreWithNocheckOnCheckConstraints', "Ignore With No check On Check Constraints"); +export const IgnoreFillFactor: string = localize('SchemaCompare.IgnoreFillFactor', "Ignore Fill Factor"); +export const IgnoreFileSize: string = localize('SchemaCompare.IgnoreFileSize', "Ignore File Size"); +export const IgnoreFilegroupPlacement: string = localize('SchemaCompare.IgnoreFilegroupPlacement', "Ignore Filegroup Placement"); +export const DoNotAlterReplicatedObjects: string = localize('SchemaCompare.DoNotAlterReplicatedObjects', "Do Not Alter Replicated Objects"); +export const DoNotAlterChangeDataCaptureObjects: string = localize('SchemaCompare.DoNotAlterChangeDataCaptureObjects', "Do Not Alter Change Data Capture Objects"); +export const DisableAndReenableDdlTriggers: string = localize('SchemaCompare.DisableAndReenableDdlTriggers', "Disable And Reenable Ddl Triggers"); +export const DeployDatabaseInSingleUserMode: string = localize('SchemaCompare.DeployDatabaseInSingleUserMode', "Deploy Database In Single User Mode"); +export const CreateNewDatabase: string = localize('SchemaCompare.CreateNewDatabase', "Create New Database"); +export const CompareUsingTargetCollation: string = localize('SchemaCompare.CompareUsingTargetCollation', "Compare Using Target Collation"); +export const CommentOutSetVarDeclarations: string = localize('SchemaCompare.CommentOutSetVarDeclarations', "Comment Out Set Var Declarations"); +export const BlockWhenDriftDetected: string = localize('SchemaCompare.BlockWhenDriftDetected', "Block When Drift Detected"); +export const BlockOnPossibleDataLoss: string = localize('SchemaCompare.BlockOnPossibleDataLoss', "Block On Possible Data Loss"); +export const BackupDatabaseBeforeChanges: string = localize('SchemaCompare.BackupDatabaseBeforeChanges', "Backup Database Before Changes"); +export const AllowIncompatiblePlatform: string = localize('SchemaCompare.AllowIncompatiblePlatform', "Allow Incompatible Platform"); +export const AllowDropBlockingAssemblies: string = localize('SchemaCompare.AllowDropBlockingAssemblies', "Allow Drop Blocking Assemblies"); +export const DropConstraintsNotInSource: string = localize('SchemaCompare.DropConstraintsNotInSource', "Drop Constraints Not In Source"); +export const DropDmlTriggersNotInSource: string = localize('SchemaCompare.DropDmlTriggersNotInSource', "Drop Dml Triggers Not In Source"); +export const DropExtendedPropertiesNotInSource: string = localize('SchemaCompare.DropExtendedPropertiesNotInSource', "Drop Extended Properties Not In Source"); +export const DropIndexesNotInSource: string = localize('SchemaCompare.DropIndexesNotInSource', "Drop Indexes Not In Source"); +export const IgnoreFileAndLogFilePath: string = localize('SchemaCompare.IgnoreFileAndLogFilePath', "Ignore File And Log File Path"); +export const IgnoreExtendedProperties: string = localize('SchemaCompare.IgnoreExtendedProperties', "Ignore Extended Properties"); +export const IgnoreDmlTriggerState: string = localize('SchemaCompare.IgnoreDmlTriggerState', "Ignore Dml Trigger State"); +export const IgnoreDmlTriggerOrder: string = localize('SchemaCompare.IgnoreDmlTriggerOrder', "Ignore Dml Trigger Order"); +export const IgnoreDefaultSchema: string = localize('SchemaCompare.IgnoreDefaultSchema', "Ignore Default Schema"); +export const IgnoreDdlTriggerState: string = localize('SchemaCompare.IgnoreDdlTriggerState', "Ignore Ddl Trigger State"); +export const IgnoreDdlTriggerOrder: string = localize('SchemaCompare.IgnoreDdlTriggerOrder', "Ignore Ddl Trigger Order"); +export const IgnoreCryptographicProviderFilePath: string = localize('SchemaCompare.IgnoreCryptographicProviderFilePath', "Ignore Cryptographic Provider FilePath"); +export const VerifyDeployment: string = localize('SchemaCompare.VerifyDeployment', "Verify Deployment"); +export const IgnoreComments: string = localize('SchemaCompare.IgnoreComments', "Ignore Comments"); +export const IgnoreColumnCollation: string = localize('SchemaCompare.IgnoreColumnCollation', "Ignore Column Collation"); +export const IgnoreAuthorizer: string = localize('SchemaCompare.IgnoreAuthorizer', "Ignore Authorizer"); +export const IgnoreAnsiNulls: string = localize('SchemaCompare.IgnoreAnsiNulls', "Ignore AnsiNulls"); +export const GenerateSmartDefaults: string = localize('SchemaCompare.GenerateSmartDefaults', "Generate SmartDefaults"); +export const DropStatisticsNotInSource: string = localize('SchemaCompare.DropStatisticsNotInSource', "Drop Statistics Not In Source"); +export const DropRoleMembersNotInSource: string = localize('SchemaCompare.DropRoleMembersNotInSource', "Drop Role Members Not In Source"); +export const DropPermissionsNotInSource: string = localize('SchemaCompare.DropPermissionsNotInSource', "Drop Permissions Not In Source"); +export const DropObjectsNotInSource: string = localize('SchemaCompare.DropObjectsNotInSource', "Drop Objects Not In Source"); +export const IgnoreColumnOrder: string = localize('SchemaCompare.IgnoreColumnOrder', "Ignore Column Order"); + +// object types +export const Aggregates: string = localize('SchemaCompare.Aggregates', "Aggregates"); +export const ApplicationRoles: string = localize('SchemaCompare.ApplicationRoles', "Application Roles"); +export const Assemblies: string = localize('SchemaCompare.Assemblies', "Assemblies"); +export const AssemblyFiles: string = localize('SchemaCompare.AssemblyFiles', "Assembly Files"); +export const AsymmetricKeys: string = localize('SchemaCompare.AsymmetricKeys', "Asymmetric Keys"); +export const BrokerPriorities: string = localize('SchemaCompare.BrokerPriorities', "Broker Priorities"); +export const Certificates: string = localize('SchemaCompare.Certificates', "Certificates"); +export const ColumnEncryptionKeys: string = localize('SchemaCompare.ColumnEncryptionKeys', "Column Encryption Keys"); +export const ColumnMasterKeys: string = localize('SchemaCompare.ColumnMasterKeys', "Column Master Keys"); +export const Contracts: string = localize('SchemaCompare.Contracts', "Contracts"); +export const DatabaseOptions: string = localize('SchemaCompare.DatabaseOptions', "Database Options"); +export const DatabaseRoles: string = localize('SchemaCompare.DatabaseRoles', "Database Roles"); +export const DatabaseTriggers: string = localize('SchemaCompare.DatabaseTriggers', "DatabaseTriggers"); +export const Defaults: string = localize('SchemaCompare.Defaults', "Defaults"); +export const ExtendedProperties: string = localize('SchemaCompare.ExtendedProperties', "Extended Properties"); +export const ExternalDataSources: string = localize('SchemaCompare.ExternalDataSources', "External Data Sources"); +export const ExternalFileFormats: string = localize('SchemaCompare.ExternalFileFormats', "External File Formats"); +export const ExternalTables: string = localize('SchemaCompare.ExternalTables', "External Tables"); +export const Filegroups: string = localize('SchemaCompare.Filegroups', "Filegroups"); +export const Files: string = localize('SchemaCompare.Files', "Files"); +export const FileTables: string = localize('SchemaCompare.FileTables', "File Tables"); +export const FullTextCatalogs: string = localize('SchemaCompare.FullTextCatalogs', "Full Text Catalogs"); +export const FullTextStoplists: string = localize('SchemaCompare.FullTextStoplists', "Full Text Stoplists"); +export const MessageTypes: string = localize('SchemaCompare.MessageTypes', "Message Types"); +export const PartitionFunctions: string = localize('SchemaCompare.PartitionFunctions', "Partition Functions"); +export const PartitionSchemes: string = localize('SchemaCompare.PartitionSchemes', "Partition Schemes"); +export const Permissions: string = localize('SchemaCompare.Permissions', "Permissions"); +export const Queues: string = localize('SchemaCompare.Queues', "Queues"); +export const RemoteServiceBindings: string = localize('SchemaCompare.RemoteServiceBindings', "Remote Service Bindings"); +export const RoleMembership: string = localize('SchemaCompare.RoleMembership', "Role Membership"); +export const Rules: string = localize('SchemaCompare.Rules', "Rules"); +export const ScalarValuedFunctions: string = localize('SchemaCompare.ScalarValuedFunctions', "Scalar Valued Functions"); +export const SearchPropertyLists: string = localize('SchemaCompare.SearchPropertyLists', "Search Property Lists"); +export const SecurityPolicies: string = localize('SchemaCompare.SecurityPolicies', "Security Policies"); +export const Sequences: string = localize('SchemaCompare.Sequences', "Sequences"); +export const Services: string = localize('SchemaCompare.Services', "Services"); +export const Signatures: string = localize('SchemaCompare.Signatures', "Signatures"); +export const StoredProcedures: string = localize('SchemaCompare.StoredProcedures', "StoredProcedures"); +export const SymmetricKeys: string = localize('SchemaCompare.SymmetricKeys', "SymmetricKeys"); +export const Synonyms: string = localize('SchemaCompare.Synonyms', "Synonyms"); +export const Tables: string = localize('SchemaCompare.Tables', "Tables"); +export const TableValuedFunctions: string = localize('SchemaCompare.TableValuedFunctions', "Table Valued Functions"); +export const UserDefinedDataTypes: string = localize('SchemaCompare.UserDefinedDataTypes', "User Defined Data Types"); +export const UserDefinedTableTypes: string = localize('SchemaCompare.UserDefinedTableTypes', "User Defined Table Types"); +export const ClrUserDefinedTypes: string = localize('SchemaCompare.ClrUserDefinedTypes', "Clr User Defined Types"); +export const Users: string = localize('SchemaCompare.Users', "Users"); +export const Views: string = localize('SchemaCompare.Views', "Views"); +export const XmlSchemaCollections: string = localize('SchemaCompare.XmlSchemaCollections', "Xml Schema Collections"); +export const Audits: string = localize('SchemaCompare.Audits', "Audits"); +export const Credentials: string = localize('SchemaCompare.Credentials', "Credentials"); +export const CryptographicProviders: string = localize('SchemaCompare.CryptographicProviders', "Cryptographic Providers"); +export const DatabaseAuditSpecifications: string = localize('SchemaCompare.DatabaseAuditSpecifications', "Database Audit Specifications"); +export const DatabaseEncryptionKeys: string = localize('SchemaCompare.DatabaseEncryptionKeys', "Database Encryption Keys"); +export const DatabaseScopedCredentials: string = localize('SchemaCompare.DatabaseScopedCredentials', "Database Scoped Credentials"); +export const Endpoints: string = localize('SchemaCompare.Endpoints', "Endpoints"); +export const ErrorMessages: string = localize('SchemaCompare.ErrorMessages', "Error Messages"); +export const EventNotifications: string = localize('SchemaCompare.EventNotifications', "Event Notifications"); +export const EventSessions: string = localize('SchemaCompare.EventSessions', "Event Sessions"); +export const LinkedServerLogins: string = localize('SchemaCompare.LinkedServerLogins', "Linked Server Logins"); +export const LinkedServers: string = localize('SchemaCompare.LinkedServers', "Linked Servers"); +export const Logins: string = localize('SchemaCompare.Logins', "Logins"); +export const MasterKeys: string = localize('SchemaCompare.MasterKeys', "Master Keys"); +export const Routes: string = localize('SchemaCompare.Routes', "Routes"); +export const ServerAuditSpecifications: string = localize('SchemaCompare.ServerAuditSpecifications', "Server Audit Specifications"); +export const ServerRoleMembership: string = localize('SchemaCompare.ServerRoleMembership', "Server Role Membership"); +export const ServerRoles: string = localize('SchemaCompare.ServerRoles', "Server Roles"); +export const ServerTriggers: string = localize('SchemaCompare.ServerTriggers', "Server Triggers"); + +// options descriptions +export const descriptionIgnoreTableOptions: string = localize('SchemaCompare.Description.IgnoreTableOptions', "Specifies whether differences in the table options will be ignored or updated when you publish to a database."); +export const descriptionIgnoreSemicolonBetweenStatements: string = localize('SchemaCompare.Description.IgnoreSemicolonBetweenStatements', "Specifies whether differences in the semi-colons between T-SQL statements will be ignored or updated when you publish to a database."); +export const descriptionIgnoreRouteLifetime: string = localize('SchemaCompare.Description.IgnoreRouteLifetime', "Specifies whether differences in the amount of time that SQL Server retains the route in the routing table should be ignored or updated when you publish to a database."); +export const descriptionIgnoreRoleMembership: string = localize('SchemaCompare.Description.IgnoreRoleMembership', "Specifies whether differences in the role membership of logins should be ignored or updated when you publish to a database."); +export const descriptionIgnoreQuotedIdentifiers: string = localize('SchemaCompare.Description.IgnoreQuotedIdentifiers', "Specifies whether differences in the quoted identifiers setting should be ignored or updated when you publish to a database."); +export const descriptionIgnorePermissions: string = localize('SchemaCompare.Description.IgnorePermissions', "Specifies whether permissions should be ignored."); +export const descriptionIgnorePartitionSchemes: string = localize('SchemaCompare.Description.IgnorePartitionSchemes', "Specifies whether differences in partition schemes and functions should be ignored or updated when you publish to a database."); +export const descriptionIgnoreObjectPlacementOnPartitionScheme: string = localize('SchemaCompare.Description.IgnoreObjectPlacementOnPartitionScheme', "Specifies whether an object\'s placement on a partition scheme should be ignored or updated when you publish to a database."); +export const descriptionIgnoreNotForReplication: string = localize('SchemaCompare.Description.IgnoreNotForReplication', "Specifies whether the not for replication settings should be ignored or updated when you publish to a database."); +export const descriptionIgnoreLoginSids: string = localize('SchemaCompare.Description.IgnoreLoginSids', "Specifies whether differences in the security identification number (SID) should be ignored or updated when you publish to a database."); +export const descriptionIgnoreLockHintsOnIndexes: string = localize('SchemaCompare.Description.IgnoreLockHintsOnIndexes', "Specifies whether differences in the lock hints on indexes should be ignored or updated when you publish to a database."); +export const descriptionIgnoreKeywordCasing: string = localize('SchemaCompare.Description.IgnoreKeywordCasing', "Specifies whether differences in the casing of keywords should be ignored or updated when you publish to a database."); +export const descriptionIgnoreIndexPadding: string = localize('SchemaCompare.Description.IgnoreIndexPadding', "Specifies whether differences in the index padding should be ignored or updated when you publish to a database."); +export const descriptionIgnoreIndexOptions: string = localize('SchemaCompare.Description.IgnoreIndexOptions', "Specifies whether differences in the index options should be ignored or updated when you publish to a database."); +export const descriptionIgnoreIncrement: string = localize('SchemaCompare.Description.IgnoreIncrement', "Specifies whether differences in the increment for an identity column should be ignored or updated when you publish to a database."); +export const descriptionIgnoreIdentitySeed: string = localize('SchemaCompare.Description.IgnoreIdentitySeed', "Specifies whether differences in the seed for an identity column should be ignored or updated when you publish updates to a database."); +export const descriptionIgnoreUserSettingsObjects: string = localize('SchemaCompare.Description.IgnoreUserSettingsObjects', "Specifies whether differences in the user settings objects will be ignored or updated when you publish to a database."); +export const descriptionIgnoreFullTextCatalogFilePath: string = localize('SchemaCompare.Description.IgnoreFullTextCatalogFilePath', "Specifies whether differences in the file path for the full-text catalog should be ignored or whether a warning should be issued when you publish to a database."); +export const descriptionIgnoreWhitespace: string = localize('SchemaCompare.Description.IgnoreWhitespace', "Specifies whether differences in white space will be ignored or updated when you publish to a database."); +export const descriptionIgnoreWithNocheckOnForeignKeys: string = localize('SchemaCompare.Description.IgnoreWithNocheckOnForeignKeys', "Specifies whether differences in the value of the WITH NOCHECK clause for foreign keys will be ignored or updated when you publish to a database."); +export const descriptionVerifyCollationCompatibility: string = localize('SchemaCompare.Description.VerifyCollationCompatibility', "Specifies whether collation compatibility is verified."); +export const descriptionUnmodifiableObjectWarnings: string = localize('SchemaCompare.Description.UnmodifiableObjectWarnings', "Specifies whether warnings should be generated when differences are found in objects that cannot be modified, for example, if the file size or file paths were different for a file."); +export const descriptionTreatVerificationErrorsAsWarnings: string = localize('SchemaCompare.Description.TreatVerificationErrorsAsWarnings', "Specifies whether errors encountered during publish verification should be treated as warnings. The check is performed against the generated deployment plan before the plan is executed against your target database. Plan verification detects problems such as the loss of target-only objects (such as indexes) that must be dropped to make a change. Verification will also detect situations where dependencies (such as a table or view) exist because of a reference to a composite project, but do not exist in the target database. You might choose to do this to get a complete list of all issues, instead of having the publish action stop on the first error."); +export const descriptionScriptRefreshModule: string = localize('SchemaCompare.Description.ScriptRefreshModule', "Include refresh statements at the end of the publish script."); +export const descriptionScriptNewConstraintValidation: string = localize('SchemaCompare.Description.ScriptNewConstraintValidation', "At the end of publish all of the constraints will be verified as one set, avoiding data errors caused by a check or foreign key constraint in the middle of publish. If set to False, your constraints will be published without checking the corresponding data."); +export const descriptionScriptFileSize: string = localize('SchemaCompare.Description.ScriptFileSize', "Controls whether size is specified when adding a file to a filegroup."); +export const descriptionScriptDeployStateChecks: string = localize('SchemaCompare.Description.ScriptDeployStateChecks', "Specifies whether statements are generated in the publish script to verify that the database name and server name match the names specified in the database project."); +export const descriptionScriptDatabaseOptions: string = localize('SchemaCompare.Description.ScriptDatabaseOptions', "Specifies whether target database properties should be set or updated as part of the publish action."); +export const descriptionScriptDatabaseCompatibility: string = localize('SchemaCompare.Description.ScriptDatabaseCompatibility', "Specifies whether differences in the database compatibility should be ignored or updated when you publish to a database."); +export const descriptionScriptDatabaseCollation: string = localize('SchemaCompare.Description.ScriptDatabaseCollation', "Specifies whether differences in the database collation should be ignored or updated when you publish to a database."); +export const descriptionRunDeploymentPlanExecutors: string = localize('SchemaCompare.Description.RunDeploymentPlanExecutors', "Specifies whether DeploymentPlanExecutor contributors should be run when other operations are executed."); +export const descriptionRegisterDataTierApplication: string = localize('SchemaCompare.Description.RegisterDataTierApplication', "Specifies whether the schema is registered with the database server."); +export const descriptionPopulateFilesOnFileGroups: string = localize('SchemaCompare.Description.PopulateFilesOnFileGroups', "Specifies whether a new file is also created when a new FileGroup is created in the target database."); +export const descriptionNoAlterStatementsToChangeClrTypes: string = localize('SchemaCompare.Description.NoAlterStatementsToChangeClrTypes', "Specifies that publish should always drop and re-create an assembly if there is a difference instead of issuing an ALTER ASSEMBLY statement"); +export const descriptionIncludeTransactionalScripts: string = localize('SchemaCompare.Description.IncludeTransactionalScripts', "Specifies whether transactional statements should be used where possible when you publish to a database."); +export const descriptionIncludeCompositeObjects: string = localize('SchemaCompare.Description.IncludeCompositeObjects', "Include all composite elements as part of a single publish operation."); +export const descriptionAllowUnsafeRowLevelSecurityDataMovement: string = localize('SchemaCompare.Description.AllowUnsafeRowLevelSecurityDataMovement', "Do not block data motion on a table which has Row Level Security if this property is set to true. Default is false."); +export const descriptionIgnoreWithNocheckOnCheckConstraints: string = localize('SchemaCompare.Description.IgnoreWithNocheckOnCheckConstraints', "Specifies whether differences in the value of the WITH NOCHECK clause for check constraints will be ignored or updated when you publish to a database."); +export const descriptionIgnoreFillFactor: string = localize('SchemaCompare.Description.IgnoreFillFactor', "Specifies whether differences in the fill factor for index storage should be ignored or whether a warning should be issued when you publish to a database."); +export const descriptionIgnoreFileSize: string = localize('SchemaCompare.Description.IgnoreFileSize', "Specifies whether differences in the file sizes should be ignored or whether a warning should be issued when you publish to a database."); +export const descriptionIgnoreFilegroupPlacement: string = localize('SchemaCompare.Description.IgnoreFilegroupPlacement', "Specifies whether differences in the placement of objects in FILEGROUPs should be ignored or updated when you publish to a database."); +export const descriptionDoNotAlterReplicatedObjects: string = localize('SchemaCompare.Description.DoNotAlterReplicatedObjects', "Specifies whether objects that are replicated are identified during verification."); +export const descriptionDoNotAlterChangeDataCaptureObjects: string = localize('SchemaCompare.Description.DoNotAlterChangeDataCaptureObjects', "If true, Change Data Capture objects are not altered."); +export const descriptionDisableAndReenableDdlTriggers: string = localize('SchemaCompare.Description.DisableAndReenableDdlTriggers', "Specifies whether Data Definition Language (DDL) triggers are disabled at the beginning of the publish process and re-enabled at the end of the publish action."); +export const descriptionDeployDatabaseInSingleUserMode: string = localize('SchemaCompare.Description.DeployDatabaseInSingleUserMode', "If true, the database is set to Single User Mode before deploying."); +export const descriptionCreateNewDatabase: string = localize('SchemaCompare.Description.CreateNewDatabase', "Specifies whether the target database should be updated or whether it should be dropped and re-created when you publish to a database."); +export const descriptionCompareUsingTargetCollation: string = localize('SchemaCompare.Description.CompareUsingTargetCollation', "This setting dictates how the database\'s collation is handled during deployment; by default the target database\'s collation will be updated if it does not match the collation specified by the source. When this option is set, the target database\'s (or server\'s) collation should be used."); +export const descriptionCommentOutSetVarDeclarations: string = localize('SchemaCompare.Description.CommentOutSetVarDeclarations', "Specifies whether the declaration of SETVAR variables should be commented out in the generated publish script. You might choose to do this if you plan to specify the values on the command line when you publish by using a tool such as SQLCMD.EXE."); +export const descriptionBlockWhenDriftDetected: string = localize('SchemaCompare.Description.BlockWhenDriftDetected', "Specifies whether to block updating a database whose schema no longer matches its registration or is unregistered."); +export const descriptionBlockOnPossibleDataLoss: string = localize('SchemaCompare.Description.BlockOnPossibleDataLoss', "Specifies that the publish episode should be terminated if there is a possibility of data loss resulting from the publish operation."); +export const descriptionBackupDatabaseBeforeChanges: string = localize('SchemaCompare.Description.BackupDatabaseBeforeChanges', "Backups the database before deploying any changes."); +export const descriptionAllowIncompatiblePlatform: string = localize('SchemaCompare.Description.AllowIncompatiblePlatform', "Specifies whether to attempt the action despite incompatible SQL Server platforms."); +export const descriptionAllowDropBlockingAssemblies: string = localize('SchemaCompare.Description.AllowDropBlockingAssemblies', "This property is used by SqlClr deployment to cause any blocking assemblies to be dropped as part of the deployment plan. By default, any blocking/referencing assemblies will block an assembly update if the referencing assembly needs to be dropped."); +export const descriptionDropConstraintsNotInSource: string = localize('SchemaCompare.Description.DropConstraintsNotInSource', "Specifies whether constraints that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); +export const descriptionDropDmlTriggersNotInSource: string = localize('SchemaCompare.Description.DropDmlTriggersNotInSource', "Specifies whether DML triggers that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); +export const descriptionDropExtendedPropertiesNotInSource: string = localize('SchemaCompare.Description.DropExtendedPropertiesNotInSource', "Specifies whether extended properties that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); +export const descriptionDropIndexesNotInSource: string = localize('SchemaCompare.Description.DropIndexesNotInSource', "Specifies whether indexes that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); +export const descriptionIgnoreFileAndLogFilePath: string = localize('SchemaCompare.Description.IgnoreFileAndLogFilePath', "Specifies whether differences in the paths for files and log files should be ignored or updated when you publish to a database."); +export const descriptionIgnoreExtendedProperties: string = localize('SchemaCompare.Description.IgnoreExtendedProperties', "Specifies whether extended properties should be ignored."); +export const descriptionIgnoreDmlTriggerState: string = localize('SchemaCompare.Description.IgnoreDmlTriggerState', "Specifies whether differences in the enabled or disabled state of DML triggers should be ignored or updated when you publish to a database."); +export const descriptionIgnoreDmlTriggerOrder: string = localize('SchemaCompare.Description.IgnoreDmlTriggerOrder', "Specifies whether differences in the order of Data Manipulation Language (DML) triggers should be ignored or updated when you publish to a database."); +export const descriptionIgnoreDefaultSchema: string = localize('SchemaCompare.Description.IgnoreDefaultSchema', "Specifies whether differences in the default schema should be ignored or updated when you publish to a database."); +export const descriptionIgnoreDdlTriggerState: string = localize('SchemaCompare.Description.IgnoreDdlTriggerState', "Specifies whether differences in the enabled or disabled state of Data Definition Language (DDL) triggers should be ignored or updated when you publish to a database."); +export const descriptionIgnoreDdlTriggerOrder: string = localize('SchemaCompare.Description.IgnoreDdlTriggerOrder', "Specifies whether differences in the order of Data Definition Language (DDL) triggers should be ignored or updated when you publish to a database or server."); +export const descriptionIgnoreCryptographicProviderFilePath: string = localize('SchemaCompare.Description.IgnoreCryptographicProviderFilePath', "Specifies whether differences in the file path for the cryptographic provider should be ignored or updated when you publish to a database."); +export const descriptionVerifyDeployment: string = localize('SchemaCompare.Description.VerifyDeployment', "Specifies whether checks should be performed before publishing that will stop the publish action if issues are present that might block successful publishing. For example, your publish action might stop if you have foreign keys on the target database that do not exist in the database project, and that will cause errors when you publish."); +export const descriptionIgnoreComments: string = localize('SchemaCompare.Description.IgnoreComments', "Specifies whether differences in the comments should be ignored or updated when you publish to a database."); +export const descriptionIgnoreColumnCollation: string = localize('SchemaCompare.Description.IgnoreColumnCollation', "Specifies whether differences in the column collations should be ignored or updated when you publish to a database."); +export const descriptionIgnoreAuthorizer: string = localize('SchemaCompare.Description.IgnoreAuthorizer', "Specifies whether differences in the Authorizer should be ignored or updated when you publish to a database."); +export const descriptionIgnoreAnsiNulls: string = localize('SchemaCompare.Description.IgnoreAnsiNulls', "Specifies whether differences in the ANSI NULLS setting should be ignored or updated when you publish to a database."); +export const descriptionGenerateSmartDefaults: string = localize('SchemaCompare.Description.GenerateSmartDefaults', "Automatically provides a default value when updating a table that contains data with a column that does not allow null values."); +export const descriptionDropStatisticsNotInSource: string = localize('SchemaCompare.Description.DropStatisticsNotInSource', "Specifies whether statistics that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); +export const descriptionDropRoleMembersNotInSource: string = localize('SchemaCompare.Description.DropRoleMembersNotInSource', "Specifies whether role members that are not defined in the database snapshot (.dacpac) file will be dropped from the target database when you publish updates to a database.(); - this.SchemaCompareActionMap[mssql.SchemaUpdateAction.Delete] = localize('schemaCompare.deleteAction', "Delete"); - this.SchemaCompareActionMap[mssql.SchemaUpdateAction.Change] = localize('schemaCompare.changeAction', "Change"); - this.SchemaCompareActionMap[mssql.SchemaUpdateAction.Add] = localize('schemaCompare.addAction', "Add"); + this.SchemaCompareActionMap[mssql.SchemaUpdateAction.Delete] = loc.deleteAction; + this.SchemaCompareActionMap[mssql.SchemaUpdateAction.Change] = loc.changeAction; + this.SchemaCompareActionMap[mssql.SchemaUpdateAction.Add] = loc.addAction; - this.editor = azdata.workspace.createModelViewEditor(localize('schemaCompare.Title', "Schema Compare"), { retainContextWhenHidden: true, supportsSave: true, resourceName: schemaCompareResourceName }); + this.editor = azdata.workspace.createModelViewEditor(loc.SchemaCompareLabel, { retainContextWhenHidden: true, supportsSave: true, resourceName: schemaCompareResourceName }); } public async start(context: any) { @@ -107,14 +96,14 @@ export class SchemaCompareMainWindow { this.editor.registerContent(async view => { this.differencesTable = view.modelBuilder.table().withProperties({ data: [], - title: localize('schemaCompare.differencesTableTitle', "Comparison between Source and Target") + title: loc.differencesTableTitle }).component(); this.diffEditor = view.modelBuilder.diffeditor().withProperties({ contentLeft: os.EOL, contentRight: os.EOL, height: 500, - title: diffEditorTitle + title: loc.diffEditorTitle }).component(); this.splitView = view.modelBuilder.splitViewContainer().component(); @@ -164,17 +153,17 @@ export class SchemaCompareMainWindow { }]); let sourceLabel = view.modelBuilder.text().withProperties({ - value: localize('schemaCompare.sourceLabel', "Source"), + value: loc.sourceTitle, CSSStyles: { 'margin-bottom': '0px' } }).component(); let targetLabel = view.modelBuilder.text().withProperties({ - value: localize('schemaCompare.targetLabel', "Target"), + value: loc.targetTitle, CSSStyles: { 'margin-bottom': '0px' } }).component(); let arrowLabel = view.modelBuilder.text().withProperties({ - value: localize('schemaCompare.switchLabel', "➔") + value: '➔' }).component(); this.sourceName = getEndpointName(this.sourceEndpointInfo); @@ -209,15 +198,15 @@ export class SchemaCompareMainWindow { this.loader = view.modelBuilder.loadingComponent().component(); this.waitText = view.modelBuilder.text().withProperties({ - value: localize('schemaCompare.waitText', "Initializing Comparison. This might take a moment.") + value: loc.waitText }).component(); this.startText = view.modelBuilder.text().withProperties({ - value: localize('schemaCompare.startText', "To compare two schemas, first select a source schema and target schema, then press Compare.") + value: loc.startText }).component(); this.noDifferencesLabel = view.modelBuilder.text().withProperties({ - value: localize('schemaCompare.noDifferences', "No schema differences were found.") + value: loc.noDifferencesText }).component(); this.flexModel = view.modelBuilder.flexContainer().component(); @@ -293,7 +282,7 @@ export class SchemaCompareMainWindow { .withAdditionalProperties({ operationId: this.comparisonResult.operationId }).send(); - vscode.window.showErrorMessage(localize('schemaCompare.compareErrorMessage', "Schema Compare failed: {0}", this.comparisonResult.errorMessage ? this.comparisonResult.errorMessage : 'Unknown')); + vscode.window.showErrorMessage(loc.compareErrorMessage(this.comparisonResult.errorMessage)); return; } TelemetryReporter.createActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaComparisonFinished') @@ -308,29 +297,29 @@ export class SchemaCompareMainWindow { data: data, columns: [ { - value: localize('schemaCompare.typeColumn', "Type"), + value: loc.type, cssClass: 'align-with-header', width: 50 }, { - value: localize('schemaCompare.sourceNameColumn', "Source Name"), + value: loc.sourceName, cssClass: 'align-with-header', width: 90 }, { - value: localize('schemaCompare.includeColumnName', "Include"), + value: loc.include, cssClass: 'align-with-header', width: 60, type: azdata.ColumnType.checkBox, options: { actionOnCheckbox: azdata.ActionOnCellCheckboxCheck.customAction } }, { - value: localize('schemaCompare.actionColumn', "Action"), + value: loc.action, cssClass: 'align-with-header', width: 30 }, { - value: localize('schemaCompare.targetNameColumn', "Target Name"), + value: loc.targetName, cssClass: 'align-with-header', width: 150 } @@ -363,8 +352,8 @@ export class SchemaCompareMainWindow { this.generateScriptButton.enabled = true; this.applyButton.enabled = true; } else { - this.generateScriptButton.title = localize('schemaCompare.generateScriptButtonDisabledTitle', "Generate script is enabled when the target is a database"); - this.applyButton.title = localize('schemaCompare.applyButtonDisabledTitle', "Apply is enabled when the target is a database"); + this.generateScriptButton.title = loc.generateScriptDisabled; + this.applyButton.title = loc.applyDisabled; } } else { this.flexModel.addItem(this.noDifferencesLabel, { CSSStyles: { 'margin': 'auto' } }); @@ -394,7 +383,7 @@ export class SchemaCompareMainWindow { this.diffEditor.updateProperties({ contentLeft: sourceText, contentRight: targetText, - title: diffEditorTitle + title: loc.diffEditorTitle }); } })); @@ -404,7 +393,7 @@ export class SchemaCompareMainWindow { // show an info notification the first time when trying to exclude to notify the user that it may take some time to calculate affected dependencies if (this.showIncludeExcludeWaitingMessage) { this.showIncludeExcludeWaitingMessage = false; - vscode.window.showInformationMessage(includeExcludeInfoMessage); + vscode.window.showInformationMessage(loc.includeExcludeInfoMessage); } let diff = this.comparisonResult.differences[checkboxState.row]; @@ -435,14 +424,14 @@ export class SchemaCompareMainWindow { // show the first dependent that caused this to fail in the warning message const diffEntryName = this.createName(diff.sourceValue ? diff.sourceValue : diff.targetValue); const firstDependentName = this.createName(result.blockingDependencies[0].sourceValue ? result.blockingDependencies[0].sourceValue : result.blockingDependencies[0].targetValue); - let cannotExcludeMessage; - let cannotIncludeMessage; + let cannotExcludeMessage: string; + let cannotIncludeMessage: string; if (firstDependentName) { - cannotExcludeMessage = localize('schemaCompare.cannotExcludeMessageWithDependent', "Cannot exclude {0}. Included dependents exist, such as {1}", diffEntryName, firstDependentName); - cannotIncludeMessage = localize('schemaCompare.cannotIncludeMessageWithDependent', "Cannot include {0}. Excluded dependents exist, such as {1}", diffEntryName, firstDependentName); + cannotExcludeMessage = loc.cannotExcludeMessageDependent(diffEntryName, firstDependentName); + cannotIncludeMessage = loc.cannotIncludeMessageDependent(diffEntryName, firstDependentName); } else { - cannotExcludeMessage = localize('schemaCompare.cannotExcludeMessage', "Cannot exclude {0}. Included dependents exist", diffEntryName); - cannotIncludeMessage = localize('schemaCompare.cannotIncludeMessage', "Cannot include {0}. Excluded dependents exist", diffEntryName); + cannotExcludeMessage = loc.cannotExcludeMessage(diffEntryName); + cannotIncludeMessage = loc.cannotIncludeMessage(diffEntryName); } vscode.window.showWarningMessage(checkboxState.checked ? cannotIncludeMessage : cannotExcludeMessage); } else { @@ -600,7 +589,7 @@ export class SchemaCompareMainWindow { this.diffEditor.updateProperties({ contentLeft: os.EOL, contentRight: os.EOL, - title: diffEditorTitle + title: loc.diffEditorTitle }); this.differencesTable.selectedRows = null; @@ -613,12 +602,12 @@ export class SchemaCompareMainWindow { private createCompareButton(view: azdata.ModelView): void { this.compareButton = view.modelBuilder.button().withProperties({ - label: localize('schemaCompare.compareButton', "Compare"), + label: loc.compare, iconPath: { light: path.join(this.extensionContext.extensionPath, 'media', 'compare.svg'), dark: path.join(this.extensionContext.extensionPath, 'media', 'compare-inverse.svg') }, - title: localize('schemaCompare.compareButtonTitle', "Compare") + title: loc.compare }).component(); this.compareButton.onDidClick(async (click) => { @@ -628,12 +617,12 @@ export class SchemaCompareMainWindow { private createCancelButton(view: azdata.ModelView): void { this.cancelCompareButton = view.modelBuilder.button().withProperties({ - label: localize('schemaCompare.cancelCompareButton', "Stop"), + label: loc.stop, iconPath: { light: path.join(this.extensionContext.extensionPath, 'media', 'stop.svg'), dark: path.join(this.extensionContext.extensionPath, 'media', 'stop-inverse.svg') }, - title: localize('schemaCompare.cancelCompareButtonTitle', "Stop") + title: loc.stop }).component(); this.cancelCompareButton.onDidClick(async (click) => { @@ -665,8 +654,7 @@ export class SchemaCompareMainWindow { .withAdditionalProperties({ 'operationId': this.operationId }).send(); - vscode.window.showErrorMessage( - localize('schemaCompare.cancelErrorMessage', "Cancel schema compare failed: '{0}'", (result && result.errorMessage) ? result.errorMessage : 'Unknown')); + vscode.window.showErrorMessage(loc.cancelErrorMessage(result.errorMessage)); } TelemetryReporter.createActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareCancelEnded') .withAdditionalProperties({ @@ -678,7 +666,7 @@ export class SchemaCompareMainWindow { private createGenerateScriptButton(view: azdata.ModelView): void { this.generateScriptButton = view.modelBuilder.button().withProperties({ - label: localize('schemaCompare.generateScriptButton', "Generate script"), + label: loc.generateScript, iconPath: { light: path.join(this.extensionContext.extensionPath, 'media', 'generate-script.svg'), dark: path.join(this.extensionContext.extensionPath, 'media', 'generate-script-inverse.svg') @@ -698,8 +686,7 @@ export class SchemaCompareMainWindow { .withAdditionalProperties({ 'operationId': this.comparisonResult.operationId }).send(); - vscode.window.showErrorMessage( - localize('schemaCompare.generateScriptErrorMessage', "Generate script failed: '{0}'", (result && result.errorMessage) ? result.errorMessage : 'Unknown')); + vscode.window.showErrorMessage(loc.generateScriptErrorMessage(result.errorMessage)); } TelemetryReporter.createActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareGenerateScriptEnded') .withAdditionalProperties({ @@ -711,12 +698,12 @@ export class SchemaCompareMainWindow { private createOptionsButton(view: azdata.ModelView) { this.optionsButton = view.modelBuilder.button().withProperties({ - label: localize('schemaCompare.optionsButton', "Options"), + label: loc.options, iconPath: { light: path.join(this.extensionContext.extensionPath, 'media', 'options.svg'), dark: path.join(this.extensionContext.extensionPath, 'media', 'options-inverse.svg') }, - title: localize('schemaCompare.optionsButtonTitle', "Options") + title: loc.options }).component(); this.optionsButton.onDidClick(async (click) => { @@ -730,7 +717,7 @@ export class SchemaCompareMainWindow { private createApplyButton(view: azdata.ModelView) { this.applyButton = view.modelBuilder.button().withProperties({ - label: localize('schemaCompare.updateButton', "Apply"), + label: loc.apply, iconPath: { light: path.join(this.extensionContext.extensionPath, 'media', 'start.svg'), dark: path.join(this.extensionContext.extensionPath, 'media', 'start-inverse.svg') @@ -738,10 +725,10 @@ export class SchemaCompareMainWindow { }).component(); // need only yes button - since the modal dialog has a default cancel - const yesString = localize('schemaCompare.ApplyYes', "Yes"); + const yesString = loc.YesButtonText; this.applyButton.onDidClick(async (click) => { - vscode.window.showWarningMessage(applyConfirmation, { modal: true }, yesString).then(async (result) => { + vscode.window.showWarningMessage(loc.applyConfirmation, { modal: true }, yesString).then(async (result) => { if (result === yesString) { TelemetryReporter.createActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareApplyStarted') .withAdditionalProperties({ @@ -759,14 +746,13 @@ export class SchemaCompareMainWindow { .withAdditionalProperties({ 'operationId': this.comparisonResult.operationId }).send(); - vscode.window.showErrorMessage( - localize('schemaCompare.updateErrorMessage', "Schema Compare Apply failed '{0}'", result.errorMessage ? result.errorMessage : 'Unknown')); + vscode.window.showErrorMessage(loc.applyErrorMessage(result.errorMessage)); // reenable generate script and apply buttons if apply failed this.generateScriptButton.enabled = true; - this.generateScriptButton.title = generateScriptEnabledMessage; + this.generateScriptButton.title = loc.generateScriptEnabledMessage; this.applyButton.enabled = true; - this.applyButton.title = applyEnabledMessage; + this.applyButton.title = loc.applyEnabledMessage; } TelemetryReporter.createActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareApplyEnded') .withAdditionalProperties({ @@ -818,15 +804,15 @@ export class SchemaCompareMainWindow { // Set generate script and apply to false because specific values depend on result and are set separately this.generateScriptButton.enabled = false; this.applyButton.enabled = false; - this.generateScriptButton.title = generateScriptEnabledMessage; - this.applyButton.title = applyEnabledMessage; + this.generateScriptButton.title = loc.generateScriptEnabledMessage; + this.applyButton.title = loc.applyEnabledMessage; } public setButtonsForRecompare(): void { this.generateScriptButton.enabled = false; this.applyButton.enabled = false; - this.generateScriptButton.title = reCompareToRefeshMessage; - this.applyButton.title = reCompareToRefeshMessage; + this.generateScriptButton.title = loc.reCompareToRefeshMessage; + this.applyButton.title = loc.reCompareToRefeshMessage; } // reset state afer loading an scmp @@ -838,12 +824,12 @@ export class SchemaCompareMainWindow { private createSwitchButton(view: azdata.ModelView): void { this.switchButton = view.modelBuilder.button().withProperties({ - label: localize('schemaCompare.switchDirectionButton', "Switch direction"), + label: loc.switchDirection, iconPath: { light: path.join(this.extensionContext.extensionPath, 'media', 'switch-directions.svg'), dark: path.join(this.extensionContext.extensionPath, 'media', 'switch-directions-inverse.svg') }, - title: localize('schemaCompare.switchButtonTitle', "Switch source and target") + title: loc.switchDirectionDescription }).component(); this.switchButton.onDidClick(async (click) => { @@ -885,8 +871,8 @@ export class SchemaCompareMainWindow { private createSourceAndTargetButtons(view: azdata.ModelView): void { this.selectSourceButton = view.modelBuilder.button().withProperties({ label: '•••', - title: localize('schemaCompare.sourceButtonTitle', "Select Source"), - ariaLabel: localize('schemaCompare.sourceButtonTitle', "Select Source") + title: loc.selectSource, + ariaLabel: loc.selectSource }).component(); this.selectSourceButton.onDidClick(() => { @@ -897,8 +883,8 @@ export class SchemaCompareMainWindow { this.selectTargetButton = view.modelBuilder.button().withProperties({ label: '•••', - title: localize('schemaCompare.targetButtonTitle', "Select Target"), - ariaLabel: localize('schemaCompare.targetButtonTitle', "Select Target") + title: loc.selectTarget, + ariaLabel: loc.selectTarget }).component(); this.selectTargetButton.onDidClick(() => { @@ -910,12 +896,12 @@ export class SchemaCompareMainWindow { private createOpenScmpButton(view: azdata.ModelView) { this.openScmpButton = view.modelBuilder.button().withProperties({ - label: localize('schemaCompare.openScmpButton', "Open .scmp file"), + label: loc.openScmp, iconPath: { light: path.join(this.extensionContext.extensionPath, 'media', 'open-scmp.svg'), dark: path.join(this.extensionContext.extensionPath, 'media', 'open-scmp-inverse.svg') }, - title: localize('schemaCompare.openScmpButtonTitle', "Load source, target, and options saved in an .scmp file") + title: loc.openScmpDescription }).component(); this.openScmpButton.onDidClick(async (click) => { @@ -927,7 +913,7 @@ export class SchemaCompareMainWindow { canSelectFolders: false, canSelectMany: false, defaultUri: vscode.Uri.file(rootPath), - openLabel: localize('schemaCompare.openFile', "Open"), + openLabel: loc.open, filters: { 'scmp Files': ['scmp'], } @@ -944,13 +930,12 @@ export class SchemaCompareMainWindow { const result = await service.schemaCompareOpenScmp(fileUri.fsPath); if (!result || !result.success) { TelemetryReporter.sendErrorEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareOpenScmpFailed', undefined, getTelemetryErrorType(result.errorMessage)); - vscode.window.showErrorMessage( - localize('schemaCompare.openScmpErrorMessage', "Open scmp failed: '{0}'", (result && result.errorMessage) ? result.errorMessage : 'Unknown')); + vscode.window.showErrorMessage(loc.openScmpErrorMessage(result.errorMessage)); return; } - this.sourceEndpointInfo = await this.constructEndpointInfo(result.sourceEndpointInfo, sourceTitle); - this.targetEndpointInfo = await this.constructEndpointInfo(result.targetEndpointInfo, targetTitle); + this.sourceEndpointInfo = await this.constructEndpointInfo(result.sourceEndpointInfo, loc.sourceTitle); + this.targetEndpointInfo = await this.constructEndpointInfo(result.targetEndpointInfo, loc.targetTitle); this.updateSourceAndTarget(); this.setDeploymentOptions(result.deploymentOptions); @@ -995,12 +980,12 @@ export class SchemaCompareMainWindow { private createSaveScmpButton(view: azdata.ModelView): void { this.saveScmpButton = view.modelBuilder.button().withProperties({ - label: localize('schemaCompare.saveScmpButton', "Save .scmp file"), + label: loc.saveScmp, iconPath: { light: path.join(this.extensionContext.extensionPath, 'media', 'save-scmp.svg'), dark: path.join(this.extensionContext.extensionPath, 'media', 'save-scmp-inverse.svg') }, - title: localize('schemaCompare.saveScmpButtonTitle', "Save source and target, options, and excluded elements"), + title: loc.saveScmpDescription, enabled: false }).component(); @@ -1009,7 +994,7 @@ export class SchemaCompareMainWindow { const filePath = await vscode.window.showSaveDialog( { defaultUri: vscode.Uri.file(rootPath), - saveLabel: localize('schemaCompare.saveFile', "Save"), + saveLabel: loc.save, filters: { 'scmp Files': ['scmp'], } @@ -1033,8 +1018,7 @@ export class SchemaCompareMainWindow { .withAdditionalProperties({ operationId: this.comparisonResult.operationId }).send(); - vscode.window.showErrorMessage( - localize('schemaCompare.saveScmpErrorMessage', "Save scmp failed: '{0}'", (result && result.errorMessage) ? result.errorMessage : 'Unknown')); + vscode.window.showErrorMessage(loc.saveScmpErrorMessage(result.errorMessage)); } TelemetryReporter.createActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareSaveScmpEnded') .withAdditionalProperties({ @@ -1064,8 +1048,8 @@ export class SchemaCompareMainWindow { if (this.targetEndpointInfo.endpointType === mssql.SchemaCompareEndpointType.Database) { this.applyButton.enabled = enableButtons; this.generateScriptButton.enabled = enableButtons; - this.applyButton.title = enableButtons ? applyEnabledMessage : applyNoChangesMessage; - this.generateScriptButton.title = enableButtons ? generateScriptEnabledMessage : generateScriptNoChangesMessage; + this.applyButton.title = enableButtons ? loc.applyEnabledMessage : loc.applyNoChangesMessage; + this.generateScriptButton.title = enableButtons ? loc.generateScriptEnabledMessage : loc.generateScriptNoChangesMessage; } } diff --git a/extensions/schema-compare/src/utils.ts b/extensions/schema-compare/src/utils.ts index f162354352..a1733e3e24 100644 --- a/extensions/schema-compare/src/utils.ts +++ b/extensions/schema-compare/src/utils.ts @@ -3,12 +3,11 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as nls from 'vscode-nls'; import * as azdata from 'azdata'; import * as vscode from 'vscode'; import * as mssql from '../../mssql'; import * as os from 'os'; -const localize = nls.loadMessageBundle(); +import * as loc from './localizedConstants'; export interface IPackageInfo { name: string; @@ -102,12 +101,10 @@ export async function verifyConnectionAndGetOwnerUri(endpoint: mssql.SchemaCompa || connection.options.database.toLowerCase() === 'master'))); if (userConnection === undefined) { - const getConnectionString = localize('schemaCompare.GetConnectionString', "Do you want to connect to {0}?", caller); + const getConnectionString = loc.getConnectionString(caller); // need only yes button - since the modal dialog has a default cancel - const yesString = localize('schemaCompare.ApplyYes', "Yes"); - - let result = await vscode.window.showWarningMessage(getConnectionString, { modal: true }, yesString); - if (result === yesString) { + let result = await vscode.window.showWarningMessage(getConnectionString, { modal: true }, loc.YesButtonText); + if (result === loc.YesButtonText) { userConnection = await azdata.connection.openConnectionDialog(undefined, connectionProfile); } }