fix(i18n): localize 5 more TUI dialog components#815
Open
MrRealORG wants to merge 1 commit into
Open
Conversation
…orkspace-create, session-rename, startup-loading
- dialog-session-rename.tsx: 'Rename Session' → t()
- startup-loading.tsx: 'Loading plugins...' / 'Finishing startup...' → t()
- dialog-worktree.tsx: 7 strings → t(), silent .catch → log.warn
- dialog-stash.tsx: 5 strings → t() (title, delete, confirm, line count)
- dialog-workspace-create.tsx: 10 strings → t(), silent .catch → log.warn
- openWorkspaceSession/restoreWorkspaceSession accept optional t() param
with passthrough fallback for backward compatibility
- en.ts: +20 i18n keys (tui.startup.*, tui.rename_session.*, tui.worktree.*, tui.stash.*, tui.workspace.*)
- zh.ts: +20 i18n keys (Chinese translations)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Continues systematic i18n coverage for TUI dialog components. Adds
useLanguage()+t()calls to 5 more components that previously had zero or partial i18n coverage.Changes
dialog-session-rename.tsx"Rename Session"→t("tui.rename_session.title")startup-loading.tsx"Loading plugins..."→t("tui.startup.loading_plugins")"Finishing startup..."→t("tui.startup.finishing")dialog-worktree.tsxt()calls (title, loading, create new, switching, switched, creating, failed).catch(() => undefined)→.catch((err) => log.warn(...))for worktree list/createdialog-stash.tsxt()calls (title, delete, confirm delete with keybind, line count)5m,2h) — locale-independentdialog-workspace-create.tsxt()calls (new title, creating title, loading, fetching, creating, creating desc, load failed, create session failed, create failed, create failed with error, restore failed, restored).catch(() => undefined)on adaptor fetch →.catch((err) => log.warn(...))openWorkspaceSession/restoreWorkspaceSessionaccept optionaltparam with passthrough fallback for backward compatibility (no caller changes needed)en.ts+zh.tsFiles Changed
packages/opencode/src/cli/cmd/tui/component/dialog-session-rename.tsxpackages/opencode/src/cli/cmd/tui/component/startup-loading.tsxpackages/opencode/src/cli/cmd/tui/component/dialog-worktree.tsxpackages/opencode/src/cli/cmd/tui/component/dialog-stash.tsxpackages/opencode/src/cli/cmd/tui/component/dialog-workspace-create.tsxpackages/opencode/src/cli/cmd/tui/i18n/en.tspackages/opencode/src/cli/cmd/tui/i18n/zh.ts