Repository navigation
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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) andtest/translate/service.ts.pnpm lint,pnpm typecheck,pnpm i18n:checkandpnpm test:mochapass.