Outcome
Define and implement typed plural and select message variants after the base registry and generated catalogue are stable.
Design gate
Before adding a dependency or public type, compare these options with real catalogue call sites:
- a small Kotventure closed model for only the categories required by the accepted use cases;
- Unicode Common Locale Data Repository (CLDR) plural rules through an established library;
- International Components for Unicode (ICU) message support.
Show dependency size, supported locales, rule-update ownership, runtime cost, generated API shape, and failure behaviour. Obtain maintainer approval. Do not add ICU or CLDR data speculatively.
Required contract
- The catalogue compiler owns variant schemas and generated placeholder types.
- Every locale must use the same placeholder name and type for a catalogue key.
- Select keys form a closed generated set. Unknown values fail; they do not select the last branch.
- Plural categories come only from the approved rule source. Do not infer categories from English.
- Require an explicit
other branch for plural and select variants.
- Validate missing, extra, and unreachable branches at build time where the approved rule model permits it.
- Runtime lookup remains fail-fast for malformed generated or external data.
Acceptance criteria
Dependencies
Blocked by #48, #49, and the catalogue-completeness child of #322. Implement diagnostics before runtime variants when useful.
Outcome
Define and implement typed plural and select message variants after the base registry and generated catalogue are stable.
Design gate
Before adding a dependency or public type, compare these options with real catalogue call sites:
Show dependency size, supported locales, rule-update ownership, runtime cost, generated API shape, and failure behaviour. Obtain maintainer approval. Do not add ICU or CLDR data speculatively.
Required contract
otherbranch for plural and select variants.Acceptance criteria
other, unknown select, missing branch, and locale-rule cases have tests.Dependencies
Blocked by #48, #49, and the catalogue-completeness child of #322. Implement diagnostics before runtime variants when useful.