Fix for i18n for JDK22+ onwards#6651
Conversation
Month format is changed from jdk22 onwards from M\uc6d4 to MMMM Signed-off-by: Pratiksha Sawant <Pratiksha.Sawant@ibm.com>
|
@llxia Could you please review this PR. Below are the grinder links for i18n tests on JDK25, all passed. MBCS_Tests_i18n_ja_JP_linux: https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder_CR/46604/ |
| resource = ResourceBundle.getBundle("ResourceBundleTest_19", locale); | ||
| } catch (MissingResourceException e) {} // Do nothing | ||
| } | ||
| } |
There was a problem hiding this comment.
Can we reduce try-catch duplication and put the logic into a function?
private ResourceBundle tryGetBundle(String baseName, Locale locale) {
try {
return ResourceBundle.getBundle(baseName, locale);
} catch (MissingResourceException e) {
// Do nothing
return null;
}
}
Then use:
if (feature >= 22L) {
resource = tryGetBundle("ResourceBundleTest_22", locale);
} else if (feature >= 19L) {
resource = tryGetBundle("ResourceBundleTest_19", locale);
} else if (feature == 16L) {
resource = tryGetBundle("ResourceBundleTest_16", locale);
}
There was a problem hiding this comment.
Done. Fixes are made as per the comment.
ResourceBundle Signed-off-by: Pratiksha Sawant <Pratiksha.Sawant@ibm.com>
|
Thanks @psawant19, for fixing this. I noticed that Unless we fix |
|
I have the fixes for |
Month format is changed in Korean from M\uc6d4 to MMMM
in Chinese from 12 hr to 24 hr format -> ah:mm:ss to HH:mm:ss
Signed-off-by: Pratiksha Sawant Pratiksha.Sawant@ibm.com