Monorepo SSOT for tooltip definitions — multilingual support
Section titled “Monorepo SSOT for tooltip definitions — multilingual support”Background
Section titled “Background”Current state (as of 2026-06-23)
Section titled “Current state (as of 2026-06-23)”Tooltip definitions for the focus pages (sites/mbr, sites/sdc) are loaded at build time from Core/Misc/Glossary.md in the KB vault. Authors write Glossary(TermName) in focus page markdown; the build pipeline resolves it to a .ft tooltip span.
Key files:
sites/mbr/src/utils/load-focus-content.ts—loadGlossaryTerms()parsesCore/Misc/Glossary.md;injectGlossaryTooltips()replacesGlossary(term)tokenssites/sdc/src/utils/load-focus-content.ts— same infrastructurepackages/components/src/ui/Tooltip.astro— shared component for general Astro page use (prop-driven, not Glossary-driven)packages/i18n/— shared message catalogue (en, fr) exists but not yet wired to tooltip definitions
Design decision (2026-06-23): Glossary(term) is opt-in, not auto-magic. The pipeline replaces only explicit Glossary(term) tokens — it does NOT auto-tooltip every substring matching a Glossary key. This prevents unintended tooltips on common terms (AI, HTML, etc.).
Why this task exists
Section titled “Why this task exists”When multilingual support is added to MBR or SDC focus pages (or any other page using Glossary tooltips), the definition must vary by language. Core/Misc/Glossary.md is an English KB file — it has no mechanism for French or other language variants.
Additionally, non-focus-page content (MDX, Astro component slots, etc.) may eventually want Glossary tooltips. A monorepo-level data store would let these pages consume definitions without depending on the KB vault path.
Problem
Section titled “Problem”- Glossary.md is English-only and KB-resident — no language variants possible
- Focus pages currently hardcode
GLOSSARY_PATH = '/mnt/d/FSS/KB/Core/Misc/Glossary.md'— CI-fragile (path only valid on dev machine) - No way for future components or MDX content to reference tooltip definitions without duplicating the Glossary reader logic
Options to evaluate
Section titled “Options to evaluate”Option A: JSON/YAML file in packages/glossary/
Section titled “Option A: JSON/YAML file in packages/glossary/”packages/glossary/src/terms.en.json,terms.fr.json- Imported at build time by
load-focus-content.ts— no filesystem path dependency - CI-safe (lives in the repo)
- Authoring: edit JSON directly, or write a sync script that pulls from Glossary.md
Option B: Extend packages/i18n/
Section titled “Option B: Extend packages/i18n/”- Add
glossarynamespace to the existing message catalogue packages/i18n/src/en.tsalready has message keys — addglossary.Cancer50Pledge,glossary.FAST, etc.- Consistent with existing i18n architecture
- Downside: mixes tooltip copy with UI copy; Glossary terms and UI strings have different lifecycles
Option C: Keep Glossary.md but generate a JSON snapshot
Section titled “Option C: Keep Glossary.md but generate a JSON snapshot”- Add a build script that reads
Glossary.md→ outputspackages/glossary/dist/terms.json - CI runs the generator; focus pages import from
dist/terms.json - Preserves Obsidian as the authoring tool; adds CI-safe artifact
Option D: SQLite (Talbot’s original idea)
Section titled “Option D: SQLite (Talbot’s original idea)”packages/glossary/glossary.dbwith(term, lang, definition)rows- Language-aware queries at build time
- Overkill until there are >50 terms or actual multilingual content
Recommendation (deferred decision)
Section titled “Recommendation (deferred decision)”Evaluate when multilingual focus page work begins. At that point:
- Start with Option B (extend i18n) if the term count stays small (<20) and i18n is actively being wired up
- Use Option A (standalone JSON) if tooltip definitions need to stay separate from UI strings
- Option C (Glossary.md → JSON generator) is attractive if Talbot wants to keep Obsidian as the authoring tool for multilingual definitions too
- Defer Option D (SQLite) unless multilingual content explodes in volume
Do not start this work until: (a) a second language is actively being added to at least one site, OR (b) a non-focus-page component needs Glossary tooltips and the KB path dependency becomes a problem.
Tasks (when activated)
Section titled “Tasks (when activated)”- Decide data format (JSON/i18n/SQLite) based on active multilingual scope at that time
- Create
packages/glossary/(or extendpackages/i18n/) with en definitions from current Glossary.md - Add fr definitions for at least the terms used in Focus pages (F.A.S.T., Cancer50Pledge, $MART DEBT)
- Update
loadGlossaryTerms()in MBR + SDC to read from monorepo package instead of KB path - Update
Glossary(term)resolution to accept alangparameter - Update README Focus Pages section with new authoring workflow