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 296b4c6f8..9899baf83 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 @@ -16,7 +16,9 @@ "clone": "Clone project", "cont": "Continue", "line": "Outline", - "fill": "Fill" + "fill": "Fill", + "color": "Color", + "position": "Position" }, "type": { "string": "string", @@ -320,6 +322,13 @@ "multipleInputsToSelection": "Cannot create subflow: multiple inputs to selection" } }, + "group": { + "editGroup": "Edit group: __name__", + "errors": { + "cannotCreateDiffGroups": "Cannot create group using nodes from different groups", + "cannotAddSubflowPorts": "Cannot add subflow ports to a group" + } + }, "editor": { "configEdit": "Edit", "configAdd": "Add", diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index a98fb9cd5..d3a54cbe7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -515,7 +515,7 @@ RED.editor = (function() { var node = editStack[i]; label = node.type; if (node.type === 'group') { - label = RED._("subflow.editGroup",{name:RED.utils.sanitize(node.name||node.id)}); + label = RED._("group.editGroup",{name:RED.utils.sanitize(node.name||node.id)}); } else if (node.type === '_expression') { label = RED._("expressionEditor.title"); } else if (node.type === '_js') { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/group.js b/packages/node_modules/@node-red/editor-client/src/js/ui/group.js index 256bf62c8..2eb13453b 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/group.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/group.js @@ -39,12 +39,12 @@ RED.group = (function() { '
'+ '
'+ ''+ - ''+ + ''+ ''+ '
'+ '
'+ ''+ - ''+ + ''+ ''+ '
'+ '
'+ @@ -340,7 +340,7 @@ RED.group = (function() { if (i === 0) { parentGroup = n.g; } else if (n.g !== parentGroup) { - RED.notify("Cannot merge nodes from different groups","error"); + RED.notify(RED._("group.errors.cannotCreateDiffGroups"),"error"); return; } } @@ -404,7 +404,7 @@ RED.group = (function() { return; } if (nodes.filter(function(n) { return n.type === "subflow" }).length > 0) { - RED.notify("Cannot add subflow ports to a group","error"); + RED.notify(RED._("group.errors.cannotAddSubflowPorts"),"error"); return; } // nodes is an array @@ -446,7 +446,7 @@ RED.group = (function() { if (!z) { z = n.z; } else if (z !== n.z) { - throw new Error("Cannot create group using nodes with different z properties") + throw new Error("Cannot add nooes with different z properties") } if (n.g) { // This is already in a group. @@ -454,13 +454,13 @@ RED.group = (function() { if (!g) { if (i!==0) { // TODO: this might be ok when merging groups - throw new Error("Cannot create group using nodes from different groups") + throw new Error(RED._("group.errors.cannotCreateDiffGroups")) } g = n.g } } if (g !== n.g) { - throw new Error("Cannot create group using nodes from different groups") + throw new Error(RED._("group.errors.cannotCreateDiffGroups")) } } // The nodes are already in a group. The assumption is they should be @@ -495,7 +495,6 @@ RED.group = (function() { markDirty(group); } function removeFromGroup(group, nodes, reparent) { - console.log('rfg',group,nodes); if (!Array.isArray(nodes)) { nodes = [nodes]; } @@ -504,7 +503,6 @@ RED.group = (function() { // TODO: DRY mergeSelection,removeSelection,... for (var i=0; i