Changeset ed7a1082d84b…
Parent 95b195e119ed…
by
Changes to 2 files · Browse files at ed7a1082d84b Showing diff from parent 95b195e119ed Diff from another changeset...
@@ -9,10 +9,8 @@
from mercurial import hg, ui, node
-from i18n import _ as gettext
-import cachethg
-import paths
-import hglib
+from tortoisehg.util.i18n import _ as gettext
+from tortoisehg.util import cachethg, paths, hglib
promoted = []
try:
|
@@ -11,7 +11,7 @@ import re
import codecs
-# copy of 'nautilus-thg.py'
+# based on 'nautilus-thg.py' and 'hgtk'
def _thg_path():
pfile = __file__
if pfile.endswith('.pyc'):
@@ -23,6 +23,9 @@ sys.path.insert(0, thgpath)
_thg_path()
+from mercurial import demandimport
+demandimport.ignore.append('win32com.shell')
+demandimport.enable()
from tortoisehg.util.menuthg import thgcmenu
regkeytmpl = u'[HKEY_CURRENT_USER\\Software\\TortoiseHg\\CMenu\\%s\\%s]'
@@ -88,8 +91,8 @@
# enumerate available languages
langinfo = [{'code': u'en_US', 'file': None}]
-lang_pat = re.compile(u'^tortoisehg-([^\\.]+)\\.po$')
-for file in glob.glob(u'../i18n/*.po'):
+lang_pat = re.compile(u'([^\\.]+)\\.po$')
+for file in glob.glob(u'../i18n/tortoisehg/*.po'):
m = lang_pat.match(os.path.basename(file))
langinfo.append({'code': m.group(1), 'file': os.path.abspath(file)})
|
Loading...