8207243: Fix translation filtering to also support zh_HK and zh_TW
authorerikj
Thu, 19 Jul 2018 14:25:42 -0700
changeset 51207 fc24da4898f1
parent 51206 14b870bda24f
child 51208 0d2e45b25c3d
8207243: Fix translation filtering to also support zh_HK and zh_TW Reviewed-by: tbell
make/CompileJavaModules.gmk
make/conf/jib-profiles.js
test/jdk/build/translations/VerifyTranslations.java
test/jdk/java/util/logging/LocalizedLevelName.java
--- a/make/CompileJavaModules.gmk	Thu Jul 19 13:41:56 2018 -0700
+++ b/make/CompileJavaModules.gmk	Thu Jul 19 14:25:42 2018 -0700
@@ -621,9 +621,14 @@
 	$(install-file)
 
 CreateHkTargets = \
-    $(patsubst $(TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
-      $(subst /share/classes,, \
-        $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
+    $(call FilterExcludedTranslations, \
+       $(patsubst $(TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
+         $(subst /share/classes,, \
+            $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1)) \
+         ) \
+       ), \
+       .properties \
+    )
 
 ifeq ($(MODULE), java.sql.rowset)
   TARGETS += $(call CreateHkTargets, $(java.sql.rowset_CLEAN_FILES))
--- a/make/conf/jib-profiles.js	Thu Jul 19 13:41:56 2018 -0700
+++ b/make/conf/jib-profiles.js	Thu Jul 19 14:25:42 2018 -0700
@@ -242,7 +242,7 @@
         dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf"],
         default_make_targets: ["product-bundles", "test-bundles"],
         configure_args: concat(["--enable-jtreg-failure-handler"],
-            "--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I",
+            "--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
             versionArgs(input, common))
     };
     // Extra settings for debug profiles
--- a/test/jdk/build/translations/VerifyTranslations.java	Thu Jul 19 13:41:56 2018 -0700
+++ b/test/jdk/build/translations/VerifyTranslations.java	Thu Jul 19 14:25:42 2018 -0700
@@ -45,7 +45,7 @@
      * The set of translations we want to see in an Oracle built image
      */
     private static final Set<String> VALID_TRANSLATION_SUFFIXES = Set.of(
-            "_en", "_en_US", "_en_US_POSIX", "_ja", "_zh_CN", "_zh_TW", "_zh_HK"
+            "_en", "_en_US", "_en_US_POSIX", "_ja", "_zh_CN"
     );
 
     /**
--- a/test/jdk/java/util/logging/LocalizedLevelName.java	Thu Jul 19 13:41:56 2018 -0700
+++ b/test/jdk/java/util/logging/LocalizedLevelName.java	Thu Jul 19 14:25:42 2018 -0700
@@ -37,8 +37,8 @@
         "SEVERE",  Locale.ENGLISH,                 "Severe",       Level.SEVERE,
         "WARNING", Locale.JAPANESE,                "\u8B66\u544A", Level.WARNING,
         "INFO",    Locale.SIMPLIFIED_CHINESE,      "\u4FE1\u606F", Level.INFO,
-        "SEVERE",  Locale.TRADITIONAL_CHINESE,     "\u56B4\u91CD", Level.SEVERE,
-        "CONFIG",  Locale.forLanguageTag("zh-HK"), "\u7D44\u614B", Level.CONFIG,
+        "SEVERE",  Locale.SIMPLIFIED_CHINESE,      "\u4E25\u91CD", Level.SEVERE,
+        "CONFIG",  Locale.forLanguageTag("zh-CN"), "\u914D\u7F6E", Level.CONFIG,
         "ALL",     Locale.ROOT,                    "All",          Level.ALL,
         "SEVERE",  Locale.ROOT,                    "Severe",       Level.SEVERE,
         "WARNING", Locale.ROOT,                    "Warning",      Level.WARNING,