Repository navigation
fix(i18n): code Source Control AI settings and generation plan failures - #35697
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[Medium impact] The changes affect failure messages across bounded text-generation workflows. The PR appears safe to merge, with a non-blocking gap in tests for the new coded failures. Findings
SummaryAdds translated settings and planner errors for Source Control AI.
Reviews (1) · Last reviewed commit: "Merge origin/main into OrcaWin/i18n-main..." · Reviewed by Greptile |
| ).toMatchObject({ | ||
| ok: false, | ||
| error: 'Command template is empty for commit messages.' |
There was a problem hiding this comment.
The updated assertions check only English text, so they pass even if errorCode or errorParams is missing or wrong. Those fields are what lets the renderer translate these failures. Assert the expected code and values here and in the other changed failure tests. Also add a non-English case with values to substitute in text-generation-error-copy.test.ts. This would catch a return to English-only errors.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Follow-up to #35669. The Source Control AI settings-resolution and generation-plan failures were authored in English in shared code and shown as-is, both from main results and from the renderer's own resolution. They now use the same coded text-generation failure table and render in the UI language.
What Changed
src/shared/text-generation-failure-copy.tsgains 18 codes:OPERATION_LABELfragment){{agents}}resolveSourceControlAiForOperationandplanCommitMessageGenerationreturn{ ok: false, error, errorCode, errorParams }. The English is byte-identical to before.runGenerationRequest. The renderer client localizer from fix(i18n): code AI text-generation failures for commit, PR, and Jira title generation #35669 then renders them.translatekeys. The renderer-detected "Custom command is empty…" reuses the shared code throughtextGenerationCopyText.Why
Part of the main → renderer coded-copy work for #32207.
Linked Issue
Refs #32207
Visual Proof
N/A — copy/i18n only.
Testing
pnpm tc— passpnpm test src/shared/source-control-ai src/shared/commit-message-plan src/main/text-generation src/main/ipc/filesystem src/main/ipc/jira src/renderer/src/lib src/renderer/src/components/right-sidebar src/renderer/src/runtime: 1423 files and 12706 tests pass. Three existingtoEqual({ ok/success: false, error })assertions moved totoMatchObject; their English is unchanged.verify:localization-catalogs/-extraction/-coverage/-runtime-catalog— passpnpm check:changeddid not run to completion on the loaded host; CI is the gate.