comparison mercurial/i18n.py @ 36835:5bc7ff103081

py3: use r'' instead of sysstr('') to get around code transformer Fewer function calls should be better.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 10 Mar 2018 15:57:16 +0900
parents aeaf9c7f7528
children 79dd61a4554f
comparison
equal deleted inserted replaced
36834:1527f40de3b3 36835:5bc7ff103081
48 48
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, r'locale')
54 t = gettextmod.translation(r'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: