[josm-dev] Presets

Dirk Stöcker openstreetmap at dstoecker.de
Tue Jul 1 09:22:30 BST 2008


On Tue, 1 Jul 2008, Dirk Stöcker wrote:

> On Mon, 30 Jun 2008, Frederik Ramm wrote:
>
>>> attached a bit updated version of the I18n presets patch:
>>
>> Attached where?
>
> BTW: I found out how to handle the XML i18n stuff. Please do not yet apply
> this patch, it will conflict (a bit) with the stuff I currently make.
>
> The other patches can be applied thought :-)

Ok. Finished that as well.

http://www.dstoecker.eu/josm_pr.tbz2

- includes support of XML-based translation as well.
- "name" gets e.g. "de:name" as translated key.
   I use the same ("En:") as the MOTD code, but convert it to lower case.
   Later on the source for this string may change to locale or whatever. For now
   I think it is good enough, especially, as the result equals ISO-language code.
- combo-box uses de:display_values". "de:values" is not supported.
- One restriction for <item> --> the i18n variant must currently be behind
   the non-translated variant, or it will be overwritten. I did not
   implement a special handling for the reversed input.
   This does not affect all the other elements, as these are handled using
   variables and not the setName() and setIcon() function calls.

As I changed the XML parser, please verify that I did not break anything. 
It lookjs fine, but who knows.

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


More information about the josm-dev mailing list