{{ message }}
Repository navigation
Commit 2b4db47
fix(i18n): give Dutch users the Dutch editor UI, and hold the language registries together (#5502)
* refactor(desktop): move the muya locale map out of editor.vue
The map from the desktop language preference to the engine's locale objects
lived inside a 2000-line SFC, where no unit test can reach it. Lift it to
`util/muyaLocale.ts` unchanged so the next commits can fix and then guard it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(i18n): give Dutch users the Dutch editor UI (#5499)
`nl.ts` has been complete since #5137 and `locales/index.ts` exports it, but
`nl` never reached the three lists the desktop reads: the `@muyajs/core`
export hub, the desktop's type surface for it, and MUYA_LOCALES. Picking
Nederlands therefore hit the `?? en` fallback, leaving the inline format
toolbar, quick-insert menu, emoji picker, image selector and preview-block
strings in English while the rest of the app was Dutch.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* test(desktop): hold the language registries to each other (#5500)
Adding a UI language means editing lists in five places that nothing checks
against each other, and they have drifted twice under a green CI run: `nl`
never reached the engine locale map (#5499) and `ru` never reached
`electronLanguages` (#5496).
Assert that SUPPORTED_LANGUAGES, the locale JSON files on disk, the
Preferences dropdown, MUYA_LOCALES and electronLanguages all describe the
same set, and name the file to edit in each failure message. The
electronLanguages arm matches on the primary subtag, since Electron ships
pt-BR/pt-PT rather than a bare `pt`, and spells macOS bundles with an
underscore.
The yml block is hand-parsed: no YAML parser is a declared dependency here,
and reaching for the one electron-builder hoists into node_modules would be
the phantom dependency that broke #5159.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent c754f2c commit 2b4db47
5 files changed
Lines changed: 128 additions & 31 deletions
File tree
- packages
- desktop
- src
- renderer/src
- components/editorWithTabs
- util
- types
- test/unit/specs
- muya/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |

0 commit comments