Skip to content

packages/i18n/README.md claims 11 built-in locales twice; the package ships 10 (and the same file says "ten packs" further down) #7989

Description

@claude

Found while compiling the i18n README's fenced blocks for objectui#5174 batch 16 (PR #7988). Filed unassigned and deliberately NOT repaired there — that batch's mandate is the ledger entry plus the ts/tsx fences, and this is a prose count in the same file, a different class of edit.

What

packages/i18n/README.md claims 11 built-in locales, twice:

  • line 3: Internationalization for Object UI — 11 built-in locales, RTL support, and date/currency formatting.
  • line 7: 🌍 **11 Built-in Locales** - English, Chinese, Japanese, Korean, German, French, Spanish, Portuguese, Russian, Arabic, and more

The package ships 10. Measured against the built artifact on origin/main 9de3141a0:

import { builtInLocales } from '@object-ui/i18n';
Object.keys(builtInLocales).length  // 10
// ["en","zh","ja","ko","de","fr","es","pt","ru","ar"]

packages/i18n/src/locales/ holds exactly those ten files (plus index.ts), and dist/index.d.ts re-exports exactly those ten defaults.

Why it is worth a card rather than a silent edit

The document contradicts itself, not just the code, and the two halves disagree by design of who wrote them:

  • The feature blurb at the top says 11 and hedges with "and more".
  • The Scope — the engine.* carve-out section further down says "no engine.* key exists in any of the ten packs" and "~1,300 keys × 8 further locales", both of which are arithmetic on ten.
  • The package's own @packageDocumentation block says "10+ built-in language packs".

So the number is wrong in the two places a reader looks first and right in the two places written later, which is the signature of a count that was never re-derived after the locale set settled. objectui#3351 is the same defect in a changeset file ("eleven locale packs — the repo has ten"), fixed there in isolation; the README was not swept at the time.

The decision the repair needs

Not purely mechanical, which is the other reason this is filed rather than patched:

  1. Correct to 10 everywhere, and drop the "and more" hedge — the enumeration on line 7 already lists all ten, so "and more" is itself false.
  2. Make the count derived instead of restated, the way the peer-dependency lines are now pinned to the manifest by scripts/__tests__/doc-version-claims.test.ts. A pin on Object.keys(builtInLocales).length would stop the number rotting again the next time a pack lands or leaves, and an eleventh locale is a live possibility — objectui#7479 and objectui#7486 are both actively reshaping how the ten packs load.

Option 2 costs a test and is the one that survives the next locale change; option 1 is a two-line edit that will drift again. Worth a maintainer's call rather than a reviewer discovering the choice inside a docs PR.

Reachability

Documentation only — nothing at runtime reads these two lines. The cost is a reader who counts on the number: builtInLocales has ten keys, so an app that sizes a language switcher or a translation matrix from the README's 11 is off by one before it starts.

Generated by Claude Code, session https://claude.ai/code/session_01MM7kaS4dPpYHV5BsMyu4tQ, dispatched by the domain:devx @ objectui PM seat for objectui#5174 batch 16.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions