--- a/mercurial/i18n.py Mon Mar 28 22:30:23 2016 +0000
+++ b/mercurial/i18n.py Tue Mar 29 17:22:08 2016 +0000
@@ -20,6 +20,10 @@
else:
module = __file__
+try:
+ unicode
+except NameError:
+ unicode = str
_languages = None
if (os.name == 'nt'
@@ -45,7 +49,10 @@
localedir = os.path.join(datapath, 'locale')
t = gettextmod.translation('hg', localedir, _languages, fallback=True)
global _ugettext
- _ugettext = t.ugettext
+ try:
+ _ugettext = t.ugettext
+ except AttributeError:
+ _ugettext = t.gettext
_msgcache = {}