mercurial/i18n.py
changeset 43554 9f70512ae2cf
parent 43089 c59eb1560c44
child 43714 f0bee3b1b847
equal deleted inserted replaced
43553:47fac1692ede 43554:9f70512ae2cf
    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