Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
Resolve 10 packages/tui conflicts by keeping upstream's refactors and re-applying the branch's i18n wiring (t() calls, dictionary keys, imports). Add new en/zh/zht catalog entries and backfill all locales; drop unused upstream imports and normalize formatting.
# Conflicts: # packages/tui/src/app.tsx
# Conflicts: # packages/tui/src/routes/session/message-parts.tsx
Mergeability note — local verification shows no conflictThis branch was synced with the latest Local merge-tree preview (non-destructive): What the 4 new v2 commits touch:
None of these touch Verification on the current HEAD (
The PR is ready to merge from a content perspective. If there's a specific merge requirement or if GitHub's mergeability check needs a nudge, please let me know. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #37216
Tracking notes: #53857 (opened for this PR's issue-first link) was triaged by the repo bot as a duplicate of #37216 and is being closed as such; #51998 was auto-closed by the issue-compliance workflow before its body could be converted to the template structure. Both preserved for history.
Type of change
What does this PR do?
Adapts the TUI i18n groundwork from #48731 (by @neriousy, original commits preserved via merge) onto the current
v2branch, where it had fallen ~550 commits behind.packages/tui: lazy per-locale dictionaries for 62 locales,language.t()/plural()/number()/duration()/date()helpers,useLanguagecontext, a language picker, andconfig.languagesupport. No behavior change when no locale is configured (English default).language.t(...)instead of hardcoded English.surface(), dialog patterns,props.sourcesdiff sources,fail/attempthelpers) and re-applied the PR'slanguage.t(...)wiring on top; dropped PR-side features whose APIs v2 has since removed.216c311744): upstream meanwhile moved GUI features into built-in extensions; 10 tsx files conflicted (dialogs, session tabs, sidebar, subagents tab, …) and were resolved by keeping upstream's structural changes (newStringChoiceField, external connection flow, recently-closed-tabs menu,filter.activerename, removedserver?/overlay?props and the unshare command) and re-wrapping their new user-facing strings: ~25language.t(...)call sites re-applied, +6 keys (tui.details.submitAnswer/backToAnswers/editAnswerHint/selectAnswerHint,tui.dialogs.recentlyClosedTabs/noRecentlyClosedTabs— zh/zht translated, other locales English placeholder), −1 orphan key (tui.session.unshareSession, UI removed upstream).tui.diff.turn*,tui.verbosity,tui.tabs.mode,tui.dialogs.pairHint,tui.dialogs.updating) added toen.tsand all 62 locale files; zh/zht carry real translations, other locales carry the English source string as placeholder — same convention as the rest of the PR.How did you verify your code works?
oxlint packages/tui/src packages/tui/test→ 0 warnings, 0 errors (523 files)tsgo -binpackages/tui→ exit 0bun testinpackages/tui→ 1504 pass / 12 skip / 11 fail; the failure set is baseline Windows-environment failures (symlinkEPERM, atomic-rename file locks, footer rendering) including two new test files upstream added that hit the same symlink/rename limits — no logic regressions; tests touched by the conflict resolution pass in isolationtsgo -binpackages/tui→ exit 0;prettier --checkon all changed files → clean;test/i18n.test.ts→ 64 pass (all locales cover the en key set with matching placeholders)bun run test:unitinpackages/app→ 930 pass / 0 fail (i18n parity tests included)verifykeys.js) → ok: 63, bad: noneScreenshots / recordings
Terminal UI change: default English output is visually unchanged; the one new visual element is the language picker dialog (unchanged from #48731). Can record a short demo on request.
Checklist