Adopt @microbit/ui-patterns' LanguageDialog - #1261
Merged
Merged
Conversation
Upgrade @microbit/ui to 0.1.0-alpha.25 and add @microbit/ui-patterns 0.1.0-alpha.2. The dialog becomes a thin wrapper over the shared pattern (flat grid, preview markers, deployment-sourced help-translate link); its hardcoded English preview footnote is finally a translated message. The ui upgrade also brings <html lang> tracking the language setting, via SharedUIProvider. First-run language now matches browser/OS preferences (after the ?l= hint) via the shared getDefaultLanguageId — previously only ?l= was honoured. Language ids take the registry's canonical BCP 47 casing (zh-CN, zh-TW, es-ES, ga-IE) and the KnownLanguageId union; stored settings and inbound ?l= links with the old lowercase ids keep working via case-insensitive reads, and the lowercase-keyed consumers (catalog imports, typeshed/pyright locale) normalise at their boundaries. Panda includes the package's sources, compile-lang merges its catalogs, and our help-translate string retires in its favour (`language` stays: the menu item).
|
Preview build will be at |
The external-link icon sits centred on the text again, and the language dialog compacts (narrower modal, two columns) when six or fewer languages are offered.
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.
Upgrade @microbit/ui to 0.1.0-alpha.25 and add @microbit/ui-patterns 0.1.0-alpha.2. The dialog becomes a thin wrapper over the shared pattern (flat grid, preview markers, deployment-sourced help-translate link); its hardcoded English preview footnote is finally a translated message. The ui upgrade also brings tracking the language setting, via SharedUIProvider.
First-run language now matches browser/OS preferences (after the ?l= hint) via the shared getDefaultLanguageId — previously only ?l= was honoured. Language ids take the registry's canonical BCP 47 casing (zh-CN, zh-TW, es-ES, ga-IE) and the KnownLanguageId union; stored settings and inbound ?l= links with the old lowercase ids keep working via case-insensitive reads, and the lowercase-keyed consumers (catalog imports, typeshed/pyright locale) normalise at their boundaries.
Panda includes the package's sources, compile-lang merges its catalogs, and our help-translate string retires in its favour (
languagestays: the menu item).To check: