Commit acc6a91
committed
Adopt @microbit/ui-patterns' LanguageDialog
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).1 parent 2dbc143 commit acc6a91
35 files changed
Lines changed: 917 additions & 312 deletions
File tree
- bin
- lang
- src
- language-server
- messages
- settings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
| |||
0 commit comments