[josm-dev] Resource bundle not found exception

Stefan Baebler stefan.baebler at gmail.com
Thu Oct 30 07:12:33 GMT 2008


Hi!

This fallback mechanism seems to work now in josm-latest.jar, but i
wonder how to define language in the commandline. I tried:

C:\WINDOWS\system32\java.exe -jar -Duser.language=sl -Xmx512M
-Djava.library.path=C:\incoming\gis\OpenStreetMap\josm\rxtx
"C:\incoming\gis\OpenStreetMap\josm\josm-latest.jar"

but this is falling back to English:

Unable to find translation for the locale: Slovenščina (Slovenija)
reverting to English.

Tried also in German
C:\WINDOWS\system32\java.exe -jar -Duser.country=de -Duser.language=de
-D--language=de -Xmx512M
-Djava.library.path=C:\incoming\gis\OpenStreetMap\josm\rxtx
"C:\incoming\gis\OpenStreetMap\josm\josm-latest.jar"

...but with no luck:
Unable to find translation for the locale: Deutsch (Deutschland)
reverting to English.

Is it searching for "sl-SI" (or "de-DE"), but we only have translation
for "sl" (or "de"). In this case we also need a fallback mechanism to
look for "sl" if "sl-SI" isn't found.

I'm not sure whether i have josm-translations.jar (or whatever it is
called), as it is not listed amongst plugins or as a seperate download.
Possibly listing available translations could help.

Also how can "--language=sl" parameter be set in the java commandline?
As you see u used -Duser.language and -Duser.country to override system
locale.

Stefan

Marcin Floryan wrote:
> Michel Marti wrote:
>> Jiri Klement wrote:
>>> Josm compiled from svn fails with following exception:
>>>
>>> java.util.MissingResourceException: Resource bundle not found
>>>        at org.xnap.commons.i18n.I18nFactory.getI18n(I18nFactory.java:257)
>>>        at org.xnap.commons.i18n.I18nFactory.getI18n(I18nFactory.java:180)
>>>        at org.xnap.commons.i18n.I18nFactory.getI18n(I18nFactory.java:127)
>>>        at org.xnap.commons.i18n.I18nFactory.getI18n(I18nFactory.java:116)
>>>        at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:181)
>>>
>>> Running josm with LC_ALL=en_GB java -jar dist/josm-custom.jar fixes
>>> the issue so it's probably neccesary to somehow define default
>>> language.
>> I have attached a patch to http://josm.openstreetmap.de/ticket/1683 that 
>>    fixes this problem...
> 
> Sorry for this - now fixed in SVN (committing as I write this) 1059.
> 
> Regards,
> Marcin Floryan
> 
> _______________________________________________
> josm-dev mailing list
> josm-dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/josm-dev
> 





More information about the josm-dev mailing list