diff --git a/app/scripts/comp/app/shortcuts.js b/app/scripts/comp/app/shortcuts.js index 3368de2b..60ebbd92 100644 --- a/app/scripts/comp/app/shortcuts.js +++ b/app/scripts/comp/app/shortcuts.js @@ -3,6 +3,7 @@ import { Keys } from 'const/keys'; import { AppSettingsModel } from 'models/app-settings-model'; import { Features } from 'util/features'; import { StringFormat } from 'util/formatting/string-format'; +import { Locale } from 'util/locale'; let allowedKeys; @@ -72,16 +73,19 @@ const Shortcuts = { .join(''); }, actionShortcutSymbol(formatting) { - return Features.isMac ? '⌘' : formatting ? 'ctrl + ' : 'ctrl+'; + return Features.isMac ? '⌘' : this.formatShortcut(Locale.ctrlKey, formatting); }, altShortcutSymbol(formatting) { - return Features.isMac ? '⌥' : formatting ? 'alt + ' : 'alt+'; + return Features.isMac ? '⌥' : this.formatShortcut(Locale.altKey, formatting); }, shiftShortcutSymbol(formatting) { - return Features.isMac ? '⇧' : formatting ? 'shift + ' : 'shift+'; + return Features.isMac ? '⇧' : this.formatShortcut(Locale.shiftKey, formatting); }, ctrlShortcutSymbol(formatting) { - return Features.isMac ? '⌃' : formatting ? 'ctrl + ' : 'ctrl+'; + return Features.isMac ? '⌃' : this.formatShortcut(Locale.ctrlKey, formatting); + }, + formatShortcut(shortcut, formatting) { + return formatting ? `${shortcut} + ` : `${shortcut}+`; }, globalShortcutText(type, formatting) { return this.presentShortcut(this.globalShortcut(type), formatting); diff --git a/app/scripts/locales/base.json b/app/scripts/locales/base.json index ae44e82b..7e316746 100644 --- a/app/scripts/locales/base.json +++ b/app/scripts/locales/base.json @@ -53,6 +53,9 @@ "help": "Help", "settings": "Settings", "plugins": "Plugins", + "ctrlKey": "ctrl", + "shiftKey": "shift", + "altKey": "alt", "cache": "cache", "file": "file", diff --git a/release-notes.md b/release-notes.md index 724ad221..44f61f92 100644 --- a/release-notes.md +++ b/release-notes.md @@ -10,6 +10,7 @@ Release notes `+` #1142: submit button on mobile password input `+` #766: setting for no/unlimited history `+` #411: option to automatically use group icon for new entries +`+` #615: translated shortcut modifier keys `-` fix #1396: fixed hyperlinks in notes `-` fix #1323: version in the About dialog `-` fix #734: OTP secrets with spaces