Merge pull request #2328 from kazuhitoyokoi/master-fixsubflowlang

Fix language handling in subflow node
This commit is contained in:
Nick O'Leary 2019-10-16 11:12:48 +01:00 committed by GitHub
commit 873bdc6733
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -806,12 +806,12 @@ RED.subflow = (function() {
locales.val(currentLocale); locales.val(currentLocale);
locales.on("change", function() { locales.on("change", function() {
currentLocale = $(this).val(); var locale = $(this).val();
var items = $("#node-input-env-container").editableList("items"); var items = $("#node-input-env-container").editableList("items");
items.each(function (i, item) { items.each(function (i, item) {
var entry = $(this).data('data'); var entry = $(this).data('data');
var labelField = entry.ui.labelField; var labelField = entry.ui.labelField;
labelField.val(lookupLabel(entry.ui.label, "", currentLocale)); labelField.val(lookupLabel(entry.ui.label, "", locale));
if (labelField.timeout) { if (labelField.timeout) {
clearTimeout(labelField.timeout); clearTimeout(labelField.timeout);
delete labelField.timeout; delete labelField.timeout;