You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "bytelazy (via GitHub)" <gi...@apache.org> on 2026/09/02 09:19:14 UTC
[PR] fix(i18n): make resume-park toast copy locale-aware [maka]
bytelazy opened a new pull request, #4556:
URL: https://github.com/apache/maka/pull/4556
## Summary
`resumeParkToastCopy()` took no `UiLocale` parameter and returned hardcoded
Chinese, so an English-locale Desktop user who resumed a parked session saw a
Chinese toast title, a Chinese description, and the same Chinese text again in
the inline detail. The locale was already in scope at the call site — the
success and error branches of the same `try` block are localized; only the park
branch skipped it.
This change restructures the copy module into a per-locale `UiLocale` table:
- `zh` keeps the existing strings verbatim.
- `en` adds an English translation of all 29 reason strings, the two
`resume_candidate_missing` strings, and the title/fallback.
- `resumeParkToastCopy(reasons, locale)` now selects the table by locale.
- The `apps/desktop` call site in `use-shell-resume.ts` passes the `uiLocale`
it already holds.
Scope: this addresses the user-visible `resumeParkToastCopy` half of the
issue. The `connection-error-copy.ts` contract cleanup the issue also
describes is a stale-boundary refactor with no current user-visible effect and
is intentionally left for a follow-up, so this PR uses `Refs` rather than
`Fixes`.
Refs #4489
## Verification
- Ran the new unit test with `node --experimental-strip-types` (Node
v24.20.0): all 5 cases pass, including a sweep asserting every one of the 29
documented reason keys resolves to non-fallback copy in both `zh` and `en`
(so the two locale tables cannot drift apart), plus the
`resume_candidate_missing` and unrecognized-reason fallback branches in both
locales.
- Confirmed `zh` output is unchanged (same strings as before) and `en` output
is fully localized.
Not run: the full desktop lint/typecheck/test suites and a live Desktop launch
(a full `npm ci` would not complete from this network). The change is confined
to `packages/ui/src/runtime-resume-copy.ts`, its new test, and the single call
site in `use-shell-resume.ts`, which already has `uiLocale` in scope.
## AI use
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Claude Code — restructured the copy module, wrote the
English translation, added the test, and updated the call site. The commit
carries a `Generated-by: Claude (Claude Code)` trailer.
## Checklist
- [x] Tests cover the change and fail without it
- [ ] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — described under Summary above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(i18n): make resume-park toast copy locale-aware [maka]
Posted by "bytelazy (via GitHub)" <gi...@apache.org>.
bytelazy closed pull request #4556: fix(i18n): make resume-park toast copy locale-aware
URL: https://github.com/apache/maka/pull/4556
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(i18n): make resume-park toast copy locale-aware [maka]
Posted by "bytelazy (via GitHub)" <gi...@apache.org>.
bytelazy commented on PR #4556:
URL: https://github.com/apache/maka/pull/4556#issuecomment-5523514867
Closing — #4489 was already fixed by #4513 (merged 2026-09-02 10:26 UTC, ~1h after this PR opened), using the same UiCatalog approach. This branch also carried two unrelated commits from #4541/#4548, so it was stale on top of being a duplicate. Thanks for the review queue slot; I'll check recent merges before opening future PRs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org