Repository navigation
fix(i18n): localize GitHub project view errors and states - #34621
Conversation
Main now tags Orca-authored project-view failures with an optional reason code plus host, rate-limit numbers and diagnostic detail; the English message is unchanged for mobile, older clients and logs. The renderer maps type/reason to translated copy in the error state, picker, item dialog and mutation toasts, falling back to the English message for older hosts and GitHub's own text. Also wraps the layout labels, unsupported-layout, not-found/too-large copy, picker partial-failure summaries and the gh sign-in help. Closes #34589
Walkthrough
Priority: Severity of issue fixed: Low Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Minor · Localize the paste error when the input changes. · ProjectPicker.tsx:290
src/renderer/src/components/github-project/ProjectPicker.tsx:290
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winLocalize the paste error when the input changes.
When a user pastes an oversized reference,
ProjectPickerBrowse.tsxpasses the English size-limit message toonPasteInputChange. It also disables Add. This handler stores that English message directly, so the new localizedhandlePastebranch does not run during the normal paste flow. Format the size-limit error here, or format it beforeProjectPickerBrowse.tsxpasses it to the handler. (raw.githubusercontent.com)

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
cb7fa1af-ca3e-4ff6-b69b-3dfbed903da7
Files selected for processing: 30-
src/main/github/project-view.test.tssrc/main/github/project-view/internals.tssrc/main/github/project-view/issue-comment-mutations.tssrc/main/github/project-view/issue-type-mutation.tssrc/main/github/project-view/mutations.tssrc/main/github/project-view/project-error-classification.tssrc/main/github/project-view/project-field-mutations.tssrc/main/github/project-view/project-view-config.tssrc/main/github/project-view/project-view-item-page.tssrc/main/github/project-view/project-view-listing.tssrc/main/github/project-view/project-view-reference.tssrc/main/github/project-view/project-view-table.tssrc/main/github/project-view/pull-request-mutation.tssrc/main/github/project-view/work-item-details.tssrc/renderer/src/components/github-project/GhAuthErrorHelp.tsxsrc/renderer/src/components/github-project/ProjectPicker.tsxsrc/renderer/src/components/github-project/ProjectPickerPanels.tsxsrc/renderer/src/components/github-project/ProjectViewStates.tsxsrc/renderer/src/components/github-project/project-view-error-copy.tssrc/renderer/src/components/github-project/slug-dialog/Comments.tsxsrc/renderer/src/components/github-project/slug-dialog/SlugDialogBody.tsxsrc/renderer/src/components/github-project/useProjectRowMutations.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/github/project-result-types.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
| : await window.api.gh.deleteIssueCommentBySlug(args) | ||
| if (!res.ok) { | ||
| toast.error(res.error.message) | ||
| toast.error(projectViewErrorMessage(res.error)) |
There was a problem hiding this comment.
Pass the project host to dialog error formatting.
If an older host returns auth_required or scope_missing without error.host, these calls omit the available host. projectViewErrorMessage then returns the English message instead of localized guidance. Pass { host } in all three calls. Apply the same correction to the formatter calls in SlugDialogBody.tsx, which also has the project host. (raw.githubusercontent.com)
Also applies to: 95-95, 239-239
What was wrong
The GitHub project view (Tasks page with a GitHub project source) showed its errors and several states in English in every UI language. Main returned English
messages that the renderer displayed as-is, and some renderer copy (layout names, unsupported/not-found/too-large states, picker summaries,ghsign-in help) never went throughtranslate.What changed
Same pattern as #33368:
GitHubProjectViewErrorgains optionalreason,host,rateLimit,detailandvalue. Main sets them on Orca-authored failures.messageis unchanged for mobile, older clients and logs.project-view-error-copy.tsmapsreason, thentype, to translated copy, withmessageas the last fallback. Hosts that send noreasonstill get the type-identified sentences (auth/scope with the surface host, rate limit, network, too large, unsupported layout, schema drift) translated. GitHub's own error text stays untranslated.ghauth help (whose summary/detail sentences are now all wrapped).projectViews.*keys.Closes #34589