Hi Felix,

On 25 janv. 2010, at 17:36, Felix Knecht wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
>> For translation of non error message we have 2 possibilites (because no
>> error code is needed):
>> a) Use the same method as for the error codes and have a MSG_xxx key for
>> each message
>> b) Use inline messages (see also [1])). Doing so the inline messages are
>> used as keys if existing in the i18n-properties file. As translators
>> need to know which inlines can be used as keys the need to be put into
>> the default properties file (but commented) for having a list of
>> available keys
>> 
>> What can be the preferable way?
>> 
>>> My preference goes to the second solution as I believe it's the same 
>>> process we're using for Studio.
>>> In Studio, we're also using the class name (where the message comes from) 
>>> as prefix for the keys which makes it even easier to match strings in the 
>>> properties file.
> 
> Using FQCN as prefix will make it impossible to avoid duplicated
> translations.

You mean, when the exact same message is used by two separate classes?
If yes, in that case, you're right, a global key without any prefix would be 
more appropriate.


One more question about possibility "a": Does this possibility mean that for 
each message a "public static String" would be created for the key in a class 
or interface, as well as the same key (with the translated value) in the 
various properties files?

Thanks,
Pierre-Arnaud

Reply via email to