Commit 30522c8d authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

backward compatibility to support non-ascii str mapping.

parent e2d2dd3e
......@@ -193,6 +193,11 @@ class MessageCatalog(LanguageManager, ObjectManager, SimpleItem):
target_language=None, default=None):
""" """
msgstr = self.gettext(msgid, lang=target_language, default=default)
# BBB support str in mapping by converting to unicode for
# backward compatibility.
if mapping:
mapping = dict([to_unicode(k), to_unicode(v)]
for k, v in mapping.iteritems())
return interpolate(msgstr, mapping)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment