Skip to content

Commit

Permalink
Fix MBCS_Tests_i18n_zh_CN_linux_0 with JDK19 (#3838)
Browse files Browse the repository at this point in the history
  • Loading branch information
takiguc authored Jul 11, 2022
1 parent 7a78f15 commit 6705dd2
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
4 changes: 4 additions & 0 deletions functional/MBCS_Tests/i18n/src/DateFormatTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public DateFormatTest(Locale locale) {
try {
resource = ResourceBundle.getBundle("ResourceBundleTest_16", locale);
} catch (MissingResourceException e) {} // Do nothing
} else if (feature >= 19L) {
try {
resource = ResourceBundle.getBundle("ResourceBundleTest_19", locale);
} catch (MissingResourceException e) {} // Do nothing
}
if (resource == null){
resource = ResourceBundle.getBundle("ResourceBundleTest", locale);
Expand Down
78 changes: 78 additions & 0 deletions functional/MBCS_Tests/i18n/src/ResourceBundleTest_19_zh_CN.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*******************************************************************************
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
import java.util.ListResourceBundle;

public class ResourceBundleTest_19_zh_CN extends ListResourceBundle {
public Object[][] getContents(){
return contents;
}

static final Object[][] contents = {
{"locale","Locale"},
{"timezone","Time Zone"},
{"date","Date"},
{"number","Number"},
{"currency","Currency"},
{"percent","Percent"},
{"FullFormat","y\u5e74M\u6708d\u65e5EEEE zzzz HH:mm:ss"},
{"LongFormat","y\u5e74M\u6708d\u65e5 z HH:mm:ss"},
{"MediumFormat","y\u5e74M\u6708d\u65e5 HH:mm:ss"},
{"ShortFormat","y/M/d HH:mm"},
/* for E,EE,EEE */
{"Day1","\u65e5"},
{"Day2","\u4e00"},
{"Day3","\u4e8c"},
{"Day4","\u4e09"},
{"Day5","\u56db"},
{"Day6","\u4e94"},
{"Day7","\u516d"},
/* for EEEE */
{"Day1F","\u661f\u671f\u65e5"},
{"Day2F","\u661f\u671f\u4e00"},
{"Day3F","\u661f\u671f\u4e8c"},
{"Day4F","\u661f\u671f\u4e09"},
{"Day5F","\u661f\u671f\u56db"},
{"Day6F","\u661f\u671f\u4e94"},
{"Day7F","\u661f\u671f\u516d"},
/* for MMM */
{"Month1","1"},
{"Month2","2"},
{"Month3","3"},
{"Month4","4"},
{"Month5","5"},
{"Month6","6"},
{"Month7","7"},
{"Month8","8"},
{"Month9","9"},
{"Month10","10"},
{"Month11","11"},
{"Month12","12"},
/* for MMMM */
{"Month1F","1\u6708"},
{"Month2F","2\u6708"},
{"Month3F","3\u6708"},
{"Month4F","4\u6708"},
{"Month5F","5\u6708"},
{"Month6F","6\u6708"},
{"Month7F","7\u6708"},
{"Month8F","8\u6708"},
{"Month9F","9\u6708"},
{"Month10F","10\u6708"},
{"Month11F","11\u6708"},
{"Month12F","12\u6708"},
/* for a */
{"AM","\u4e0a\u5348"},
{"PM","\u4e0b\u5348"},
};
}

0 comments on commit 6705dd2

Please sign in to comment.