[josm-dev] JOSM Translations BIG problem

Dirk Stöcker openstreetmap at dstoecker.de
Sun Jan 3 22:12:00 GMT 2010


Hello,

the JOSM translation handling got a VERY big problem now. The current 
gettext method will no longer work. The auto-generated Java code does no 
longer compile due to "code too large". This means we need to change that 
code and when we do this, we can also fix all the other related problems 
like space wasting.

Mainly this means we need to change to another format of data storage:
i.e. one file for each language and one file for English where each file 
has same layout.

I already tried to do this once, but failed is I was unable to extract the 
hashing algorithm from "msgfmt" (GNU codes are so heavy interlinked, that 
it is very hard to reuse code).

Essentially a good hashing is the only thing which is missing to drop 
gettext use and switch to e.g. text based files.

Suggestions welcome!

A short description how gettext works at all. The software maintains a 
large hash which holds English strings and for each string it looks in 
this hash and selects the related translations. When nothing found, then 
the original string is returned. The main speed issue is thus the hashing 
to access strings which should have very little (no?) conflicts.

For number-based strings it is a bit more complicated, as you have 
multiple translations and based on the number and the algorithm to choose 
one of these strings the selection is done (languages may have up to 6 
different forms, where English has only two).

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





More information about the josm-dev mailing list