i18n: mark strings for translation in interhg extension
authorMartin Geisler <mg@daimi.au.dk>
Sun, 31 Aug 2008 16:12:03 +0200
changeset 6962 2af657eafeba
parent 6961 12163fb21fce
child 6963 71da881b259e
i18n: mark strings for translation in interhg extension
hgext/interhg.py
--- a/hgext/interhg.py	Sun Aug 31 16:12:03 2008 +0200
+++ b/hgext/interhg.py	Sun Aug 31 16:12:03 2008 +0200
@@ -28,6 +28,7 @@
 import re
 from mercurial.hgweb import hgweb_mod
 from mercurial import templatefilters
+from mercurial.i18n import _
 
 orig_escape = templatefilters.filters["escape"]
 
@@ -56,7 +57,7 @@
         match = re.match(r'^s%s(.+)(?:(?<=\\\\)|(?<!\\))%s(.*)%s([ilmsux])*$'
                          % (delim, delim, delim), pattern)
         if not match:
-            self.repo.ui.warn("interhg: invalid pattern for %s: %s\n"
+            self.repo.ui.warn(_("interhg: invalid pattern for %s: %s\n")
                               % (key, pattern))
             continue
 
@@ -76,7 +77,7 @@
             regexp = re.compile(regexp, flags)
             interhg_table.append((regexp, format))
         except re.error:
-            self.repo.ui.warn("interhg: invalid regexp for %s: %s\n"
+            self.repo.ui.warn(_("interhg: invalid regexp for %s: %s\n")
                               % (key, regexp))
     return orig_refresh(self)