[PATCH] With corrected documentation

Ingo Proetel proetel at aicas.de
Fri Aug 12 02:32:32 CDT 2011


Am 11.08.2011 23:54, schrieb timeless:
> I'm not sure you really want to mix untranslated text with foreign languages.
> 
> It's likely to get horribly messy for RTL languages.
> 
It looks like we have three options:

- separate texts for translation and untranslated commands (my last patch)
  This gives translators several strings for translation without much
context.

- one text for all options but including untranslated commands (what I
described below)
  This gives translators one text with the full context (questions and
all possible replies) but requires commands stay untranslated.

- one text for all options without command and go back using indices as
return value
  This seems the best solution for translators full context and no
further requirements (except that the sequence of command helps stays
the same.) But for programmers it gets hard to figure out which index
corresponds to what command.

More solutions?

Cheers,
Ingo

> On 8/11/11, Ingo Proetel <proetel at aicas.de> wrote:
>> 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
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial-devel
>>
> 

-- 
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