Skip to content

Monorepo SSOT for tooltip definitions — multilingual support

Section titled “Monorepo SSOT for tooltip definitions — multilingual support”

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.tsloadGlossaryTerms() parses Core/Misc/Glossary.md; injectGlossaryTooltips() replaces Glossary(term) tokens
  • sites/sdc/src/utils/load-focus-content.ts — same infrastructure
  • packages/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.).

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.


  • 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

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
  • Add glossary namespace to the existing message catalogue
  • packages/i18n/src/en.ts already has message keys — add glossary.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 → outputs packages/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.db with (term, lang, definition) rows
  • Language-aware queries at build time
  • Overkill until there are >50 terms or actual multilingual content

Evaluate when multilingual focus page work begins. At that point:

  1. Start with Option B (extend i18n) if the term count stays small (<20) and i18n is actively being wired up
  2. Use Option A (standalone JSON) if tooltip definitions need to stay separate from UI strings
  3. Option C (Glossary.md → JSON generator) is attractive if Talbot wants to keep Obsidian as the authoring tool for multilingual definitions too
  4. 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.


  • Decide data format (JSON/i18n/SQLite) based on active multilingual scope at that time
  • Create packages/glossary/ (or extend packages/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 a lang parameter
  • Update README Focus Pages section with new authoring workflow