Centralizes localized category string (#19857)

This commit is contained in:
Lewis Sanchez
2022-06-28 16:58:09 -07:00
committed by GitHub
parent b01642aec1
commit 811aa18862
3 changed files with 8 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions';
import { localize } from 'vs/nls';
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { CATEGORIES } from 'sql/workbench/contrib/query/browser/queryActions';
// Execution Plan editor registration
@@ -101,7 +102,7 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
value: localize('executionPlanCompareCommandValue', "Compare execution plans"),
original: localize('executionPlanCompareCommandOriginalValue', "Compare execution plans")
},
category: localize('ExecutionPlan', 'Execution Plan')
category: CATEGORIES.ExecutionPlan.value
}
});

View File

@@ -34,7 +34,7 @@ import { FileQueryEditorInput } from 'sql/workbench/contrib/query/browser/fileQu
import { FileQueryEditorSerializer, QueryEditorLanguageAssociation, UntitledQueryEditorSerializer } from 'sql/workbench/contrib/query/browser/queryEditorFactory';
import { UntitledQueryEditorInput } from 'sql/base/query/browser/untitledQueryEditorInput';
import { ILanguageAssociationRegistry, Extensions as LanguageAssociationExtensions } from 'sql/workbench/services/languageAssociation/common/languageAssociation';
import { NewQueryTask, OE_NEW_QUERY_ACTION_ID, DE_NEW_QUERY_COMMAND_ID } from 'sql/workbench/contrib/query/browser/queryActions';
import { NewQueryTask, OE_NEW_QUERY_ACTION_ID, DE_NEW_QUERY_COMMAND_ID, CATEGORIES } from 'sql/workbench/contrib/query/browser/queryActions';
import { TreeNodeContextKey } from 'sql/workbench/services/objectExplorer/common/treeNodeContextKey';
import { MssqlNodeContext } from 'sql/workbench/services/objectExplorer/browser/mssqlNodeContext';
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
@@ -143,7 +143,7 @@ actionRegistry.registerWorkbenchAction(
{ primary: KeyMod.CtrlCmd | KeyCode.KEY_L }
),
EstimatedExecutionPlanKeyboardAction.LABEL,
localize('ExecutionPlan', 'Execution Plan')
CATEGORIES.ExecutionPlan.value
);
actionRegistry.registerWorkbenchAction(

View File

@@ -893,3 +893,7 @@ export class ExportAsNotebookAction extends QueryTaskbarAction {
this._commandService.executeCommand('mssql.exportSqlAsNotebook', this.editor.input.uri);
}
}
export const CATEGORIES = {
ExecutionPlan: { value: nls.localize('ExecutionPlan', 'Execution Plan'), original: 'Execution Plan' }
};