Skip to content

test(desktop): repoint the technical-term checks at keys that exist - #5503

Merged
Jocs merged 1 commit into
developfrom
fix/5501-dead-tech-term-paths
Sep 22, 2026
Merged

Jocs merged 1 commit into
developfrom
fix/5501-dead-tech-term-paths

Conversation

@Jocs

@Jocs Jocs commented Sep 21, 2026

Copy link
Copy Markdown
Member

Closes #5501

Summary

locale-validation.spec.ts advertises a "technical terms stay in English" check over five keys. Four of them name a quickInsert.* path, and en.json has no quickInsert section at all — those strings live in the engine's locales, not the desktop's. getByPath returned undefined, the typeof value === 'string' guard skipped them, and the block passed vacuously: only menu.paragraph.frontMatter was 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_TERMS at desktop keys that exist:

Path Must contain Status
menu.paragraph.frontMatter Front Matter kept (the only live one)
commands.paragraph.frontMatter Front Matter added
preferences.markdown.diagrams.plantumlServer.title PlantUML added
quickInsert.{frontMatter,mermaid,plantUMLChart,vegaChart}.title — removed (no such keys)

Both added paths already comply in every locale, so this locks in current behaviour rather than demanding new translation work — commands.paragraph.frontMatter is "Front Matter" in de/es/fr/nl/pt (and translated in ja/ko/tr/zh, which the locale gate already exempts), and plantumlServer.title contains PlantUML in all eleven.

The quick-insert terms are not lost: muya's localeCompleteness.spec.ts checks Front Matter, Mermaid and Plantuml against 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:

  • re-adding quickInsert.mermaid.title → every technical term path exists in en.json fails and names it
  • setting commands.paragraph.frontMatter to "Métadonnées" in fr.json → fr.json keeps product names untranslated fails, proving the newly added path enforces

Local: desktop unit 864 passed (65 files), ESLint clean.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Build artifacts for PR #5503:

Run: https://github.com/marktext/marktext/actions/runs/35681189175

Artifact Size Link
marktext-linux 640.4 MB Download
marktext-macos-arm64 288.1 MB Download
marktext-macos-x64 298.4 MB Download
marktext-windows-x64 288.2 MB Download
marktext-windows-arm64 280.0 MB Download

@Jocs
Jocs force-pushed the fix/5501-dead-tech-term-paths branch 2 times, most recently from cedc588 to 6b62dd3 Compare September 22, 2026 02:42
…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
Jocs force-pushed the fix/5501-dead-tech-term-paths branch from 6b62dd3 to f79d986 Compare September 22, 2026 02:54
@Jocs
Jocs merged commit 70372d6 into develop Sep 22, 2026
11 checks passed
@Jocs
Jocs deleted the fix/5501-dead-tech-term-paths branch October 23, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop locale technical-term validation is a no-op (4 of 5 paths do not exist)

1 participant