i18n: 'danger' key is only defined in yunohost, not moulinette

This commit is contained in:
Alexandre Aubin 2021-09-06 00:01:36 +02:00
parent 552db2e21d
commit acf4d1c82a

View file

@ -771,7 +771,8 @@ class DisplayTextQuestion(Question):
"warning": "yellow",
"danger": "red",
}
return colorize(m18n.g(self.style), color[self.style]) + f" {text}"
text = m18n.g(self.style) if self.style != "danger" else m18n.n("danger")
return colorize(text, color[self.style]) + f" {text}"
else:
return text