[PATCH V3] record: display the running operation for recording commands

Yuya Nishihara yuya at tcha.org
Tue Jun 2 07:54:24 CDT 2015


On Mon, 1 Jun 2015 10:38:21 -0700, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1432767495 25200
> #      Wed May 27 15:58:15 2015 -0700
> # Node ID 1e379d0f63b47fba888724c5a90717c67c874552
> # Parent  6084926366b979e81e5dcc84fa595965d4c07883
> record: display the running operation for recording commands
> 
> This patch is part of a series of patches to change the recording ui to reflect
> the operation currently running (commit, shelve, revert ...).
> This patch makes the UI change to display the running operation on the UI.
> It does not change any tests since we are not using the feature in any command
> yet.

> --- a/mercurial/patch.py
> +++ b/mercurial/patch.py
> @@ -970,7 +970,7 @@
>              return skipfile, skipfile, skipall, newpatches
>          while True:
>              resps = _('[Ynesfdaq?]'
> -                      '$$ &Yes, record this change'
> +                      '$$ &Yes, ') + operation + _(' this change'

Maybe it was pointed out already, but there are two i18n issues:

 a. it assumes that all languages have subject-verb-object structure, which is
    untrue.
 b. choices and their descriptions should be put into a single message
    because &-char may be different by translation (see c58b6ab4c26f)

So, I think it should be

  yesop = {'record': _('record this change'),
           'confirm': ...}[operation]
  _('[Ynesfdaq?]'
    '$$ &Yes, %s'
    '$$ &No, ...') % yesop

Regards,


More information about the Mercurial-devel mailing list