Skip to content

pluralize hard-codes en-US and renderers are inconsistent #1385

@BBC6BAE9

Description

@BBC6BAE9

Problems

Spec vs reference renderer — The specification does not define which locale drives plural categories, while the reference implementation hard-codes en-US. Renderer SDK authors have no normative target and cannot tell integrators what behavior is “correct.”

1. WebCore hard-codes en-US
basic_functions.ts line 326: new Intl.PluralRules('en-US').select(args.value) — wrong category for any non-English content (e.g. Polish select(2)few, not other).

2. Flutter ignores CLDR entirely
basic_functions.dart uses if (count == 0) / if (count == 1) / other — no Intl.PluralRules equivalent, always wrong for languages like French (0one) or Arabic.

3. No locale in the spec
pluralize.args has no locale field and uses unevaluatedProperties: false, so agents cannot pass a locale even if they want to.

Fix

  • Add optional locale (BCP 47) to pluralize.args in the spec.
  • Update WebCore to use args.locale when present, fall back to client locale, then en-US.
  • Fix Flutter to read value (not count) and use a proper CLDR plural lookup.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions