forgiving T for unicode, thanks Vladyslav

This commit is contained in:
mdipierro
2012-09-13 06:59:42 -05:00
parent a84b9b6bf1
commit fa73d46e82
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.8 (2012-09-13 06:58:42) stable
Version 2.0.8 (2012-09-13 06:59:39) stable
+4
View File
@@ -709,6 +709,10 @@ class translator(object):
the ## notation is ignored in multiline strings and strings that
start with ##. this is to allow markmin syntax to be translated
"""
if isinstance(message, unicode):
message = message.encode('utf8')
if isinstance(prefix, unicode):
prefix = prefix.encode('utf8')
key = prefix+message
mt = self.t.get(key, None)
if mt is not None: return mt