From acf4d1c82a9e8ffefb2adc7628b8bd7f07be73bc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 6 Sep 2021 00:01:36 +0200 Subject: [PATCH] i18n: 'danger' key is only defined in yunohost, not moulinette --- src/yunohost/utils/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yunohost/utils/config.py b/src/yunohost/utils/config.py index f078dda82..a4c27c693 100644 --- a/src/yunohost/utils/config.py +++ b/src/yunohost/utils/config.py @@ -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