1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

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;