# HG changeset patch
# User Yuki KODAMA <endflow....@gmail.com>
# Date 1254196582 -32400
# Node ID ed7a1082d84b5f82f8f3813ff1fecbac300a8312
# Parent  95b195e119eda9157a534ec450a2603699b2227f
reggen: follow changes of the i18n directory structure

diff --git a/tortoisehg/util/menuthg.py b/tortoisehg/util/menuthg.py
--- a/tortoisehg/util/menuthg.py
+++ b/tortoisehg/util/menuthg.py
@@ -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:
diff --git a/win32/reggen.py b/win32/reggen.py
--- a/win32/reggen.py
+++ b/win32/reggen.py
@@ -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)})

Attachment: thg-kuy_rev4265.patch
Description: Binary data

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to