diff hgext/patchbomb.py @ 12196:e42bc7f66e25

patchbomb: use ui.promptchoice for diffstat to allow localization of choices The extra check for ui.interacive from patchbomb's prompt function is not needed here. Format boolean prompt as in filemerge.py.
author Christian Ebert <blacktrash@gmx.net>
date Wed, 08 Sep 2010 08:31:07 +0200
parents 6449be7b8a3b
children 540693065d40
line wrap: on
line diff
--- a/hgext/patchbomb.py	Fri Sep 03 23:34:37 2010 +0200
+++ b/hgext/patchbomb.py	Wed Sep 08 08:31:07 2010 +0200
@@ -101,8 +101,8 @@
     if summary:
         ui.write(summary, '\n')
         ui.write(s, '\n')
-    ans = prompt(ui, _('does the diffstat above look okay?'), 'y')
-    if not ans.lower().startswith('y'):
+    if ui.promptchoice(_('does the diffstat above look okay (yn)?'),
+                       (_('&Yes'), _('&No'))):
         raise util.Abort(_('diffstat rejected'))
     return s