On Fri, 27 Jun 2008, Christoph Eckert wrote:

Maybe. But if we had the two way mechanism ("inline" translations as well as
centralised i18n), we should ensure that no strings appear in the lang
plugins that are already tranlated inline.

No. Why. Strings can be in both sets. Double text is only a very little waste of space, but a large advantage in comfort (thing of old/new versions, changed texts, ...). The i18n() translates every equal string, which means also all the double strings in the preset file will be translated automatically (as well as strings in own files).

What is true is, that translations in the preset files should be preferred.

KDE already has a mechanism to translate config files (such as .desktop
files):

Trask.desktop

Name=Trash
Name[de]=Mülleimer
Comment=Contains removed files
Comment[de]=Enthält gelöschte Dateien
Type=Link
URL=trash:/

Well. That's what I meant with scripting. For KDE all these desktop files and other stuff are parsed by scripts and the texts are extracted and copied to the .po/.pot files. When these are translated scripts copy the stuff back into the original file.

name="Streets/Trunk"
name[de]="Straßen/Schnellstraße"
name[fr]="Voies/Voie rapide"

icon="presets/trunk.png">
icon[de]="presets/Schnellstraße.png">
icon[fr]="presets/VoieRapide.png">

<label text="Edit a Trunk" />
<label text[de]="Schnellstraße bearbeiten" />
<label text[fr]="Adapter Voie Rapide" />

<text key="ref"

text="Reference:" default=""
text="Reference[de]:" default=""
text="Reference[fr]:" default=""

I would prefer "De:name" instead of "name[de]", as "De:" is used in MOTD already.

This shows a disadvantage of inline translations: It will blow up the
translation files and potentially make them "unreadable".

Yes. That's why the mixed strategie. So only the strings not in the main set need to be translated. This reduces confusion and space.

But you are right, that also the i18n should be extended to each key and not only to the text keys, so maybe german signs can be used.

Frankly, I don't know which method is best. The only thing that is out of the
question is that we need translated presets :) . The currently best solution
was to have both methods, "inline" translations for "SIG" presets as well as
plugin based translations for the default presets. For the latter one, we
needed a markup for the strings being trranslated, right?

No. Already done. The lang-infrastructure is working with the patch I supplied (and the stuff I checked in in OSM svn) and I also started to partially translate German texts (is a bit complicated, as I have to check against the wiki for each text).

What is missing is
a) applying the patch
b) add the "Xx:key" to "key" conversion.

P.S. In my last letter I wanted to write, that I CAN'T do part b). I don't fully understand the XML parser yet.

Ciao
--
http://www.dstoecker.eu/ (PGP key available)
_______________________________________________
josm-dev mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/josm-dev

Reply via email to