branch | 3.24 |
changeset 11823 | 4f43e64603ef |
parent 11057 | 0b59724cb3f2 |
child 12567 | 26744ad37953 |
--- a/cubicweb/cwgettext.py Wed Nov 16 14:38:11 2016 +0100 +++ b/cubicweb/cwgettext.py Thu Nov 17 10:47:52 2016 +0100 @@ -18,6 +18,8 @@ import gettext +from six import PY3 + class cwGNUTranslations(gettext.GNUTranslations): # The encoding of a msgctxt and a msgid in a .mo file is @@ -83,6 +85,9 @@ else: return msgid2 + if PY3: + ugettext = gettext.GNUTranslations.gettext + def upgettext(self, context, message): ctxt_message_id = self.CONTEXT_ENCODING % (context, message) missing = object()