diff --git a/data/core.yaml b/data/core.yaml index a007e5f5d..d3195381b 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -1036,6 +1036,7 @@ en: help: title: "Help" help: "Show help/documentation" + keyboard: "Show keyboard shortcuts" selected: title: "With selected" toggle_infobox: "Toggle info box" @@ -1057,7 +1058,7 @@ en: split: "Split a line into two at the selected node" move: "Move selected items" rotate: "Rotate selected items" - orthagonalize: "Straighten line / Square area corners" + orthogonalize: "Straighten line / Square area corners" circularize: "Circularize an area" reflect_long: "Reflect items across the longer axis" reflect_short: "Reflect items across the shorter axis" diff --git a/data/shortcuts.json b/data/shortcuts.json index 71874356c..78e26e407 100644 --- a/data/shortcuts.json +++ b/data/shortcuts.json @@ -49,6 +49,9 @@ { "shortcut": ["H"], "text": "shortcuts.browsing.help.help" + }, { + "shortcut": ["?"], + "text": "shortcuts.browsing.help.keyboard" } ] }, { @@ -96,38 +99,38 @@ "text": "shortcuts.editing.operations.title", "shortcuts": [ { - "shortcut": ["A"], + "shortcut": ["operations.continue.key"], "text": "shortcuts.editing.operations.continue_line" }, { - "shortcut": ["C"], + "shortcut": ["operations.merge.key"], "text": "shortcuts.editing.operations.merge" }, { - "shortcut": ["D"], + "shortcut": ["operations.disconnect.key"], "text": "shortcuts.editing.operations.disconnect" }, { - "shortcut": ["X"], + "shortcut": ["operations.split.key"], "text": "shortcuts.editing.operations.split" }, { - "shortcut": ["M"], + "shortcut": ["operations.reverse.key"], + "text": "shortcuts.editing.operations.reverse" + }, { + "shortcut": ["operations.move.key"], "text": "shortcuts.editing.operations.move" }, { - "shortcut": ["R"], + "shortcut": ["operations.rotate.key"], "text": "shortcuts.editing.operations.rotate" }, { - "shortcut": ["S"], - "text": "shortcuts.editing.operations.orthagonalize" + "shortcut": ["operations.orthogonalize.key"], + "text": "shortcuts.editing.operations.orthogonalize" }, { - "shortcut": ["O"], + "shortcut": ["operations.circularize.key"], "text": "shortcuts.editing.operations.circularize" }, { - "shortcut": ["T"], + "shortcut": ["operations.reflect.key.long"], "text": "shortcuts.editing.operations.reflect_long" }, { - "shortcut": ["Y"], + "shortcut": ["operations.reflect.key.short"], "text": "shortcuts.editing.operations.reflect_short" - }, { - "shortcut": ["V"], - "text": "shortcuts.editing.operations.reverse" } ] }, { diff --git a/dist/locales/en.json b/dist/locales/en.json index 9151864d2..33ea1db4e 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -904,7 +904,8 @@ }, "help": { "title": "Help", - "help": "Show help/documentation" + "help": "Show help/documentation", + "keyboard": "Show keyboard shortcuts" }, "selected": { "title": "With selected", @@ -930,7 +931,7 @@ "split": "Split a line into two at the selected node", "move": "Move selected items", "rotate": "Rotate selected items", - "orthagonalize": "Straighten line / Square area corners", + "orthogonalize": "Straighten line / Square area corners", "circularize": "Circularize an area", "reflect_long": "Reflect items across the longer axis", "reflect_short": "Reflect items across the shorter axis", diff --git a/modules/ui/shortcuts.js b/modules/ui/shortcuts.js index abe7385a5..5ddbf8d38 100644 --- a/modules/ui/shortcuts.js +++ b/modules/ui/shortcuts.js @@ -127,7 +127,9 @@ export function uiShortcuts() { .data(function (d) { return d.shortcut; }) .enter() .append('kbd') - .text(function (d) { return uiCmd(d); }); + .text(function (d) { + return d.indexOf('.') !== -1 ? uiCmd(t(d)) : uiCmd(d); + }); row .append('div')