mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Allow port labels be i18n identifiers
This commit is contained in:
parent
85b2a03a42
commit
50017c28da
@ -136,10 +136,15 @@ RED.nodes = (function() {
|
||||
}
|
||||
def["_"] = function() {
|
||||
var args = Array.prototype.slice.call(arguments, 0);
|
||||
var original = args[0];
|
||||
if (args[0].indexOf(":") === -1) {
|
||||
args[0] = ns+":"+args[0];
|
||||
}
|
||||
return RED._.apply(null,args);
|
||||
var result = RED._.apply(null,args);
|
||||
if (result === args[0]) {
|
||||
result = original;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// TODO: too tightly coupled into palette UI
|
||||
|
@ -1500,6 +1500,9 @@ RED.view = (function() {
|
||||
} else if ($.isArray(portLabels)) {
|
||||
result = portLabels[portIndex];
|
||||
}
|
||||
if (result) {
|
||||
result = node._(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function portMouseOver(port,d,portType,portIndex) {
|
||||
|
Loading…
Reference in New Issue
Block a user