##// END OF EJS Templates
i18n: lookup .mo files in private locale/ directory...
Martin Geisler -
r7650:85ae7aaf default
parent child Browse files
Show More
@@ -7,7 +7,20 b' This software may be used and distribute'
7 of the GNU General Public License, incorporated herein by reference.
7 of the GNU General Public License, incorporated herein by reference.
8 """
8 """
9
9
10 import gettext
10 import gettext, sys, os
11 t = gettext.translation('hg', fallback=1)
11
12 # modelled after templater.templatepath:
13 if hasattr(sys, 'frozen'):
14 module = sys.executable
15 else:
16 module = __file__
17
18 base = os.path.dirname(module)
19 for dir in ('.', '..'):
20 localedir = os.path.normpath(os.path.join(base, dir, 'locale'))
21 if os.path.isdir(localedir):
22 break
23
24 t = gettext.translation('hg', localedir, fallback=True)
12 gettext = t.gettext
25 gettext = t.gettext
13 _ = gettext
26 _ = gettext
General Comments 0
You need to be logged in to leave comments. Login now