Skip to content

B5: =1 + one plural pairing produces gen-l10n 'overridden' warnings on most locales #1

@ChauCM

Description

@ChauCM

Surfaced by a pilot test (Claude Code Opus 4.7 against examples/after/, 2026-05-24). Full feedback: dialect-feed.md.

Problem

The convention tells the agent to include both an exact-match =1 and the CLDR one category in every plural. For most target locales we ship (en/es/de/ja/vi/ar), CLDR one matches only n=1. After =1 matches, one is dead code, and flutter gen-l10n correctly warns:

[app_de.arb:checkoutNights] ICU Syntax Warning: The plural part specified below is overridden by a later plural part.
    {nights, plural, =1{1 Nacht} one{{nights} Nacht} other{...}}

Harmless at runtime, but every adopter sees these on first sync.

Options

  • (A) Refine the convention: "If your locale's one covers values beyond 1 (Russian, Polish), include both. If one matches only n=1, prefer =1 and skip one." Most teachable.
  • (B) Add dialect check / dialect lint-plurals detection of the overlap + --fix to remove redundant one.
  • (C) Document the warning is intentional belt-and-braces.

The original reporter votes (A) with (B) as enforcement.

Acceptance

  • dialect.yaml's plural section explicitly distinguishes CLDR-one-only-equals-1 locales from CLDR-one-broader locales.
  • dialect check flags redundant =1+one pairs in locales where one matches only 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions