Add namespaced i18n function to node definition

This commit is contained in:
Nick O'Leary
2015-06-08 11:37:36 +01:00
parent f0b4cb608a
commit 9bbd6a70b8
2 changed files with 18 additions and 23 deletions

View File

@@ -624,16 +624,8 @@ RED.editor = (function() {
if (node_def.defaults[d].value) {
configNode[d] = node_def.defaults[d].value;
}
}
configNode["_"] = function() {
var args = Array.prototype.slice.call(arguments, 0);
if (args[0].indexOf(":") === -1) {
args[0] = ns+":"+args[0];
}
return RED._.apply(null,args);
}
}
configNode["_"] = node_def._;
}
$("#dialog-config-form").html($("script[data-template-name='"+type+"']").html());