mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 17:23:45 -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:
@@ -31,15 +31,15 @@ const viewDescriptor: IJSONSchema = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {
|
||||
description: localize('vscode.extension.contributes.view.id', 'Identifier of the view. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`.'),
|
||||
description: localize('vscode.extension.contributes.view.id', "Identifier of the view. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`."),
|
||||
type: 'string'
|
||||
},
|
||||
name: {
|
||||
description: localize('vscode.extension.contributes.view.name', 'The human-readable name of the view. Will be shown'),
|
||||
description: localize('vscode.extension.contributes.view.name', "The human-readable name of the view. Will be shown"),
|
||||
type: 'string'
|
||||
},
|
||||
when: {
|
||||
description: localize('vscode.extension.contributes.view.when', 'Condition which must be true to show this view'),
|
||||
description: localize('vscode.extension.contributes.view.when', "Condition which must be true to show this view"),
|
||||
type: 'string'
|
||||
},
|
||||
}
|
||||
@@ -133,15 +133,15 @@ class DataExplorerContainerExtensionHandler implements IWorkbenchContribution {
|
||||
|
||||
for (let descriptor of viewDescriptors) {
|
||||
if (typeof descriptor.id !== 'string') {
|
||||
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'id'));
|
||||
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", "id"));
|
||||
return false;
|
||||
}
|
||||
if (typeof descriptor.name !== 'string') {
|
||||
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'name'));
|
||||
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", "name"));
|
||||
return false;
|
||||
}
|
||||
if (descriptor.when && typeof descriptor.when !== 'string') {
|
||||
collector.error(localize('optstring', "property `{0}` can be omitted or must be of type `string`", 'when'));
|
||||
collector.error(localize('optstring', "property `{0}` can be omitted or must be of type `string`", "when"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 4,
|
||||
command: {
|
||||
id: DISCONNECT_COMMAND_ID,
|
||||
title: localize('disconnect', 'Disconnect')
|
||||
title: localize('disconnect', "Disconnect")
|
||||
},
|
||||
when: ContextKeyExpr.and(NodeContextKey.IsConnected,
|
||||
new ContextKeyNotEqualsExpr('nodeType', NodeType.Folder))
|
||||
@@ -39,7 +39,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 3,
|
||||
command: {
|
||||
id: DISCONNECT_COMMAND_ID,
|
||||
title: localize('disconnect', 'Disconnect')
|
||||
title: localize('disconnect', "Disconnect")
|
||||
},
|
||||
when: ContextKeyExpr.and(NodeContextKey.IsConnected,
|
||||
MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
@@ -52,7 +52,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 2,
|
||||
command: {
|
||||
id: NEW_QUERY_COMMAND_ID,
|
||||
title: localize('newQuery', 'New Query')
|
||||
title: localize('newQuery', "New Query")
|
||||
},
|
||||
when: MssqlNodeContext.IsDatabaseOrServer
|
||||
});
|
||||
@@ -63,7 +63,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 1,
|
||||
command: {
|
||||
id: MANAGE_COMMAND_ID,
|
||||
title: localize('manage', 'Manage')
|
||||
title: localize('manage', "Manage")
|
||||
},
|
||||
when: MssqlNodeContext.IsDatabaseOrServer
|
||||
});
|
||||
@@ -75,7 +75,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 6,
|
||||
command: {
|
||||
id: REFRESH_COMMAND_ID,
|
||||
title: localize('refresh', 'Refresh')
|
||||
title: localize('refresh', "Refresh")
|
||||
},
|
||||
when: NodeContextKey.IsConnectable
|
||||
});
|
||||
@@ -87,7 +87,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 3,
|
||||
command: {
|
||||
id: NEW_NOTEBOOK_COMMAND_ID,
|
||||
title: localize('newNotebook', 'New Notebook')
|
||||
title: localize('newNotebook', "New Notebook")
|
||||
},
|
||||
when: ContextKeyExpr.and(NodeContextKey.IsConnectable,
|
||||
MssqlNodeContext.IsDatabaseOrServer,
|
||||
@@ -100,7 +100,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 7,
|
||||
command: {
|
||||
id: DATA_TIER_WIZARD_COMMAND_ID,
|
||||
title: localize('dacFx', 'Data-tier Application Wizard')
|
||||
title: localize('dacFx', "Data-tier Application Wizard")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.IsDatabaseOrServer)
|
||||
@@ -112,7 +112,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 7,
|
||||
command: {
|
||||
id: DATA_TIER_WIZARD_COMMAND_ID,
|
||||
title: localize('dacFx', 'Data-tier Application Wizard')
|
||||
title: localize('dacFx', "Data-tier Application Wizard")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.NodeType.isEqualTo(NodeType.Folder),
|
||||
@@ -125,7 +125,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 8,
|
||||
command: {
|
||||
id: PROFILER_COMMAND_ID,
|
||||
title: localize('profiler', 'Launch Profiler')
|
||||
title: localize('profiler', "Launch Profiler")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.NodeType.isEqualTo(NodeType.Server))
|
||||
@@ -137,7 +137,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 10,
|
||||
command: {
|
||||
id: IMPORT_COMMAND_ID,
|
||||
title: localize('flatFileImport', 'Import Wizard')
|
||||
title: localize('flatFileImport', "Import Wizard")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database))
|
||||
@@ -149,7 +149,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 9,
|
||||
command: {
|
||||
id: SCHEMA_COMPARE_COMMAND_ID,
|
||||
title: localize('schemaCompare', 'Schema Compare')
|
||||
title: localize('schemaCompare', "Schema Compare")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database))
|
||||
@@ -161,7 +161,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 4,
|
||||
command: {
|
||||
id: BACKUP_COMMAND_ID,
|
||||
title: localize('backup', 'Backup')
|
||||
title: localize('backup', "Backup")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database))
|
||||
@@ -173,7 +173,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 5,
|
||||
command: {
|
||||
id: RESTORE_COMMAND_ID,
|
||||
title: localize('restore', 'Restore')
|
||||
title: localize('restore', "Restore")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database))
|
||||
@@ -185,7 +185,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 11,
|
||||
command: {
|
||||
id: GENERATE_SCRIPTS_COMMAND_ID,
|
||||
title: localize('generateScripts', 'Generate Scripts...')
|
||||
title: localize('generateScripts', "Generate Scripts...")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.NodeType.isEqualTo(NodeType.Database),
|
||||
@@ -198,7 +198,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 12,
|
||||
command: {
|
||||
id: PROPERTIES_COMMAND_ID,
|
||||
title: localize('properties', 'Properties')
|
||||
title: localize('properties', "Properties")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.NodeType.isEqualTo(NodeType.Server), ContextKeyExpr.not('isCloud'),
|
||||
@@ -210,7 +210,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 12,
|
||||
command: {
|
||||
id: PROPERTIES_COMMAND_ID,
|
||||
title: localize('properties', 'Properties')
|
||||
title: localize('properties', "Properties")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.NodeProvider.isEqualTo(mssqlProviderName),
|
||||
MssqlNodeContext.IsWindows,
|
||||
@@ -225,7 +225,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 3,
|
||||
command: {
|
||||
id: SCRIPT_AS_CREATE_COMMAND_ID,
|
||||
title: localize('scriptAsCreate', 'Script as Create')
|
||||
title: localize('scriptAsCreate', "Script as Create")
|
||||
},
|
||||
when: MssqlNodeContext.CanScriptAsCreateOrDelete
|
||||
});
|
||||
@@ -236,7 +236,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 4,
|
||||
command: {
|
||||
id: SCRIPT_AS_DELETE_COMMAND_ID,
|
||||
title: localize('scriptAsDelete', 'Script as Drop')
|
||||
title: localize('scriptAsDelete', "Script as Drop")
|
||||
},
|
||||
when: MssqlNodeContext.CanScriptAsCreateOrDelete
|
||||
});
|
||||
@@ -247,7 +247,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 1,
|
||||
command: {
|
||||
id: SCRIPT_AS_SELECT_COMMAND_ID,
|
||||
title: localize('scriptAsSelect', 'Select Top 1000')
|
||||
title: localize('scriptAsSelect', "Select Top 1000")
|
||||
},
|
||||
when: MssqlNodeContext.CanScriptAsSelect
|
||||
});
|
||||
@@ -258,7 +258,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 5,
|
||||
command: {
|
||||
id: SCRIPT_AS_EXECUTE_COMMAND_ID,
|
||||
title: localize('scriptAsExecute', 'Script as Execute')
|
||||
title: localize('scriptAsExecute', "Script as Execute")
|
||||
},
|
||||
when: MssqlNodeContext.CanScriptAsExecute
|
||||
});
|
||||
@@ -269,7 +269,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 5,
|
||||
command: {
|
||||
id: SCRIPT_AS_ALTER_COMMAND_ID,
|
||||
title: localize('scriptAsAlter', 'Script as Alter')
|
||||
title: localize('scriptAsAlter', "Script as Alter")
|
||||
},
|
||||
when: MssqlNodeContext.CanScriptAsAlter
|
||||
});
|
||||
@@ -280,7 +280,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
order: 2,
|
||||
command: {
|
||||
id: EDIT_DATA_COMMAND_ID,
|
||||
title: localize('editData', 'Edit Data')
|
||||
title: localize('editData', "Edit Data")
|
||||
},
|
||||
when: MssqlNodeContext.CanEditData
|
||||
});
|
||||
Reference in New Issue
Block a user