[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Synaptic-devel] Language issue regarding the use of Gettext

From: Jean-Michel POURE
Subject: [Synaptic-devel] Language issue regarding the use of Gettext
Date: Sat, 13 Sep 2003 22:23:45 +0200
User-agent: KMail/1.5.2

Dear Friends,

First of all, thank you for this marvelous piece of sofware. Synaptic 
interface improved constantly to reach a level of excellence.

I use Synaptic daily with great pleasure. Therefore, I would like to update 
the French translation. But ... looking at Synaptic code, I would like to 
underline a serious issue about the use of Gettext. 

1) Problem
Several times, sentences are build by the program.

For example, in, line 224:
cout << _(" Processed by using Prefix '") << Prefix <<
                 _("' and chop ") << Chop << endl;

Most languages in the world, even in Europe, are ***very*** different from 
English. If you hard code an English sentences, they will not be 

Some languages do not have verbs, others do not have adjectives, others 
aggregate nouns together. Some language write from left to right. You would 
not believe how different languages are. Languages are different because 
humans are different. You can't hard-code that using C.

2) Solution

The solution is to write complete sentences and/or use %s variable 
placeholders. But beware the use of %s. For example, you cannot write:

"Change %s"
where %s is "password" or "username". 

For example, in Hungarian:
# standard
#: standard input:447 input:448
msgid "Change Password" (two words)
is translated by
msgstr "Jelszóváltás" (one word)

In this case you have to write "Change password" and "Change username" without 
using %s variable placehorders.

You can only use "%s" variable placehorders for user entries or names (product 
names, machine names, etc...).

"an error occured when connecting to %s server"
where %s is "foo".

I hope this helps. 

3) Fixing
If you would like to translate Synaptic to all languages of the Debian project 
(>50), you need to fix Synaptic writing complete sentences using %s 
variables. Could it be done quickly? Synaptic is such a central application 
that it needs fixing.

Do not hesitate to contact me on the list for any question. If you fix the 
main entries, I can review the resulting .pot file to verify all entries 
comply with most languages.

Best regards, Jean-Michel Pouré

reply via email to

[Prev in Thread] Current Thread [Next in Thread]