diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index dfaef3ea7e4..330f1227a89 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -26,7 +26,7 @@ import { URI } from 'vs/base/common/uri'; import { isWindows } from 'vs/base/common/platform'; import { withNullAsUndefined } from 'vs/base/common/types'; import { ITerminalInstance, ITerminalService, Direction } from 'vs/workbench/contrib/terminal/browser/terminal'; -import { Action2, registerAction2 } from 'vs/platform/actions/common/actions'; +import { Action2, registerAction2, ILocalizedString } from 'vs/platform/actions/common/actions'; import { TerminalQuickAccessProvider } from 'vs/workbench/contrib/terminal/browser/terminalQuickAccess'; import { ToggleViewAction } from 'vs/workbench/browser/actions/layoutActions'; import { IViewsService, IViewDescriptorService } from 'vs/workbench/common/views'; @@ -393,13 +393,13 @@ export class ClearTerminalAction extends Action { } export function registerTerminalActions() { - const category = TERMINAL_ACTION_CATEGORY; + const category: ILocalizedString = { value: TERMINAL_ACTION_CATEGORY, original: 'Terminal' }; registerAction2(class extends Action2 { constructor() { super({ id: TERMINAL_COMMAND_ID.NEW_IN_ACTIVE_WORKSPACE, - title: localize('workbench.action.terminal.newInActiveWorkspace', "Create New Integrated Terminal (In Active Workspace)"), + title: { value: localize('workbench.action.terminal.newInActiveWorkspace', "Create New Integrated Terminal (In Active Workspace)"), original: 'Create New Integrated Terminal (In Active Workspace)' }, f1: true, category }); @@ -418,7 +418,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.FOCUS_PREVIOUS_PANE, - title: localize('workbench.action.terminal.focusPreviousPane', "Focus Previous Pane"), + title: { value: localize('workbench.action.terminal.focusPreviousPane', "Focus Previous Pane"), original: 'Focus Previous Pane' }, f1: true, category, keybinding: { @@ -443,7 +443,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.FOCUS_NEXT_PANE, - title: localize('workbench.action.terminal.focusNextPane', "Focus Next Pane"), + title: { value: localize('workbench.action.terminal.focusNextPane', "Focus Next Pane"), original: 'Focus Next Pane' }, f1: true, category, keybinding: { @@ -468,7 +468,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.RESIZE_PANE_LEFT, - title: localize('workbench.action.terminal.resizePaneLeft', "Resize Pane Left"), + title: { value: localize('workbench.action.terminal.resizePaneLeft', "Resize Pane Left"), original: 'Resize Pane Left' }, f1: true, category, keybinding: { @@ -487,7 +487,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.RESIZE_PANE_RIGHT, - title: localize('workbench.action.terminal.resizePaneRight', "Resize Pane Right"), + title: { value: localize('workbench.action.terminal.resizePaneRight', "Resize Pane Right"), original: 'Resize Pane Right' }, f1: true, category, keybinding: { @@ -506,7 +506,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.RESIZE_PANE_UP, - title: localize('workbench.action.terminal.resizePaneUp', "Resize Pane Up"), + title: { value: localize('workbench.action.terminal.resizePaneUp', "Resize Pane Up"), original: 'Resize Pane Up' }, f1: true, category, keybinding: { @@ -524,7 +524,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.RESIZE_PANE_DOWN, - title: localize('workbench.action.terminal.resizePaneDown', "Resize Pane Down"), + title: { value: localize('workbench.action.terminal.resizePaneDown', "Resize Pane Down"), original: 'Resize Pane Down' }, f1: true, category, keybinding: { @@ -542,7 +542,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.FOCUS, - title: localize('workbench.action.terminal.focus', "Focus Terminal"), + title: { value: localize('workbench.action.terminal.focus', "Focus Terminal"), original: 'Focus Terminal' }, f1: true, category }); @@ -561,7 +561,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.FOCUS_NEXT, - title: localize('workbench.action.terminal.focusNext', "Focus Next Terminal"), + title: { value: localize('workbench.action.terminal.focusNext', "Focus Next Terminal"), original: 'Focus Next Terminal' }, f1: true, category }); @@ -576,7 +576,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.FOCUS_PREVIOUS, - title: localize('workbench.action.terminal.focusPrevious', "Focus Previous Terminal"), + title: { value: localize('workbench.action.terminal.focusPrevious', "Focus Previous Terminal"), original: 'Focus Previous Terminal' }, f1: true, category }); @@ -591,7 +591,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.RUN_SELECTED_TEXT, - title: localize('workbench.action.terminal.runSelectedText', "Run Selected Text In Active Terminal"), + title: { value: localize('workbench.action.terminal.runSelectedText', "Run Selected Text In Active Terminal"), original: 'Run Selected Text In Active Terminal' }, f1: true, category }); @@ -621,7 +621,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.RUN_ACTIVE_FILE, - title: localize('workbench.action.terminal.runActiveFile', "Run Active File In Active Terminal"), + title: { value: localize('workbench.action.terminal.runActiveFile', "Run Active File In Active Terminal"), original: 'Run Active File In Active Terminal' }, f1: true, category }); @@ -655,7 +655,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SCROLL_DOWN_LINE, - title: localize('workbench.action.terminal.scrollDown', "Scroll Down (Line)"), + title: { value: localize('workbench.action.terminal.scrollDown', "Scroll Down (Line)"), original: 'Scroll Down (Line)' }, f1: true, category, keybinding: { @@ -674,7 +674,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SCROLL_DOWN_PAGE, - title: localize('workbench.action.terminal.scrollDownPage', "Scroll Down (Page)"), + title: { value: localize('workbench.action.terminal.scrollDownPage', "Scroll Down (Page)"), original: 'Scroll Down (Page)' }, f1: true, category, keybinding: { @@ -693,7 +693,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SCROLL_TO_BOTTOM, - title: localize('workbench.action.terminal.scrollToBottom', "Scroll to Bottom"), + title: { value: localize('workbench.action.terminal.scrollToBottom', "Scroll to Bottom"), original: 'Scroll to Bottom' }, f1: true, category, keybinding: { @@ -712,7 +712,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SCROLL_UP_LINE, - title: localize('workbench.action.terminal.scrollUp', "Scroll Up (Line)"), + title: { value: localize('workbench.action.terminal.scrollUp', "Scroll Up (Line)"), original: 'Scroll Up (Line)' }, f1: true, category, keybinding: { @@ -731,7 +731,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SCROLL_UP_PAGE, - title: localize('workbench.action.terminal.scrollUpPage', "Scroll Up (Page)"), + title: { value: localize('workbench.action.terminal.scrollUpPage', "Scroll Up (Page)"), original: 'Scroll Up (Page)' }, f1: true, category, keybinding: { @@ -750,7 +750,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SCROLL_TO_TOP, - title: localize('workbench.action.terminal.scrollToTop', "Scroll to Top"), + title: { value: localize('workbench.action.terminal.scrollToTop', "Scroll to Top"), original: 'Scroll to Top' }, f1: true, category, keybinding: { @@ -769,7 +769,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.NAVIGATION_MODE_EXIT, - title: localize('workbench.action.terminal.navigationModeExit', "Exit Navigation Mode"), + title: { value: localize('workbench.action.terminal.navigationModeExit', "Exit Navigation Mode"), original: 'Exit Navigation Mode' }, f1: true, category, keybinding: { @@ -787,7 +787,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.NAVIGATION_MODE_FOCUS_PREVIOUS, - title: localize('workbench.action.terminal.navigationModeFocusPrevious', "Focus Previous Line (Navigation Mode)"), + title: { value: localize('workbench.action.terminal.navigationModeFocusPrevious', "Focus Previous Line (Navigation Mode)"), original: 'Focus Previous Line (Navigation Mode)' }, f1: true, category, keybinding: { @@ -808,7 +808,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.NAVIGATION_MODE_FOCUS_NEXT, - title: localize('workbench.action.terminal.navigationModeFocusNext', "Focus Next Line (Navigation Mode)"), + title: { value: localize('workbench.action.terminal.navigationModeFocusNext', "Focus Next Line (Navigation Mode)"), original: 'Focus Next Line (Navigation Mode)' }, f1: true, category, keybinding: { @@ -829,7 +829,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.CLEAR_SELECTION, - title: localize('workbench.action.terminal.clearSelection', "Clear Selection"), + title: { value: localize('workbench.action.terminal.clearSelection', "Clear Selection"), original: 'Clear Selection' }, f1: true, category, keybinding: { @@ -850,7 +850,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.MANAGE_WORKSPACE_SHELL_PERMISSIONS, - title: localize('workbench.action.terminal.manageWorkspaceShellPermissions', "Manage Workspace Shell Permissions"), + title: { value: localize('workbench.action.terminal.manageWorkspaceShellPermissions', "Manage Workspace Shell Permissions"), original: 'Manage Workspace Shell Permissions' }, f1: true, category }); @@ -863,7 +863,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.RENAME, - title: localize('workbench.action.terminal.rename', "Rename"), + title: { value: localize('workbench.action.terminal.rename', "Rename"), original: 'Rename' }, f1: true, category }); @@ -884,7 +884,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.FIND_FOCUS, - title: localize('workbench.action.terminal.focusFind', "Focus Find"), + title: { value: localize('workbench.action.terminal.focusFind', "Focus Find"), original: 'Focus Find' }, f1: true, category, keybinding: { @@ -902,7 +902,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.FIND_HIDE, - title: localize('workbench.action.terminal.hideFind', "Hide Find"), + title: { value: localize('workbench.action.terminal.hideFind', "Hide Find"), original: 'Hide Find' }, f1: true, category, keybinding: { @@ -921,7 +921,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.QUICK_OPEN_TERM, - title: localize('quickAccessTerminal', "Switch Active Terminal"), + title: { value: localize('quickAccessTerminal', "Switch Active Terminal"), original: 'Switch Active Terminal' }, f1: true, category }); @@ -934,7 +934,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SCROLL_TO_PREVIOUS_COMMAND, - title: localize('workbench.action.terminal.scrollToPreviousCommand', "Scroll To Previous Command"), + title: { value: localize('workbench.action.terminal.scrollToPreviousCommand', "Scroll To Previous Command"), original: 'Scroll To Previous Command' }, f1: true, category, keybinding: { @@ -955,7 +955,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SCROLL_TO_NEXT_COMMAND, - title: localize('workbench.action.terminal.scrollToNextCommand', "Scroll To Next Command"), + title: { value: localize('workbench.action.terminal.scrollToNextCommand', "Scroll To Next Command"), original: 'Scroll To Next Command' }, f1: true, category, keybinding: { @@ -976,7 +976,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SELECT_TO_PREVIOUS_COMMAND, - title: localize('workbench.action.terminal.selectToPreviousCommand', "Select To Previous Command"), + title: { value: localize('workbench.action.terminal.selectToPreviousCommand', "Select To Previous Command"), original: 'Select To Previous Command' }, f1: true, category, keybinding: { @@ -997,7 +997,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SELECT_TO_NEXT_COMMAND, - title: localize('workbench.action.terminal.selectToNextCommand', "Select To Next Command"), + title: { value: localize('workbench.action.terminal.selectToNextCommand', "Select To Next Command"), original: 'Select To Next Command' }, f1: true, category, keybinding: { @@ -1018,7 +1018,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SELECT_TO_PREVIOUS_LINE, - title: localize('workbench.action.terminal.selectToPreviousLine', "Select To Previous Line"), + title: { value: localize('workbench.action.terminal.selectToPreviousLine', "Select To Previous Line"), original: 'Select To Previous Line' }, f1: true, category }); @@ -1034,7 +1034,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SELECT_TO_NEXT_LINE, - title: localize('workbench.action.terminal.selectToNextLine', "Select To Next Line"), + title: { value: localize('workbench.action.terminal.selectToNextLine', "Select To Next Line"), original: 'Select To Next Line' }, f1: true, category }); @@ -1050,7 +1050,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.TOGGLE_ESCAPE_SEQUENCE_LOGGING, - title: localize('workbench.action.terminal.toggleEscapeSequenceLogging', "Toggle Escape Sequence Logging"), + title: { value: localize('workbench.action.terminal.toggleEscapeSequenceLogging', "Toggle Escape Sequence Logging"), original: 'Toggle Escape Sequence Logging' }, f1: true, category }); @@ -1064,7 +1064,7 @@ export function registerTerminalActions() { const title = localize('workbench.action.terminal.sendSequence', "Send Custom Sequence To Terminal"); super({ id: TERMINAL_COMMAND_ID.SEND_SEQUENCE, - title, + title: { value: title, original: 'Send Custom Sequence To Terminal' }, category, description: { description: title, @@ -1090,7 +1090,7 @@ export function registerTerminalActions() { const title = localize('workbench.action.terminal.newWithCwd', "Create New Integrated Terminal Starting in a Custom Working Directory"); super({ id: TERMINAL_COMMAND_ID.NEW_WITH_CWD, - title, + title: { value: title, original: 'Create New Integrated Terminal Starting in a Custom Working Directory' }, category, description: { description: title, @@ -1125,7 +1125,7 @@ export function registerTerminalActions() { const title = localize('workbench.action.terminal.renameWithArg', "Rename the Currently Active Terminal"); super({ id: TERMINAL_COMMAND_ID.RENAME_WITH_ARG, - title, + title: { value: title, original: 'Rename the Currently Active Terminal' }, category, description: { description: title, @@ -1159,7 +1159,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.TOGGLE_FIND_REGEX, - title: localize('workbench.action.terminal.toggleFindRegex', "Toggle Find Using Regex"), + title: { value: localize('workbench.action.terminal.toggleFindRegex', "Toggle Find Using Regex"), original: 'Toggle Find Using Regex' }, f1: true, category, keybinding: { @@ -1179,7 +1179,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.TOGGLE_FIND_WHOLE_WORD, - title: localize('workbench.action.terminal.toggleFindWholeWord', "Toggle Find Using Whole Word"), + title: { value: localize('workbench.action.terminal.toggleFindWholeWord', "Toggle Find Using Whole Word"), original: 'Toggle Find Using Whole Word' }, f1: true, category, keybinding: { @@ -1199,7 +1199,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.TOGGLE_FIND_CASE_SENSITIVE, - title: localize('workbench.action.terminal.toggleFindCaseSensitive', "Toggle Find Using Case Sensitive"), + title: { value: localize('workbench.action.terminal.toggleFindCaseSensitive', "Toggle Find Using Case Sensitive"), original: 'Toggle Find Using Case Sensitive' }, f1: true, category, keybinding: { @@ -1219,7 +1219,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.FIND_NEXT, - title: localize('workbench.action.terminal.findNext', "Find Next"), + title: { value: localize('workbench.action.terminal.findNext', "Find Next"), original: 'Find Next' }, f1: true, category, keybinding: [ @@ -1245,7 +1245,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.FIND_PREVIOUS, - title: localize('workbench.action.terminal.findPrevious', "Find Previous"), + title: { value: localize('workbench.action.terminal.findPrevious', "Find Previous"), original: 'Find Previous' }, f1: true, category, keybinding: [ @@ -1271,7 +1271,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.RELAUNCH, - title: localize('workbench.action.terminal.relaunch', "Relaunch Active Terminal"), + title: { value: localize('workbench.action.terminal.relaunch', "Relaunch Active Terminal"), original: 'Relaunch Active Terminal' }, f1: true, category }); @@ -1284,7 +1284,7 @@ export function registerTerminalActions() { constructor() { super({ id: TERMINAL_COMMAND_ID.SHOW_ENVIRONMENT_INFORMATION, - title: localize('workbench.action.terminal.showEnvironmentInformation', "Show Environment Information"), + title: { value: localize('workbench.action.terminal.showEnvironmentInformation', "Show Environment Information"), original: 'Show Environment Information' }, f1: true, category });