diff --git a/editor/js/comms.js b/editor/js/comms.js index 126264d06..eb55b6b06 100644 --- a/editor/js/comms.js +++ b/editor/js/comms.js @@ -13,16 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ - + RED.comms = (function() { - + var errornotification = null; var clearErrorTimer = null; - + var subscriptions = {}; var ws; var pendingAuth = false; - + function connectWS() { var path = location.hostname; var port = location.port; @@ -32,10 +32,10 @@ RED.comms = (function() { path = path+document.location.pathname; path = path+(path.slice(-1) == "/"?"":"/")+"comms"; path = "ws"+(document.location.protocol=="https:"?"s":"")+"://"+path; - + var auth_tokens = RED.settings.get("auth-tokens"); pendingAuth = (auth_tokens!=null); - + function completeConnection() { for (var t in subscriptions) { if (subscriptions.hasOwnProperty(t)) { @@ -43,7 +43,7 @@ RED.comms = (function() { } } } - + ws = new WebSocket(path); ws.onopen = function() { if (errornotification) { @@ -81,7 +81,7 @@ RED.comms = (function() { }; ws.onclose = function() { if (errornotification == null) { - errornotification = RED.notify(RED._("notification.lostConnectionError"),"error",true); + errornotification = RED.notify(RED._("notification.error",{message:RED._("notification.errors.lostConnection")}),"error",true); } else if (clearErrorTimer) { clearTimeout(clearErrorTimer); clearErrorTimer = null; @@ -89,7 +89,7 @@ RED.comms = (function() { setTimeout(connectWS,1000); } } - + function subscribe(topic,callback) { if (subscriptions[topic] == null) { subscriptions[topic] = []; @@ -99,7 +99,7 @@ RED.comms = (function() { ws.send(JSON.stringify({subscribe:topic})); } } - + function unsubscribe(topic,callback) { if (subscriptions[topic]) { for (var i=0;i
  • ")+"
  • "; - RED.notify(RED._("notification.nodeAdded", {count:addedTypes.length})+typeList,"success"); + RED.notify(RED._("palette.event.nodeAdded", {count:addedTypes.length})+typeList,"success"); } } else if (topic == "node/removed") { for (i=0;i
  • ")+"
  • "; - RED.notify(RED._("notification.nodeRemoved", {count:m.types.length})+typeList,"success"); + RED.notify(RED._("palette.event.nodeRemoved", {count:m.types.length})+typeList,"success"); } } } else if (topic == "node/enabled") { @@ -127,12 +127,12 @@ var RED = (function() { if (info.added) { RED.nodes.enableNodeSet(msg.id); typeList = ""; - RED.notify(RED._("notification.nodeEnabled", {count:msg.types.length})+typeList,"success"); + RED.notify(RED._("palette.event.nodeEnabled", {count:msg.types.length})+typeList,"success"); } else { $.get('nodes/'+msg.id, function(data) { $("body").append(data); typeList = ""; - RED.notify(RED._("notification.nodeAdded", {count:msg.types.length})+typeList,"success"); + RED.notify(RED._("palette.event.nodeAdded", {count:msg.types.length})+typeList,"success"); }); } } @@ -140,7 +140,7 @@ var RED = (function() { if (msg.types) { RED.nodes.disableNodeSet(msg.id); typeList = ""; - RED.notify(RED._("notfication.nodeDisabled", {count:msg.types.length})+typeList,"success"); + RED.notify(RED._("palette.event.nodeDisabled", {count:msg.types.length})+typeList,"success"); } } }); @@ -153,7 +153,7 @@ var RED = (function() { statusEnabled = state; RED.view.status(statusEnabled); } - + function loadEditor() { RED.menu.init({id:"btn-sidemenu", options: [ @@ -190,9 +190,9 @@ var RED = (function() { } ] }); - + RED.user.init(); - + RED.library.init(); RED.palette.init(); RED.sidebar.init(); @@ -201,9 +201,9 @@ var RED = (function() { RED.clipboard.init(); RED.view.init(); RED.editor.init(); - + RED.deploy.init(RED.settings.theme("deployButton",null)); - + RED.keyboard.add(/* ? */ 191,{shift:true},function(){RED.keyboard.showHelp();d3.event.preventDefault();}); RED.comms.connect(); @@ -214,11 +214,11 @@ var RED = (function() { } $(function() { - + if ((window.location.hostname !== "localhost") && (window.location.hostname !== "127.0.0.1")) { document.title = document.title+" : "+window.location.hostname; } - + ace.require("ace/ext/language_tools"); RED.settings.init(loadLocales); diff --git a/editor/js/nodes.js b/editor/js/nodes.js index 2333ed32d..240aecfff 100644 --- a/editor/js/nodes.js +++ b/editor/js/nodes.js @@ -133,7 +133,8 @@ RED.nodes = (function() { }, removeNodeType: function(nt) { if (nt.substring(0,8) != "subflow:") { - throw new Error(RED._("error.apiSubflowOnly"),nt); + // NON-NLS - internal debug message + throw new Error("this api is subflow only. called with:",nt); } delete nodeDefinitions[nt]; RED.palette.remove(nt); @@ -549,7 +550,7 @@ RED.nodes = (function() { try { newNodes = JSON.parse(newNodesObj); } catch(err) { - var e = new Error(RED._("error.invalidFlow")+err.message); + var e = new Error(RED._("clipboard.invalidFlow",{message:err.message})); e.code = "NODE_RED"; throw e; } @@ -576,8 +577,7 @@ RED.nodes = (function() { if (unknownTypes.length > 0) { var typeList = ""; var type = "type"+(unknownTypes.length > 1?"s":""); - RED.notify(""+RED._("notification.importUnrecognised")+type+":"+typeList,"error",false,10000); - //"DO NOT DEPLOY while in this state.
    Either, add missing types to Node-RED, restart and then reload page,
    or delete unknown "+n.name+", rewire as required, and then deploy.","error"); + RED.notify(""+RED._("clipboard.importUnrecognised",{count:unknownTypes.length})+""+typeList,"error",false,10000); } var activeWorkspace = RED.workspaces.active(); @@ -589,17 +589,16 @@ RED.nodes = (function() { var subflowId = m[1]; var err; if (subflowId === activeSubflow.id) { - err = new Error(RED._("error.cannotAddSubflowToItself")); + err = new Error(RED._("notification.errors.cannotAddSubflowToItself")); } if (subflowContains(m[1],activeSubflow.id)) { - err = new Error(RED._("error.cannotAddCircularReference")); + err = new Error(RED._("notification.errors.cannotAddCircularReference")); } if (err) { // TODO: standardise error codes err.code = "NODE_RED"; throw err; } - } } } diff --git a/editor/js/ui/clipboard.js b/editor/js/ui/clipboard.js index 2fbf90253..d95e5bc38 100644 --- a/editor/js/ui/clipboard.js +++ b/editor/js/ui/clipboard.js @@ -21,7 +21,7 @@ RED.clipboard = (function() { var dialogContainer; var exportNodesDialog; var importNodesDialog; - + function setupDialogs(){ dialog = $('
    ') .appendTo("body") @@ -33,7 +33,7 @@ RED.clipboard = (function() { buttons: [ { id: "clipboard-dialog-ok", - text: RED._("dialog.ok"), + text: RED._("common.label.ok"), click: function() { if (/Import/.test(dialog.dialog("option","title"))) { RED.view.importNodes($("#clipboard-import").val()); @@ -43,14 +43,14 @@ RED.clipboard = (function() { }, { id: "clipboard-dialog-cancel", - text: RED._("dialog.cancel"), + text: RED._("common.label.cancel"), click: function() { $( this ).dialog( "close" ); } }, { id: "clipboard-dialog-close", - text: RED._("dialog.close"), + text: RED._("common.label.close"), click: function() { $( this ).dialog( "close" ); } @@ -66,20 +66,22 @@ RED.clipboard = (function() { }); dialogContainer = dialog.children(".dialog-form"); - + exportNodesDialog = '
    '+ - ''+ + ''+ ''+ '
    '+ '
    '+ - RED._("dialog.selectToCopy")+ + RED._("clipboard.selectNodes")+ '
    '; - + importNodesDialog = '
    '+ - ''+ + ''+ '
    '; } - + function validateImport() { var importInput = $("#clipboard-import"); var v = importInput.val(); @@ -104,8 +106,8 @@ RED.clipboard = (function() { $("#clipboard-dialog-ok").button("disable"); $("#clipboard-import").keyup(validateImport); $("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)}); - - dialog.dialog("option","title",RED._("dialog.importNodes")).dialog("open"); + + dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open"); } function exportNodes() { @@ -127,15 +129,15 @@ RED.clipboard = (function() { return false; }) }); - dialog.dialog("option","title",RED._("dialog.exportNodesClipboard")).dialog( "open" ); + dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" ); } } - + function hideDropTarget() { $("#dropTarget").hide(); RED.keyboard.remove(/* ESCAPE */ 27); } - + return { init: function() { setupDialogs(); @@ -152,16 +154,16 @@ RED.clipboard = (function() { }); RED.keyboard.add(/* e */ 69,{ctrl:true},function(){exportNodes();d3.event.preventDefault();}); RED.keyboard.add(/* i */ 73,{ctrl:true},function(){importNodes();d3.event.preventDefault();}); - - - + + + $('#chart').on("dragenter",function(event) { if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) { $("#dropTarget").css({display:'table'}); RED.keyboard.add(/* ESCAPE */ 27,hideDropTarget); } }); - + $('#dropTarget').on("dragover",function(event) { if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) { event.preventDefault(); @@ -176,15 +178,15 @@ RED.clipboard = (function() { RED.view.importNodes(data); event.preventDefault(); }); - - + + }, import: importNodes, export: exportNodes } - - - - - + + + + + })(); diff --git a/editor/js/ui/deploy.js b/editor/js/ui/deploy.js index 0b985e097..09b71b22f 100644 --- a/editor/js/ui/deploy.js +++ b/editor/js/ui/deploy.js @@ -13,29 +13,29 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ - + RED.deploy = (function() { - + var deploymentTypes = { "full":{img:"red/images/deploy-full-o.png"}, "nodes":{img:"red/images/deploy-nodes-o.png"}, "flows":{img:"red/images/deploy-flows-o.png"} } - + var ignoreDeployWarnings = { unknown: false, unusedConfig: false, invalid: false } - + var deploymentType = "full"; - + function changeDeploymentType(type) { deploymentType = type; $("#btn-deploy img").attr("src",deploymentTypes[type].img); } - - + + /** * options: * type: "default" - Button with drop-down options - no further customisation available @@ -46,7 +46,7 @@ RED.deploy = (function() { function init(options) { options = options || {}; var type = options.type || "default"; - + if (type == "default") { $('
  • '+ ' '+RED._("deploy.deploy")+''+ @@ -65,16 +65,16 @@ RED.deploy = (function() { if (options.hasOwnProperty('icon')) { icon = options.icon; } - + $('
  • '+ ''+ (icon?' ':'')+ ''+label+''+ '
  • ').prependTo(".header-toolbar"); } - + $('#btn-deploy').click(function() { save(); }); - + $( "#node-dialog-confirm-deploy" ).dialog({ title: "Confirm deploy", modal: true, @@ -83,9 +83,9 @@ RED.deploy = (function() { height: "auto", buttons: [ { - text: RED._("deploy.confirmDeploy"), + text: RED._("deploy.confirm.button.confirm"), click: function() { - + var ignoreChecked = $( "#node-dialog-confirm-deploy-hide" ).prop("checked"); if (ignoreChecked) { ignoreDeployWarnings[$( "#node-dialog-confirm-deploy-type" ).val()] = true; @@ -95,7 +95,7 @@ RED.deploy = (function() { } }, { - text: RED._("deploy.cancelDeploy"), + text: RED._("deploy.confirm.button.cancel"), click: function() { $( this ).dialog( "close" ); } @@ -114,7 +114,7 @@ RED.deploy = (function() { RED.nodes.on('change',function(state) { if (state.dirty) { window.onbeforeunload = function() { - return RED._("deploy.undeployedChanges"); + return RED._("deploy.confirm.undeployedChanges"); } $("#btn-deploy").removeClass("disabled"); } else { @@ -132,7 +132,7 @@ RED.deploy = (function() { var hasUnknown = false; var hasInvalid = false; var hasUnusedConfig = false; - + var unknownNodes = []; RED.nodes.eachNode(function(node) { hasInvalid = hasInvalid || !node.valid; @@ -143,7 +143,7 @@ RED.deploy = (function() { } }); hasUnknown = unknownNodes.length > 0; - + var unusedConfigNodes = {}; RED.nodes.eachConfig(function(node) { if (node.users.length === 0) { @@ -159,13 +159,13 @@ RED.deploy = (function() { hasUnusedConfig = true; } }); - + $( "#node-dialog-confirm-deploy-config" ).hide(); $( "#node-dialog-confirm-deploy-unknown" ).hide(); $( "#node-dialog-confirm-deploy-unused" ).hide(); - + var showWarning = false; - + if (hasUnknown && !ignoreDeployWarnings.unknown) { showWarning = true; $( "#node-dialog-confirm-deploy-type" ).val("unknown"); @@ -186,7 +186,7 @@ RED.deploy = (function() { unusedConfigNodes[type].forEach(function(label) { unusedNodeLabels.push(type+": "+label); }); - }); + }); $( "#node-dialog-confirm-deploy-unused-list" ) .html("
  • "+unusedNodeLabels.join("
  • ")+"
  • "); } @@ -196,10 +196,10 @@ RED.deploy = (function() { return; } } - - - - + + + + var nns = RED.nodes.createCompleteNodeSet(); $("#btn-deploy-icon").removeClass('fa-download'); @@ -236,9 +236,9 @@ RED.deploy = (function() { }).fail(function(xhr,textStatus,err) { RED.nodes.dirty(true); if (xhr.responseText) { - RED.notify(RED._("deploy.error")+xhr.responseJSON.message,"error"); + RED.notify(RED._("notification.error",{message:xhr.responseJSON.message}),"error"); } else { - RED.notify(RED._("deploy.error")+RED._("deploy.noResponseError"),"error"); + RED.notify(RED._("notification.error",{message:RED._("deploy.errors.noResponse")}),"error"); } }).always(function() { $("#btn-deploy-icon").removeClass('spinner'); diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index e7a46abdf..6e9e03756 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -179,7 +179,7 @@ RED.editor = (function() { buttons: [ { id: "node-dialog-ok", - text: RED._("dialog.ok"), + text: RED._("common.label.ok"), click: function() { if (editing_node) { var changes = {}; @@ -286,7 +286,7 @@ RED.editor = (function() { contentType: "application/json; charset=utf-8" }).done(function() { RED.library.loadFlowLibrary(); - RED.notify(RED._("editor.savedNodes"),"success"); + RED.notify(RED._("library.savedNodes"),"success"); }); } } @@ -295,7 +295,7 @@ RED.editor = (function() { }, { id: "node-dialog-cancel", - text: RED._("dialog.cancel"), + text: RED._("common.label.cancel"), click: function() { if (editing_node && editing_node._def) { if (editing_node._def.oneditcancel) { @@ -567,7 +567,7 @@ RED.editor = (function() { var buttons = $( "#dialog" ).dialog("option","buttons"); buttons.unshift({ class: 'leftButton', - text: RED._("editor.editFlow"), + text: RED._("subflow.edit"), click: function() { RED.workspaces.show(id); $("#node-dialog-ok").click(); @@ -745,7 +745,7 @@ RED.editor = (function() { buttons: [ { id: "node-config-dialog-ok", - text: RED._("dialog.ok"), + text: RED._("common.label.ok"), click: function() { var configProperty = $(this).dialog('option','node-property'); var configId = $(this).dialog('option','node-id'); @@ -805,7 +805,7 @@ RED.editor = (function() { }, { id: "node-config-dialog-cancel", - text: RED._("dialog.cancel"), + text: RED._("common.label.cancel"), click: function() { var configType = $(this).dialog('option','node-type'); var configId = $(this).dialog('option','node-id'); @@ -861,7 +861,7 @@ RED.editor = (function() { buttons: [ { id: "subflow-dialog-ok", - text: RED._("dialog.ok"), + text: RED._("common.label.ok"), click: function() { if (editing_node) { var i; @@ -875,7 +875,7 @@ RED.editor = (function() { changes['name'] = editing_node.name; editing_node.name = newName; changed = true; - $("#menu-item-workspace-menu-"+editing_node.id.replace(".","-")).text(RED._("editor.subflow")+newName); + $("#menu-item-workspace-menu-"+editing_node.id.replace(".","-")).text(RED._("subflow.tabLabel",{name:newName})); } RED.palette.refresh(); @@ -908,7 +908,7 @@ RED.editor = (function() { }, { id: "subflow-dialog-cancel", - text: RED._("dialog.cancel"), + text: RED._("common.label.cancel"), click: function() { $( this ).dialog( "close" ); editing_node = null; @@ -949,8 +949,8 @@ RED.editor = (function() { } }); - $("#subflow-dialog-user-count").html(RED._("editor.subflowInstances", {count:userCount})).show(); - $("#subflow-dialog").dialog("option","title",RED._("editor.editFlow")+subflow.name).dialog( "open" ); + $("#subflow-dialog-user-count").html(RED._("subflow.subflowInstances", {count:userCount})).show(); + $("#subflow-dialog").dialog("option","title",RED._("subflow.editSubflow",{name:subflow.name})).dialog( "open" ); } diff --git a/editor/js/ui/library.js b/editor/js/ui/library.js index a80ecd451..af36da8cb 100644 --- a/editor/js/ui/library.js +++ b/editor/js/ui/library.js @@ -239,7 +239,7 @@ RED.library = (function() { height: 450, buttons: [ { - text: RED._("dialog.ok"), + text: RED._("common.label.ok"), click: function() { if (selectedLibraryItem) { for (var i=0;i
    "+type+"

    "; } - + popOverContent = $(l+($("script[data-help-name|='"+type+"']").html()||"

    "+RED._("palette.noInfo")+"

    ").trim()) .filter(function(n) { return this.nodeType == 1 || (this.nodeType == 3 && this.textContent.trim().length > 0) }).slice(0,2); } catch(err) { // Malformed HTML may cause errors. TODO: need to understand what can break - console.log(RED._("palette.popOverError",{type:type})); + // NON-NLS: internal debug + console.log("Error generating pop-over label for ",type); console.log(err.toString()); popOverContent = "

    "+label+"

    "+RED._("palette.noInfo")+"

    "; } @@ -120,12 +121,12 @@ RED.palette = (function() { label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||""; } - + $('
    ',{class:"palette_label"+(def.align=="right"?" palette_label_right":"")}).appendTo(d); d.className="palette_node"; - - + + if (def.icon) { var icon_url = (typeof def.icon === "function" ? def.icon.call({}) : def.icon); var iconContainer = $('
    ',{class:"palette_icon_container"+(def.align=="right"?" palette_icon_container_right":"")}).appendTo(d); @@ -183,7 +184,7 @@ RED.palette = (function() { revertDuration: 50, start: function() {RED.view.focus();} }); - + if (def.category == "subflows") { $(d).dblclick(function(e) { RED.workspaces.show(nt.substring(8)); @@ -192,7 +193,7 @@ RED.palette = (function() { } setLabel(nt,$(d),label); - + var categoryNode = $("#palette-container-"+category); if (categoryNode.find(".palette_node").length === 1) { if (!categoryNode.find("i").hasClass("expanded")) { @@ -200,7 +201,7 @@ RED.palette = (function() { categoryNode.find("i").toggleClass("expanded"); } } - + } } @@ -281,26 +282,26 @@ RED.palette = (function() { createCategoryContainer(category, RED._("palette.label."+category,{defaultValue:category})); }); } - + $("#palette-search-input").focus(function(e) { RED.keyboard.disable(); }); $("#palette-search-input").blur(function(e) { RED.keyboard.enable(); }); - + $("#palette-search-clear").on("click",function(e) { e.preventDefault(); $("#palette-search-input").val(""); filterChange(); $("#palette-search-input").focus(); }); - + $("#palette-search-input").val(""); $("#palette-search-input").on("keyup",function() { filterChange(); }); - + $("#palette-search-input").on("focus",function() { $("body").one("mousedown",function() { $("#palette-search-input").blur(); diff --git a/editor/js/ui/subflow.js b/editor/js/ui/subflow.js index cd42b7afb..dea5169c9 100644 --- a/editor/js/ui/subflow.js +++ b/editor/js/ui/subflow.js @@ -15,12 +15,12 @@ **/ RED.subflow = (function() { - + function getSubflow() { return RED.nodes.subflow(RED.workspaces.active()); } - + function findAvailableSubflowIOPosition(subflow) { var pos = {x:70,y:70}; for (var i=0;i 1) { - RED.notify(RED._("notification.multipleInputsToSelection"),"error"); + RED.notify(RED._("subflow.errors.multipleInputsToSelection"),"error"); return; } //if (candidateInputs.length == 0) { // RED.notify("Cannot create subflow: no input to selection","error"); // return; //} - - + + var lastIndex = 0; RED.nodes.eachSubflow(function(sf) { var m = (new RegExp("^Subflow (\\d+)$")).exec(sf.name); @@ -292,9 +292,9 @@ RED.subflow = (function() { lastIndex = Math.max(lastIndex,m[1]); } }); - + var name = "Subflow "+(lastIndex+1); - + var subflowId = RED.nodes.id(); var subflow = { type:"subflow", @@ -322,7 +322,7 @@ RED.subflow = (function() { }}) }; RED.nodes.addSubflow(subflow); - + var subflowInstance = { id:RED.nodes.id(), type:"subflow:"+subflow.id, @@ -337,13 +337,13 @@ RED.subflow = (function() { subflowInstance._def = RED.nodes.getType(subflowInstance.type); RED.editor.validateNode(subflowInstance); RED.nodes.add(subflowInstance); - + candidateInputs.forEach(function(l) { var link = {source:l.source, sourcePort:l.sourcePort, target: subflowInstance}; new_links.push(link); RED.nodes.addLink(link); }); - + candidateOutputs.forEach(function(output,i) { output.targets.forEach(function(target) { var link = {source:subflowInstance, sourcePort:i, target: target}; @@ -351,7 +351,7 @@ RED.subflow = (function() { RED.nodes.addLink(link); }); }); - + subflow.in.forEach(function(input) { input.wires.forEach(function(wire) { var link = {source: input, sourcePort: 0, target: RED.nodes.node(wire.id) } @@ -366,34 +366,34 @@ RED.subflow = (function() { RED.nodes.addLink(link); }); }); - + for (i=0;i",{class:"tab-config-list"}).appendTo(content); - + function show() { if (!RED.sidebar.containsTab("config")) { - RED.sidebar.addTab(RED._("sidebar.config"),content,true); + RED.sidebar.addTab(RED._("sidebar.config.title"),content,true); } refresh(); RED.sidebar.show("config"); } - + function refresh() { list.empty(); RED.nodes.eachConfig(function(node) { @@ -46,12 +46,12 @@ RED.sidebar.config = (function() { label = node._def.label; } label = label || " "; - + var entry = $('
    ').appendTo(li); entry.on('dblclick',function(e) { RED.editor.editConfig("", node.type, node.id); }); - + var userArray = node.users.map(function(n) { return n.id }); entry.on('mouseover',function(e) { RED.nodes.eachNode(function(node) { @@ -72,7 +72,7 @@ RED.sidebar.config = (function() { }); RED.view.redraw(); }); - + $('
    '+label+'
    ').appendTo(entry); $('
    '+node.users.length+'
    ').appendTo(entry); }); diff --git a/editor/js/ui/tab-info.js b/editor/js/ui/tab-info.js index 58cde0f92..c07a3c266 100644 --- a/editor/js/ui/tab-info.js +++ b/editor/js/ui/tab-info.js @@ -33,10 +33,10 @@ RED.sidebar.info = (function() { content.style.paddingRight = "4px"; var propertiesExpanded = false; - + function show() { if (!RED.sidebar.containsTab("info")) { - RED.sidebar.addTab(RED._("sidebar.info"),content,false); + RED.sidebar.addTab(RED._("sidebar.info.title"),content,false); } RED.sidebar.show("info"); } @@ -60,13 +60,13 @@ RED.sidebar.info = (function() { function refresh(node) { var table = ''; - table += ''; + table += ''; if (node.type != "subflow" && node.name) { - table += ""; + table += ""; } - table += ""; - table += ""; - + table += ""; + table += ""; + var m = /^subflow(:(.+))?$/.exec(node.type); if (m) { var subflowNode; @@ -75,9 +75,9 @@ RED.sidebar.info = (function() { } else { subflowNode = node; } - - table += ''; - + + table += ''; + var userCount = 0; var subflowType = "subflow:"+subflowNode.id; RED.nodes.eachNode(function(n) { @@ -85,12 +85,12 @@ RED.sidebar.info = (function() { userCount++; } }); - table += ""; - table += ""; + table += ""; + table += ""; } - + if (!m && node.type != "subflow" && node.type != "comment") { - table += ''; + table += ''; if (node._def) { for (var n in node._def.defaults) { if (n != "name" && node._def.defaults.hasOwnProperty(n)) { @@ -98,7 +98,7 @@ RED.sidebar.info = (function() { var type = typeof val; if (type === "string") { if (val.length === 0) { - val += ''+RED._("tabInfo.blank")+''; + val += ''+RED._("sidebar.info.blank")+''; } else { if (val.length > 30) { val = val.substring(0,30)+" ..."; @@ -114,14 +114,14 @@ RED.sidebar.info = (function() { val += " "+i+": "+vv+"
    "; } if (node[n].length > 10) { - val += " ... "+node[n].length+" items
    "; + val += " ... "+RED._("sidebar.info.arrayItems",{count:node[n].length})+"
    "; } val += "]"; } else { val = JSON.stringify(val,jsonFilter," "); val = val.replace(/&/g,"&").replace(//g,">"); } - + table += '"; } } @@ -140,7 +140,7 @@ RED.sidebar.info = (function() { } $("#tab-info").html(table); - + $(".node-info-property-header").click(function(e) { var icon = $(this).find("i"); if (icon.hasClass("fa-caret-right")) { @@ -154,15 +154,15 @@ RED.sidebar.info = (function() { $(".node-info-property-row").hide(); propertiesExpanded = false; } - + e.preventDefault(); }); } - + function clear() { $("#tab-info").html(""); } - + RED.view.on("selection-changed",function(selection) { if (selection.nodes) { if (selection.nodes.length == 1) { diff --git a/editor/js/ui/view.js b/editor/js/ui/view.js index 0266a6868..acd0897be 100644 --- a/editor/js/ui/view.js +++ b/editor/js/ui/view.js @@ -35,7 +35,7 @@ RED.view = (function() { var activeSubflow = null; var activeNodes = []; var activeLinks = []; - + var selected_link = null, mousedown_link = null, mousedown_node = null, @@ -73,7 +73,7 @@ RED.view = (function() { .on("mousedown", function() { $(this).focus(); }); - + var vis = outer .append('svg:g') .on("dblclick.zoom", null) @@ -233,9 +233,9 @@ RED.view = (function() { function updateActiveNodes() { var activeWorkspace = RED.workspaces.active(); - + activeNodes = RED.nodes.filterNodes({z:activeWorkspace}); - + activeLinks = RED.nodes.filterLinks({ source:{z:activeWorkspace}, target:{z:activeWorkspace} @@ -253,15 +253,15 @@ RED.view = (function() { } var scrollStartLeft = chart.scrollLeft(); var scrollStartTop = chart.scrollTop(); - + activeSubflow = RED.nodes.subflow(event.workspace); if (activeSubflow) { $("#workspace-subflow-add-input").toggleClass("disabled",activeSubflow.in.length > 0); } - + RED.menu.setDisabled("menu-item-workspace-edit", activeSubflow); RED.menu.setDisabled("menu-item-workspace-delete",RED.workspaces.count() == 1 || activeSubflow); - + if (workspaceScrollPositions[event.workspace]) { chart.scrollLeft(workspaceScrollPositions[event.workspace].left); chart.scrollTop(workspaceScrollPositions[event.workspace].top); @@ -283,7 +283,7 @@ RED.view = (function() { updateActiveNodes(); redraw(); }); - + $('#btn-zoom-out').click(function() {zoomOut();}); $('#btn-zoom-zero').click(function() {zoomZero();}); $('#btn-zoom-in').click(function() {zoomIn();}); @@ -296,50 +296,50 @@ RED.view = (function() { else { zoomIn(); } } }); - + // Handle nodes dragged from the palette $("#chart").droppable({ accept:".palette_node", drop: function( event, ui ) { d3.event = event; var selected_tool = ui.draggable[0].type; - + var m = /^subflow:(.+)$/.exec(selected_tool); - + if (activeSubflow && m) { var subflowId = m[1]; if (subflowId === activeSubflow.id) { - RED.notify(RED._("notification.cannotAddSubflowToItself"),"error"); + RED.notify(RED._("notification.error",{message: RED._("notification.errors.cannotAddSubflowToItself")}),"error"); return; } if (RED.nodes.subflowContains(m[1],activeSubflow.id)) { - RED.notify(RED._("notification.cannotAddCircularReference"),"error"); + RED.notify(RED._("notification.error",{message: RED._("notification.errors.cannotAddCircularReference")}),"error"); return; } - + } - + var mousePos = d3.touches(this)[0]||d3.mouse(this); mousePos[1] += this.scrollTop; mousePos[0] += this.scrollLeft; mousePos[1] /= scaleFactor; mousePos[0] /= scaleFactor; - + var nn = { id:(1+Math.random()*4294967295).toString(16),x: mousePos[0],y:mousePos[1],w:node_width,z:RED.workspaces.active()}; - + nn.type = selected_tool; nn._def = RED.nodes.getType(nn.type); - + if (!m) { nn.inputs = nn._def.inputs || 0; nn.outputs = nn._def.outputs; - + for (var d in nn._def.defaults) { if (nn._def.defaults.hasOwnProperty(d)) { nn[d] = nn._def.defaults[d].value; } } - + if (nn._def.onadd) { nn._def.onadd.call(nn); } @@ -348,7 +348,7 @@ RED.view = (function() { nn.inputs = subflow.in.length; nn.outputs = subflow.out.length; } - + nn.changed = true; nn.h = Math.max(node_height,(nn.outputs||0) * 15); RED.history.push({t:'add',nodes:[nn.id],dirty:RED.nodes.dirty()}); @@ -362,13 +362,13 @@ RED.view = (function() { updateActiveNodes(); updateSelection(); redraw(); - + if (nn._def.autoedit) { RED.editor.edit(nn); } } }); - + RED.keyboard.add(/* z */ 90,{ctrl:true},function(){RED.history.pop();}); RED.keyboard.add(/* a */ 65,{ctrl:true},function(){selectAll();d3.event.preventDefault();}); RED.keyboard.add(/* = */ 187,{ctrl:true},function(){zoomIn();d3.event.preventDefault();}); @@ -652,7 +652,7 @@ RED.view = (function() { } }); } - + selected_link = null; updateSelection(); redraw(); @@ -693,17 +693,17 @@ RED.view = (function() { } var selection = {}; - + if (moving_set.length > 0) { selection.nodes = moving_set.map(function(n) { return n.n;}); } if (selected_link != null) { selection.link = selected_link; } - + eventHandler.emit("selection-changed",selection); } - + function endKeyboardMove() { var ns = []; for (var i=0;i 0) { for (var i=0;i 0 || removedSubflowOutputs.length > 0 || removedSubflowInputs.length > 0) { RED.nodes.dirty(true); @@ -856,7 +856,7 @@ RED.view = (function() { } } clipboard = JSON.stringify(nns); - RED.notify(RED._("notification.nodeCopied",{count:nns.length})); + RED.notify(RED._("clipboard.nodeCopied",{count:nns.length})); } } @@ -1043,9 +1043,9 @@ RED.view = (function() { redraw(); } } else if (d.changed) { - RED.notify(RED._("notification.undeployedChanges"),"warning"); + RED.notify(RED._("notification.warning", {message:RED._("notification.warnings.undeployedChanges")}),"warning"); } else { - RED.notify(RED._("notification.nodeActionDisabled"),"warning"); + RED.notify(RED._("notification.warning", {message:RED._("notification.warnings.nodeActionDisabled")}),"warning"); } d3.event.preventDefault(); } @@ -1070,9 +1070,9 @@ RED.view = (function() { // Don't bother redrawing nodes if we're drawing links if (mouse_mode != RED.state.JOINING) { - + var dirtyNodes = {}; - + if (activeSubflow) { var subflowOutputs = vis.selectAll(".subflowoutput").data(activeSubflow.out,function(d,i){ return d.id;}); subflowOutputs.exit().remove(); @@ -1082,7 +1082,7 @@ RED.view = (function() { d.h=40; }); outGroup.append("rect").attr("class","subflowport").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) - // TODO: This is exactly the same set of handlers used for regular nodes - DRY + // TODO: This is exactly the same set of handlers used for regular nodes - DRY .on("mouseup",nodeMouseUp) .on("mousedown",nodeMouseDown) .on("touchstart",function(d) { @@ -1094,7 +1094,7 @@ RED.view = (function() { touchStartTime = setTimeout(function() { showTouchMenu(obj,pos); },touchLongPressTimeout); - nodeMouseDown.call(this,d) + nodeMouseDown.call(this,d) }) .on("touchend", function(d) { clearTimeout(touchStartTime); @@ -1105,7 +1105,7 @@ RED.view = (function() { } nodeMouseUp.call(this,d); }); - + outGroup.append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10).attr("x",-5).attr("y",15) .on("mousedown", function(d,i){portMouseDown(d,1,0);} ) .on("touchstart", function(d,i){portMouseDown(d,1,0);} ) @@ -1125,7 +1125,7 @@ RED.view = (function() { d.h=40; }); inGroup.append("rect").attr("class","subflowport").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) - // TODO: This is exactly the same set of handlers used for regular nodes - DRY + // TODO: This is exactly the same set of handlers used for regular nodes - DRY .on("mouseup",nodeMouseUp) .on("mousedown",nodeMouseDown) .on("touchstart",function(d) { @@ -1137,7 +1137,7 @@ RED.view = (function() { touchStartTime = setTimeout(function() { showTouchMenu(obj,pos); },touchLongPressTimeout); - nodeMouseDown.call(this,d) + nodeMouseDown.call(this,d) }) .on("touchend", function(d) { clearTimeout(touchStartTime); @@ -1148,7 +1148,7 @@ RED.view = (function() { } nodeMouseUp.call(this,d); }); - + inGroup.append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10).attr("x",35).attr("y",15) .on("mousedown", function(d,i){portMouseDown(d,0,i);} ) .on("touchstart", function(d,i){portMouseDown(d,0,i);} ) @@ -1157,9 +1157,9 @@ RED.view = (function() { .on("mouseover",function(d,i) { var port = d3.select(this); port.classed("port_hovered",(mouse_mode!=RED.state.JOINING || mousedown_port_type !== 0 ));}) .on("mouseout",function(d,i) { var port = d3.select(this); port.classed("port_hovered",false);}); inGroup.append("svg:text").attr('class','port_label').attr('x',18).attr('y',20).style("font-size","10px").text("input"); - - - + + + subflowOutputs.each(function(d,i) { if (d.dirty) { var output = d3.select(this); @@ -1183,7 +1183,7 @@ RED.view = (function() { vis.selectAll(".subflowoutput").remove(); vis.selectAll(".subflowinput").remove(); } - + var node = vis.selectAll(".nodegroup").data(activeNodes,function(d){return d.id}); node.exit().remove(); @@ -1318,7 +1318,7 @@ RED.view = (function() { //icon.attr('class','node_icon_shade node_icon_shade_'+d._def.align); //icon.attr('class','node_icon_shade_border node_icon_shade_border_'+d._def.align); } - + //if (d.inputs > 0 && d._def.align == null) { // icon_shade.attr("width",35); // icon.attr("transform","translate(5,0)"); @@ -1388,7 +1388,7 @@ RED.view = (function() { var thisNode = d3.select(this); //thisNode.selectAll(".centerDot").attr({"cx":function(d) { return d.w/2;},"cy":function(d){return d.h/2}}); thisNode.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; }); - + if (mouse_mode != RED.state.MOVING_ACTIVE) { thisNode.selectAll(".node") .attr("width",function(d){return d.w}) @@ -1398,13 +1398,13 @@ RED.view = (function() { ; //thisNode.selectAll(".node-gradient-top").attr("width",function(d){return d.w}); //thisNode.selectAll(".node-gradient-bottom").attr("width",function(d){return d.w}).attr("y",function(d){return d.h-30}); - + thisNode.selectAll(".node_icon_group_right").attr('transform', function(d){return "translate("+(d.w-30)+",0)"}); thisNode.selectAll(".node_label_right").attr('x', function(d){return d.w-38}); //thisNode.selectAll(".node_icon_right").attr("x",function(d){return d.w-d3.select(this).attr("width")-1-(d.outputs>0?5:0);}); //thisNode.selectAll(".node_icon_shade_right").attr("x",function(d){return d.w-30;}); //thisNode.selectAll(".node_icon_shade_border_right").attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2)}); - + var inputPorts = thisNode.selectAll(".port_input"); if (d.inputs === 0 && !inputPorts.empty()) { inputPorts.remove(); @@ -1419,13 +1419,13 @@ RED.view = (function() { .on("mouseover",function(d) { var port = d3.select(this); port.classed("port_hovered",(mouse_mode!=RED.state.JOINING || mousedown_port_type != 1 ));}) .on("mouseout",function(d) { var port = d3.select(this); port.classed("port_hovered",false);}) } - + var numOutputs = d.outputs; var y = (d.h/2)-((numOutputs-1)/2)*13; d.ports = d.ports || d3.range(numOutputs); d._ports = thisNode.selectAll(".port_output").data(d.ports); var output_group = d._ports.enter().append("g").attr("class","port_output"); - + output_group.append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) .on("mousedown",(function(){var node = d; return function(d,i){portMouseDown(node,0,i);}})() ) .on("touchstart",(function(){var node = d; return function(d,i){portMouseDown(node,0,i);}})() ) @@ -1433,7 +1433,7 @@ RED.view = (function() { .on("touchend",(function(){var node = d; return function(d,i){portMouseUp(node,0,i);}})() ) .on("mouseover",function(d,i) { var port = d3.select(this); port.classed("port_hovered",(mouse_mode!=RED.state.JOINING || mousedown_port_type !== 0 ));}) .on("mouseout",function(d,i) { var port = d3.select(this); port.classed("port_hovered",false);}); - + d._ports.exit().remove(); if (d._ports) { numOutputs = d.outputs || 1; @@ -1461,7 +1461,7 @@ RED.view = (function() { (d._def.align?' node_label_'+d._def.align:'')+ (d._def.labelStyle?' '+(typeof d._def.labelStyle == "function" ? d._def.labelStyle.call(d):d._def.labelStyle):'') ; }); - + if (d._def.icon) { icon = thisNode.select(".node_icon"); var current_url = icon.attr("xlink:href"); @@ -1482,27 +1482,27 @@ RED.view = (function() { } } } - - + + thisNode.selectAll(".node_tools").attr("x",function(d){return d.w-35;}).attr("y",function(d){return d.h-20;}); - + thisNode.selectAll(".node_changed") .attr("x",function(d){return d.w-10}) .classed("hidden",function(d) { return !d.changed; }); - + thisNode.selectAll(".node_error") .attr("x",function(d){return d.w-10-(d.changed?13:0)}) .classed("hidden",function(d) { return d.valid; }); - + thisNode.selectAll(".port_input").each(function(d,i) { var port = d3.select(this); port.attr("transform",function(d){return "translate(-5,"+((d.h/2)-5)+")";}) }); - + thisNode.selectAll(".node_icon").attr("y",function(d){return (d.h-d3.select(this).attr("height"))/2;}); thisNode.selectAll(".node_icon_shade").attr("height",function(d){return d.h;}); thisNode.selectAll(".node_icon_shade_border").attr("d",function(d){ return "M "+(("right" == d._def.align) ?0:30)+" 1 l 0 "+(d.h-2)}); - + thisNode.selectAll('.node_button').attr("opacity",function(d) { return (activeSubflow||d.changed)?0.4:1 }); @@ -1522,11 +1522,11 @@ RED.view = (function() { } return 1; }); - + //thisNode.selectAll('.node_right_button').attr("transform",function(d){return "translate("+(d.w - d._def.button.width.call(d))+","+0+")";}).attr("fill",function(d) { // return typeof d._def.button.color === "function" ? d._def.button.color.call(d):(d._def.button.color != null ? d._def.button.color : d._def.color) //}); - + thisNode.selectAll('.node_badge_group').attr("transform",function(d){return "translate("+(d.w-40)+","+(d.h+3)+")";}); thisNode.selectAll('text.node_badge_label').text(function(d,i) { if (d._def.badge) { @@ -1581,7 +1581,7 @@ RED.view = (function() { } ); var linkEnter = link.enter().insert("g",".node").attr("class","link"); - + linkEnter.each(function(d,i) { var l = d3.select(this); d.added = true; @@ -1608,7 +1608,7 @@ RED.view = (function() { l.append("svg:path").attr("class","link_line link_path") .classed("link_subflow", function(d) { return activeSubflow && (d.source.type === "subflow" || d.target.type === "subflow") }); }); - + link.exit().remove(); var links = vis.selectAll(".link_path"); links.each(function(d) { @@ -1618,7 +1618,7 @@ RED.view = (function() { var numOutputs = d.source.outputs || 1; var sourcePort = d.sourcePort || 0; var y = -((numOutputs-1)/2)*13 +13*sourcePort; - + var dy = d.target.y-(d.source.y+y); var dx = (d.target.x-d.target.w/2)-(d.source.x+d.source.w/2); var delta = Math.sqrt(dy*dy+dx*dx); @@ -1627,19 +1627,19 @@ RED.view = (function() { if (delta < node_width) { scale = 0.75-0.75*((node_width-delta)/node_width); } - + if (dx < 0) { scale += 2*(Math.min(5*node_width,Math.abs(dx))/(5*node_width)); if (Math.abs(dy) < 3*node_height) { scaleY = ((dy>0)?0.5:-0.5)*(((3*node_height)-Math.abs(dy))/(3*node_height))*(Math.min(node_width,Math.abs(dx))/(node_width)) ; } } - + d.x1 = d.source.x+d.source.w/2; d.y1 = d.source.y+y; d.x2 = d.target.x-d.target.w/2; d.y2 = d.target.y; - + return "M "+(d.source.x+d.source.w/2)+" "+(d.source.y+y)+ " C "+(d.source.x+d.source.w/2+scale*node_width)+" "+(d.source.y+y+scaleY*node_height)+" "+ (d.target.x-d.target.w/2-scale*node_width)+" "+(d.target.y-scaleY*node_height)+" "+ @@ -1647,9 +1647,9 @@ RED.view = (function() { }); } }) - + link.classed("link_selected", function(d) { return d === selected_link || d.selected; }); - link.classed("link_unknown",function(d) { + link.classed("link_unknown",function(d) { delete d.added; return d.target.type == "unknown" || d.source.type == "unknown" }); @@ -1662,12 +1662,12 @@ RED.view = (function() { } ).classed("link_selected", false); } - + if (d3.event) { d3.event.preventDefault(); } - + } function focusView() { @@ -1688,7 +1688,7 @@ RED.view = (function() { var new_links = result[1]; var new_workspaces = result[2]; var new_subflows = result[3]; - + var new_ms = new_nodes.filter(function(n) { return n.z == RED.workspaces.active() }).map(function(n) { return {n:n};}); var new_node_ids = new_nodes.map(function(n){ return n.id; }); @@ -1764,7 +1764,7 @@ RED.view = (function() { // TODO: DRY var eventHandler = (function() { var handlers = {}; - + return { on: function(evt,func) { handlers[evt] = handlers[evt]||[]; @@ -1775,12 +1775,12 @@ RED.view = (function() { for (var i=0;i'+ '
    '+ '
    '+ @@ -37,7 +37,7 @@ RED.user = (function() { resizable: false, draggable: false }); - + $("#node-dialog-login-fields").empty(); $.ajax({ dataType: "json", @@ -45,7 +45,7 @@ RED.user = (function() { success: function(data) { if (data.type == "credentials") { var i=0; - + if (data.image) { $("#node-dialog-login-image").attr("src",data.image); } else { @@ -56,7 +56,7 @@ RED.user = (function() { var row = $("
    ",{id:"rrr"+i,class:"form-row"}); $('
    ').appendTo(row); var input = $('').appendTo(row); - + if (i'+RED._("dialog.loginFailed")+''+ - (opts.cancelable?''+RED._("dialog.cancel")+'':'')+ - '
    ').appendTo("#node-dialog-login-fields"); - - + $('
    '+RED._("user.loginFailed")+''+ + (opts.cancelable?''+RED._("common.label.cancel")+'':'')+ + '
    ').appendTo("#node-dialog-login-fields"); + + $("#node-dialog-login-submit").button(); $("#node-dialog-login-fields").submit(function(event) { $("#node-dialog-login-submit").button("option","disabled",true); $("#node-dialog-login-failed").hide(); $(".login-spinner").show(); - + var body = { client_id: "node-red-editor", grant_type: "password", @@ -116,7 +116,7 @@ RED.user = (function() { } } dialog.dialog("open"); - } + } }); } @@ -131,7 +131,7 @@ RED.user = (function() { } }) } - + function updateUserMenu() { $("#usermenu-submenu li").remove(); if (RED.settings.user.anonymous) { @@ -141,7 +141,7 @@ RED.user = (function() { onselect: function() { RED.user.login({cancelable:true},function() { RED.settings.load(function() { - RED.notify(RED._("notification.loggedInAs")+RED.settings.user.username,"success"); + RED.notify(RED._("user.loggedInAs",{name:RED.settings.user.username}),"success"); updateUserMenu(); }); }); @@ -160,25 +160,25 @@ RED.user = (function() { } }); } - + } - - - + + + function init() { if (RED.settings.user) { if (!RED.settings.editorTheme || !RED.settings.editorTheme.hasOwnProperty("userMenu")) { - + $('
  • ') .prependTo(".header-toolbar"); - + RED.menu.init({id:"btn-usermenu", options: [] }); updateUserMenu(); } } - + } return { init: init, diff --git a/editor/templates/index.mst b/editor/templates/index.mst index 4e9a34531..b386282aa 100644 --- a/editor/templates/index.mst +++ b/editor/templates/index.mst @@ -55,10 +55,10 @@
    - - - - + + + +
    @@ -80,14 +80,14 @@
    -

    +

    - +
    @@ -95,11 +95,11 @@
    -
    -
    +
    +
      -
      +
        @@ -115,12 +115,12 @@
        - - + +
        - - + +
        @@ -129,7 +129,7 @@
        @@ -145,7 +145,7 @@
        - +
        @@ -159,15 +159,15 @@ diff --git a/locales/en-US/editor.json b/locales/en-US/editor.json index 6480030f2..5785dbe60 100644 --- a/locales/en-US/editor.json +++ b/locales/en-US/editor.json @@ -1,178 +1,192 @@ { + "common": { + "label": { + "name": "Name", + "ok": "Ok", + "cancel": "Cancel", + "delete": "Delete", + "close": "Close" + } + }, "workspace": { + "renameSheet": "Rename sheet", + "confirmDelete": "Confirm delete", + "delete": "Are you sure you want to delete '__label__'?", + "dropFlowHere": "Drop the flow here" + }, + "menu": { "label": { - "name": "Name:" + "sidebar": "Sidebar", + "displayStatus": "Display node status", + "import": "Import", + "export": "Export", + "clipboard": "Clipboard", + "library": "Library", + "configurationNodes": "Configuration nodes", + "subflows": "Subflows", + "createSubflow": "Create subflow", + "selectionToSubflow": "Selection to subflow", + "workspaces": "Workspaces", + "add": "Add", + "rename": "Rename", + "delete": "Delete", + "keyboardShortcuts": "Keyboard Shortcuts", + "login": "Login", + "logout": "Logout" } }, - "menu": { - "label": { - "sidebar": "Sidebar", - "displayStatus": "Display node status", - "import": "Import", - "export": "Export", - "clipboard": "Clipboard", - "library": "Library", - "configurationNodes": "Configuration nodes", - "subflows": "Subflows", - "createSubflow": "Create subflow", - "selectionToSubflow": "Selection to subflow", - "workspaces": "Workspaces", - "add": "Add", - "rename": "Rename", - "delete": "Delete", - "keyboardShortcuts": "Keyboard Shortcuts", - "login": "Login", - "logout": "Logout" - } - }, - "notification": { - "nodeAdded": "Node added to palette:", - "nodeAdded_plural": "Nodes added to palette", - "nodeRemoved": "Node removed from palette:", - "nodeRemoved_plural": "Nodes removed from palette:", - "nodeEnabled": "Node enabled:", - "nodeEnabled_plural": "Nodes enabled:", - "nodeDisabled": "Node disabled:", - "nodeDisabled_plural": "Nodes disabled:", - "lostConnectionError": "Error: Lost connection to server", - "importUnrecognised": "Imported unrecognised ", - "loggedInAs": "Logged in as ", - "invalidFilename": "Invalid filename", - "savedType": "Saved __type__", - "saveFailed": "Save failed: ", - "noNodesSelected": "Cannot create subflow: no nodes selected", - "multipleInputsToSelection": "Cannot create subflow: multiple inputs to selection", - "cannotAddSubflowToItself": "Error: Cannot add subflow to itself", - "cannotAddCircularReference": "Error: Cannot add subflow - circular reference detected", - "nodeCopied": "__count__ node copied", - "nodeCopied_plural": "__count__ nodes copied", - "undeployedChanges": "Warning: node has undeployed changes", - "nodeActionDisabled": "Warning: node actions disabled within subflow", - "error": "Error: " - }, - "error": { - "apiSubflowOnly": "this api is subflow only. called with:", - "invalidFlow": "Invalid flow: ", - "cannotAddSubflowToItself": "Cannot add subflow to itself", - "cannotAddCircularReference": "Cannot add subflow - circular reference detected" - }, - "dialog": { - "cancel": "Cancel", - "login": "Login", - "loginFailed": "Login failed", - "ok": "Ok", - "delete": "Delete", - "close": "Close", - "nodes": " Nodes:", - "selectToCopy": "Select the text above and copy to the clipboard with Ctrl-C.", - "pasteNodesHere": "Paste nodes here", - "importNodes": "Import nodes", - "exportNodesClipboard": "Export nodes to clipboard", - "renameSheet": "Rename sheet", - "confirmDelete": "Confirm delete" - }, - "deploy": { - "deploy": "Deploy", - "full": "Full", - "modifiedFlows": "Modified Flows", - "modifiedNodes": "Modified Nodes", - "fullDesc": "Deploys everything in the workspace", - "modifiedFlowsDesc": "Only deploys flows that contain changed nodes", - "modifiedNodesDesc": "Only deploys nodes that have changed", - "confirmDeploy": "Confirm deploy", - "cancelDeploy": "Cancel", - "undeployedChanges": "You have undeployed changes.\n\nLeaving this page will lose these changes.", - "successfulDeploy": "Successfully Deployed", - "error": "Error: ", - "noResponseError": "no response from server" - }, - "editor": { - "savedNodes": "Saved nodes", - "configEdit": "edit", - "configAdd": "add", - "configDelete": "Delete", - "editFlow": "Edit flow ", - "nodesUse": "__count__ node uses this config", - "nodesUse_plural": "__count__ nodes use this config", - "addNewConfig": "Add new __type__ config node", - "editConfig": "Edit __type__ config node", - "addNewType": "Add new __type__...", - "subflow": "Subflow: ", - "subflowInstances": "There is __count__ instance of this subflow", - "subflowInstances_plural": "There are __count__ instances of this subflow" - }, - "keyboard": { - "selectAll": "Select all nodes", - "selectAllConnected": "Select all connected nodes", - "addRemoveNode": "Add/remove node from selection", - "deleteSelected": "Delete selected nodes or link", - "importNode": "Import nodes", - "exportNode": "Export selected nodes", - "toggleSidebar": "Toggle sidebar", - "deleteNode": "Delete selected nodes or link", - "copyNode": "Copy selected nodes", - "cutNode": "Cut selected nodes", - "pasteNode": "Paste nodes" - }, - "library": { - "openLibrary": "Open Library...", - "saveToLibrary": "Save to Library...", - "typeLibrary": "__type__ library", - "unnamedType": "Unnamed __type__", - "saveToLibrary": "Save to Library", - "exportToLibrary": "Export nodes to library", - "dialogSaveOverwrite": "A __libraryType__ called __libraryName__ already exists. Overwrite?" - }, - "palette": { - "noInfo": "no information available", - "popOverError": "Error generating pop-over label for '__type__'.", - "filter": "filter", - "label": { - "subflows": "subflows", - "input": "input", - "output": "output", - "function": "function", - "social": "social", - "storage": "storage", - "analysis": "analysis", - "advanced": "advanced" - } - }, - "tabInfo": { - "node": "Node", - "type": "Type", - "id": "ID", - "subflow": "Subflow", - "name": "name", - "instances": "instances", - "properties": "Properties", - "blank": "blank" - }, - "sidebar": { - "info": "info", - "config": "config" + "user": { + "loggedInAs": "Logged in as __name__", + "login": "Login", + "loginFailed": "Login failed" }, - "workspaces": { - "subflow": "Subflow: ", + "notification": { + "warning": "Warning: __message__", + "warnings": { + "undeployedChanges": "node has undeployed changes", + "nodeActionDisabled": "node actions disabled within subflow" + }, + + "error": "Error: __message__", + "errors": { + "lostConnection": "Lost connection to server", + "cannotAddSubflowToItself": "Cannot add subflow to itself", + "cannotAddCircularReference": "Cannot add subflow - circular reference detected" + } + }, + "clipboard": { + "nodes": "Nodes:", + "selectNodes": "Select the text above and copy to the clipboard.", + "pasteNodes": "Paste nodes here", + "importNodes": "Import nodes", + "exportNodes": "Export nodes to clipboard", + "importUnrecognised": "Imported unrecognised type:", + "importUnrecognised_plural": "Imported unrecognised types:", + "nodeCopied": "__count__ node copied", + "nodeCopied_plural": "__count__ nodes copied", + "invalidFlow": "Invalid flow: __message__" + }, + "deploy": { + "deploy": "Deploy", + "full": "Full", + "fullDesc": "Deploys everything in the workspace", + "modifiedFlows": "Modified Flows", + "modifiedFlowsDesc": "Only deploys flows that contain changed nodes", + "modifiedNodes": "Modified Nodes", + "modifiedNodesDesc": "Only deploys nodes that have changed", + "successfulDeploy": "Successfully Deployed", + "errors": { + "noResponse": "no response from server" + }, + "confirm": { + "button": { + "confirm": "Confirm deploy", + "cancel": "Cancel" + }, + "undeployedChanges": "You have undeployed changes.\n\nLeaving this page will lose these changes.", + "improperlyConfigured": "Some of the nodes are not properly configured.", + "unknown": "The workspace contains some unknown node types:", + "unusedConfig": "The workspace contains some unused configuration nodes:", + "confirm": "Are you sure you want to deploy?" + } + }, + "subflow": { + "tabLabel": "Subflow: __name__", + "editSubflow": "Edit flow __name__", + "edit": "Edit flow", + "subflowInstances": "There is __count__ instance of this subflow", + "subflowInstances_plural": "There are __count__ instances of this subflow", "editSubflowName": "edit name", "input": "input", "output": "output", "deleteSubflow": "delete subflow", - "dropFlowHere": "Drop the flow here", - "subflowName": "Name", - "folderPlaceholder": "Folder", - "filenamePlaceholder": "Filename", - "folderLabel": "Folder", - "filenameLabel": "Filename", - "libraryBreadcrumb": "Library", - "libraryFilenamePlaceholder": "Filename", - "libraryFilenameLabel": "Filename:", - "libraryNamePlaceholder": "Name", - "libraryNameLabel": "Name", - "confirmDeployImproperlyConfigured": "Some of the nodes are not properly configured. Are you sure you want to deploy?", - "confirmDeployUnknown": "The workspace contains some unknown node types:", - "confirmDeployUnusedConfig": "The workspace contains some unused configuration nodes:", - "confirmDeploy": "Are you sure you want to deploy?", - "deleteDialog": "Are you sure you want to delete '__label__'?" + "errors": { + "noNodesSelected": "Cannot create subflow: no nodes selected", + "multipleInputsToSelection": "Cannot create subflow: multiple inputs to selection" + } + }, + "editor": { + "configEdit": "edit", + "configAdd": "add", + "configDelete": "Delete", + "nodesUse": "__count__ node uses this config", + "nodesUse_plural": "__count__ nodes use this config", + "addNewConfig": "Add new __type__ config node", + "editConfig": "Edit __type__ config node", + "addNewType": "Add new __type__..." + }, + "keyboard": { + "selectAll": "Select all nodes", + "selectAllConnected": "Select all connected nodes", + "addRemoveNode": "Add/remove node from selection", + "deleteSelected": "Delete selected nodes or link", + "importNode": "Import nodes", + "exportNode": "Export selected nodes", + "toggleSidebar": "Toggle sidebar", + "deleteNode": "Delete selected nodes or link", + "copyNode": "Copy selected nodes", + "cutNode": "Cut selected nodes", + "pasteNode": "Paste nodes" + }, + "library": { + "openLibrary": "Open Library...", + "saveToLibrary": "Save to Library...", + "typeLibrary": "__type__ library", + "unnamedType": "Unnamed __type__", + "saveToLibrary": "Save to Library", + "exportToLibrary": "Export nodes to library", + "dialogSaveOverwrite": "A __libraryType__ called __libraryName__ already exists. Overwrite?", + "invalidFilename": "Invalid filename", + "savedNodes": "Saved nodes", + "savedType": "Saved __type__", + "saveFailed": "Save failed: __message__", + + "filename": "Filename", + "folder": "Folder", + "filenamePlaceholder": "file", + "fullFilenamePlaceholder": "a/b/file", + "folderPlaceholder": "a/b", + + "breadcrumb": "Library" + }, + "palette": { + "noInfo": "no information available", + "filter": "filter", + "label": { + "subflows": "subflows", + "input": "input", + "output": "output", + "function": "function", + "social": "social", + "storage": "storage", + "analysis": "analysis", + "advanced": "advanced" + }, + "event": { + "nodeAdded": "Node added to palette:", + "nodeAdded_plural": "Nodes added to palette", + "nodeRemoved": "Node removed from palette:", + "nodeRemoved_plural": "Nodes removed from palette:", + "nodeEnabled": "Node enabled:", + "nodeEnabled_plural": "Nodes enabled:", + "nodeDisabled": "Node disabled:", + "nodeDisabled_plural": "Nodes disabled:" + } + }, + "sidebar": { + "info": { + "title": "info", + "node": "Node", + "type": "Type", + "id": "ID", + "subflow": "Subflow", + "instances": "Instances", + "properties": "Properties", + "blank": "blank", + "arrayItems": "__count__ items" + }, + "config": { + "title": "config" + } } } diff --git a/locales/en-US/runtime.json b/locales/en-US/runtime.json index 556764cbc..2e0c26702 100644 --- a/locales/en-US/runtime.json +++ b/locales/en-US/runtime.json @@ -6,7 +6,7 @@ "settings": "Settings file : __path__" } }, - + "server": { "loading": "Loading palette nodes", "errors": "Failed to register __count__ node type", @@ -23,14 +23,14 @@ "install-failed": "Install failed", "install-failed-long": "Installation of module __name__ failed:", "install-failed-not-found": "$t(install-failed-long) module not found", - + "uninstalling": "Uninstalling module: __name__", "uninstall-failed": "Uninstall failed", "uninstall-failed-long": "Uninstall of module __name__ failed:", "uninstalled": "Uninstalled module: __name__" } }, - + "api": { "flows": { "error-save": "Error saving flows: __message__" @@ -47,18 +47,18 @@ "error-enable": "Failed to enable node:" } }, - + "comms": { "error": "Communication channel error: __message__", "error-server": "Communication server error: __message__", "error-send": "Communication send error: __message__" }, - + "settings": { "not-available": "Settings not available", "property-read-only": "Property '__prop__' is read-only" }, - + "nodes": { "credentials": { "error":"Error loading credentials: __message__", @@ -82,7 +82,6 @@ "stopped": "Stopped", "missing-types": "Waiting for missing types to be registered:", "missing-type-provided": " - __type__ (provided by npm module __module__)", - "missing-type-install-1": "To install any of these missing modules, run:", "missing-type-install-2": "in the directory:" }, @@ -102,7 +101,7 @@ } } }, - + "storage": { "index": { "forbidden-flow-name": "forbidden flow name" @@ -113,7 +112,7 @@ "create": "Creating new flow file" } }, - + "httpadminauth-deprecated": "use of httpAdminAuth is deprecated. Use adminAuth instead", "unable-to-listen": "Unable to listen on __listenpath__", "port-in-use": "Error: port in use",
        '+RED._("tabInfo.node")+'
        '+RED._("sidebar.info.node")+'
        Name "+node.name+"
        "+RED._("common.label.name")+" "+node.name+"
        "+RED._("tabInfo.type")+" "+node.type+"
        "+RED._("tabInfo.id")+" "+node.id+"
        "+RED._("sidebar.info.type")+" "+node.type+"
        "+RED._("sidebar.info.id")+" "+node.id+"
        '+RED._("tabInfo.subflow")+'
        '+RED._("sidebar.info.subflow")+'
        "+RED._("tabInfo.name")+""+subflowNode.name+"
        "+RED._("tabInfo.instances")+""+userCount+"
        "+RED._("common.label.name")+""+subflowNode.name+"
        "+RED._("sidebar.info.instances")+""+userCount+"
        '+RED._("tabInfo.properties")+'
        '+RED._("sidebar.info.properties")+'
        '+n+""+val+"