Repository navigation
feat(i18n): add Dutch locale + validation tests + fix existing issues - #5137
Merged
Merged
Conversation
…sting issues - Add complete Dutch translation (desktop nl.json + muya nl.ts) - Register nl in SUPPORTED_LANGUAGES, language map (nl, nl-NL, nl-BE), preferences - Add locale-validation.spec.ts with actionable error messages: - Key parity check (missing/extra keys) - Placeholder variable preservation - Technical terms stay English (Latin-script locales) - No empty values - Update muya localeCompleteness.spec.ts with nl + technical terms check - Fix existing upstream issues: - Front Matter incorrectly translated in es.json and fr.json - 13 missing placeholder variables in fr/ja/ko/pt/zh-CN/zh-TW - Add 'dutch' language entry to all existing locales Canonical product name reference (documented in tests): - PlantUML (not Plantuml), Mermaid, Vega-Lite, Front Matter, KaTeX, MathJax
3 of 6 tasks
Member
|
Thank you very much for such a careful PR. |
Jocs
approved these changes
Sep 2, 2026
This was referenced Sep 5, 2026
This was referenced Sep 21, 2026
Jocs
added a commit
that referenced
this pull request
Sep 22, 2026
`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) <[email protected]>
Jocs
added a commit
that referenced
this pull request
Sep 22, 2026
`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) <[email protected]>
Jocs
added a commit
that referenced
this pull request
Sep 22, 2026
…e 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) <[email protected]> * 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) <[email protected]> * 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) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Jocs
added a commit
to rkristelijn/marktext-fork
that referenced
this pull request
Sep 22, 2026
Resolve three conflicts introduced since the branch point (marktext#4874): - store/editor.ts: keep both new state fields — `activeHeadingSlug` from this branch and `selectionWordCount` from develop (marktext#4457). - editor.vue: keep both `@/util/tocNavigation` imports — develop's `getTocHeadingScrollTop` (marktext#5292 TOC scroll alignment) alongside `TOP_LEVEL_HEADINGS_SELECTOR`, which is still exported from there. The locale additions in this branch (`sideBar.toc.expandAll` / `collapseAll`) already landed on develop via marktext#5137, so all twelve locale files merged to identical content — including the `nl` and `ru` files added after this branch point. Verified on the merge result: `vue-tsc --noEmit` clean, eslint clean (warnings only), 875/875 desktop unit tests pass. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
3 tasks done
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.
Summary
Adds Dutch (nl) locale and strict i18n validation tests. Also fixes existing issues in other locales found during implementation.
New: Dutch locale
nl.json, 748 keys) and muya editor (nl.ts)SUPPORTED_LANGUAGES, language map (nl,nl-NL,nl-BE), and preferences UINew: locale-validation.spec.ts
Strict test suite with actionable error messages — when it fails, it tells you exactly what to fix:
Fixes to existing locales
es.json: Front Matter was incorrectly translated as "Metadatos"fr.json: Front Matter was incorrectly translated as "Métadonnées"dutchlanguage entryfr/ja/ko/pt/zh-CN/zh-TW: fix 13 missing placeholder variables (e.g.{name},{filename})Documentation in tests
Canonical spelling reference for product names:
Testing
pnpm typecheck✅locale-validation.spec.ts: 35 tests pass ✅localeCompleteness.spec.ts: 45 tests pass ✅