keyword, i18n: avoid untranslated strings as message parameters stable
authorWagner Bruna <wbruna@yahoo.com>
Mon, 20 Apr 2009 21:16:13 -0300
branchstable
changeset 531 f7865fb770fe
parent 529 7197324dfa4d
child 532 70220c2a4940
keyword, i18n: avoid untranslated strings as message parameters [ original upstream message ]
hgkw/keyword.py
--- a/hgkw/keyword.py	Tue Apr 07 22:58:05 2009 +0200
+++ b/hgkw/keyword.py	Mon Apr 20 21:16:13 2009 -0300
@@ -179,7 +179,6 @@
         candidates = [f for f in files if self.iskwfile(f, ctx.flags)]
         if candidates:
             self.restrict = True # do not expand when reading
-            action = expand and 'expanding' or 'shrinking'
             for f in candidates:
                 fp = self.repo.file(f)
                 data = fp.read(mf[f])
@@ -193,7 +192,11 @@
                 else:
                     found = self.re_kw.search(data)
                 if found:
-                    notify(_('overwriting %s %s keywords\n') % (f, action))
+                    if expand:
+                        msg = _('overwriting %s expanding keywords\n')
+                    else:
+                        msg = _('overwriting %s shrinking keywords\n')
+                    notify(msg % f)
                     self.repo.wwrite(f, data, mf.flags(f))
                     self.repo.dirstate.normal(f)
             self.restrict = False