[PATCH] With corrected documentation

Ingo Proetel proetel at aicas.de
Thu Aug 11 15:31:47 CDT 2011


Am 11.08.2011 19:23, schrieb Matt Mackall:
> On Thu, 2011-08-11 at 15:27 +0200, Martin Geisler wrote:
>> Ingo Proetel <proetel at aicas.de> writes:
>>
>>> The current promptchoice function needs something like this:
>>>
>>> msgid "[Ynaq?]"
>>> msgstr ""
>>>
>>> msgid "&Yes, record this change"
>>> msgstr "&Yes - übernimmt diese Änderung"
>>> ...
>>>
>>> Which means basically that the possible responses string cannot be
>>> safely translated since "[Ynaq]" could mean all kinds of things in
>>> different contexts.
>>
>> That is a good point -- for the Danish translation I translated the
>> "[Ynaq]" string and the corresponding answers, but this could fail if
>> more prompts have the same set of English answer letters.
>>
>> To me, this indicates that the promptchoice function should be changed,
>> and I think it should be changed into what you called promptselection :)
> 
> I think we should consider rolling this all into one string to get the
> maximum amount of context for translation:
> 
>> promptselection(_(
>>     '''What shall we do?\n
>>        abort:&Abort command\n
>>        retry:&Retry command\n
>>        ignore:&Ignore error\n'''), ...)
> 
> Thoughts?
> 
All lines before the first line containing a colon are prompt text.
There is one word before the colon. This word is the command and may not
be translated. The rest of the line and all following lines without
colon are help text for the command.
The next line with a colon defines a command:

    request = ui.promptselection(_(
    '''Now this is a serious issue.
       What shall we do?
       abort:&Abort command
       Sleep it over.
       retry:&Retry command
       ignore:&Ignore error
       This might not be a good idea'''
              ),'ignore')

Results in this dialog:

Now this is a serious issue.
What shall we do? [arI?] ?
a Abort command
  Sleep it over.
r Retry command
i Ignore error
  This might not be a good idea

Now this is a serious issue.
What shall we do? [arI?] a
abort: User aborted

Does this summarize your idea?


-- 
aicas GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-0

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt


More information about the Mercurial-devel mailing list