[PATCH] With corrected documentation

Ingo Proetel proetel at aicas.de
Thu Aug 11 07:31:01 CDT 2011


Am 11.08.2011 10:46, schrieb Dennis Brakhane:
> Can we be sure that this function will be used exclusively for
> interactive convenience functions that can also be done
> with other non-interactive command line functionality?
> 
> I'm thinking of scripts or tools like TortoiseHg that otherwise
> are forced to do some kind of hack to set the language
> to english to ensure correctness.
> 
> Consider the following artificial example:
> 
> &perform suggested actions now
> &delay actions
> 
> which could be translated into German as:
> 
> Vorgeschlagene Aktionen jetzt &durchführen
> Aktionen &zurückstellen
> 
> Now, 'd' does the exact opposite, while 'p' is an invalid
> answer.
> 
> The alternative, forcing translators to remember doing
> something like
> 
> &p: Vorgeschlagene Aktionen jetzt durchführen
> &d: Aktionen zurückstellen
> 
> doesn't sound very good to me.

I initially created the function to get a uniform user interface on the
command line while not having to code with indices and not having to
redo the help every time. But I think this function simplifies life of
translators too.

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. And since the responses cannot be translated a
rather ugly denglish (german-english) text must be used to explain why
the user must type 'y' in case of 'j'.

With the new promptselection the responses string gets generated from
the localized help text and thus will show the correct letters.

msgid "&Yes, record this change"
msgstr "&Ja, übernimmt diese Änderung"
...

Cheers,
Ingo

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