Skip to content

fix(outreach): translate docs sidebar section labels into French - #1814

Open
Shaji-Mohammed wants to merge 2 commits into
DouglasNeuroInformatics:mainfrom
Shaji-Mohammed:fix/french-docs-sidebar-labels
Open

Shaji-Mohammed wants to merge 2 commits into
DouglasNeuroInformatics:mainfrom
Shaji-Mohammed:fix/french-docs-sidebar-labels

Conversation

@Shaji-Mohammed

Copy link
Copy Markdown

Fixes #1793.

What changed

The French docs sidebar showed English group headings. Starlight sidebar entries now carry translations: { fr: … }:

  • Tutorials → Tutoriels, Reference → Référence, Changelog → Journal des modifications (astro.config.ts)
  • Runtime Core API → API de Runtime Core, via a new optional translations field on the typedoc plugin's sidebar options

Introduction, Guides and Concepts are the same words in French. Pages in these sections stay English-only, per docs/AGENTS.md.

Why not the suggested fix

The issue suggests passing translations through getSidebarGroupFromPackageReflections / getSidebarGroupFromReflections. Both functions call themselves recursively with the same options object to build nested groups under their own labels (child.name). Reading options.translations there would give nested groups the top-level French label unless each call site added a condition. Instead, the translations are attached once in getSidebarFromReflections, where the top-level group replaces the sidebar placeholder. That function already applies badge there.

Verification

  • pnpm lint green; outreach astro check 0 errors, build succeeds.
  • Rebuilt outreach and compared all 300 built pages against the previous build. English pages are unchanged. On French pages the only differences are the translated labels and Starlight's sidebar-state hash. Nested typedoc groups keep their own names.
  • pnpm test:coverage green (384/384 files, 100%), run with NODE_OPTIONS=--no-experimental-webstorage because the local machine is on Node 25.

Exceptions:

  • No unit or e2e test: apps/outreach has no test suite, by decision (apps/outreach/AGENTS.md). The build comparison above is the check.
  • pnpm test:e2e not run locally (Playwright browsers not installed). The e2e suite doesn't cover the outreach site, so CI's run covers it.

This branch has not been deployed

No deployments
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.

French docs sidebar shows English section labels

1 participant