Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8185478

CLDR "contributed" property should be available on it_CH locale

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:

      Description

      In it_CH.xml, shows below contributed properties for month stand-alone wide value. Java doesn't get this value, but fallback to its parentLocale 'it' and returns 'Gennaio' which is in it.xml

      In it_CH.xml
      <calendar type="gregorian">
      <months>
      <monthContext type="stand-alone">
      <monthWidth type="wide">
      <month type="1" draft="contributed">gennaio</month>

      But Java output is " Gennaio", instead of "gennaio".
      Use below code to get Java's output.
      ---------------------------------------------
      String tag = "it-CH";
      Locale target = Locale.forLanguageTag(tag);
      MonthDay date = MonthDay.of(Integer.parseInt("1"), Integer.parseInt("5"));
      String mPattern="LLLL";
      DateTimeFormatter formatter = DateTimeFormatter.ofPattern(mPattern, target);
      formatter = formatter.withLocale(target);
      String actualResult = date.format(formatter);
      System.out.println(actualResult );
      -------------------------------------------------------

        Attachments

          Activity

            People

            • Assignee:
              naoto Naoto Sato
              Reporter:
              yzhou Daisy Zhou
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: