feat(i18n): adopt ICU plural syntax in Paraglide for count-bearing messages #640

Open
opened 2026-05-20 07:18:42 +02:00 by marcel · 0 comments
Owner

Context

PR #629 introduced person_mention_results_count_singular and _plural keys to handle the "N persons found" announcement. The two-key suffix convention works for de/en/es (all binary-plural languages) but breaks the day a non-binary-plural locale is added — Polish (4 forms), Russian (3+), Arabic (6), Welsh (6).

Leonie S-1 on PR #629 #11175.

Required

  • Investigate Paraglide ICU plural support ({count, plural, one {...} other {...}}).
  • Migrate the person_mention_results_count_* keys to ICU format if supported, or document the constraint with a TODO marker so the choice is visible the next time count-bearing copy is added.
  • Audit other count-bearing message keys in frontend/messages/{de,en,es}.json for the same pattern.
  • If Paraglide doesn't support ICU plural natively, evaluate a thin wrapper that picks the right key based on Intl.PluralRules.

Acceptance

  • All count-bearing message keys use ICU plural OR are guarded by a wrapper that handles non-binary-plural locales.
  • At least one test asserts plural agreement in a locale with >2 forms (use a synthetic Polish locale if needed).
  • Documented in frontend i18n README.

Reviewer rationale: Leonie on PR #629 #11175.

## Context PR #629 introduced `person_mention_results_count_singular` and `_plural` keys to handle the "N persons found" announcement. The two-key suffix convention works for de/en/es (all binary-plural languages) but breaks the day a non-binary-plural locale is added — Polish (4 forms), Russian (3+), Arabic (6), Welsh (6). Leonie S-1 on PR #629 #11175. ## Required - Investigate Paraglide ICU plural support (`{count, plural, one {...} other {...}}`). - Migrate the `person_mention_results_count_*` keys to ICU format if supported, or document the constraint with a TODO marker so the choice is visible the next time count-bearing copy is added. - Audit other count-bearing message keys in `frontend/messages/{de,en,es}.json` for the same pattern. - If Paraglide doesn't support ICU plural natively, evaluate a thin wrapper that picks the right key based on Intl.PluralRules. ## Acceptance - [ ] All count-bearing message keys use ICU plural OR are guarded by a wrapper that handles non-binary-plural locales. - [ ] At least one test asserts plural agreement in a locale with >2 forms (use a synthetic Polish locale if needed). - [ ] Documented in frontend i18n README. Reviewer rationale: Leonie on PR #629 #11175.
marcel added the P3-laterfeatureui labels 2026-05-20 07:18:46 +02:00
Sign in to join this conversation.
No Label P3-later feature ui
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#640