changeset 8008:36924a4711e9

commands, i18n: avoid untranslated strings as message parameters
author Wagner Bruna <wbruna@yahoo.com>
date Sun, 05 Apr 2009 05:11:46 -0300
parents a4defdc4f5dc
children 76e4c08a48ad
files mercurial/commands.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Apr 04 20:16:01 2009 +0200
+++ b/mercurial/commands.py	Sun Apr 05 05:11:46 2009 -0300
@@ -2829,8 +2829,10 @@
             if not repo.tagtype(n):
                 raise util.Abort(_('tag \'%s\' does not exist') % n)
             if repo.tagtype(n) != expectedtype:
-                raise util.Abort(_('tag \'%s\' is not a %s tag') %
-                                 (n, expectedtype))
+                if expectedtype == 'global':
+                    raise util.Abort(_('tag \'%s\' is not a global tag') % n)
+                else:
+                    raise util.Abort(_('tag \'%s\' is not a local tag') % n)
         rev_ = nullid
         if not message:
             message = _('Removed tag %s') % ', '.join(names)