[PATCH] patchbomb: use ui.promptchoice for diffstat to allow localization of choices (3rd try)
Christian Ebert
blacktrash at gmx.net
Mon Sep 6 13:35:25 CDT 2010
* Christian Ebert on Friday, September 03, 2010 at 15:15:36 +0100
> # HG changeset patch
> # User Christian Ebert <blacktrash at gmx.net>
> # Date 1283523139 -3600
> # Node ID 8826ee11af61e2b1c1711266a44d88e89e7fbe96
> # Parent dfb11f9922c152bd74f5d827d89ec39f8749c1ad
> 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.
>
> diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
> --- a/hgext/patchbomb.py
> +++ b/hgext/patchbomb.py
> @@ -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'))):
Oops, forgot to i18n the negative answer. Will resend.
c
--
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org/
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions
More information about the Mercurial-devel
mailing list