You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2010/08/09 02:07:16 UTC

[jira] Updated: (LUCENE-2591) TestNLS fails with ja locale

     [ https://issues.apache.org/jira/browse/LUCENE-2591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2591:
--------------------------------

    Attachment: LUCENE-2591.patch

here's the fix, i switched it to LocalizedTestCase too so it tests all default locales.


> TestNLS fails with ja locale
> ----------------------------
>
>                 Key: LUCENE-2591
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2591
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.1, 4.0
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>            Priority: Minor
>         Attachments: LUCENE-2591.patch
>
>
> set ANT_ARGS="-Dargs=-Duser.language=ja -Duser.country=JP"
> ant test-core -Dtestcase=TestNLS
> The test has 2 sets of message, one fallback, and one ja.
> The tests assume if it asks for a non-ja locale, that it will get the fallback message,
> but this is not how ResourceBundle.getBundle works:
> {noformat}
> Otherwise, the following sequence is generated from the attribute values of the specified locale 
> (language1, country1, and variant1) and of the default locale (language2, country2, and variant2):
> baseName + "_" + language1 + "_" + country1 + "_" + variant1
> baseName + "_" + language1 + "_" + country1
> baseName + "_" + language1
> baseName + "_" + language2 + "_" + country2 + "_" + variant2
> baseName + "_" + language2 + "_" + country2
> baseName + "_" + language2
> baseName
> {noformat}
> So in the case of ja default locale, you get a japanese message instead from the baseName + "_" + language2 match

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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