1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

@ -1187,5 +1187,11 @@
"missing-config": "__prop__: missing configuration node",
"validation-error": "__prop__: validation error: __node__, __id__: __error__"
}
},
"contextMenu": {
"insert": "Insert",
"node": "Node",
"junction": "Junction",
"linkNodes": "Link Nodes"
}
}

View File

@ -1188,6 +1188,12 @@
"validation-error": "__prop__: チェックエラー: __node__, __id__: __error__"
}
},
"contextMenu": {
"insert": "挿入",
"node": "ノード",
"junction": "分岐点",
"linkNodes": "Linkード"
},
"action-list": {
"toggle-show-tips": "ヒント表示切替",
"show-about": "Node-REDの説明を表示",

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
}