|
9 | 9 | Gesture, |
10 | 10 | ShortcutRegistry, |
11 | 11 | Events, |
| 12 | + Msg, |
12 | 13 | utils as blocklyUtils, |
13 | 14 | clipboard, |
14 | 15 | ICopyData, |
@@ -104,7 +105,8 @@ export class Clipboard { |
104 | 105 | */ |
105 | 106 | private registerCutContextMenuAction() { |
106 | 107 | const cutAction: ContextMenuRegistry.RegistryItem = { |
107 | | - displayText: (scope) => `Cut (${getShortActionShortcut('cut')})`, |
| 108 | + displayText: (scope) => |
| 109 | + Msg['CUT_SHORTCUT'].replace('%1', getShortActionShortcut('cut')), |
108 | 110 | preconditionFn: (scope) => { |
109 | 111 | const ws = scope.block?.workspace; |
110 | 112 | if (!ws) return 'hidden'; |
@@ -199,7 +201,8 @@ export class Clipboard { |
199 | 201 | */ |
200 | 202 | private registerCopyContextMenuAction() { |
201 | 203 | const copyAction: ContextMenuRegistry.RegistryItem = { |
202 | | - displayText: (scope) => `Copy (${getShortActionShortcut('copy')})`, |
| 204 | + displayText: (scope) => |
| 205 | + Msg['COPY_SHORTCUT'].replace('%1', getShortActionShortcut('copy')), |
203 | 206 | preconditionFn: (scope) => { |
204 | 207 | const ws = scope.block?.workspace; |
205 | 208 | if (!ws) return 'hidden'; |
@@ -304,7 +307,8 @@ export class Clipboard { |
304 | 307 | */ |
305 | 308 | private registerPasteContextMenuAction() { |
306 | 309 | const pasteAction: ContextMenuRegistry.RegistryItem = { |
307 | | - displayText: (scope) => `Paste (${getShortActionShortcut('paste')})`, |
| 310 | + displayText: (scope) => |
| 311 | + Msg['PASTE_SHORTCUT'].replace('%1', getShortActionShortcut('paste')), |
308 | 312 | preconditionFn: (scope: ContextMenuRegistry.Scope) => { |
309 | 313 | let block; |
310 | 314 | if (scope.focusedNode instanceof Blockly.Block) { |
|
0 commit comments