Repository navigation
fix(i18n): translate source control remote operation error toasts - #35893
Conversation
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryTranslates classified source-control error toasts while keeping shared English messages and raw git details unchanged.
No actionable issues found. Review was based on source inspection; tests were not run. Reviews (1) · Last reviewed commit: "fix(i18n): translate source control remo..." · Reviewed by Greptile |
|
No actionable comments were generated in the recent review.
|
Summary
Translate the git push/pull/sync/rebase/fetch failure toasts built in
source-control-remote-error.ts. Classification of git output and Orca's shared English stays as-is; each resulting sentence is now a whole translated sentence.What Changed
src/renderer/src/lib/source-control-remote-error.ts: every Orca sentence goes throughtranslate(literalKey, englishFallback, params). The operation word is part of each key (one key per operation × case, e.g.failedWithDetail.push,hookBlocked.lint.forcePush,remoteAccessWithDetail.sync); no operation labels are inserted into templates.source-control-remote-error-copy.tsholds the per-operation sentence builders (split to stay withinmax-lines).{{detail}}when they were prefixed by Orca copy). Unclassified errors still pass through unchanged.src/shared/git-remote-error.ts:classifySubmodulePushFailureexposes the submodule classification (name + remote-changed vs push-failed) so the renderer can render a translated sentence;formatSubmodulePushFailureDetailkeeps its English output for main/CLI callers. The normalized-text pattern now captures the reason separately from the submodule name.src/shared/source-control-push-failure.ts: export the lint / pre-push summary constants so the renderer can pick translated "blocked" sentences.sourceControl.remoteError.*in all 11 catalogs.Why
These toasts were English-only for every UI language. The errors come over IPC/runtime RPC as English text, so the existing renderer classification is reused and its result is translated.
Linked Issue
Refs #32207
Visual Proof
N/A — copy/i18n only.
Testing
origin/mainwith a scratch comparison across 21 error messages × 9 option sets (not checked in).pnpm teston source-control-remote-error, editor-remote-branch-actions and git-remote-error tests: pass.pnpm tc:web, oxlint: pass.pnpm sync:localization-runtime-catalog,verify:localization-catalogs,-catalog,-extraction,-coverage,-runtime-catalog: pass.pnpm check:changed --maxWorkers=2: all steps passed except unit tests, which did not finish within 10 minutes on this loaded machine; CI is the gate.