add Japanese messages

This commit is contained in:
Hisashi Osanai 2023-09-07 00:44:13 +09:00
parent 980f04557c
commit 33fc1fcdbe
3 changed files with 1049 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,19 @@ class I18nBaseTest {
Object[] testArgs = {ARG_1};
assertEquals(form.format(testArgs), result);
}
@Test
@DisplayName("Test argument substitution with initializing Locale(Japanese).")
void testFormatMessageWithInitLocaleJA() {
I18nTestClass testClass = new I18nTestClass();
ResourceBundle loadedBundle = ResourceBundle.getBundle("Messages", Locale.JAPANESE);
testClass.setLocale(Locale.JAPANESE);
String result = testClass.formatMessage(I18nConstants.BUNDLE_BUNDLE_MULTIPLEMATCHES, ARG_1);
MessageFormat form = new MessageFormat(loadedBundle.getString(I18nConstants.BUNDLE_BUNDLE_MULTIPLEMATCHES));
Object[] testArgs = {ARG_1};
System.out.println(result);
assertEquals(form.format(testArgs), result);
}
@Test
@DisplayName("Test argument substitution without initializing Locale.")

View File

@ -23,7 +23,8 @@ public class I18nCoverageTest {
Locale.ENGLISH,
Locale.GERMAN,
Locale.forLanguageTag("es"),
Locale.forLanguageTag("nl")
Locale.forLanguageTag("nl"),
Locale.forLanguageTag("ja")
);
@Test