# HG changeset patch
# User Wagner Bruna <wbr...@softwareexpress.com.br>
# Date 1266873378 10800
# Branch stable
# Node ID 410128b0619838620bf990eb88f310ac9ead24ce
# Parent  52ac8fe83a980d24110b8b364201aef3efe8dddf
prej, i18n: avoid parameterized messages

diff --git a/tortoisehg/util/prej.py b/tortoisehg/util/prej.py
--- a/tortoisehg/util/prej.py
+++ b/tortoisehg/util/prej.py
@@ -282,20 +282,18 @@
                         self.lines[l : l + len(old)] = newlines
                         self.offset += len(newlines) - len(old)
                         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:
-                            linestr = "line"
-                        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 "
+                                    "(offset %d lines).\n")
+                            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))

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to