Repository navigation
test(desktop): repoint the technical-term checks at keys that exist - #5503
Merged
Merged
Conversation
Contributor
|
Build artifacts for PR #5503: Run: https://github.com/marktext/marktext/actions/runs/35681189175
|
Jocs
force-pushed
the
fix/5501-dead-tech-term-paths
branch
2 times, most recently
from
September 22, 2026 02:42
cedc588 to
6b62dd3
Compare
…5501) Four of the five TECHNICAL_TERMS paths named a `quickInsert.*` key, and en.json has no `quickInsert` section at all — those strings live in the engine's locales. `getByPath` returned undefined for each, the `typeof value === 'string'` guard skipped it, and the block passed vacuously: only `menu.paragraph.frontMatter` was ever asserted, so a locale rendering "PlantUML" as something else went through. Point the list at desktop keys that exist — `commands.paragraph.frontMatter` and `preferences.markdown.diagrams.plantumlServer.title`, both already compliant in every locale — and drop the dead ones; muya's localeCompleteness.spec.ts covers the quick-insert terms on its own side. Add a check that every listed path resolves in en.json, so the next rename fails loudly instead of quietly disabling the block again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Jocs
force-pushed
the
fix/5501-dead-tech-term-paths
branch
from
September 22, 2026 02:54
6b62dd3 to
f79d986
Compare
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.
Closes #5501
Summary
locale-validation.spec.tsadvertises a "technical terms stay in English" check over five keys. Four of them name aquickInsert.*path, anden.jsonhas noquickInsertsection at all — those strings live in the engine's locales, not the desktop's.getByPathreturnedundefined, thetypeof value === 'string'guard skipped them, and the block passed vacuously: onlymenu.paragraph.frontMatterwas ever asserted.So a locale rendering "PlantUML" or "Mermaid" as something else went through on the desktop side, and PR checklists claiming a passing "tech-term check" overstated what ran.
Changes
Repoint
TECHNICAL_TERMSat desktop keys that exist:menu.paragraph.frontMatterFront Mattercommands.paragraph.frontMatterFront Matterpreferences.markdown.diagrams.plantumlServer.titlePlantUMLquickInsert.{frontMatter,mermaid,plantUMLChart,vegaChart}.titleBoth added paths already comply in every locale, so this locks in current behaviour rather than demanding new translation work —
commands.paragraph.frontMatteris"Front Matter"in de/es/fr/nl/pt (and translated in ja/ko/tr/zh, which the locale gate already exempts), andplantumlServer.titlecontainsPlantUMLin all eleven.The quick-insert terms are not lost: muya's
localeCompleteness.spec.tschecksFront Matter,MermaidandPlantumlagainst the engine locales where those strings actually live.Add
every technical term path exists in en.json, so the next key rename fails loudly instead of silently disabling the block again.Verification
Both failure modes reproduced against the updated spec:
quickInsert.mermaid.title→every technical term path exists in en.jsonfails and names itcommands.paragraph.frontMatterto"Métadonnées"in fr.json →fr.json keeps product names untranslatedfails, proving the newly added path enforcesLocal: desktop unit 864 passed (65 files), ESLint clean.
🤖 Generated with Claude Code