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

CLDR "contributed" property should be available on it_CH locale

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 9
    • core-libs

      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 );
      -------------------------------------------------------

            naoto Naoto Sato
            yzhou Daisy Zhou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: