patch, i18n: avoid parameterized plural
authorWagner Bruna <wbruna@yahoo.com>
Mon, 20 Apr 2009 21:16:14 -0300
changeset 8090 388bb482024e
parent 8089 67efe5e3b0fb
child 8091 e85cc856d2e1
patch, i18n: avoid parameterized plural
mercurial/patch.py
--- a/mercurial/patch.py	Mon Apr 20 21:16:13 2009 -0300
+++ b/mercurial/patch.py	Mon Apr 20 21:16:14 2009 -0300
@@ -421,11 +421,12 @@
                             f = self.ui.note
                         offset = l - orig_start - fuzzlen
                         if offset == 1:
-                            linestr = "line"
+                            msg = _("Hunk #%d succeeded at %d %s"
+                                    "(offset %d line).\n")
                         else:
-                            linestr = "lines"
-                        f(_("Hunk #%d succeeded at %d %s(offset %d %s).\n") %
-                          (h.number, l+1, fuzzstr, offset, linestr))
+                            msg = _("Hunk #%d succeeded at %d %s"
+                                    "(offset %d lines).\n")
+                        f(msg % (h.number, l+1, fuzzstr, offset))
                         return fuzzlen
         self.printfile(True)
         self.ui.warn(_("Hunk #%d FAILED at %d\n") % (h.number, orig_start))