Merge pull request #2388 from node-red/subflow-status-i18n

let subflow add node-red context to status so i18n works
This commit is contained in:
Nick O'Leary 2019-11-21 09:59:40 +00:00 committed by GitHub
commit e90e6eaac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -200,6 +200,9 @@ class Subflow extends Flow {
self.node.status({text:text}); self.node.status({text:text});
} else if (msg.status !== undefined) { } else if (msg.status !== undefined) {
// if msg.status exists // if msg.status exists
if (msg.status.hasOwnProperty("text") && msg.status.text.indexOf("common.") === 0) {
msg.status.text = "node-red:"+msg.status.text;
}
self.node.status(msg.status) self.node.status(msg.status)
} }
}) })
@ -310,7 +313,6 @@ class Subflow extends Flow {
} }
} }
} }
super.start(diff); super.start(diff);
} }
@ -435,7 +437,6 @@ class Subflow extends Flow {
} }
return handled; return handled;
} }
} }