Repository navigation
Conversation
This was referenced Oct 15, 2026
noahbclarkson
added a commit
that referenced
this pull request
Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noahbclarkson
added a commit
that referenced
this pull request
Oct 19, 2026
Ports @VedaChen's translation of the interface from #89 onto rgitui_i18n. Their call-site work is kept file by file; the TrKey table, the settings language enum and the git-layer changes are not. - 469 strings carried over as written, under keys named by the panel that shows them (toolbar.push, confirm.force_push, branch_health.merged). - Every `tr(TrKey::X)` call is now a compile-checked t!("key"); keys held as data (graph menu rows, toolbar tooltips, the settings quick reference) use key!. Positional `{}` templates filled by chained replacen are named placeholders filled in one pass, so user text containing "{}" can no longer swallow the next value. - Sentence fragments joined with format! are whole sentences: "Pending changes on {branch}", "HEAD is detached at {commit}", "Return to {branch}", "Inspecting worktree: {name} ({branch})", "Failed to load comments: {error}". Counts are plurals ("1 file staged", "1 result", "1 commit"), and the four DescCount variants are one message built from two plural pieces. - English words no longer land in Chinese sentences: the PR and issue empty states have a message per filter (which also fixes "No all issues found"), and the AI section translates its credential store names, catalogue ages, "verified" suffix and model-list footer. - Relative dates in the graph, blame, history and detail panels go through shared time.* messages. - Pill groups select by value instead of comparing the clicked label against both languages. The confirm dialog returns its translated label directly. Dropped from #89: - The 27 observe_global::<SettingsState> redraw observers. A language change refreshes every window already, and those observers redrew the main window on every settings write, including each move of the settings window. - The placeholder resets in render. TextInput::set_placeholder_message takes a key and translates it when drawn, so inputs follow the language with no observer and no per-frame work. - The General-page language dropdown, which duplicated the Appearance picker. - The four #[allow(dead_code)] English label functions; the label functions that render are the ones tested now. - description_tr's hard-coded Chinese in the keymap registry; the settings quick reference has message keys instead, with a test that keeps their English equal to each command's doc comment. Terminology, from review of #89: rebase "pick" is 使用 (拣选 is cherry-pick), bisect good/bad is 正常/有问题 everywhere with the menu saying 二分查找, the "Open" filter is 打开, a stash message is 储藏说明, and the interface uses 你. The working-tree row's labels and badges and the diff header were English on the main screen in #89 too and are translated here. The settings window rebuilds the AI model picker when the language changes, since the picker keeps the notes it was handed. Confirmation dialogs, which #89 left in English apart from their buttons, build their title and warning from the action in render, so call sites pass only the action. Aborting names the operation ("Abort Rebase") through `ConfirmAction::AbortOperation(RepoState)`, which replaces `AbortMerge`. Co-authored-by: chenjunjie <zmiss2024@foxmail.com> Co-authored-by: VedaChen <251404213+VedaChen@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Adds a language toggle (English / 简体中文) to Settings → General and translates the full UI into Simplified Chinese.
What changed
Infrastructure
Languageenum (English/ChineseSimplified) +TrKeyenum with 465+ translation keys inrgitui_settings/src/lib.rsLanguage::tr(key) -> &'static strwith English source text locked by unit testsAppSettings.languagefield; settings version migrated3 → 4build_ui_fontso Chinese characters render correctlySettingsState(same pattern asThemeState) for instant refresh on language switchTranslation coverage (4 phases)
Language/TrKeyframework + General settings page + sidebar labelsIntentionally NOT translated (per spec)
command_palettestatic labels andcommands!doc strings (used by keybindings docs generator)Quality gates
cargo fmt --allcleancargo clippy --workspace --all-targets -- -D warnings— zero warningsTrKeycovered by non-empty and English-literal-lock testsdbg!/todo!