Skip to content

agent: flag stale translations and clean up the catalog - #1489

Merged
AnthonyRonning merged 1 commit into
masterfrom
claude/agent-i18n-catalog-cleanup
Nov 7, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
claude/agent-i18n-catalog-cleanup

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Makes the Agent translation catalog cheap to keep correct before we add more languages. These are the catalog follow-ups left over from #1372. Dispatch consolidation and locale observers stay separate.

What changed

  • Stale translations are now flagged. app/translation-revisions/es.txt records the English each Spanish message was reviewed against. If English is added, removed or reworded, a test fails and names the messages. After updating them, run just translations-reviewed es. Comment edits don't count as changes.
  • 76 unused messages removed, with a test that fails if a message has no production caller. Lookups take &'static str, so every live key has to appear as a literal in the source.
  • Every message variable is documented. The 16 remaining messages using $argN now have real names, and 135 translator comments were added or rewritten. A test requires a comment for each variable and rejects positional names.
  • computadora for computer in Spanish. The glossary already said this, but 63 lines used equipo, which it keeps for team. Three more settings-remote-refused-* lines changed because they relied on the old noun's gender. equipo now only means team.

Testing

  • just ci-lint and just ci-test passed through the pre-commit hook, including 1,311 app tests and 857 core tests.
  • Each new check was shown to fail: reworded English, an unused key, a removed comment and a restored $arg1 were each caught and named. A comment-only edit was correctly not flagged.
  • Live on macOS with a local Pro account, in Spanish: Remote computers, Keyboard Shortcuts, Usage, Billing and API all rendered with the renamed values and without clipping, and the app logged no panics.
  • A one-off script compared argument names at 122 call sites with the catalog, and all of them matched, along with the English and Spanish variable sets. The other 42 sites pick their key or arguments indirectly. None of those use a renamed message, so they weren't checked and didn't change.

Not seen live: settings-pairing-expiry, because this debug build has no remote relay, and the other renamed messages that need a specific state, such as settings-shortcut-collision, settings-credits-cost and settings-api-key-created. The script covers these. This branch hasn't been run on Windows either; ci:windows runs the test suite there, including the CRLF handling in the revision check.

For reviewers

  • es.txt can't prove anyone translated anything. A changed revision line should come with a changed translation.
  • The computadora rewrite wasn't reviewed by a native speaker. The new Computadoras remotas Settings label is shorter than Instrucciones adicionales in the same column.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Before adding languages, make the catalog cheap to keep correct.

- Record the English each translation was reviewed against, and fail a
  catalog test when English is added, removed or reworded. Run
  `just translations-reviewed <locale>` after updating the translation.
- Remove 76 unused messages and fail a test when a message has no
  production caller.
- Rename positional `$argN` variables and give every message variable a
  translator comment, enforced by a test.
- Use computadora for computer in Spanish, as the glossary says. 63 lines
  used equipo, which the glossary keeps for team.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning AnthonyRonning added the ci:windows Run Windows checks on this PR label Nov 7, 2026
@AnthonyRonning
AnthonyRonning merged commit 43dabf8 into master Nov 7, 2026
25 checks passed
@AnthonyRonning
AnthonyRonning deleted the claude/agent-i18n-catalog-cleanup branch November 7, 2026 08:17
AnthonyRonning added a commit that referenced this pull request Nov 7, 2026
#1488 added twelve messages with their Spanish text but no review
record. Its CI ran before #1489 added the stale-translation check, so
master's agent-test and agent-full-macos now fail in
translations_were_reviewed_against_the_current_english.

Generated with `just translations-reviewed es`. The Spanish text is
unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:windows Run Windows checks on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant