Skip to content

feat(opencode): add locale-aware cli and tui strings#21085

Open
gqcdm wants to merge 8 commits intoanomalyco:devfrom
gqcdm:feat/opencode-cli-tui-i18n-mvp
Open

feat(opencode): add locale-aware cli and tui strings#21085
gqcdm wants to merge 8 commits intoanomalyco:devfrom
gqcdm:feat/opencode-cli-tui-i18n-mvp

Conversation

@gqcdm
Copy link
Copy Markdown

@gqcdm gqcdm commented Apr 5, 2026

Issue for this PR

Closes #21084

Related: #7170, #15800

Type of change

  • New feature
  • Refactor / code improvement

What does this PR do?

This adds a focused multilingual MVP for packages/opencode.

It introduces a small config.locale setting with env fallback, adds lightweight en / zh dictionaries for built-in OpenCode strings, and wires locale-aware copy into selected CLI/TUI surfaces such as serve, web, export, session, help/status dialogs, select defaults, and home placeholders.

It also regenerates the v2 SDK config type so locale is reflected in the generated client types.

How did you verify your code works?

  • Ran bun typecheck in packages/opencode
  • Ran bun test test/i18n/index.test.ts test/cli/i18n-mvp.test.ts test/config/locale.test.ts
  • Ran focused CLI checks for locale resolution and localized output in isolated temp dirs/env

Screenshots / recordings

Not included. This PR is mainly CLI/TUI copy plumbing and config behavior.

Checklist

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

gqcdm and others added 8 commits April 5, 2026 17:19
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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.

[FEATURE]: add locale-aware CLI and TUI strings to packages/opencode

1 participant