[PATCH STABLE] record: update help message to use operation instead of "record" (issue5432)

Sean Farley sean at farley.io
Wed Apr 26 14:25:44 EDT 2017


Yuya Nishihara <yuya at tcha.org> writes:

> On Wed, 26 Apr 2017 09:59:50 +0100, Ryan McElroy wrote:
>> On 4/25/17 10:15 PM, Sean Farley wrote:
>> > Boris Feld <boris.feld at octobus.net> writes:
>> >
>> >> # HG changeset patch
>> >> # User Boris Feld <boris.feld at octobus.net>
>> >> # Date 1493046804 -7200
>> >> #      Mon Apr 24 17:13:24 2017 +0200
>> >> # Branch stable
>> >> # Node ID 208a60229f9bdf04351442c7a2fd66f41b83ea3e
>> >> # Parent  0ea1d9a750da142e67690d88644ce4121ed268a1
>> >> record: update help message to use operation instead of "record" (issue5432)
>> >>
>> >> Update the hunk selector help message to use the operation name instead
>> >> of using "record" for all operations. Extract the help message in the same way
>> >> as other single and multiple message line.
>> >> Update tests to make sure that both "revert" and "discard" variants are tested.
>> >>
>> >> diff -r 0ea1d9a750da -r 208a60229f9b mercurial/patch.py
>> >> --- a/mercurial/patch.py	Tue Apr 18 11:10:08 2017 -0700
>> >> +++ b/mercurial/patch.py	Mon Apr 24 17:13:24 2017 +0200
>> >> @@ -992,6 +992,38 @@
>> >>               'record': _("record this change to '%s'?"),
>> >>               'revert': _("revert this change to '%s'?"),
>> >>           }[operation],
>> >> +        'help': {
>> >> +            'discard': _('[Ynesfdaq?]'
>> >> +                      '$$ &Yes, discard this change'
>> >> +                      '$$ &No, skip this change'
>> >> +                      '$$ &Edit this change manually'
>> >> +                      '$$ &Skip remaining changes to this file'
>> >> +                      '$$ Discard remaining changes to this &file'
>> >> +                      '$$ &Done, skip remaining changes and files'
>> >> +                      '$$ Discard &all changes to all remaining files'
>> >> +                      '$$ &Quit, discarding no changes'
>> >> +                      '$$ &? (display help)'),
>> >> +            'record': _('[Ynesfdaq?]'
>> >> +                      '$$ &Yes, record this change'
>> >> +                      '$$ &No, skip this change'
>> >> +                      '$$ &Edit this change manually'
>> >> +                      '$$ &Skip remaining changes to this file'
>> >> +                      '$$ Record remaining changes to this &file'
>> >> +                      '$$ &Done, skip remaining changes and files'
>> >> +                      '$$ Record &all changes to all remaining files'
>> >> +                      '$$ &Quit, recording no changes'
>> >> +                      '$$ &? (display help)'),
>> >> +            'revert': _('[Ynesfdaq?]'
>> >> +                      '$$ &Yes, revert this change'
>> >> +                      '$$ &No, skip this change'
>> >> +                      '$$ &Edit this change manually'
>> >> +                      '$$ &Skip remaining changes to this file'
>> >> +                      '$$ Revert remaining changes to this &file'
>> >> +                      '$$ &Done, skip remaining changes and files'
>> >> +                      '$$ Revert &all changes to all remaining files'
>> >> +                      '$$ &Quit, reverting no changes'
>> >> +                      '$$ &? (display help)')
>> > Perhaps as a follow-up (after the freeze) these could be consolidated
>> > since they all follow the same pattern? Not a big deal, though.
>
> These messages can't be split nor be boilerplate because of translation.

Can something like this be done:

_('$$ %s remaining changes to this &file') % _('Discard')?

If not, then yeah, probably not possible nor worth it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170426/f2c6979f/attachment.sig>


More information about the Mercurial-devel mailing list