diff --git a/product/ERP5Type/patches/Localizer.py b/product/ERP5Type/patches/Localizer.py index 405cfbb6c0d671cdb35a90e6af9b8f28e4eaa52f..e7289cfb76804303f5122b73b104fd657dd6f336 100755 --- a/product/ERP5Type/patches/Localizer.py +++ b/product/ERP5Type/patches/Localizer.py @@ -67,7 +67,9 @@ def Localizer_translate(self, domain, msgid, mapping=None, *args, **kw): if type(mapping) is type({}): if isinstance(translated_str, unicode) : translated_str = translated_str.encode('utf8') - return Template(translated_str).substitute(mapping) + translated_str = Template(translated_str).substitute(mapping) + if not isinstance(translated_str, unicode): + translated_str = translated_str.decode('utf8') return translated_str def GlobalTranslationService_translate(self, domain, msgid, *args, **kw):