Skip to content

Translation: one Apple language sheet at a time - #225

Draft
rdrake wants to merge 1 commit into
evilnet:developfrom
rdrake:apple-sheet-once-upstream
Draft

rdrake wants to merge 1 commit into
evilnet:developfrom
rdrake:apple-sheet-once-upstream

Conversation

@rdrake

@rdrake rdrake commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

What

On iOS, opening a channel offered one Apple language download sheet for every language detected in the visible lines, one after another, so the user had to close a stack of system sheets. Turning the Apple engine off did not stop them: the switch was read before the pack's status was awaited, so every offer already in flight still reached the shell.

Now an offer waits for the sheet before it, so at most one sheet is up at a time. The switch is checked again just before a sheet would open and after it closes, so turning the engine off drops the offers still queued. A declined sheet holds every other pair back for the rest of the page load, as "not now" on the model download question does. A pair that is declined or unsupported still falls through to the route table, so a missing pack never blocks a translation.

Testing

  • New mocha tests in test/translate/apple.ts (one sheet at a time, a decline holding the rest back, the switch going off before a queued sheet's turn) and test/translate/service.ts.
  • pnpm lint, pnpm typecheck, pnpm i18n:check and pnpm test:mocha pass.

…witched off

Opening a channel routed every visible line at once, and each detected
source language offered its own download sheet, so the sheets came one
after another. Turning the Apple engine off did not stop them: the switch
was read before the pack's status was awaited, and every offer already
past that point still reached the shell.

Offers now wait for the sheet before them, the switch is asked again just
before a sheet would open and after it closes, and a declined sheet holds
every other pair back for the page load, as the model download question's
"not now" does.

This branch was previously deployed

1 inactive deployment
github-pages — 2e94e24e Deployed Nov 8, 2026 by rdrake via deploy #769
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant