##// END OF EJS Templates
py3: handle ugettext + unicode in i18n
timeless -
r28674:03d1ecbb default
parent child Browse files
Show More
@@ -20,6 +20,10 b" if getattr(sys, 'frozen', None) is not N"
20 20 else:
21 21 module = __file__
22 22
23 try:
24 unicode
25 except NameError:
26 unicode = str
23 27
24 28 _languages = None
25 29 if (os.name == 'nt'
@@ -45,7 +49,10 b' def setdatapath(datapath):'
45 49 localedir = os.path.join(datapath, 'locale')
46 50 t = gettextmod.translation('hg', localedir, _languages, fallback=True)
47 51 global _ugettext
52 try:
48 53 _ugettext = t.ugettext
54 except AttributeError:
55 _ugettext = t.gettext
49 56
50 57 _msgcache = {}
51 58
General Comments 0
You need to be logged in to leave comments. Login now