comparison mercurial/i18n.py @ 36692:aeaf9c7f7528

py3: make gettext domain a system string
author Yuya Nishihara <yuya@tcha.org>
date Sat, 03 Mar 2018 19:12:47 -0500
parents d00ec62d156f
children 5bc7ff103081
comparison
equal deleted inserted replaced
36691:1b179d151578 36692:aeaf9c7f7528
49 _ugettext = None 49 _ugettext = None
50 50
51 def setdatapath(datapath): 51 def setdatapath(datapath):
52 datapath = pycompat.fsdecode(datapath) 52 datapath = pycompat.fsdecode(datapath)
53 localedir = os.path.join(datapath, pycompat.sysstr('locale')) 53 localedir = os.path.join(datapath, pycompat.sysstr('locale'))
54 t = gettextmod.translation('hg', localedir, _languages, fallback=True) 54 t = gettextmod.translation(r'hg', localedir, _languages, fallback=True)
55 global _ugettext 55 global _ugettext
56 try: 56 try:
57 _ugettext = t.ugettext 57 _ugettext = t.ugettext
58 except AttributeError: 58 except AttributeError:
59 _ugettext = t.gettext 59 _ugettext = t.gettext