mirror of https://github.com/keeweb/keeweb.git
#615: translated shortcut modifier keys
This commit is contained in:
parent
3f9296e38c
commit
3d3864d535
|
@ -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 ? '<span class="thin">ctrl + </span>' : 'ctrl+';
|
||||
return Features.isMac ? '⌘' : this.formatShortcut(Locale.ctrlKey, formatting);
|
||||
},
|
||||
altShortcutSymbol(formatting) {
|
||||
return Features.isMac ? '⌥' : formatting ? '<span class="thin">alt + </span>' : 'alt+';
|
||||
return Features.isMac ? '⌥' : this.formatShortcut(Locale.altKey, formatting);
|
||||
},
|
||||
shiftShortcutSymbol(formatting) {
|
||||
return Features.isMac ? '⇧' : formatting ? '<span class="thin">shift + </span>' : 'shift+';
|
||||
return Features.isMac ? '⇧' : this.formatShortcut(Locale.shiftKey, formatting);
|
||||
},
|
||||
ctrlShortcutSymbol(formatting) {
|
||||
return Features.isMac ? '⌃' : formatting ? '<span class="thin">ctrl + </span>' : 'ctrl+';
|
||||
return Features.isMac ? '⌃' : this.formatShortcut(Locale.ctrlKey, formatting);
|
||||
},
|
||||
formatShortcut(shortcut, formatting) {
|
||||
return formatting ? `<span class="thin">${shortcut} + </span>` : `${shortcut}+`;
|
||||
},
|
||||
globalShortcutText(type, formatting) {
|
||||
return this.presentShortcut(this.globalShortcut(type), formatting);
|
||||
|
|
|
@ -53,6 +53,9 @@
|
|||
"help": "Help",
|
||||
"settings": "Settings",
|
||||
"plugins": "Plugins",
|
||||
"ctrlKey": "ctrl",
|
||||
"shiftKey": "shift",
|
||||
"altKey": "alt",
|
||||
|
||||
"cache": "cache",
|
||||
"file": "file",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue