mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
@@ -1018,8 +1018,27 @@ en:
|
||||
start: "Start mapping!"
|
||||
shortcuts:
|
||||
title: "Keyboard shortcuts"
|
||||
key:
|
||||
alt: Alt
|
||||
backspace: Backspace
|
||||
cmd: Cmd
|
||||
ctrl: Ctrl
|
||||
delete: Delete
|
||||
del: Del
|
||||
end: End
|
||||
enter: Enter
|
||||
esc: Esc
|
||||
home: Home
|
||||
option: Option
|
||||
pause: Pause
|
||||
pgdn: PgDn
|
||||
pgup: PgUp
|
||||
return: Return
|
||||
shift: Shift
|
||||
space: Space
|
||||
gesture:
|
||||
drag: drag
|
||||
or: "-or-"
|
||||
drag: drag
|
||||
browsing:
|
||||
title: "Browsing"
|
||||
navigation:
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
}, {
|
||||
"modifiers": ["⇧"],
|
||||
"shortcuts": ["Left-click"],
|
||||
"gesture": "shortcuts.drag",
|
||||
"gesture": "shortcuts.gesture.drag",
|
||||
"text": "shortcuts.browsing.selecting.lasso"
|
||||
}, {
|
||||
"shortcuts": [],
|
||||
@@ -90,7 +90,7 @@
|
||||
"section": "with_selected",
|
||||
"text": "shortcuts.browsing.with_selected.title"
|
||||
}, {
|
||||
"shortcuts": ["Right-click", "Space"],
|
||||
"shortcuts": ["Right-click", "shortcuts.key.space"],
|
||||
"text": "shortcuts.browsing.with_selected.edit_menu"
|
||||
}, {
|
||||
"modifiers": ["⌘"],
|
||||
@@ -114,7 +114,7 @@
|
||||
"shortcuts": ["}", "⇟"],
|
||||
"text": "shortcuts.browsing.vertex_selected.last"
|
||||
}, {
|
||||
"shortcuts": ["\\", "Pause"],
|
||||
"shortcuts": ["\\", "shortcuts.key.pause"],
|
||||
"text": "shortcuts.browsing.vertex_selected.change_parent"
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
"shortcuts": ["3"],
|
||||
"text": "shortcuts.editing.drawing.add_area"
|
||||
}, {
|
||||
"shortcuts": ["Space"],
|
||||
"shortcuts": ["shortcuts.key.space"],
|
||||
"text": "shortcuts.editing.drawing.place_point"
|
||||
}, {
|
||||
"shortcuts": ["⌥"],
|
||||
|
||||
23
dist/locales/en.json
vendored
23
dist/locales/en.json
vendored
@@ -885,8 +885,29 @@
|
||||
},
|
||||
"shortcuts": {
|
||||
"title": "Keyboard shortcuts",
|
||||
"key": {
|
||||
"alt": "Alt",
|
||||
"backspace": "Backspace",
|
||||
"cmd": "Cmd",
|
||||
"ctrl": "Ctrl",
|
||||
"delete": "Delete",
|
||||
"del": "Del",
|
||||
"end": "End",
|
||||
"enter": "Enter",
|
||||
"esc": "Esc",
|
||||
"home": "Home",
|
||||
"option": "Option",
|
||||
"pause": "Pause",
|
||||
"pgdn": "PgDn",
|
||||
"pgup": "PgUp",
|
||||
"return": "Return",
|
||||
"shift": "Shift",
|
||||
"space": "Space"
|
||||
},
|
||||
"gesture": {
|
||||
"drag": "drag"
|
||||
},
|
||||
"or": "-or-",
|
||||
"drag": "drag",
|
||||
"browsing": {
|
||||
"title": "Browsing",
|
||||
"navigation": {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { t } from '../util/locale';
|
||||
import { utilDetect } from '../util/detect';
|
||||
|
||||
// Translate a MacOS key command into the appropriate Windows/Linux equivalent.
|
||||
@@ -41,17 +42,17 @@ uiCmd.display = function(code) {
|
||||
var detected = utilDetect();
|
||||
var mac = (detected.os === 'mac');
|
||||
var replacements = {
|
||||
'⌘': mac ? '⌘ Cmd' : 'Ctrl',
|
||||
'⇧': mac ? '⇧ Shift' : 'Shift',
|
||||
'⌥': mac ? '⌥ Option' : 'Alt',
|
||||
'⌫': mac ? '⌫ Delete' : 'Backspace',
|
||||
'⌦': mac ? '⌦ Del' : 'Del',
|
||||
'↖': mac ? '↖ PgUp' : 'PgUp',
|
||||
'↘': mac ? '↘ PgDn' : 'PgDn',
|
||||
'⇞': mac ? '⇞ Home' : 'Home',
|
||||
'⇟': mac ? '⇟ End' : 'End',
|
||||
'↵': mac ? '↵ Return' : 'Enter',
|
||||
'⎋': mac ? '⎋ Esc' : 'Esc',
|
||||
'⌘': mac ? '⌘ ' + t('shortcuts.key.cmd') : t('shortcuts.key.ctrl'),
|
||||
'⇧': mac ? '⇧ ' + t('shortcuts.key.shift') : t('shortcuts.key.shift'),
|
||||
'⌥': mac ? '⌥ ' + t('shortcuts.key.option') : t('shortcuts.key.alt'),
|
||||
'⌫': mac ? '⌫ ' + t('shortcuts.key.delete') : t('shortcuts.key.backspace'),
|
||||
'⌦': mac ? '⌦ ' + t('shortcuts.key.del') : t('shortcuts.key.del'),
|
||||
'↖': mac ? '↖ ' + t('shortcuts.key.pgup') : t('shortcuts.key.pgup'),
|
||||
'↘': mac ? '↘ ' + t('shortcuts.key.pgdn') : t('shortcuts.key.pgdn'),
|
||||
'⇞': mac ? '⇞ ' + t('shortcuts.key.home') : t('shortcuts.key.home'),
|
||||
'⇟': mac ? '⇟ ' + t('shortcuts.key.end') : t('shortcuts.key.end'),
|
||||
'↵': mac ? '↵ ' + t('shortcuts.key.return') : t('shortcuts.key.enter'),
|
||||
'⎋': mac ? '⎋ ' + t('shortcuts.key.esc') : t('shortcuts.key.esc'),
|
||||
};
|
||||
|
||||
return replacements[code] || code;
|
||||
|
||||
Reference in New Issue
Block a user