Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1, 4.0-ALPHA
    • Fix Version/s: None
    • Component/s: general/build
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      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:

      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
      

      So in the case of ja default locale, you get a japanese message instead from the baseName + "_" + language2 match

        Activity

        Hide
        Robert Muir added a comment -

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

        Show
        Robert Muir added a comment - here's the fix, i switched it to LocalizedTestCase too so it tests all default locales.
        Hide
        Robert Muir added a comment -

        Committed revision 983500 (trunk), 983501 (3x)

        Show
        Robert Muir added a comment - Committed revision 983500 (trunk), 983501 (3x)

          People

          • Assignee:
            Robert Muir
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development