Repository navigation
fix(commands): localize diff feedback - #7101
Merged
Merged
Conversation
Route diff messages and pager titles through the presentation facet and provide translations in all 15 complete locale packs. Preserve the English output, action behavior and raw diff payloads. Refs codewhale-hq#7071 (diff portion).
Exercise Simplified Chinese interpolation, stat header, pager title and opaque patch preservation through the real diff handler. This regression check fails against the original English-only handler and passes with the localization fix. The full commands suite remains 28 passed, 0 failed.
Contributor
Author
|
CI triage note for reviewers: The current red checks do not appear to be caused by this PR's
I have left those unrelated protocol, extension-host and release-note areas untouched to keep this PR scoped to Once main's shared failures are repaired, a rerun should provide a cleaner signal for this PR. |
3 tasks done
Maintainer merge so the required checks run against current main (main was red when this branch last ran CI; CW-7525). Signed-off-by: CodeWhale Bot <bot@codewhale.net> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picks up 22e3411, which clears the crates/tui/src/lib.rs rustfmt drift main carried (CW-7525). Signed-off-by: CodeWhale Bot <bot@codewhale.net> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picks up codewhale-hq#7108, which restores main's clippy and rustfmt gate (CW-7525). Signed-off-by: CodeWhale Bot <bot@codewhale.net> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
Hmbown
pushed a commit
that referenced
this pull request
Oct 28, 2026
…redit @laozidabo prepare-release.sh 0.10.3 refuses a release section without a Keep a Changelog subsection (rehearsed on an export of main: "CHANGELOG.md section 0.10.3 must contain at least one Keep a Changelog subsection"). The Unreleased bullets are regrouped, unchanged, into Added, Changed, Fixed, Security and Maintenance as in 0.10.2, with Contributors last; the freeze then only renames the heading. check-contributor-credit.py also failed on main: @laozidabo (#7101, localized /diff feedback, merged) was not credited. Added to the CHANGELOG Contributors block, docs/CONTRIBUTORS.md and UNRELEASED_CONTRIBUTORS; agent docs regenerated. Verified on the edited export of main: the sorted bullet set is unchanged apart from the new credit line; sync-changelog.sh --check, check-feature-release-notes.sh v0.10.2 HEAD, check-contributor-credit.py v0.10.2 (was exit 1), check-bundled-plugin-claims.py and web check:facts pass. 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.
What and why
/diffreturns English feedback and a pager title even when another UI language is selected. Route its nine user-facing messages through the existing presentation facet and typed diagnostics mapping, with translations in all 15 complete locale packs.For example, with Simplified Chinese selected,
No changes since session startbecomes会话开始以来没有变更. English output, error/action behavior, filenames and raw Git payloads stay unchanged.Issue
Refs #7071 (partial)
This PR addresses
/diff./undoand the other remaining surfaces are still tracked in #7071.How I tested it
On Linux, using the installed toolchain and linker:
Formatting, whitespace checks, 28 commands tests, 54 localization tests, and the focused Clippy checks passed. The existing command fixture now supplies English presentation, and its capability expectation includes
PRESENTATION.A committed regression case also runs the actual diff handler against the Simplified Chinese catalog and verifies translated interpolation, the stat header, pager title and unchanged raw patch. It fails against the original English-only handler and passes with this fix. The changed command/localization crates additionally pass Clippy with
--all-targets --all-features --no-deps.A separate local reproduction harness (not included in this commit) invokes the actual registered handlers and real catalog/mapping/interpolation. It reproduces the Chinese failure against the original handler, then checks the updated handler across all complete locale packs. Its output is:
Clippy including dependencies encountered the existing
clippy::large_enum_variantwarning in unchangedcrates/protocol/src/op.rs:209. The focused checks above exclude dependencies and use the project's documented allowances.The full TUI/workspace build, real host Git collection and interactive terminal/pager rendering were not exercised locally. No UI screenshot or recording was captured; the reproduction verifies returned messages and pager metadata, not visual rendering.
Checklist
main(no need to rebase whenmainmoves)cargo fmt --allpasses, and tests cover new or changed behaviordocs/features.toml(cargo test -p codewhale-tui --test feature_registrychecks it)The docs/feature-registry item is not applicable: this fixes translation of the existing
/difffeature.AI disclosure: AI assistance was used for investigation, implementation, translation, testing and review on behalf of @laozidabo. The account owner has not personally written or technically reviewed it.