mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix language handling in subflow node
This commit is contained in:
parent
e10dd54e2b
commit
dae9ac8173
@ -802,8 +802,8 @@ RED.subflow = (function() {
|
|||||||
}
|
}
|
||||||
$("<option/>", opt).text(item.text).appendTo(locales);
|
$("<option/>", opt).text(item.text).appendTo(locales);
|
||||||
});
|
});
|
||||||
currentLocale = RED.i18n.lang();
|
var locale = RED.i18n.lang();
|
||||||
locales.val(currentLocale);
|
locales.val(locale);
|
||||||
|
|
||||||
locales.on("change", function() {
|
locales.on("change", function() {
|
||||||
currentLocale = $(this).val();
|
currentLocale = $(this).val();
|
||||||
@ -1371,7 +1371,8 @@ RED.subflow = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var labels = ui.label || {};
|
var labels = ui.label || {};
|
||||||
var labelText = lookupLabel(labels, labels["en-US"]||tenv.name, currentLocale);
|
var locale = RED.i18n.lang();
|
||||||
|
var labelText = lookupLabel(labels, labels["en-US"]||tenv.name, locale);
|
||||||
var label = $('<label>').appendTo(row);
|
var label = $('<label>').appendTo(row);
|
||||||
var labelContainer = $('<span></span>').appendTo(label);
|
var labelContainer = $('<span></span>').appendTo(label);
|
||||||
if (ui.icon) {
|
if (ui.icon) {
|
||||||
@ -1423,7 +1424,7 @@ RED.subflow = (function() {
|
|||||||
input = $('<select>').css('width','70%').appendTo(row);
|
input = $('<select>').css('width','70%').appendTo(row);
|
||||||
if (ui.opts.opts) {
|
if (ui.opts.opts) {
|
||||||
ui.opts.opts.forEach(function(o) {
|
ui.opts.opts.forEach(function(o) {
|
||||||
$('<option>').val(o.v).text(lookupLabel(o.l, o.l['en-US']||o.v, currentLocale)).appendTo(input);
|
$('<option>').val(o.v).text(lookupLabel(o.l, o.l['en-US']||o.v, locale)).appendTo(input);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
input.val(val.value);
|
input.val(val.value);
|
||||||
|
Loading…
Reference in New Issue
Block a user