changeset 55627:9c1885fb2a42

8227127: Era designator not displayed correctly using the COMPAT provider Reviewed-by: rriggs
author naoto
date Tue, 09 Jul 2019 08:05:38 -0700
parents eb1fbe4d61b2
children 7a0d1616851e
files src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_ja.java src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_zh.java src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_zh_TW.java test/jdk/sun/text/resources/LocaleData test/jdk/sun/text/resources/LocaleDataTest.java
diffstat 5 files changed, 30 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_ja.java	Mon Jul 08 12:16:13 2019 -0400
+++ b/src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_ja.java	Tue Jul 09 08:05:38 2019 -0700
@@ -97,6 +97,10 @@
             "\u6c11\u56fd\u524d",
             "\u6c11\u56fd",
         };
+        final String[] gregoryEras = {
+            "\u7d00\u5143\u524d",
+            "\u897f\u66a6",
+        };
         return new Object[][] {
             { "MonthNames",
                 new String[] {
@@ -171,12 +175,8 @@
                     "\u5348\u5f8c" // pm marker
                 }
             },
-            { "Eras",
-                new String[] { // era strings for GregorianCalendar
-                    "\u7d00\u5143\u524d",
-                    "\u897f\u66a6"
-                }
-            },
+            { "Eras", gregoryEras },
+            { "short.Eras", gregoryEras },
             { "buddhist.Eras",
                 new String[] { // era strings for Thai Buddhist calendar
                     "\u7d00\u5143\u524d", // Kigenzen
--- a/src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_zh.java	Mon Jul 08 12:16:13 2019 -0400
+++ b/src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_zh.java	Tue Jul 09 08:05:38 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -88,6 +88,10 @@
             "\u6c11\u56fd\u524d",
             "\u6c11\u56fd",
         };
+        final String[] gregoryEras = {
+            "\u516c\u5143\u524d",
+            "\u516c\u5143",
+        };
         return new Object[][] {
             { "MonthNames",
                 new String[] {
@@ -263,12 +267,8 @@
                     "\u4e0b\u5348" // pm marker
                 }
             },
-            { "Eras",
-                new String[] { // era strings
-                    "\u516c\u5143\u524d",
-                    "\u516c\u5143"
-                }
-            },
+            { "Eras", gregoryEras },
+            { "short.Eras", gregoryEras },
             { "buddhist.Eras",
                 new String[] {
                     "BC",
--- a/src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_zh_TW.java	Mon Jul 08 12:16:13 2019 -0400
+++ b/src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_zh_TW.java	Tue Jul 09 08:05:38 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -88,13 +88,13 @@
             "\u6c11\u570b\u524d",
             "\u6c11\u570b",
         };
+        final String[] gregoryEras = {
+            "\u897f\u5143\u524d",
+            "\u897f\u5143",
+        };
         return new Object[][] {
-            { "Eras",
-                new String[] { // era strings
-                    "\u897f\u5143\u524d",
-                    "\u897f\u5143"
-                }
-            },
+            { "Eras", gregoryEras },
+            { "short.Eras", gregoryEras },
             { "standalone.MonthAbbreviations",
                 new String[] {
                     "1\u6708",
--- a/test/jdk/sun/text/resources/LocaleData	Mon Jul 08 12:16:13 2019 -0400
+++ b/test/jdk/sun/text/resources/LocaleData	Tue Jul 09 08:05:38 2019 -0700
@@ -8322,7 +8322,15 @@
 # bug #8208746
 CurrencyNames//ves=Venezuelan Bol\u00edvar Soberano
 
-# bug# 8206879
+# bug #8206879
 # For Peru decimal separator is changed to dot(.) and grouping separator is changed to comma(,)
 FormatData/es_PE/NumberElements/0=.
 FormatData/es_PE/NumberElements/1=,
+
+# bug #8227127
+FormatData/ja/short.Eras/0=\u7d00\u5143\u524d
+FormatData/ja/short.Eras/1=\u897f\u66a6
+FormatData/zh/short.Eras/0=\u516c\u5143\u524d
+FormatData/zh/short.Eras/1=\u516c\u5143
+FormatData/zh_TW/short.Eras/0=\u897f\u5143\u524d
+FormatData/zh_TW/short.Eras/1=\u897f\u5143
--- a/test/jdk/sun/text/resources/LocaleDataTest.java	Mon Jul 08 12:16:13 2019 -0400
+++ b/test/jdk/sun/text/resources/LocaleDataTest.java	Tue Jul 09 08:05:38 2019 -0700
@@ -39,7 +39,7 @@
  *      8017142 8037343 8055222 8042126 8074791 8075173 8080774 8129361 8134916
  *      8145136 8145952 8164784 8037111 8081643 7037368 8178872 8185841 8190918
  *      8187946 8195478 8181157 8179071 8193552 8202026 8204269 8202537 8208746
- *      8209775 8221432
+ *      8209775 8221432 8227127
  * @summary Verify locale data
  * @modules java.base/sun.util.resources
  * @modules jdk.localedata