Allow runtime calls to RED._ to specify other namespace

This commit is contained in:
Nick O'Leary 2016-03-06 20:43:19 +00:00
parent 0e9ea0aff1
commit 708365c4ac
1 changed files with 3 additions and 1 deletions

View File

@ -94,7 +94,9 @@ function createNodeApi(node) {
}
red["_"] = function() {
var args = Array.prototype.slice.call(arguments, 0);
args[0] = node.namespace+":"+args[0];
if (args[0].indexOf(":") === -1) {
args[0] = node.namespace+":"+args[0];
}
return runtime.i18n._.apply(null,args);
}
return red;