Skip to content

feat(app): sync product translations#35856

Merged
Hona merged 7 commits into
anomalyco:devfrom
Hona:translation-sync
Jul 8, 2026
Merged

feat(app): sync product translations#35856
Hona merged 7 commits into
anomalyco:devfrom
Hona:translation-sync

Conversation

@Hona

@Hona Hona commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • synchronize all 17 non-English product app and shared UI locales with intentional English sources
  • replace the changed-file fragments with one/other full-summary keys while preserving the exact rendered English copy
  • add a programmatic translation runner under script/ with configurable concurrency, model, and variant overrides
  • keep the translation prompt outside .opencode/command so it is not exposed as a slash command
  • enforce key and placeholder parity across app, UI, and desktop dictionaries and fail on out-of-scope edits
  • explicitly treat intentional English keys and copy as read-only translation sources

Testing

  • bun run translate:app -- all --check
  • bun test ../../script/translate-app.test.ts (packages/ui)
  • bun test --only-failures --preload ./happydom.ts ./src/i18n/parity.test.ts (packages/app)
  • bun typecheck in packages/app, packages/ui, packages/session-ui, and packages/desktop

@Hona Hona requested a review from Brendonovich as a code owner July 8, 2026 04:07
Copilot AI review requested due to automatic review settings July 8, 2026 04:07

Copilot AI 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.

Pull request overview

This PR synchronizes product translation dictionaries across the app, shared UI, and desktop surfaces, and introduces tooling/tests to keep locale keys + placeholder tokens aligned with English going forward.

Changes:

  • Adds a locale-scoped translation runner workflow (config + tests) with concurrency/model/variant controls and strict edit scoping.
  • Updates UI and app copy across all supported locales to match English keys/placeholders (including full-phrase “changed files” summaries).
  • Tightens patch-application permission metadata to include move destinations (edit confinement) and expands i18n parity tests across app/ui/desktop.

Reviewed changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated no comments.

Show a summary per file
File Description
script/translate-app.test.ts Adds test coverage for translate-app argument parsing, drift detection, pooling, and config scoping.
.opencode/command/translate-app.md Adds an OpenCode command template describing strict translation/edit constraints.
package.json Adds translate:app script entrypoint.
packages/app/src/i18n/parity.test.ts Expands parity tests to enforce key + placeholder parity across app/ui/desktop locale dictionaries.
packages/app/src/pages/session/timeline/message-timeline.tsx Switches changed-file summary to a localized full phrase with {{count}}.
packages/session-ui/src/components/session-turn.tsx Switches changed-file summary to a localized full phrase with {{count}}.
packages/opencode/src/tool/apply_patch.ts Includes both source + destination paths in permission patterns for move hunks.
packages/opencode/test/tool/apply_patch.test.ts Asserts permission patterns include move destinations for apply_patch moves.
packages/ui/src/i18n/en.ts Updates changed-file summary key to include {{count}} phrase.
packages/ui/src/i18n/ar.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/bs.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/br.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/da.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/de.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/es.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/fr.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/ja.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/ko.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/no.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/pl.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/ru.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/th.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/tr.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/uk.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/zh.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/ui/src/i18n/zht.ts Syncs UI locale keys/phrases with English (session review v2 + diffs + cancel).
packages/app/src/i18n/ar.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/bs.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/br.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/da.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/de.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/es.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/fr.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/ja.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/ko.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/no.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/ru.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/uk.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/zh.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).
packages/app/src/i18n/zht.ts Syncs app locale dictionary with English (new navigation, WSL, settings, errors, etc.).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Hona Hona merged commit 77429f5 into anomalyco:dev Jul 8, 2026
9 checks passed
avion23 pushed a commit to avion23/opencode that referenced this pull request Jul 9, 2026
anduimagui pushed a commit to anduimagui/opencode that referenced this pull request Jul 9, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jul 11, 2026
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.

2 participants