changeset 8852:129c133558c1

8218781: Localized names for Japanese era Reiwa in COMPAT provider Summary: Contains locale data additions from 8007392 & 8011172 Reviewed-by: naoto, aph, phh
author andrew
date Mon, 15 Jul 2019 00:38:00 +0100
parents da44ccb641bb
children a15b0903de83
files src/share/classes/sun/text/resources/FormatData.java src/share/classes/sun/text/resources/FormatData_ar.java src/share/classes/sun/text/resources/FormatData_be.java src/share/classes/sun/text/resources/FormatData_bg.java src/share/classes/sun/text/resources/FormatData_ca.java src/share/classes/sun/text/resources/FormatData_cs.java src/share/classes/sun/text/resources/FormatData_da.java src/share/classes/sun/text/resources/FormatData_de.java src/share/classes/sun/text/resources/FormatData_el.java src/share/classes/sun/text/resources/FormatData_es.java src/share/classes/sun/text/resources/FormatData_et.java src/share/classes/sun/text/resources/FormatData_fi.java src/share/classes/sun/text/resources/FormatData_fr.java src/share/classes/sun/text/resources/FormatData_ga.java src/share/classes/sun/text/resources/FormatData_hi_IN.java src/share/classes/sun/text/resources/FormatData_hr.java src/share/classes/sun/text/resources/FormatData_hu.java src/share/classes/sun/text/resources/FormatData_it.java src/share/classes/sun/text/resources/FormatData_iw.java src/share/classes/sun/text/resources/FormatData_ja.java src/share/classes/sun/text/resources/FormatData_ko.java src/share/classes/sun/text/resources/FormatData_lt.java src/share/classes/sun/text/resources/FormatData_pt.java src/share/classes/sun/text/resources/FormatData_sr.java src/share/classes/sun/text/resources/FormatData_sv.java src/share/classes/sun/text/resources/FormatData_th.java src/share/classes/sun/text/resources/FormatData_tr.java src/share/classes/sun/text/resources/FormatData_zh.java src/share/classes/sun/text/resources/FormatData_zh_TW.java test/java/util/Calendar/JapanEraNameCompatTest.java test/java/util/Calendar/JapaneseEraNameTest.java
diffstat 31 files changed, 427 insertions(+), 110 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/text/resources/FormatData.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData.java	Mon Jul 15 00:38:00 2019 +0100
@@ -49,7 +49,40 @@
     /**
      * Overrides ListResourceBundle
      */
+    @Override
     protected final Object[][] getContents() {
+        // Julian calendar era strings
+        final String[] julianEras = {
+            "BC",
+            "AD"
+        };
+
+        // Thai Buddhist calendar era strings
+        final String[] buddhistEras = {
+            "BC",     // BC
+            "B.E."    // Buddhist Era
+        };
+
+        // Japanese imperial calendar era abbreviations
+        final String[] japaneseEraAbbrs = {
+            "",
+            "M",
+            "T",
+            "S",
+            "H",
+            "R",
+        };
+
+        // Japanese imperial calendar era strings
+        final String[] japaneseEras = {
+            "",
+            "Meiji",
+            "Taisho",
+            "Showa",
+            "Heisei",
+            "Reiwa",
+        };
+
         return new Object[][] {
             { "MonthNames",
                 new String[] {
@@ -114,42 +147,19 @@
                 }
             },
             { "Eras",
-                new String[] { // era strings for GregorianCalendar
-                    "BC",
-                    "AD"
-                }
-            },
+                julianEras },
+            { "short.Eras",
+                julianEras },
             { "sun.util.BuddhistCalendar.Eras",
-                new String[] { // Thai Buddhist calendar era strings
-                    "BC",     // BC
-                    "B.E."    // Buddhist Era
-                }
+              buddhistEras
             },
             { "sun.util.BuddhistCalendar.short.Eras",
-                new String[] { // Thai Buddhist calendar era strings
-                    "BC",     // BC
-                    "B.E."    // Buddhist Era
-                }
+              buddhistEras
             },
             { "java.util.JapaneseImperialCalendar.Eras",
-                new String[] { // Japanese imperial calendar era strings
-                    "",
-                    "Meiji",
-                    "Taisho",
-                    "Showa",
-                    "Heisei",
-                    "Reiwa",
-                }
-            },
+                japaneseEras },
             { "java.util.JapaneseImperialCalendar.short.Eras",
-                new String[] { // Japanese imperial calendar era abbreviations
-                    "",
-                    "M",
-                    "T",
-                    "S",
-                    "H",
-                    "R",
-                }
+                japaneseEraAbbrs
             },
             { "java.util.JapaneseImperialCalendar.FirstYear",
                 new String[] { // Japanese imperial calendar year name
--- a/src/share/classes/sun/text/resources/FormatData_ar.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_ar.java	Mon Jul 15 00:38:00 2019 +0100
@@ -49,6 +49,7 @@
     /**
      * Overrides ListResourceBundle
      */
+    @Override
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -119,6 +120,44 @@
                     "\u0645"
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u0642.\u0645",
+                    "\u0645",
+                }
+            },
+            { "java.util.JapaneseImperialCalendar.Eras",
+                new String[] {
+                    "\u0645",
+                    "\u0645\u064a\u062c\u064a",
+                    "\u062a\u064a\u0634\u0648",
+                    "\u0634\u0648\u0648\u0627",
+                    "\u0647\u064a\u0633\u064a",
+                    "\u0631\u064a\u0648\u0627",
+                }
+            },
+            { "java.util.JapaneseImperialCalendar.short.Eras",
+                new String[] {
+                    "\u0645",
+                    "\u0645\u064a\u062c\u064a",
+                    "\u062a\u064a\u0634\u0648",
+                    "\u0634\u0648\u0648\u0627",
+                    "\u0647\u064a\u0633\u064a",
+                    "\u0631\u064a\u0648\u0627",
+                }
+            },
+            { "sun.util.BuddhistCalendar.Eras",
+                new String[] {
+                    "BC",
+                    "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a",
+                }
+            },
+            { "sun.util.BuddhistCalendar.short.Eras",
+                new String[] {
+                    "BC",
+                    "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###;#,##0.###-", // decimal pattern
--- a/src/share/classes/sun/text/resources/FormatData_be.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_be.java	Mon Jul 15 00:38:00 2019 +0100
@@ -113,6 +113,12 @@
                     "\u043d.\u0435."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u0434\u0430 \u043d.\u044d.",
+                    "\u043d.\u044d.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_bg.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_bg.java	Mon Jul 15 00:38:00 2019 +0100
@@ -113,6 +113,12 @@
                     "\u043d.\u0435."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u043f\u0440. \u043d. \u0435.",
+                    "\u043e\u0442 \u043d. \u0435.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_ca.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_ca.java	Mon Jul 15 00:38:00 2019 +0100
@@ -107,6 +107,12 @@
                     "ds." // abb Saturday
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "aC",
+                    "dC",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_cs.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_cs.java	Mon Jul 15 00:38:00 2019 +0100
@@ -119,6 +119,12 @@
                     "po Kr."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "p\u0159. n. l.",
+                    "n. l.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_da.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_da.java	Mon Jul 15 00:38:00 2019 +0100
@@ -122,6 +122,18 @@
                     "\ufffd" // NaN
                 }
             },
+            { "Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
+            { "short.Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
             { "DateTimePatterns",
                 new String[] {
                     "HH:mm:ss z", // full time pattern
--- a/src/share/classes/sun/text/resources/FormatData_de.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_de.java	Mon Jul 15 00:38:00 2019 +0100
@@ -113,6 +113,12 @@
                     "n. Chr."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "v. Chr.",
+                    "n. Chr.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_el.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_el.java	Mon Jul 15 00:38:00 2019 +0100
@@ -49,6 +49,7 @@
     /**
      * Overrides ListResourceBundle
      */
+    @Override
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -107,6 +108,12 @@
                     "\u03a3\u03b1\u03b2" // abb Saturday
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u03c0.\u03a7.",
+                    "\u03bc.\u03a7.",
+                }
+            },
             { "AmPmMarkers",
                 new String[] {
                     "\u03c0\u03bc", // am marker
--- a/src/share/classes/sun/text/resources/FormatData_es.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_es.java	Mon Jul 15 00:38:00 2019 +0100
@@ -104,6 +104,18 @@
                     "s\u00e1b" // abb Saturday
                 }
             },
+            { "Eras",
+                new String[] {
+                    "antes de Cristo",
+                    "anno D\u00f3mini",
+                }
+            },
+            { "short.Eras",
+                new String[] {
+                    "a.C.",
+                    "d.C.",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###;-#,##0.###", // decimal pattern
--- a/src/share/classes/sun/text/resources/FormatData_et.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_et.java	Mon Jul 15 00:38:00 2019 +0100
@@ -110,6 +110,12 @@
                     "m.a.j."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "e.m.a.",
+                    "m.a.j.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_fi.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_fi.java	Mon Jul 15 00:38:00 2019 +0100
@@ -82,6 +82,24 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "long.Eras",
+                new String[] {
+                    "ennen Kristuksen syntym\u00e4\u00e4",
+                    "j\u00e4lkeen Kristuksen syntym\u00e4n",
+                }
+            },
+            { "Eras",
+                new String[] {
+                    "eKr.",
+                    "jKr.",
+                }
+            },
+            { "narrow.Eras",
+                new String[] {
+                    "eK",
+                    "jK",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "sunnuntai", // Sunday
--- a/src/share/classes/sun/text/resources/FormatData_fr.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_fr.java	Mon Jul 15 00:38:00 2019 +0100
@@ -110,6 +110,24 @@
                     "ap. J.-C."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "av. J.-C.",
+                    "ap. J.-C.",
+                }
+            },
+            { "sun.util.BuddhistCalendar.Eras",
+                new String[] {
+                    "BC",
+                    "\u00e8re bouddhiste",
+                }
+            },
+            { "sun.util.BuddhistCalendar.short.Eras",
+                new String[] {
+                    "BC",
+                    "\u00e8re b.",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###;-#,##0.###", // decimal pattern
--- a/src/share/classes/sun/text/resources/FormatData_ga.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_ga.java	Mon Jul 15 00:38:00 2019 +0100
@@ -115,6 +115,12 @@
                     "AD",
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "RC",
+                    "AD",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###",
--- a/src/share/classes/sun/text/resources/FormatData_hi_IN.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_hi_IN.java	Mon Jul 15 00:38:00 2019 +0100
@@ -111,6 +111,12 @@
                     "\u0938\u0928"
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u0908\u0938\u093e\u092a\u0942\u0930\u094d\u0935",
+                    "\u0938\u0928",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ".", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_hr.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_hr.java	Mon Jul 15 00:38:00 2019 +0100
@@ -46,6 +46,7 @@
     /**
      * Overrides ListResourceBundle
      */
+    @Override
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -104,6 +105,18 @@
                     "sub" // abb Saturday
                 }
             },
+            { "Eras",
+                new String[] {
+                    "Prije Krista",
+                    "Poslije Krista",
+                }
+            },
+            { "short.Eras",
+                new String[] {
+                    "p. n. e.",
+                    "A. D.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_hu.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_hu.java	Mon Jul 15 00:38:00 2019 +0100
@@ -116,6 +116,12 @@
                     "i.u."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "i. e.",
+                    "i. sz.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_it.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_it.java	Mon Jul 15 00:38:00 2019 +0100
@@ -110,6 +110,12 @@
                     "dopo Cristo"
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "aC",
+                    "dC",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_iw.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_iw.java	Mon Jul 15 00:38:00 2019 +0100
@@ -110,6 +110,12 @@
                     "\u05dc\u05e4\u05e1\u05d4\"\u05e0"
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1",
+                    "\u05dc\u05e1\u05d4\u05f4\u05e0",
+                }
+            },
             { "DateTimePatterns",
                 new String[] {
                     "HH:mm:ss z", // full time pattern
--- a/src/share/classes/sun/text/resources/FormatData_ja.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_ja.java	Mon Jul 15 00:38:00 2019 +0100
@@ -46,7 +46,17 @@
     /**
      * Overrides ListResourceBundle
      */
+    @Override
     protected final Object[][] getContents() {
+        // era strings for Japanese imperial calendar
+        final String[] japaneseEras = {
+            "\u897f\u66a6", // Seireki (Gregorian)
+            "\u660e\u6cbb", // Meiji
+            "\u5927\u6b63", // Taisho
+            "\u662d\u548c", // Showa
+            "\u5e73\u6210", // Heisei
+            "\u4ee4\u548c", // Reiwa
+        };
         return new Object[][] {
             { "MonthNames",
                 new String[] {
@@ -122,16 +132,7 @@
                     "\u4ecf\u66a6",       // Butsureki
                 }
             },
-            { "java.util.JapaneseImperialCalendar.Eras",
-                new String[] { // era strings for Japanese imperial calendar
-                    "\u897f\u66a6",     // Seireki (Gregorian)
-                    "\u660e\u6cbb",     // Meiji
-                    "\u5927\u6b63",     // Taisho
-                    "\u662d\u548c",     // Showa
-                    "\u5e73\u6210",     // Heisei
-                    "\u4ee4\u548c",     // Reiwa
-                }
-            },
+            { "java.util.JapaneseImperialCalendar.Eras", japaneseEras },
             { "java.util.JapaneseImperialCalendar.FirstYear",
                 new String[] {  // first year name
                     "\u5143",   // "Gan"-nen
--- a/src/share/classes/sun/text/resources/FormatData_ko.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_ko.java	Mon Jul 15 00:38:00 2019 +0100
@@ -46,6 +46,7 @@
     /**
      * Overrides ListResourceBundle
      */
+    @Override
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -104,6 +105,28 @@
                     "\ud1a0" // abb Saturday
                 }
             },
+            { "Eras",
+                new String[] {
+                    "\uae30\uc6d0\uc804",
+                    "\uc11c\uae30",
+                }
+            },
+            { "sun.util.BuddhistCalendar.Eras",
+                new String[] {
+                    "BC",
+                    "\ubd88\uae30",
+                }
+            },
+            { "java.util.JapaneseImperialCalendar.Eras",
+                new String[] {
+                    "\uc11c\uae30",
+                    "\uba54\uc774\uc9c0",
+                    "\ub2e4\uc774\uc1fc",
+                    "\uc1fc\uc640",
+                    "\ud5e4\uc774\uc138\uc774",
+                    "\ub808\uc774\uc640",
+                }
+            },
             { "AmPmMarkers",
                 new String[] {
                     "\uc624\uc804", // am marker
--- a/src/share/classes/sun/text/resources/FormatData_lt.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_lt.java	Mon Jul 15 00:38:00 2019 +0100
@@ -110,6 +110,12 @@
                     "po.Kr."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "pr. Kr.",
+                    "po Kr.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_pt.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_pt.java	Mon Jul 15 00:38:00 2019 +0100
@@ -104,6 +104,18 @@
                     "S\u00e1b" // abb Saturday
                 }
             },
+            { "long.Eras",
+                new String[] {
+                    "Antes de Cristo",
+                    "Ano do Senhor",
+                }
+            },
+            { "Eras",
+                new String[] {
+                    "a.C.",
+                    "d.C.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal al separator
--- a/src/share/classes/sun/text/resources/FormatData_sr.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_sr.java	Mon Jul 15 00:38:00 2019 +0100
@@ -45,6 +45,7 @@
 import java.util.ListResourceBundle;
 
 public class FormatData_sr extends ListResourceBundle {
+    @Override
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
--- a/src/share/classes/sun/text/resources/FormatData_sv.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_sv.java	Mon Jul 15 00:38:00 2019 +0100
@@ -46,6 +46,7 @@
     /**
      * Overrides ListResourceBundle
      */
+    @Override
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -110,6 +111,18 @@
                     "em" // pm marker
                 }
             },
+            { "Eras",
+                new String[] {
+                    "f\u00f6re Kristus",
+                    "efter Kristus",
+                }
+            },
+            { "short.Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/FormatData_th.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_th.java	Mon Jul 15 00:38:00 2019 +0100
@@ -141,6 +141,32 @@
                     "\u0e04.\u0e28."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.",
+                    "\u0e04.\u0e28.",
+                }
+            },
+            { "java.util.JapaneseImperialCalendar.Eras",
+                new String[] {
+                    "\u0e04.\u0e28.",
+                    "\u0e40\u0e21\u0e08\u0e34",
+                    "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a",
+                    "\u0e42\u0e0a\u0e27\u0e30",
+                    "\u0e40\u0e2e\u0e40\u0e0b",
+                    "\u0e40\u0e23\u0e27\u0e30",
+                }
+            },
+            { "java.util.JapaneseImperialCalendar.short.Eras",
+                new String[] {
+                    "\u0e04.\u0e28.",
+                    "\u0e21",
+                    "\u0e17",
+                    "\u0e0a",
+                    "\u0e2e",
+                    "R",
+                }
+            },
             { "sun.util.BuddhistCalendar.DateTimePatterns",
                 dateTimePatterns
             },
--- a/src/share/classes/sun/text/resources/FormatData_tr.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_tr.java	Mon Jul 15 00:38:00 2019 +0100
@@ -104,6 +104,18 @@
                     "Cmt" // abb Saturday
                 }
             },
+            { "long.Eras",
+                new String[] {
+                    "Milattan \u00d6nce",
+                    "Milattan Sonra",
+                }
+            },
+            { "Eras",
+                new String[] {
+                    "M\u00d6",
+                    "MS",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###;-#,##0.###", // decimal pattern
--- a/src/share/classes/sun/text/resources/FormatData_zh.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_zh.java	Mon Jul 15 00:38:00 2019 +0100
@@ -46,6 +46,7 @@
     /**
      * Overrides ListResourceBundle
      */
+    @Override
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -116,6 +117,22 @@
                     "\u516c\u5143"
                 }
             },
+            { "sun.util.BuddhistCalendar.Eras",
+                new String[] {
+                    "BC",
+                    "\u4f5b\u5386",
+                }
+            },
+            { "java.util.JapaneseImperialCalendar.Eras",
+                new String[] {
+                    "\u516c\u5143",
+                    "\u660e\u6cbb",
+                    "\u5927\u6b63",
+                    "\u662d\u548c",
+                    "\u5e73\u6210",
+                    "\u4ee4\u548c",
+                }
+            },
             { "DateTimePatterns",
                 new String[] {
                     "ahh'\u65f6'mm'\u5206'ss'\u79d2' z", // full time pattern
--- a/src/share/classes/sun/text/resources/FormatData_zh_TW.java	Sun Jul 14 02:21:55 2019 +0100
+++ b/src/share/classes/sun/text/resources/FormatData_zh_TW.java	Mon Jul 15 00:38:00 2019 +0100
@@ -46,6 +46,7 @@
     /**
      * Overrides ListResourceBundle
      */
+    @Override
     protected final Object[][] getContents() {
         return new Object[][] {
             { "Eras",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Calendar/JapanEraNameCompatTest.java	Mon Jul 15 00:38:00 2019 +0100
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8218781
+ * @summary Test the localized names of Japanese era Reiwa from COMPAT provider.
+ * @modules jdk.localedata
+ * @run testng/othervm -Djava.locale.providers=COMPAT JapanEraNameCompatTest
+ */
+
+import static java.util.Calendar.*;
+import static java.util.Locale.*;
+
+import java.util.Calendar;
+import java.util.Locale;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import static org.testng.Assert.assertEquals;
+
+@Test
+public class JapanEraNameCompatTest {
+    static final Calendar c;
+    static final String EngName = "Reiwa";
+    static final String CJName = "\u4ee4\u548c";
+    static final String KoreanName = "\ub808\uc774\uc640";
+    static final String ArabicName = "\u0631\u064a\u0648\u0627";
+    static final String ThaiName = "\u0e40\u0e23\u0e27\u0e30";
+
+    static {
+        c = Calendar.getInstance(new Locale("ja","JP","JP"));
+        c.set(ERA, 5);
+        c.set(1, MAY, 1);
+    }
+
+    @DataProvider(name="UtilCalendar")
+    Object[][] dataUtilCalendar() {
+        return new Object[][] {
+            //locale,   long,       short
+            { US,       EngName,    "R" },
+            { JAPAN,    CJName,     "R" },
+            { KOREAN,   KoreanName, "R" },
+            { CHINA,    CJName,     "R" },
+            { TAIWAN,   CJName,     "R" }, // fallback to zh
+            { new Locale("ar"), ArabicName, ArabicName },
+            { new Locale("th"), ThaiName, "R" },
+            // hi_IN fallback to root
+            { new Locale("hi", "IN"), EngName, "R" }
+        };
+    }
+
+    @Test(dataProvider="UtilCalendar")
+    public void testCalendarEraDisplayName(Locale locale,
+            String longName, String shortName) {
+        assertEquals(c.getDisplayName(ERA, LONG, locale), longName);
+        assertEquals(c.getDisplayName(ERA, SHORT, locale), shortName);
+    }
+
+}
--- a/test/java/util/Calendar/JapaneseEraNameTest.java	Sun Jul 14 02:21:55 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 8202088
- * @summary Test the localized Japanese new era name (May 1st. 2019-)
- *      is retrieved no matter CLDR provider contains the name or not.
- * @run testng/othervm JapaneseEraNameTest
- */
-
-import static java.util.Calendar.*;
-import static java.util.Locale.*;
-import java.util.Calendar;
-import java.util.Locale;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-import static org.testng.Assert.assertEquals;
-
-@Test
-public class JapaneseEraNameTest {
-    static final Calendar c;
-
-    static {
-        c = Calendar.getInstance(new Locale("ja","JP","JP"));
-        c.set(ERA, 5);
-        c.set(YEAR, 1);
-        c.set(MONTH, MAY);
-        c.set(DAY_OF_MONTH, 1);
-    }
-
-    @DataProvider(name="names")
-    Object[][] names() {
-        return new Object[][] {
-            // type,    locale,  name
-            { LONG,     JAPAN,   "\u4ee4\u548c" },
-            { LONG,     US,      "Reiwa" },
-            { LONG,     CHINA,   "Reiwa" },
-            { SHORT,    JAPAN,   "R" },
-            { SHORT,    US,      "R" },
-            { SHORT,    CHINA,   "R" },
-        };
-    }
-
-    @Test(dataProvider="names")
-    public void testJapaneseNewEraName(int type, Locale locale, String expected) {
-        assertEquals(c.getDisplayName(ERA, type, locale), expected);
-    }
-}