From c47da013ff831d57160676a43df726c30ec88572 Mon Sep 17 00:00:00 2001
From: Nick O'Leary
";
- 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._("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'+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+" |