mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Encode translated string before formating it
This commit is contained in:
parent
1a313a792c
commit
7145039e89
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ class Translator(object):
|
|||
logging.warning("unknown key '%s' for locale '%s'" %
|
||||
(key, self.default_locale))
|
||||
return key
|
||||
return value.format(*args, **kwargs).encode('utf-8')
|
||||
return value.encode('utf-8').format(*args, **kwargs)
|
||||
|
||||
def _load_translations(self, locale, overwrite=False):
|
||||
"""Load translations for a locale
|
||||
|
|
Loading…
Add table
Reference in a new issue