PATCH: translation of menu-commands now possible in pkclist.c

Edmund GRIMLEY EVANS edmundo@rano.org
Thu, 27 Jan 2000 16:29:25 +0000


Daniel Resare <noa@melody.se>:


> When translating the gnupg messages to swedish i noticed the following
> entry
>
> #. a string with valid answers
> #: g10/pkclist.c:197
> msgid "sSmMqQ"
>
> and i wondered if it was ok to translate this message, or if the
> english standard behaviour of the program would break if i did.
> Checking the source I came to the conclution that my worries were
> relevant, if the string sSmMqQ is translated to another language
> not only the translation of the program changes but also the behaviour,
> which is not desired. So i wrote the following patch to solve the
> problem.
I'm not sure this is the right way to do it. Hard-wired things are to be avoided, I think ... An alternative would be to change the notation: use a string like "sS,mM,qQ", which a translater could translate as "xX,yY,zZ", if they don't want the English keys to be accepted, or as "xXsS,yYmM,zZqq", if they do. Either way, the translator can see the consequences of their decision, whereas your patch might have nasty circumstances if someone were translating into a language in which the word for "quit" starts with 's' ... particularly if the word for "show" happens to start with 'q'! I sent a patch to the list last night in which I suggest a similar solution for the commands in keyedit.c. But I suppose we really ought to be thinking about wide characters and charset support, too; a Russian user might be using koi8-r or utf-8. The same problem effects lots of programs, not just gnupg ... Edmund