Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #11224 from MarcelGerber/keyboard-more-translated-…
Browse files Browse the repository at this point in the history
…keys

Add more translatable keys
  • Loading branch information
abose committed Jul 30, 2015
2 parents ada8199 + 4d8a874 commit a45f721
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
15 changes: 12 additions & 3 deletions src/command/KeyBindingManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,21 @@ define(function (require, exports, module) {
displayStr = displayStr.replace("Shift", "\u21E7"); // Shift > shift symbol
displayStr = displayStr.replace("Alt", "\u2325"); // Alt > option symbol
} else {
displayStr = descriptor.replace("Ctrl", Strings.KEYBOARD_CTRL); // Ctrl
displayStr = displayStr.replace("Shift", Strings.KEYBOARD_SHIFT); // Shift > shift symbol
displayStr = displayStr.replace("Space", Strings.KEYBOARD_SPACE); // Alt > option symbol
displayStr = descriptor.replace("Ctrl", Strings.KEYBOARD_CTRL);
displayStr = displayStr.replace("Shift", Strings.KEYBOARD_SHIFT);
displayStr = displayStr.replace(/-(?!$)/g, "+");
}

displayStr = displayStr.replace("Space", Strings.KEYBOARD_SPACE);

displayStr = displayStr.replace("PageUp", Strings.KEYBOARD_PAGE_UP);
displayStr = displayStr.replace("PageDown", Strings.KEYBOARD_PAGE_DOWN);
displayStr = displayStr.replace("Home", Strings.KEYBOARD_HOME);
displayStr = displayStr.replace("End", Strings.KEYBOARD_END);

displayStr = displayStr.replace("Ins", Strings.KEYBOARD_INSERT);
displayStr = displayStr.replace("Del", Strings.KEYBOARD_DELETE);

return displayStr;
}

Expand Down
14 changes: 10 additions & 4 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,17 @@ define({
"SPLITVIEW_MULTIPANE_WARNING" : "The file is already open in another pane. {APP_NAME} will soon support opening the same file in more than one pane. Until then, the file will be shown in the pane it's already open in.<br /><br />(You'll only see this message once.)",

/**
* Keyboard modifier names
* Keyboard modifiers and special key names
*/
"KEYBOARD_CTRL" : "Ctrl",
"KEYBOARD_SHIFT" : "Shift",
"KEYBOARD_SPACE" : "Space",
"KEYBOARD_CTRL" : "Ctrl",
"KEYBOARD_SHIFT" : "Shift",
"KEYBOARD_SPACE" : "Space",
"KEYBOARD_PAGE_UP" : "Page Up",
"KEYBOARD_PAGE_DOWN" : "Page Down",
"KEYBOARD_HOME" : "Home",
"KEYBOARD_END" : "End",
"KEYBOARD_INSERT" : "Insert",
"KEYBOARD_DELETE" : "Delete",

/**
* StatusBar strings
Expand Down

0 comments on commit a45f721

Please sign in to comment.