Localize strings (#16781)

Localize all user viewable strings
This commit is contained in:
goyal-anjali
2021-08-16 10:59:40 -07:00
committed by GitHub
parent 6014b17d52
commit 1121429f5c
4 changed files with 29 additions and 19 deletions

View File

@@ -3,6 +3,8 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import * as loc from '../../constants/strings';
export class SqlAssessmentResult {
async createComponent(view: azdata.ModelView): Promise<azdata.Component> {
@@ -25,7 +27,7 @@ export class SqlAssessmentResult {
private createImpactComponent(view: azdata.ModelView): azdata.TextComponent {
const impact = view.modelBuilder.text().withProps({
title: 'Impact', // TODO localize
title: loc.IMPACT,
value: 'SQL Server allows a database to log transactions across multiple files. This databases uses multiple log files' // TODO: Get this string from the actual results
});
@@ -34,7 +36,7 @@ export class SqlAssessmentResult {
private createRecommendationComponent(view: azdata.ModelView): azdata.TextComponent {
const recommendation = view.modelBuilder.text().withProps({
title: 'Recommendation', // TODO localize
title: loc.RECOMMENDATION,
value: 'Azure SQL Managed Instance allows a single log file per database only. Please delete all but one of the log files before migrating this database.' // TODO: Get this string from the actual results
});
@@ -43,7 +45,7 @@ export class SqlAssessmentResult {
private createMoreInfoComponent(view: azdata.ModelView): azdata.TextComponent {
const moreInfo = view.modelBuilder.text().withProps({
title: 'More info', // TODO localize
title: loc.MORE_INFO,
value: '{0}',
links: [
{
@@ -60,8 +62,8 @@ export class SqlAssessmentResult {
const impactedObjects = view.modelBuilder.table().withProps({
title: 'Impacted Objects',
columns: [
'Type', // TODO localize
'Name',
loc.TYPE,
loc.NAME
],
data: [
['Database', 'AAAW2008P7'] // TODO: Get this string from the actual results

View File

@@ -4,24 +4,25 @@
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import * as loc from '../../constants/strings';
import { MigrationContext } from '../../models/migrationLocalStorage';
export class MigrationStatusDialogModel {
public statusDropdownValues: azdata.CategoryValue[] = [
{
displayName: 'Status: All',
name: AdsMigrationStatus.ALL,
displayName: loc.STATUS_ALL,
name: AdsMigrationStatus.ALL
}, {
displayName: 'Status: Ongoing',
name: AdsMigrationStatus.ONGOING,
displayName: loc.STATUS_ONGOING,
name: AdsMigrationStatus.ONGOING
}, {
displayName: 'Status: Completing',
displayName: loc.STATUS_COMPLETING,
name: AdsMigrationStatus.COMPLETING
}, {
displayName: 'Status: Succeeded',
name: AdsMigrationStatus.SUCCEEDED,
displayName: loc.STATUS_SUCCEEDED,
name: AdsMigrationStatus.SUCCEEDED
}, {
displayName: 'Status: Failed',
displayName: loc.STATUS_FAILED,
name: AdsMigrationStatus.FAILED
}
];