mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
The cosmetic DocsI18n.tsx shim duplicated the locale catalog that already lives in config/i18n.json and consumed it through a separate client hook (useDocsLocale + a 10-entry hard-coded SECTION_LABELS map). It only ever translated sidebar section titles — the docs content itself was always English. Now the /docs page uses the same `LanguageSelector` component as the rest of the dashboard, backed by next-intl + config/i18n.json. The locale cookie set there is consumed by the [slug] page server component (next commit) to actually serve translated markdown. Removed: - src/app/docs/components/DocsI18n.tsx (203 lines) Updated: - src/app/docs/layout.tsx — swaps DocsLocaleSwitcher for the shared LanguageSelector - tests/unit/docs-site-overhaul.test.ts — replaces the DocsI18n importability assertions with checks that (a) the shared next-intl config covers the same locales, (b) the global LanguageSelector is the new docs switcher, and (c) the DocsI18n module is gone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>