Skip to content

Commit

Permalink
add missing english alias for global actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Sep 3, 2016
1 parent 0357c71 commit e63da24
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ const listOutdatedActionDescriptor = new SyncActionDescriptor(ShowOutdatedExtens
actionRegistry.registerWorkbenchAction(listOutdatedActionDescriptor, 'Extensions: Show Outdated Extensions', ExtensionsLabel);

const recommendationsActionDescriptor = new SyncActionDescriptor(ShowRecommendedExtensionsAction, ShowRecommendedExtensionsAction.ID, ShowRecommendedExtensionsAction.LABEL);
actionRegistry.registerWorkbenchAction(recommendationsActionDescriptor, `Extensions: ${ ShowRecommendedExtensionsAction.LABEL }`, ExtensionsLabel);
actionRegistry.registerWorkbenchAction(recommendationsActionDescriptor, 'Extensions: Show Recommended Extensions', ExtensionsLabel);

const popularActionDescriptor = new SyncActionDescriptor(ShowPopularExtensionsAction, ShowPopularExtensionsAction.ID, ShowPopularExtensionsAction.LABEL);
actionRegistry.registerWorkbenchAction(popularActionDescriptor, `Extensions: ${ ShowPopularExtensionsAction.LABEL }`, ExtensionsLabel);
actionRegistry.registerWorkbenchAction(popularActionDescriptor, 'Extensions: Show Popular Extensions', ExtensionsLabel);

const installedActionDescriptor = new SyncActionDescriptor(ShowInstalledExtensionsAction, ShowInstalledExtensionsAction.ID, ShowInstalledExtensionsAction.LABEL);
actionRegistry.registerWorkbenchAction(installedActionDescriptor, `Extensions: ${ ShowInstalledExtensionsAction.LABEL }`, ExtensionsLabel);
actionRegistry.registerWorkbenchAction(installedActionDescriptor, 'Extensions: Show Installed Extensions', ExtensionsLabel);

const updateAllActionDescriptor = new SyncActionDescriptor(UpdateAllAction, UpdateAllAction.ID, UpdateAllAction.LABEL);
actionRegistry.registerWorkbenchAction(updateAllActionDescriptor, `Extensions: ${ UpdateAllAction.LABEL }`, ExtensionsLabel);
actionRegistry.registerWorkbenchAction(updateAllActionDescriptor, 'Extensions: Update All Extensions', ExtensionsLabel);

const openExtensionsFolderActionDescriptor = new SyncActionDescriptor(OpenExtensionsFolderAction, OpenExtensionsFolderAction.ID, OpenExtensionsFolderAction.LABEL);
actionRegistry.registerWorkbenchAction(openExtensionsFolderActionDescriptor, `Extensions: ${ OpenExtensionsFolderAction.LABEL }`, ExtensionsLabel);
actionRegistry.registerWorkbenchAction(openExtensionsFolderActionDescriptor, 'Extensions: Open Extensions Folder', ExtensionsLabel);

Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
.registerConfiguration({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,35 +126,36 @@ registerSingleton(ITerminalService, TerminalService);
));

// On mac cmd+` is reserved to cycle between windows, that's why the keybindings use WinCtrl
const category = nls.localize('terminalCategory', "Terminal");
let actionRegistry = <IWorkbenchActionRegistry>Registry.as(ActionExtensions.WorkbenchActions);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(KillTerminalAction, KillTerminalAction.ID, KillTerminalAction.LABEL), KillTerminalAction.LABEL);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(KillTerminalAction, KillTerminalAction.ID, KillTerminalAction.LABEL), 'Terminal: Kill the Active Terminal Instance', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(CopyTerminalSelectionAction, CopyTerminalSelectionAction.ID, CopyTerminalSelectionAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C,
// Don't apply to Mac since cmd+c works
mac: { primary: null }
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), CopyTerminalSelectionAction.LABEL);
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Copy Selection', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(CreateNewTerminalAction, CreateNewTerminalAction.ID, CreateNewTerminalAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKTICK,
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.US_BACKTICK }
}), CreateNewTerminalAction.LABEL);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusTerminalAction, FocusTerminalAction.ID, FocusTerminalAction.LABEL), FocusTerminalAction.LABEL);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusNextTerminalAction, FocusNextTerminalAction.ID, FocusNextTerminalAction.LABEL), KillTerminalAction.LABEL);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPreviousTerminalAction, FocusPreviousTerminalAction.ID, FocusPreviousTerminalAction.LABEL), KillTerminalAction.LABEL);
}), 'Terminal: Create New Integrated Terminal', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusTerminalAction, FocusTerminalAction.ID, FocusTerminalAction.LABEL), 'Terminal: Focus Terminal', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusNextTerminalAction, FocusNextTerminalAction.ID, FocusNextTerminalAction.LABEL), 'Terminal: Focus Next Terminal', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPreviousTerminalAction, FocusPreviousTerminalAction.ID, FocusPreviousTerminalAction.LABEL), 'Terminal: Focus Previous Terminal', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(TerminalPasteAction, TerminalPasteAction.ID, TerminalPasteAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V,
// Don't apply to Mac since cmd+v works
mac: { primary: null }
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), CopyTerminalSelectionAction.LABEL);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(RunSelectedTextInTerminalAction, RunSelectedTextInTerminalAction.ID, RunSelectedTextInTerminalAction.LABEL), RunSelectedTextInTerminalAction.LABEL);
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Paste into Active Terminal', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(RunSelectedTextInTerminalAction, RunSelectedTextInTerminalAction.ID, RunSelectedTextInTerminalAction.LABEL), 'Terminal: Run Selected Text In Active Terminal', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleTerminalAction, ToggleTerminalAction.ID, ToggleTerminalAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyCode.US_BACKTICK,
mac: { primary: KeyMod.WinCtrl | KeyCode.US_BACKTICK }
}), 'View: ' + ToggleTerminalAction.LABEL, nls.localize('viewCategory', "View"));
}), 'View: Toggle Integrated Terminal', nls.localize('viewCategory', "View"));
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ScrollDownTerminalAction, ScrollDownTerminalAction.ID, ScrollDownTerminalAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.DownArrow }
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), ScrollDownTerminalAction.LABEL);
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Scroll Down', category);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ScrollUpTerminalAction, ScrollUpTerminalAction.ID, ScrollUpTerminalAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow },
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), ScrollUpTerminalAction.LABEL);
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Scroll Up', category);
22 changes: 11 additions & 11 deletions src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ToggleTerminalAction extends Action {
export class KillTerminalAction extends Action {

public static ID = 'workbench.action.terminal.kill';
public static LABEL = nls.localize('workbench.action.terminal.kill', "Terminal: Kill the Active Terminal Instance");
public static LABEL = nls.localize('workbench.action.terminal.kill', "Kill the Active Terminal Instance");
public static PANEL_LABEL = nls.localize('workbench.action.terminal.kill.short', "Kill Terminal");

constructor(
Expand All @@ -52,7 +52,7 @@ export class KillTerminalAction extends Action {
export class CopyTerminalSelectionAction extends Action {

public static ID = 'workbench.action.terminal.copySelection';
public static LABEL = nls.localize('workbench.action.terminal.copySelection', "Terminal: Copy Selection");
public static LABEL = nls.localize('workbench.action.terminal.copySelection', "Copy Selection");

constructor(
id: string, label: string,
Expand All @@ -69,7 +69,7 @@ export class CopyTerminalSelectionAction extends Action {
export class CreateNewTerminalAction extends Action {

public static ID = 'workbench.action.terminal.new';
public static LABEL = nls.localize('workbench.action.terminal.new', "Terminal: Create New Integrated Terminal");
public static LABEL = nls.localize('workbench.action.terminal.new', "Create New Integrated Terminal");
public static PANEL_LABEL = nls.localize('workbench.action.terminal.new.short', "New Terminal");

constructor(
Expand All @@ -88,7 +88,7 @@ export class CreateNewTerminalAction extends Action {
export class FocusTerminalAction extends Action {

public static ID = 'workbench.action.terminal.focus';
public static LABEL = nls.localize('workbench.action.terminal.focus', "Terminal: Focus Terminal");
public static LABEL = nls.localize('workbench.action.terminal.focus', "Focus Terminal");

constructor(
id: string, label: string,
Expand All @@ -105,7 +105,7 @@ export class FocusTerminalAction extends Action {
export class FocusNextTerminalAction extends Action {

public static ID = 'workbench.action.terminal.focusNext';
public static LABEL = nls.localize('workbench.action.terminal.focusNext', "Terminal: Focus Next Terminal");
public static LABEL = nls.localize('workbench.action.terminal.focusNext', "Focus Next Terminal");

constructor(
id: string, label: string,
Expand All @@ -122,7 +122,7 @@ export class FocusNextTerminalAction extends Action {
export class FocusPreviousTerminalAction extends Action {

public static ID = 'workbench.action.terminal.focusPrevious';
public static LABEL = nls.localize('workbench.action.terminal.focusPrevious', "Terminal: Focus Previous Terminal");
public static LABEL = nls.localize('workbench.action.terminal.focusPrevious', "Focus Previous Terminal");

constructor(
id: string, label: string,
Expand All @@ -138,7 +138,7 @@ export class FocusPreviousTerminalAction extends Action {
export class TerminalPasteAction extends Action {

public static ID = 'workbench.action.terminal.paste';
public static LABEL = nls.localize('workbench.action.terminal.paste', "Terminal: Paste into Active Terminal");
public static LABEL = nls.localize('workbench.action.terminal.paste', "Paste into Active Terminal");

constructor(
id: string, label: string,
Expand All @@ -155,7 +155,7 @@ export class TerminalPasteAction extends Action {
export class RunSelectedTextInTerminalAction extends Action {

public static ID = 'workbench.action.terminal.runSelectedText';
public static LABEL = nls.localize('workbench.action.terminal.runSelectedText', "Terminal: Run Selected Text In Active Terminal");
public static LABEL = nls.localize('workbench.action.terminal.runSelectedText', "Run Selected Text In Active Terminal");

constructor(
id: string, label: string,
Expand All @@ -172,7 +172,7 @@ export class RunSelectedTextInTerminalAction extends Action {
export class SwitchTerminalInstanceAction extends Action {

public static ID = 'workbench.action.terminal.switchTerminalInstance';
public static LABEL = nls.localize('workbench.action.terminal.switchTerminalInstance', "Terminal: Switch Terminal Instance");
public static LABEL = nls.localize('workbench.action.terminal.switchTerminalInstance', "Switch Terminal Instance");

constructor(
id: string, label: string,
Expand Down Expand Up @@ -210,7 +210,7 @@ export class SwitchTerminalInstanceActionItem extends SelectActionItem {
export class ScrollDownTerminalAction extends Action {

public static ID = 'workbench.action.terminal.scrollDown';
public static LABEL = nls.localize('workbench.action.terminal.scrollDown', "Terminal: Scroll Down");
public static LABEL = nls.localize('workbench.action.terminal.scrollDown', "Scroll Down");

constructor(
id: string, label: string,
Expand All @@ -227,7 +227,7 @@ export class ScrollDownTerminalAction extends Action {
export class ScrollUpTerminalAction extends Action {

public static ID = 'workbench.action.terminal.scrollUp';
public static LABEL = nls.localize('workbench.action.terminal.scrollUp', "Terminal: Scroll Up");
public static LABEL = nls.localize('workbench.action.terminal.scrollUp', "Scroll Up");

constructor(
id: string, label: string,
Expand Down

0 comments on commit e63da24

Please sign in to comment.