Support i18n in context menu

This commit is contained in:
Kazuhito Yokoi
2022-06-18 00:51:05 +09:00
parent fc5a5f1b73
commit 0000f2a34d
3 changed files with 16 additions and 4 deletions

View File

@@ -48,10 +48,10 @@ RED.contextMenu = (function() {
const menuItems = [
{ onselect: 'core:show-action-list', onpostselect: function() {} },
{
label: 'Insert',
label: RED._("contextMenu.insert"),
options: [
{
label: 'Node',
label: RED._("contextMenu.node"),
onselect: function() {
RED.view.showQuickAddDialog({
position: [ options.x - offset.left, options.y - offset.top ],
@@ -62,12 +62,12 @@ RED.contextMenu = (function() {
}
},
{
label: 'Junction',
label: RED._("contextMenu.junction"),
onselect: 'core:split-wires-with-junctions',
disabled: hasSelection || !hasLinks
},
{
label: 'Link Nodes',
label: RED._("contextMenu.linkNodes"),
onselect: 'core:split-wire-with-link-nodes',
disabled: hasSelection || !hasLinks
}