Skip to content

fix(i18n): remove dead locale keys - #56611

Open
dat-rd wants to merge 1 commit into
anomalyco:devfrom
dat-rd:locale-dead-keys
Open

dat-rd wants to merge 1 commit into
anomalyco:devfrom
dat-rd:locale-dead-keys

Conversation

@dat-rd

@dat-rd dat-rd commented Oct 18, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #56610

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Removes 116 locale entries that no longer correspond to any key in English.

19 dictionaries still carried translations for four key families that en.ts no longer defines: session.question.pending, session.background.runningCount, session.background.shell and session.background.subagent. Every one of the 116 entries is a CLDR plural variant (few, many, zero or two) of those families.

None of them is reachable. A locale lookup only ever asks for a key the English dictionary defines, and the families were removed from en.ts long ago, so nothing ever selects those strings. Nothing outside runtime/i18n references them either. packages/ui had none.

This is what blocks the subset assertion in #50835: "no locale defines a key English does not" cannot pass while the locales define families English does not have.

I kept this separate from #50835 on purpose. It is a mechanical deletion that needs no judgement about what the copy should say, so it can be reviewed and landed without waiting on the test it unblocks.

How did you verify your code works?

  • Every removed entry was confirmed against en.ts before deleting: none of the four families exists there, by plural family as well as by exact key.
  • grep across packages/app/src, packages/core/src and packages/cli/src finds no reference to any of the four names outside runtime/i18n.
  • After the removal, a re-scan of all 62 app locales and 61 ui locales reports zero remaining unknown keys.
  • bun test src/runtime/i18n in packages/app: 18 pass, 1 fail. That failure is pre-existing — language.test.ts cannot resolve jsxDEV from the locally installed solid-js — and reproduces identically with these changes stashed.
  • bun typecheck reports the same 2 errors with and without the change. Note that packages/ai currently has 6 typecheck errors on dev itself, which is why the pre-push bun run check hook fails on a clean tree; I verified this on a stashed checkout rather than assuming.
  • prettier clean on all 19 files.

Screenshots / recordings

None. No user-visible change; these strings were already unreachable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

19 locale dictionaries still translated four key families English had
dropped: session.question.pending, session.background.runningCount,
.background.shell and .background.subagent. All 116 entries are plural
variants of those families, none is reachable because lookup keys come from
the English dictionary, and nothing outside runtime/i18n references them.

The ui dictionaries had none. This is what anomalyco#50835's subset assertion needs
before it can pass.
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. The removed entries can't be reached. The plural lookup in language.tsx only accepts a key whose .one and .other forms exist in en.ts. None of session.question.pending, session.background.runningCount, session.background.shell or session.background.subagent exists there (they were dropped in #52369), and nothing builds these keys at runtime. I checked that every deleted line belongs to one of those four groups, so nearby keys that are still used are untouched. I also checked that latest dev still has the stale entries. A script comparing each locale's keys with en.ts reports exactly 116 fewer keys English lacks with this PR. In packages/app, bun run typecheck passes and bun test src/runtime/i18n passes (20/20).

The public API is unchanged: the change only touches internal app locale dictionaries.

I have no concerns.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: 19 locale dictionaries carry 116 entries for key families English no longer defines

1 participant