Skip to content

Commit

Permalink
Add Japanese + Korean plural rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobras committed Jan 15, 2024
1 parent d95c909 commit a50bd6a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,10 @@ actual fun extendLibresPlurals() {
else -> PluralForm.Other
}
}

// TODO: Remove when https://github.com/Skeptick/libres/pull/56 is merged
PluralRules["ja"] = PluralRule { PluralForm.Other }

// TODO: Remove when https://github.com/Skeptick/libres/pull/56 is merged
PluralRules["ko"] = PluralRule { PluralForm.Other }
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ class LocalizedTests {
assertThat(HumanReadable.duration(2.seconds)).isEqualTo("2 secondi")
}

@Test
fun ja() {
LibresSettings.languageCode = "ja"
assertThat(HumanReadable.duration(2.seconds)).isEqualTo("2 秒")
}

@Test
fun ko() {
LibresSettings.languageCode = "ko"
assertThat(HumanReadable.duration(2.seconds)).isEqualTo("2 초")
}

@Test
fun nl() {
LibresSettings.languageCode = "nl"
Expand Down

0 comments on commit a50bd6a

Please sign in to comment.