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:
parent
0e9ea0aff1
commit
708365c4ac
@ -94,7 +94,9 @@ function createNodeApi(node) {
|
|||||||
}
|
}
|
||||||
red["_"] = function() {
|
red["_"] = function() {
|
||||||
var args = Array.prototype.slice.call(arguments, 0);
|
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 runtime.i18n._.apply(null,args);
|
||||||
}
|
}
|
||||||
return red;
|
return red;
|
||||||
|
Loading…
Reference in New Issue
Block a user