Curated per-file descriptions for the political-intelligence
index page. Replaces the fragile first-paragraph extraction from Markdown
source files (which leaked document-owner metadata and --- separators
into the rendered UI) with hand-written, high-quality descriptions keyed
by the repository-relative file path.
Each entry ships with:
a canonical English description (description) used as the fallback
only when the caller requests English (lang === 'en');
an optional per-language overlay (i18n) mapping a subset of the 14
supported language codes to a localized rendering of the same meaning.
Non-English callers never receive the raw English description as a
fallback — getCuratedDescription synthesizes a localized sentence
from the localized title and the localized "kind" word (methodology,
template, reference, …) so every card on a non-English page reads
naturally in that language.
Unmapped files fall back to a generic localized phrase built from the
file's display title — see buildGenericFallback.
Description
Curated per-file descriptions for the political-intelligence index page. Replaces the fragile first-paragraph extraction from Markdown source files (which leaked document-owner metadata and
---separators into the rendered UI) with hand-written, high-quality descriptions keyed by the repository-relative file path.Each entry ships with:
description) used as the fallback only when the caller requests English (lang === 'en');i18n) mapping a subset of the 14 supported language codes to a localized rendering of the same meaning.Non-English callers never receive the raw English
descriptionas a fallback — getCuratedDescription synthesizes a localized sentence from the localized title and the localized "kind" word (methodology, template, reference, …) so every card on a non-English page reads naturally in that language.Unmapped files fall back to a generic localized phrase built from the file's display title — see buildGenericFallback.