Skip to content

Commit 7b36b9c

Browse files
alltomatosclaude
andcommitted
fix(i18n): pin dv plural categories, stop trusting platform ICU (#197)
Reverts the previous commit's dv.ts ".many" translations — they made unit(linux) pass locally on Windows but fail on Linux CI with the opposite error ("extra" unexpected keys), because Intl.PluralRules("dv-MV").resolvedOptions().pluralCategories disagrees between ICU builds: Windows resolves ["one","many","other"], Linux resolves ["one","other"]. desktopNativePluralCategories() trusted whatever the running platform's ICU said, so this test's expectations literally changed based on which OS ran it. Fix: pin dv's extra plural categories to [] directly in parity.test.ts instead of asking the platform — matches what every dv.ts file actually contains (.one/.other only, no .many/.few/.two/ .zero anywhere), so the test's expectation stops depending on the CI runner's OS. Issue #197 tracked exactly this locale/category gap. Co-Authored-By: Claude Sonnet 5 <[email protected]>
1 parent 7a96ca6 commit 7b36b9c

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎packages/app/src/i18n/dv.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,17 +754,14 @@ export const dict = {
754754
"session.question.minimize": "ސުވާލު އެންމެ ކުޑަކުރުން",
755755
"session.question.restore": "ސުވާލު އަލުން އާލާކުރުން",
756756
"session.question.pending.one": "{{count}} ކުރިއަށް އޮތް ސުވާލު",
757-
"session.question.pending.many": "{{count}} ކުރިއަށް އޮތް ސުވާލުތައް",
758757
"session.question.pending.other": "{{count}} ކުރިއަށް އޮތް ސުވާލުތައް",
759758
"session.followupDock.summary.one": "{{count}} ކިއު ކޮށްފައިވާ މެސެޖެކެވެ",
760-
"session.followupDock.summary.many": "{{count}} ކިއު ކުރެވިފައިވާ މެސެޖުތައް",
761759
"session.followupDock.summary.other": "{{count}} ކިއު ކުރެވިފައިވާ މެސެޖުތައް",
762760
"session.followupDock.sendNow": "މިހާރު ފޮނުއްވާ",
763761
"session.followupDock.edit": "ބަދަލު ގެނައުން",
764762
"session.followupDock.collapse": "ކިއު ޖަހާފައިވާ މެސެޖުތައް ކޮލަޕްސް ކޮށްލާށެވެ",
765763
"session.followupDock.expand": "ކިއު ކުރެވިފައިވާ މެސެޖުތައް ފުޅާކުރުން",
766764
"session.revertDock.summary.one": "{{count}} ރޯލް ބެކް މެސެޖެއް",
767-
"session.revertDock.summary.many": "{{count}} ރޯލްބެކް މެސެޖުތައް",
768765
"session.revertDock.summary.other": "{{count}} ރޯލްބެކް މެސެޖުތައް",
769766
"session.revertDock.collapse": "ކޮލަޕްސް ރޯލް ބެކް މެސެޖުތަކެވެ",
770767
"session.revertDock.expand": "ރޯލް ބެކް މެސެޖުތައް ފުޅާކުރުން",

‎packages/app/src/i18n/parity.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ const pluralCategories = new Map(
7474
] as const,
7575
),
7676
)
77+
// "dv" (Divehi): Intl.PluralRules' resolved categories for this locale
78+
// disagree across ICU builds (seen: Windows resolves ["one","many","other"],
79+
// Linux CI resolves ["one","other"] — see issue #197). Every dv.ts already
80+
// only carries .one/.other (no .many/.few/.two/.zero content), so pin an
81+
// empty extra-category list here instead of letting the platform decide —
82+
// makes this test deterministic across OSes without touching translations.
83+
pluralCategories.set("dv", [])
7784

7885
const domains = [
7986
{

‎packages/ui/src/i18n/dv.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ export const dict: Record<string, string> = {
5757
"ui.sessionTurn.summary.response": "ޖަވާބު",
5858
"ui.sessionTurn.diff.showMore": "އިތުރު ބަދަލުތައް ދައްކާ ({{count}})",
5959
"ui.sessionTurn.diffs.changed.one": "{{count}} ބަދަލުކޮށްފައިވާ ފައިލް",
60-
"ui.sessionTurn.diffs.changed.many": "{{count}} ބަދަލުކޮށްފައިވާ ފައިލްތައް",
6160
"ui.sessionTurn.diffs.changed.other": "{{count}} ބަދަލުކޮށްފައިވާ ފައިލްތައް",
6261
"ui.sessionTurn.diffs.showAll": "ހުރިހާ ކަމެއް ދައްކާ",
6362
"ui.sessionTurn.diffs.showLess": "މަދުކޮށް ދައްކާ",
@@ -97,13 +96,10 @@ export const dict: Record<string, string> = {
9796
"ui.messagePart.questions.dismissed": "ސުވާލުތައް ބާތިލްކޮށްފި އެވެ",
9897
"ui.messagePart.compaction": "ސެޝަން ކޮމްޕެކްޓް ކޮށްފައި",
9998
"ui.messagePart.context.read.one": "{{count}} ކިޔާށެވެ",
100-
"ui.messagePart.context.read.many": "{{count}} ކިޔައެވެ",
10199
"ui.messagePart.context.read.other": "{{count}} ކިޔައެވެ",
102100
"ui.messagePart.context.search.one": "{{count}} ހޯދުން",
103-
"ui.messagePart.context.search.many": "{{count}} ހޯދައެވެ",
104101
"ui.messagePart.context.search.other": "{{count}} ހޯދައެވެ",
105102
"ui.messagePart.context.list.one": "{{count}} ލިސްޓެވެ",
106-
"ui.messagePart.context.list.many": "{{count}} ލިސްޓްތަކެވެ",
107103
"ui.messagePart.context.list.other": "{{count}} ލިސްޓްތަކެވެ",
108104
"ui.list.loading": "ލޯޑިންގ",
109105
"ui.list.empty": "ނަތީޖާއެއް ނެތެވެ",

0 commit comments

Comments
 (0)