changeset 6962:2af657eafeba

i18n: mark strings for translation in interhg extension
author Martin Geisler <mg@daimi.au.dk>
date Sun, 31 Aug 2008 16:12:03 +0200
parents 12163fb21fce
children 71da881b259e
files hgext/interhg.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)