fix: include multilingual designations in index summary#25
Merged
Conversation
ronaldtse
added a commit
that referenced
this pull request
Jun 12, 2026
The HTML stripping regex appeared 3 times inline. Extracted to a single stripHtml() function and applied it to all designation values in the index summary (previously only eng was stripped). This also incorporates the intent of PR #25 (multilingual designations in index) — the designations map in index.json is now fully HTML-stripped.
The fix from cb41d2d (multilingual designations in index summary) had no regression test — every fixture in dataset-adapter.test.ts used English-only designations, so reverting the fix would have passed CI silently. Add a fixture with eng+fra+deu designations and assert: - getIndexEntry() returns the full designations map (not just eng) - lookupByDesignation() resolves non-English terms to the right concept If normalizeIndex() ever falls back to { eng: c.eng } again, the new test fails.
12ab764 to
ac42f50
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.
Problem
The graph panel's "designation" node label mode shows identifiers instead of term names for non-English languages. This is because the index summary (
index.json) only stored the English term (engfield), discarding the fulldesignationsmap.The
DatasetAdapter.normalizeIndex()creates graph nodes from the index data. Without adesignationsmap, it falls back todesignations: { eng: c.eng }— losing all other languages.Fix
Include the full
designationsmap in the index summary, with HTML stripped from each term. The adapter already handles the new format via itsif (c.designations && typeof c.designations === 'object')branch.Testing
Built the VIML glossary (135 concepts, eng+fra) and verified:
index.jsonnow includes{"id":"0.01","designations":{"eng":"metrology","fra":"métrologie"},"eng":"metrology","status":"valid"}