Skip to content

Docs chrome still speaks English inside localized pages: fumadocs' hard-coded aria-labels, English page-tree names without lang="en", no zh-Hant 404 copy #305

Description

@objectstack-fleet

Found while #298 was staged on 2026-10-06 (build cd2af9f), so this is the same defect family as #298. #298 localizes the visible chrome strings and marks fallback page content lang="en". Four gaps remain, and they need different mechanisms. Priority: P2. It is an accessibility (WCAG 3.1.2) and localization defect.

  1. Hard-coded English accessible names. Every locale page serves fumadocs-ui's built-in names in English inside <html lang="xx">, for example /de/docs/build/agents:

    • "Open Search" ×2, "Collapse Sidebar" ×2, "Open Sidebar", "Toggle Theme";
    • "Copy Anchor Link" ×9, "Copy Text" ×4.

    fumadocs-ui 16.8.12 hard-codes them (e.g. dist/layouts/shared/slots/search-trigger.js:19), outside its Translations API.

    Fix: slot overrides, or a pinned patch, that take the names from lib/ui-text.

  2. English page-tree names with no language marked. On a fallback page the sidebar, breadcrumb and prev/next footer render English page names with no lang="en". Examples are "Backup and Disaster Recovery" on /zh-Hans/docs/operate/backup, plus 28 more in zh-Hans and 53 per locale in ja, de, es, fr and ko. axe has no language-of-parts rule, so it stays green.

    Fix: a page-tree transform in docs/layout.tsx that marks untranslated entries.

  3. No zh-Hant 404 text. app/not-found.tsx's COPY table has no zh-Hant entry, so zh-Hant shows English 404 text.

    Fix: derive it the way ui-text/zh-Hant.json is (gen-zh-hant).

  4. "Open in ChatGPT / Claude" on translated pages points at the English .mdx.

    Fix: decide this with 290 English-fallback locale URLs render English under lang="xx" with no notice, and the docs chrome (search, TOC, Copy Markdown, language picker) is English in every locale #298's Copy Markdown choice, which is to inline the locale Markdown. Point at that, or say in the UI that the source is English.

Done looks like

  • An aria-label scan of built pages in 3 locales finds 0 English chrome names, except brand names.
  • A built-HTML scan finds every untranslated page-tree entry carrying lang="en".
  • zh-Hant 404 renders in Traditional Chinese.
  • The repo's gates are green, with screenshots at 1440 and 390.

Order

After #298 lands.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions