Use translated keyboard shortcuts for operations, add '?'

This commit is contained in:
Bryan Housel
2017-05-18 13:36:19 -04:00
parent 0013866fe3
commit 9628670b98
4 changed files with 25 additions and 18 deletions
+2 -1
View File
@@ -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"
+17 -14
View File
@@ -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"
}
]
}, {
+3 -2
View File
@@ -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",
+3 -1
View File
@@ -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')