Resource bundle not found exception

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Resource bundle not found exception

Jiri Klement
Hi,

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.

--
Jiri

_______________________________________________
josm-dev mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/josm-dev
Reply | Threaded
Open this post in threaded view
|

Re: Resource bundle not found exception

Michel Marti-2
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...



_______________________________________________
josm-dev mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/josm-dev
Reply | Threaded
Open this post in threaded view
|

Re: Resource bundle not found exception

Marcin Floryan-3
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
[hidden email]
http://lists.openstreetmap.org/listinfo/josm-dev
Reply | Threaded
Open this post in threaded view
|

Re: Resource bundle not found exception

Stefan Baebler
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
> [hidden email]
> http://lists.openstreetmap.org/listinfo/josm-dev
>


_______________________________________________
josm-dev mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/josm-dev
Reply | Threaded
Open this post in threaded view
|

Re: Resource bundle not found exception

Marcin Floryan-3
Hi!

Stefan Baebler wrote:

> 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.

Fortunately the library we use for translations will do exactly that
automatically so you should be able to specify de-DE and the "de"
translation will be used if "de-DE" is not 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.

The way it is solved now you should not need worry about this file at
all as it is included in the lib/ directory of the JOSM core and during
build included into the josm-latest.jar itself. However, I think that
josm-latest.jar is created by an automated build that might not use ant
and thus might not have this file just yet (but then I am sure the
automated build will be fixed with regards to that).

Alternatively you could try downloading the jar from:
http://svn.openstreetmap.org/applications/editors/josm/dist/josm-translation.jar
and add it to the libraries but as I said you should not need to do that.

> Also how can "--language=sl" parameter be set in the java commandline?

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

So you just need to add it at the end after the josm-latest.jar however
setting the default locale via -Duser.langauge has an identical effect.

> As you see u used -Duser.language and -Duser.country to override system
> locale.

And this is a perfectly valid way to do it. Soon, there will be one more
way to do this - via preferences but I need to find the optimum way of
listing the available translations.


Regards,
Marcin Floryan

_______________________________________________
josm-dev mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/josm-dev
Reply | Threaded
Open this post in threaded view
|

Re: Resource bundle not found exception

Stefan Baebler
On Thu, Oct 30, 2008 at 12:56 PM, Marcin Floryan <[hidden email]> wrote:

>> 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.
>
> The way it is solved now you should not need worry about this file at
> all as it is included in the lib/ directory of the JOSM core and during
> build included into the josm-latest.jar itself. However, I think that
> josm-latest.jar is created by an automated build that might not use ant
> and thus might not have this file just yet (but then I am sure the
> automated build will be fixed with regards to that).

Frederik confirmed a few days ago that automatic building is not done with ant.
That probably needs to be changed, or scripts adjusted accordingly.

Stefan

_______________________________________________
josm-dev mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/josm-dev
Reply | Threaded
Open this post in threaded view
|

Re: Resource bundle not found exception

Marcin Floryan-3
Stefan Baebler wrote:
>
> Frederik confirmed a few days ago that automatic building is not done with ant.
> That probably needs to be changed, or scripts adjusted accordingly.

Just to close this thread - the automated build of JOSM is not done with
ant but relevant build scripts have been updated and all releases of
JOSM contain translations.

Regards,
Marcin


_______________________________________________
josm-dev mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/josm-dev