patch, i18n: avoid parameterized messages
Singular message removed for simplicity.
--- a/mercurial/patch.py Sat Feb 20 15:18:59 2010 +0100
+++ b/mercurial/patch.py Fri Feb 19 13:04:11 2010 -0200
@@ -607,21 +607,18 @@
self.offset += len(newlines) - len(old)
self.skew = l - orig_start
self.dirty = 1
+ offset = l - orig_start - fuzzlen
if fuzzlen:
- fuzzstr = "with fuzz %d " % fuzzlen
- f = self.ui.warn
+ msg = _("Hunk #%d succeeded at %d "
+ "with fuzz %d "
+ "(offset %d lines).\n")
self.printfile(True)
+ self.ui.warn(msg %
+ (h.number, l + 1, fuzzlen, offset))
else:
- fuzzstr = ""
- f = self.ui.note
- offset = l - orig_start - fuzzlen
- if offset == 1:
- msg = _("Hunk #%d succeeded at %d %s"
- "(offset %d line).\n")
- else:
- msg = _("Hunk #%d succeeded at %d %s"
+ msg = _("Hunk #%d succeeded at %d "
"(offset %d lines).\n")
- f(msg % (h.number, l + 1, fuzzstr, offset))
+ self.ui.note(msg % (h.number, l + 1, offset))
return fuzzlen
self.printfile(True)
self.ui.warn(_("Hunk #%d FAILED at %d\n") % (h.number, orig_start))