i18n: mark strings for translation in alias extension
authorMartin Geisler <mg@daimi.au.dk>
Sun, 31 Aug 2008 16:12:02 +0200
changeset 6954 f7d545a866e8
parent 6953 63b5f4c73c98
child 6955 a9411e29773f
i18n: mark strings for translation in alias extension
hgext/alias.py
--- a/hgext/alias.py	Sun Aug 31 16:12:02 2008 +0200
+++ b/hgext/alias.py	Sun Aug 31 16:12:02 2008 +0200
@@ -11,6 +11,7 @@
 
 from mercurial.cmdutil import findcmd, UnknownCommand, AmbiguousCommand
 from mercurial import commands
+from mercurial.i18n import _
 
 cmdtable = {}
 
@@ -49,13 +50,13 @@
                 commands.norepo += ' %s' % self._name
             return
         except UnknownCommand:
-            msg = '*** [alias] %s: command %s is unknown' % \
+            msg = _('*** [alias] %s: command %s is unknown') % \
                   (self._name, self._target)
         except AmbiguousCommand:
-            msg = '*** [alias] %s: command %s is ambiguous' % \
+            msg = _('*** [alias] %s: command %s is ambiguous') % \
                   (self._name, self._target)
         except RecursiveCommand:
-            msg = '*** [alias] %s: circular dependency on %s' % \
+            msg = _('*** [alias] %s: circular dependency on %s') % \
                   (self._name, self._target)
         def nocmd(*args, **opts):
             self._ui.warn(msg + '\n')
@@ -67,7 +68,7 @@
 def uisetup(ui):
     for cmd, target in ui.configitems('alias'):
         if not target:
-            ui.warn('*** [alias] %s: no definition\n' % cmd)
+            ui.warn(_('*** [alias] %s: no definition\n') % cmd)
             continue
         args = target.split(' ')
         tcmd = args.pop(0)