[josm-dev] Translation

Dirk Stöcker openstreetmap at dstoecker.de
Tue Dec 23 19:48:08 GMT 2008


On Tue, 23 Dec 2008, Frederik Ramm wrote:

> Just to understand this right; if I, as a developer, add a new English
> string, then it will show up as English string in all the national
> language versions until it gets translated, right?
>
> Is it good practice to do things like
>
> String message1 = tr("No luck today.") + " " + tr("Try again.");
> String message2 = tr("Busy with other things.") + " " + tr("Try again.");
>
> instead of
>
> String message1 = tr("No luck today. Try again.");
> String message2 = tr("Busy with other things. Try again.");
>
> assuming that the former would lead to less work for translators?

Yes and no.

If they are clearly distinguished (i.e. could be separate parts): Yes.
In any other case: No.

In another language it could be "Try again. No luck today.", because their 
text semantics is reversed.

Also tr("My value: ") + value + "\n" is better written as
      tr("My value: {0}\n", value);

for the same reason.

Conclusion: Group everything which is related into one string. Break for 
unrelated stuff.

> Also: Can we somehow get rid of that ultra-stupid message: "Unable to
> find translation for the locale: English (United States) reverting to
> English." that is printed to the console on startup?

Seen this today as well. Should be easy to solve :-)

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)




More information about the josm-dev mailing list