commands, i18n: avoid untranslated strings as message parameters
authorWagner Bruna <wbruna@yahoo.com>
Mon, 20 Apr 2009 20:38:37 -0300
changeset 8088 bdeb380a10de
parent 8087 6dcf425cc2a6
child 8089 67efe5e3b0fb
commands, i18n: avoid untranslated strings as message parameters
mercurial/commands.py
--- a/mercurial/commands.py	Mon Apr 20 20:38:37 2009 -0300
+++ b/mercurial/commands.py	Mon Apr 20 20:38:37 2009 -0300
@@ -287,15 +287,21 @@
     """
     def print_result(nodes, good):
         displayer = cmdutil.show_changeset(ui, repo, {})
-        transition = (good and "good" or "bad")
         if len(nodes) == 1:
             # narrowed it down to a single revision
-            ui.write(_("The first %s revision is:\n") % transition)
+            if good:
+                ui.write(_("The first good revision is:\n"))
+            else:
+                ui.write(_("The first bad revision is:\n"))
             displayer.show(repo[nodes[0]])
         else:
             # multiple possible revisions
-            ui.write(_("Due to skipped revisions, the first "
-                       "%s revision could be any of:\n") % transition)
+            if good:
+                ui.write(_("Due to skipped revisions, the first "
+                        "good revision could be any of:\n"))
+            else:
+                ui.write(_("Due to skipped revisions, the first "
+                        "bad revision could be any of:\n"))
             for n in nodes:
                 displayer.show(repo[n])