mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 03:38:32 +02:00
Markdown links like `[xx](/workspaces)` written in `*.zh.mdx` rendered as bare `<a href="/workspaces">`, which Next's basePath rewrote to `/docs/workspaces` and the docs middleware then routed to English — silently kicking Chinese readers out of their locale on every internal click. Add a `LocaleLink` MDX `a` override that runs every internal href through `prefixLocale(href, lang)` before passing it to `next/link`, and wire a `DocsLocaleProvider` around the MDX body in both page entry points so the override and `NumberedCard` know the active locale. External links, in-page anchors, relative paths, already-prefixed paths, and default-language pages are deliberately left untouched. Closes the bug reported in https://github.com/multica-ai/multica/issues/2173. Co-authored-by: multica-agent <github@multica.ai>
341 B
341 B