Skip to content

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

Description

@objectstack-fleet

Found by the seat's site-wide audit of docs.objectos.ai on 2026-10-06, which built main @ b754364. Priority: P1. This affects accessibility (WCAG 3.1.1 and 3.1.2) and how honest the site is with readers.

What happens today

Pages that show English under another language's URL

  • 290 locale URLs fall back to English: 48 pages in each of de/es/fr/ja/ko, and 25 in each of zh-Hans/zh-Hant. They include index, why, quickstart, architecture, glossary, faq and security, whose siblings docs: one positioning constant, one gate, ObjectOS as Cloud or Enterprise (PR 1 of #171) #293 deleted.
  • They render English inside <html lang="de"> and so on, so screen readers read English in the wrong voice.
  • Cause: apps/docs/app/[lang]/layout.tsx:32 sets lang from the route segment.

What tells the reader

  • The language switcher always lists all 8 languages.
  • No page says "not translated yet".
  • The zh-Hans sidebar mixes English labels ("Runtime Configuration", "Data Sources", "Localization", "Notifications") in with Chinese ones.

Interface text

  • "Search", "On this page", "Copy Markdown" and "Choose a language" are English in every locale. root-provider.tsx passes no translations.
  • Copy Markdown on a translated page copies the English source.

Already correct (keep it): the canonical points to English; fallback URLs stay out of the sitemap; unknown slugs return a localized 404; and pages whose siblings were deleted show the current English, not stale text.

Done looks like

  • A fallback page renders its content with lang="en" on the content element, and shows a short localized callout ("This page is not yet translated; showing English").
  • The interface text is localized for the 8 locales, using fumadocs' i18n translations.
  • Sidebar labels come from the locale's meta where one exists, and the gap is listed where one does not.
  • Copy Markdown copies the page being shown.
  • Measured on the built site:
    • every fallback URL carries lang="en" on its content and the callout;
    • no translated page carries the callout;
    • axe html-lang-valid and valid-lang are clean on one fallback page and one translated page per locale.
  • Screenshots of one fallback page and one translated page in zh-Hans and de, at 1440 and 390.

Surface

Order

After the P0 and P1 instruction-fix cards.


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