diff mercurial/util.py @ 22638:0d0350cfc7ab

i18n: use datapath for i18n like for templates and help To avoid circular module dependencies we initialize i18n from util when datapath is found.
author Mads Kiilerich <madski@unity3d.com>
date Sun, 28 Sep 2014 16:57:47 +0200
parents 92b54547ac5d
children 3b1c0e1ede4c
line wrap: on
line diff
--- a/mercurial/util.py	Sun Sep 28 16:57:47 2014 +0200
+++ b/mercurial/util.py	Sun Sep 28 16:57:47 2014 +0200
@@ -13,7 +13,8 @@
 hide platform-specific details from the core.
 """
 
-from i18n import _
+import i18n
+_ = i18n._
 import error, osutil, encoding
 import errno, shutil, sys, tempfile, traceback
 import re as remod
@@ -467,6 +468,8 @@
 else:
     datapath = os.path.dirname(__file__)
 
+i18n.setdatapath(datapath)
+
 _hgexecutable = None
 
 def hgexecutable():