Support raw string in 'ask' fields from manifest (for upcoming thing in core about default strings for install questions)

This commit is contained in:
Alexandre Aubin 2020-05-09 19:53:36 +02:00
parent 7fff782dc2
commit ee20f551f2

View file

@ -412,10 +412,16 @@
args[k].helpLink = "";
// Multilingual label
args[k].label = (typeof args[k].ask[y18n.locale] !== 'undefined') ?
args[k].ask[y18n.locale] :
args[k].ask['en']
;
if (typeof args[k].ask === "string")
{
args[k].label = args[k].ask;
}
else if (typeof args[k].ask[y18n.locale] !== 'undefined') {
args[k].label = args[k].ask[y18n.locale];
}
else {
args[k].label = args[k].ask['en'];
}
// Multilingual help text
if (typeof args[k].help !== 'undefined') {