diff --git a/data/core.yaml b/data/core.yaml index 236f002c0..5cba09816 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -1654,10 +1654,12 @@ en: title: "Editing" drawing: title: "Drawing" + focus_add_feature: "Focus the feature search field" add_point: "'Add point' mode" add_line: "'Add line' mode" add_area: "'Add area' mode" add_note: "'Add note' mode" + add_favorite: "Add a favorite feature" place_point: "Place a point or note" disable_snap: "Hold to disable point snapping" stop_line: "Finish drawing a line or area" diff --git a/data/shortcuts.json b/data/shortcuts.json index 376cb9a94..484de5af1 100644 --- a/data/shortcuts.json +++ b/data/shortcuts.json @@ -157,19 +157,17 @@ "text": "shortcuts.editing.drawing.title" }, { - "shortcuts": ["1"], - "text": "shortcuts.editing.drawing.add_point" + "shortcuts": ["modes.add_feature.key"], + "text": "shortcuts.editing.drawing.focus_add_feature" }, { - "shortcuts": ["2"], - "text": "shortcuts.editing.drawing.add_line" + "shortcuts": ["1", "2", "3"], + "text": "shortcuts.editing.drawing.add_favorite", + "separator": ",", + "suffix": "…" }, { - "shortcuts": ["3"], - "text": "shortcuts.editing.drawing.add_area" - }, - { - "shortcuts": ["4"], + "shortcuts": ["modes.add_note.key"], "text": "shortcuts.editing.drawing.add_note" }, { diff --git a/dist/locales/en.json b/dist/locales/en.json index 21bd47a37..477ec20ae 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1997,10 +1997,12 @@ "title": "Editing", "drawing": { "title": "Drawing", + "focus_add_feature": "Focus the feature search field", "add_point": "'Add point' mode", "add_line": "'Add line' mode", "add_area": "'Add area' mode", "add_note": "'Add note' mode", + "add_favorite": "Add a favorite feature", "place_point": "Place a point or note", "disable_snap": "Hold to disable point snapping", "stop_line": "Finish drawing a line or area" diff --git a/modules/ui/shortcuts.js b/modules/ui/shortcuts.js index 252375c4b..8842d96b8 100644 --- a/modules/ui/shortcuts.js +++ b/modules/ui/shortcuts.js @@ -189,7 +189,8 @@ export function uiShortcuts(context) { return _uniq(arr).map(function(s) { return { shortcut: s, - separator: d.separator + separator: d.separator, + suffix: d.suffix }; }); }) @@ -212,6 +213,10 @@ export function uiShortcuts(context) { selection .append('span') .text(d.separator || '\u00a0' + t('shortcuts.or') + '\u00a0'); + } else if (i === nodes.length - 1 && d.suffix) { + selection + .append('span') + .text(d.suffix); } });