From 2d6e1d7089583501c95a773d576520e8c637f007 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sat, 3 Dec 2022 21:29:27 +0000 Subject: [PATCH] NLS updates for context menu --- .../@node-red/editor-client/locales/en-US/editor.json | 2 ++ .../@node-red/editor-client/src/js/ui/contextMenu.js | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json index e74dbdbaa..6dcbd1d75 100755 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json @@ -107,6 +107,7 @@ "displayStatus": "Show node status", "displayConfig": "Configuration nodes", "import": "Import", + "importExample": "Import Example Flow", "export": "Export", "search": "Search flows", "searchInput": "search your flows", @@ -503,6 +504,7 @@ "addRemoveNode": "Add/remove node from selection", "editSelected": "Edit selected node", "deleteSelected": "Delete selected nodes or link", + "deleteReconnect": "Delete and Reconnect", "importNode": "Import nodes", "exportNode": "Export nodes", "nudgeNode": "Move selected nodes (1px)", diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js index ef69ea330..57d5bbcf9 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js @@ -101,7 +101,7 @@ RED.contextMenu = (function () { }, null, { onselect: 'core:show-import-dialog', label: RED._('common.label.import')}, - { onselect: 'core:show-examples-import-dialog', label: 'Import Example Flow' } + { onselect: 'core:show-examples-import-dialog', label: RED._('menu.label.importExample') } ) if (hasSelection && canEdit) { const nodeOptions = [] @@ -119,11 +119,11 @@ RED.contextMenu = (function () { { onselect: 'core:hide-selected-node-labels' } ) menuItems.push({ - label: 'Node', + label: RED._('sidebar.info.node'), options: nodeOptions }) menuItems.push({ - label: 'Group', + label: RED._('sidebar.info.group'), options: [ { onselect: 'core:group-selection' }, { onselect: 'core:ungroup-selection', disabled: !hasGroup }, @@ -141,7 +141,7 @@ RED.contextMenu = (function () { } if (canEdit && hasMultipleSelection) { menuItems.push({ - label: 'Arrange', + label: RED._('menu.label.arrange'), options: [ { label:RED._("menu.label.alignLeft"), onselect: "core:align-selection-to-left"}, { label:RED._("menu.label.alignCenter"), onselect: "core:align-selection-to-center"}, @@ -167,7 +167,7 @@ RED.contextMenu = (function () { { onselect: 'core:copy-selection-to-internal-clipboard', label: RED._("keyboard.copyNode"), disabled: !hasSelection }, { onselect: 'core:paste-from-internal-clipboard', label: RED._("keyboard.pasteNode"), disabled: !canEdit || !RED.view.clipboard() }, { onselect: 'core:delete-selection', disabled: !canEdit || !canDelete }, - { onselect: 'core:delete-selection-and-reconnect', label: 'Delete and Reconnect', disabled: !canEdit || !canDelete }, + { onselect: 'core:delete-selection-and-reconnect', label: RED._('keyboard.deleteReconnect'), disabled: !canEdit || !canDelete }, { onselect: 'core:show-export-dialog', label: RED._("menu.label.export") }, { onselect: 'core:select-all-nodes' }, )