You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Angelo Turetta <at...@commit.it> on 2003/10/18 17:58:25 UTC

fulcrum-localization test fail in non-US locale

Trying to build fulcrum-localization, I get the following error during test:

----------------
Testsuite: org.apache.fulcrum.localization.LocalizationTest
Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 1,532 sec

Testcase: testInitialization took 0,691 sec
Testcase: testLocalization took 0,831 sec
 Caused an ERROR
Can't find bundle for base name org.apache.fulcrum.localization.BarBundle,
locale it_IT
java.util.MissingResourceException: Can't find bundle for base name
org.apache.fulcrum.localization.BarBundle, locale it_IT
 at
org.apache.fulcrum.localization.DefaultLocalizationService.cacheBundle(Defau
ltLocalizationService.java:381)
 at
org.apache.fulcrum.localization.DefaultLocalizationService.getBundle(Default
LocalizationService.java:345)
 at
org.apache.fulcrum.localization.DefaultLocalizationService.getString(Default
LocalizationService.java:531)
 at
org.apache.fulcrum.localization.LocalizationTest.testLocalization(Localizati
onTest.java:104)
 at ........ (unimportant stack trace removed)
---------------

After looking at the code, I found that setting

MAVEN_OPTS=-Duser.language=en -Duser.region=US

before running maven let me pass the tests. Not bad for a localization
service, its testing classes presume to be run only in a U.S. environment
:-)

Ciao
Angelo Turetta
Modena - Italy


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


RE: fulcrum-localization test fail in non-US locale

Posted by Eric Pugh <ep...@upstate.com>.
Any patches submitted would be great..  Maybe you can look up the current
system property and change it to us?  Or, although it seems like heck, maybe
add more versions and and add some docs about why the unit test fails?

Things that depend on external resources (like the country code) are hard to
test...  Any patches are happily accepted!  Possibly you could also add a
section to the xdocs highlighting that it may fail on non us platforms,
since I expect localization to be built by non US folks a lot!

Eric

> -----Original Message-----
> From: Angelo Turetta [mailto:at-turbine@commit.it]
> Sent: Saturday, October 18, 2003 5:58 PM
> To: Turbine Developers List
> Subject: fulcrum-localization test fail in non-US locale
>
>
> Trying to build fulcrum-localization, I get the following
> error during test:
>
> ----------------
> Testsuite: org.apache.fulcrum.localization.LocalizationTest
> Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 1,532 sec
>
> Testcase: testInitialization took 0,691 sec
> Testcase: testLocalization took 0,831 sec
>  Caused an ERROR
> Can't find bundle for base name
> org.apache.fulcrum.localization.BarBundle,
> locale it_IT
> java.util.MissingResourceException: Can't find bundle for base name
> org.apache.fulcrum.localization.BarBundle, locale it_IT
>  at
> org.apache.fulcrum.localization.DefaultLocalizationService.cac
> heBundle(Defau
> ltLocalizationService.java:381)
>  at
> org.apache.fulcrum.localization.DefaultLocalizationService.get
> Bundle(Default
> LocalizationService.java:345)
>  at
> org.apache.fulcrum.localization.DefaultLocalizationService.get
> String(Default
> LocalizationService.java:531)
>  at
> org.apache.fulcrum.localization.LocalizationTest.testLocalizat
> ion(Localizati
> onTest.java:104)
>  at ........ (unimportant stack trace removed)
> ---------------
>
> After looking at the code, I found that setting
>
> MAVEN_OPTS=-Duser.language=en -Duser.region=US
>
> before running maven let me pass the tests. Not bad for a localization
> service, its testing classes presume to be run only in a U.S.
> environment
> :-)
>
> Ciao
> Angelo Turetta
> Modena - Italy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org