mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 17:23:15 -05:00
Add double quotes for localize hygiene check (#6492)
* Add localize single quote hygiene task * Update localize calls * Update comment * Fix build failures and remove test code
This commit is contained in:
@@ -24,26 +24,26 @@ Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions)
|
||||
|
||||
Registry.as<IConfigurationRegistry>(ConfigExtensions.Configuration).registerConfiguration({
|
||||
'id': 'previewFeatures',
|
||||
'title': nls.localize('previewFeatures.configTitle', 'Preview Features'),
|
||||
'title': nls.localize('previewFeatures.configTitle', "Preview Features"),
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'workbench.enablePreviewFeatures': {
|
||||
'type': 'boolean',
|
||||
'default': undefined,
|
||||
'description': nls.localize('previewFeatures.configEnable', 'Enable unreleased preview features')
|
||||
'description': nls.localize('previewFeatures.configEnable', "Enable unreleased preview features")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Registry.as<IConfigurationRegistry>(ConfigExtensions.Configuration).registerConfiguration({
|
||||
'id': 'showConnectDialogOnStartup',
|
||||
'title': nls.localize('showConnectDialogOnStartup', 'Show connect dialog on startup'),
|
||||
'title': nls.localize('showConnectDialogOnStartup', "Show connect dialog on startup"),
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'workbench.showConnectDialogOnStartup': {
|
||||
'type': 'boolean',
|
||||
'default': true,
|
||||
'description': nls.localize('showConnectDialogOnStartup', 'Show connect dialog on startup')
|
||||
'description': nls.localize('showConnectDialogOnStartup', "Show connect dialog on startup")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@ export interface ManageActionContext extends BaseActionContext {
|
||||
// --- actions
|
||||
export class NewQueryAction extends Task {
|
||||
public static ID = 'newQuery';
|
||||
public static LABEL = nls.localize('newQueryAction.newQuery', 'New Query');
|
||||
public static LABEL = nls.localize('newQueryAction.newQuery', "New Query");
|
||||
public static ICON = 'new-query';
|
||||
|
||||
constructor() {
|
||||
@@ -69,7 +69,7 @@ export class NewQueryAction extends Task {
|
||||
|
||||
export class ScriptSelectAction extends Action {
|
||||
public static ID = 'selectTop';
|
||||
public static LABEL = nls.localize('scriptSelect', 'Select Top 1000');
|
||||
public static LABEL = nls.localize('scriptSelect', "Select Top 1000");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@@ -93,7 +93,7 @@ export class ScriptSelectAction extends Action {
|
||||
|
||||
export class ScriptExecuteAction extends Action {
|
||||
public static ID = 'scriptExecute';
|
||||
public static LABEL = nls.localize('scriptExecute', 'Script as Execute');
|
||||
public static LABEL = nls.localize('scriptExecute', "Script as Execute");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@@ -120,7 +120,7 @@ export class ScriptExecuteAction extends Action {
|
||||
|
||||
export class ScriptAlterAction extends Action {
|
||||
public static ID = 'scriptAlter';
|
||||
public static LABEL = nls.localize('scriptAlter', 'Script as Alter');
|
||||
public static LABEL = nls.localize('scriptAlter', "Script as Alter");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@@ -147,7 +147,7 @@ export class ScriptAlterAction extends Action {
|
||||
|
||||
export class EditDataAction extends Action {
|
||||
public static ID = 'editData';
|
||||
public static LABEL = nls.localize('editData', 'Edit Data');
|
||||
public static LABEL = nls.localize('editData', "Edit Data");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@@ -198,7 +198,7 @@ export class ScriptCreateAction extends Action {
|
||||
|
||||
export class ScriptDeleteAction extends Action {
|
||||
public static ID = 'scriptDelete';
|
||||
public static LABEL = nls.localize('scriptDelete', 'Script as Drop');
|
||||
public static LABEL = nls.localize('scriptDelete', "Script as Drop");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@@ -227,7 +227,7 @@ export const BackupFeatureName = 'backup';
|
||||
|
||||
export class BackupAction extends Task {
|
||||
public static readonly ID = BackupFeatureName;
|
||||
public static readonly LABEL = nls.localize('backupAction.backup', 'Backup');
|
||||
public static readonly LABEL = nls.localize('backupAction.backup', "Backup");
|
||||
public static readonly ICON = BackupFeatureName;
|
||||
|
||||
constructor() {
|
||||
@@ -243,7 +243,7 @@ export class BackupAction extends Task {
|
||||
const configurationService = accessor.get<IConfigurationService>(IConfigurationService);
|
||||
const previewFeaturesEnabled: boolean = configurationService.getValue('workbench')['enablePreviewFeatures'];
|
||||
if (!previewFeaturesEnabled) {
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.isPreviewFeature', 'You must enable preview features in order to use backup'));
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.isPreviewFeature', "You must enable preview features in order to use backup"));
|
||||
}
|
||||
|
||||
const connectionManagementService = accessor.get<IConnectionManagementService>(IConnectionManagementService);
|
||||
@@ -255,11 +255,11 @@ export class BackupAction extends Task {
|
||||
if (profile) {
|
||||
const serverInfo = connectionManagementService.getServerInfo(profile.id);
|
||||
if (serverInfo && serverInfo.isCloud && profile.providerName === mssqlProviderName) {
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.commandNotSupported', 'Backup command is not supported for Azure SQL databases.'));
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.commandNotSupported', "Backup command is not supported for Azure SQL databases."));
|
||||
}
|
||||
|
||||
if (!profile.databaseName && profile.providerName === mssqlProviderName) {
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.commandNotSupportedForServer', 'Backup command is not supported in Server Context. Please select a Database and try again.'));
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('backup.commandNotSupportedForServer', "Backup command is not supported in Server Context. Please select a Database and try again."));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ export const RestoreFeatureName = 'restore';
|
||||
|
||||
export class RestoreAction extends Task {
|
||||
public static readonly ID = RestoreFeatureName;
|
||||
public static readonly LABEL = nls.localize('restoreAction.restore', 'Restore');
|
||||
public static readonly LABEL = nls.localize('restoreAction.restore', "Restore");
|
||||
public static readonly ICON = RestoreFeatureName;
|
||||
|
||||
constructor() {
|
||||
@@ -290,7 +290,7 @@ export class RestoreAction extends Task {
|
||||
const configurationService = accessor.get<IConfigurationService>(IConfigurationService);
|
||||
const previewFeaturesEnabled: boolean = configurationService.getValue('workbench')['enablePreviewFeatures'];
|
||||
if (!previewFeaturesEnabled) {
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.isPreviewFeature', 'You must enable preview features in order to use restore'));
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.isPreviewFeature', "You must enable preview features in order to use restore"));
|
||||
}
|
||||
|
||||
let connectionManagementService = accessor.get<IConnectionManagementService>(IConnectionManagementService);
|
||||
@@ -302,11 +302,11 @@ export class RestoreAction extends Task {
|
||||
if (profile) {
|
||||
const serverInfo = connectionManagementService.getServerInfo(profile.id);
|
||||
if (serverInfo && serverInfo.isCloud && profile.providerName === mssqlProviderName) {
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.commandNotSupported', 'Restore command is not supported for Azure SQL databases.'));
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.commandNotSupported', "Restore command is not supported for Azure SQL databases."));
|
||||
}
|
||||
|
||||
if (!profile.databaseName && profile.providerName === mssqlProviderName) {
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.commandNotSupportedForServer', 'Restore command is not supported in Server Context. Please select a Database and try again.'));
|
||||
return accessor.get<INotificationService>(INotificationService).info(nls.localize('restore.commandNotSupportedForServer', "Restore command is not supported in Server Context. Please select a Database and try again."));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ export class RestoreAction extends Task {
|
||||
|
||||
export class ManageAction extends Action {
|
||||
public static ID = 'manage';
|
||||
public static LABEL = nls.localize('manage', 'Manage');
|
||||
public static LABEL = nls.localize('manage', "Manage");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@@ -341,7 +341,7 @@ export class ManageAction extends Action {
|
||||
|
||||
export class InsightAction extends Action {
|
||||
public static ID = 'showInsight';
|
||||
public static LABEL = nls.localize('showDetails', 'Show Details');
|
||||
public static LABEL = nls.localize('showDetails', "Show Details");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@@ -358,7 +358,7 @@ export class InsightAction extends Action {
|
||||
|
||||
export class ConfigureDashboardAction extends Task {
|
||||
public static readonly ID = 'configureDashboard';
|
||||
public static readonly LABEL = nls.localize('configureDashboard', 'Learn How To Configure The Dashboard');
|
||||
public static readonly LABEL = nls.localize('configureDashboard', "Learn How To Configure The Dashboard");
|
||||
public static readonly ICON = 'configure-dashboard';
|
||||
private static readonly configHelpUri = 'https://aka.ms/sqldashboardconfig';
|
||||
|
||||
|
||||
@@ -69,15 +69,15 @@ export function GetScriptOperationName(operation: ScriptOperation) {
|
||||
let defaultName: string = ScriptOperation[operation];
|
||||
switch (operation) {
|
||||
case ScriptOperation.Select:
|
||||
return nls.localize('selectOperationName', 'Select');
|
||||
return nls.localize('selectOperationName', "Select");
|
||||
case ScriptOperation.Create:
|
||||
return nls.localize('createOperationName', 'Create');
|
||||
return nls.localize('createOperationName', "Create");
|
||||
case ScriptOperation.Insert:
|
||||
return nls.localize('insertOperationName', 'Insert');
|
||||
return nls.localize('insertOperationName', "Insert");
|
||||
case ScriptOperation.Update:
|
||||
return nls.localize('updateOperationName', 'Update');
|
||||
return nls.localize('updateOperationName', "Update");
|
||||
case ScriptOperation.Delete:
|
||||
return nls.localize('deleteOperationName', 'Delete');
|
||||
return nls.localize('deleteOperationName', "Delete");
|
||||
default:
|
||||
// return the raw, non-localized string name
|
||||
return defaultName;
|
||||
@@ -109,7 +109,7 @@ export function scriptSelect(connectionProfile: IConnectionProfile, metadata: az
|
||||
reject(editorError);
|
||||
});
|
||||
} else {
|
||||
let errMsg: string = nls.localize('scriptSelectNotFound', 'No script was returned when calling select script on object ');
|
||||
let errMsg: string = nls.localize('scriptSelectNotFound', "No script was returned when calling select script on object ");
|
||||
reject(errMsg.concat(metadata.metadataTypeName));
|
||||
}
|
||||
}, scriptError => {
|
||||
@@ -144,7 +144,7 @@ export function scriptEditSelect(connectionProfile: IConnectionProfile, metadata
|
||||
reject(editorError);
|
||||
});
|
||||
} else {
|
||||
let errMsg: string = nls.localize('scriptSelectNotFound', 'No script was returned when calling select script on object ');
|
||||
let errMsg: string = nls.localize('scriptSelectNotFound', "No script was returned when calling select script on object ");
|
||||
reject(errMsg.concat(metadata.metadataTypeName));
|
||||
}
|
||||
}, scriptError => {
|
||||
@@ -197,7 +197,7 @@ export function script(connectionProfile: IConnectionProfile, metadata: azdata.O
|
||||
messageDetail = operationResult.errorDetails;
|
||||
}
|
||||
if (errorMessageService) {
|
||||
let title = nls.localize('scriptingFailed', 'Scripting Failed');
|
||||
let title = nls.localize('scriptingFailed', "Scripting Failed");
|
||||
errorMessageService.showDialog(Severity.Error, title, scriptNotFoundMsg, messageDetail);
|
||||
}
|
||||
reject(scriptNotFoundMsg);
|
||||
|
||||
Reference in New Issue
Block a user