equal
deleted
inserted
replaced
48 _ugettext = None |
48 _ugettext = None |
49 |
49 |
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, r'locale') |
53 localedir = os.path.join(datapath, 'locale') |
54 t = gettextmod.translation(r'hg', localedir, _languages, fallback=True) |
54 t = gettextmod.translation('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 |