mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Move dacpac and schema compare localized strings (#9107)
* move localized strings * move schema compare localized strings
This commit is contained in:
@@ -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<boolean> {
|
||||
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,
|
||||
|
||||
@@ -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<boolean> {
|
||||
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<azdata.FormComponent> {
|
||||
const targetDatabaseTitle = localize('dacFx.targetDatabaseDropdownTitle', "Database Name");
|
||||
const targetDatabaseTitle = loc.databaseName;
|
||||
this.databaseDropdown = this.view.modelBuilder.dropDown().withProperties({
|
||||
ariaLabel: targetDatabaseTitle
|
||||
}).component();
|
||||
|
||||
@@ -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<azdata.FormComponent> {
|
||||
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;
|
||||
|
||||
@@ -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]
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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<azdata.FormComponent> {
|
||||
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,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<boolean> {
|
||||
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]
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user