diff -r adf0212d1dcc -r 4f43e64603ef cubicweb/cwgettext.py --- 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()