diff mercurial/filemerge.py @ 19226:c58b6ab4c26f

ui: merge prompt text components into a singe string This will help avoid problems with partial or mismatched translation of the components.
author Matt Mackall <mpm@selenic.com>
date Wed, 22 May 2013 17:31:43 -0500
parents 297bf69966a0
children 89b2336e5ccf
line wrap: on
line diff
--- a/mercurial/filemerge.py	Tue May 21 15:32:15 2013 -0500
+++ b/mercurial/filemerge.py	Wed May 22 17:31:43 2013 -0500
@@ -144,8 +144,8 @@
     fd = fcd.path()
 
     if ui.promptchoice(_(" no tool found to merge %s\n"
-                         "keep (l)ocal or take (o)ther?") % fd,
-                       (_("&Local"), _("&Other")), 0):
+                         "keep (l)ocal or take (o)ther?"
+                         "$$ &Local $$ &Other") % fd, 0):
         return _iother(repo, mynode, orig, fcd, fco, fca, toolconf)
     else:
         return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf)
@@ -348,16 +348,16 @@
     checked = False
     if 'prompt' in _toollist(ui, tool, "check"):
         checked = True
-        if ui.promptchoice(_("was merge of '%s' successful (yn)?") % fd,
-                           (_("&Yes"), _("&No")), 1):
+        if ui.promptchoice(_("was merge of '%s' successful (yn)?"
+                             "$$ &Yes $$ &No") % fd, 1):
             r = 1
 
     if not r and not checked and (_toolbool(ui, tool, "checkchanged") or
                                   'changed' in _toollist(ui, tool, "check")):
         if filecmp.cmp(a, back):
             if ui.promptchoice(_(" output file %s appears unchanged\n"
-                                 "was merge successful (yn)?") % fd,
-                               (_("&Yes"), _("&No")), 1):
+                                 "was merge successful (yn)?"
+                                 "$$ &Yes $$ &No") % fd, 1):
                 r = 1
 
     if _toolbool(ui, tool, "fixeol"):