From a8966b8643a46dd66ab5b9126ef77171119abad0 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 28 Jul 2019 21:14:24 +0200 Subject: [PATCH] [mod] add more message to inform users that some stuff are a warning --- moulinette/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moulinette/core.py b/moulinette/core.py index 70cc88c6..25dd5625 100644 --- a/moulinette/core.py +++ b/moulinette/core.py @@ -92,7 +92,7 @@ class Translator(object): try: return self._translations[self.locale][key].encode('utf-8').format(*args, **kwargs) except KeyError as e: - logger.exception("Failed to format translated string '%s' with error: %s" % (key, e)) + logger.exception("Failed to format translated string '%s' with error: %s (don't panic this is just a warning)" % (key, e)) failed_to_format = True if failed_to_format or (self.default_locale != self.locale and key in self._translations.get(self.default_locale, {})): @@ -102,7 +102,7 @@ class Translator(object): try: return self._translations[self.default_locale][key].encode('utf-8').format(*args, **kwargs) except KeyError as e: - logger.exception("Failed to format translatable string '%s' with error: %s" % (key, e)) + logger.exception("Failed to format translatable string '%s' with error: %s (don't panic this is just a warning)" % (key, e)) return self._translations[self.locale][key].encode('utf-8') logger.exception("unable to retrieve key '%s' for default locale '%s' (don't panic this is just a warning)",