[fix] Prevent malformed translation issue

This commit is contained in:
Jérôme Lebleu 2015-10-05 14:57:58 +02:00
parent a4a9e8562d
commit 3d589b59d7

View file

@ -194,7 +194,7 @@ class Translator(object):
try:
return _load_key(self.locale)
except KeyError:
except (KeyError, IndexError):
if self.default_locale != self.locale:
logger.info("untranslated key '%s' for locale '%s'",
key, self.locale)