Mailing List Archive

Re: PATCH: translation of commands
On Wed, 26 Jan 2000, Edmund GRIMLEY EVANS wrote:

> Here's a patch which, I think, helps with the i18n of commands. A
> translater may translate "help|?|" as "hilfe|help|?", for example, and
> then any unambiguous prefix of "hilfe" or of "help" will be accepted.

Thanks for the path. But I think that this gets too complicated for
command line options. It should be possible even for a non-english
speaking user to enter some letters as described in the documentaion
(which of course should be in her language). Keeping the code clean
is a major design issue.

Translating Yes/No/Quit and leaving the english ones as alias is IMO
okay, as users are often used to just hit the J key (German) or the
Y-key.

Messages are another issue as they transport an important message to
the user which may be really relevant to the operation of the program

GUIs and Buttons do make this issue much easier.

So sorry, I will not apply this patch.


Werner


--
Werner Koch at guug.de www.gnupg.org keyid 621CC013
Re: PATCH: translation of commands [ In reply to ]
Werner Koch <wk@gnupg.org>:

> > Here's a patch which, I think, helps with the i18n of commands. A
> > translater may translate "help|?|" as "hilfe|help|?", for example, and
> > then any unambiguous prefix of "hilfe" or of "help" will be accepted.
>
> Thanks for the path. But I think that this gets too complicated for
> command line options. It should be possible even for a non-english
> speaking user to enter some letters as described in the documentaion
> (which of course should be in her language). Keeping the code clean
> is a major design issue.

We could keep the code clean by using a general-purpose function for
interpreting commands, as I suggested in a subsequent message: a
function that does all the stuff involving unambiguous prefixes in one
place in a consistent way that programmers and translators can
understand.

> Translating Yes/No/Quit and leaving the english ones as alias is IMO
> okay, as users are often used to just hit the J key (German) or the
> Y-key.

Probably, unless there is a language in which the translation of one
of the words starts with the same letter as one of the other words.
(Greek "ne", which means "yes", is a nice example of a confusing word;
but in Greek the word starts with ν [nu], really, so I don't know of a
real example of this problem.)

> So sorry, I will not apply this patch.

Good, because I now realise that it would be a bad idea to put such
complicated functionality in-line in the code. But I think we should
discuss this issue of translating commands and perhaps implement it
using a single function in one place, perhaps like the function I
suggested.

Edmund