Repository navigation
docs: localize fumadocs' accessible names, mark English page-tree entries, zh-Hant 404, Open-in links follow the page shown - #314
Merged
Conversation
…ds or fewer Adds a `seoTitle:` frontmatter line to every English page whose built `<title>` read as one or two words plus the ` | ObjectOS` suffix, so the tab/result title carries the terms a reader searches for while the H1, sidebar and breadcrumb keep the short noun (#166's mechanism). - 67 pages: each gains exactly one line; no `title`, `description` or body line changes. - Every title leads with the page's own specific term, lifted from its description and headings, and renders at 52–60 characters including the suffix (measured on the built HTML). - The three duplicated titles (Approvals, Dashboards, Notifications — each used by a build/configure page and a use page) are now distinct. - English only. Locale siblings are translation artifacts that a non-translator commit may not modify (AGENTS.md, Translation workflow; check-translation-ownership.mjs); the translation pass carries the new key over, and the output report lists the 163 siblings now missing it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…AQ headings, title-weighted per-locale search, consistency pass - Light-mode muted foreground to hsl(0 0% 40%); code comments recoloured in both shiki themes. - Tables get an always-drawn scrollbar and a scroll-driven trailing fade. - FAQ and License FAQ questions become headings. - /api/search builds one locale's index on that locale's first search and weights title > heading > text; check-search-locales gains own-title-buried; smoke-docs asks /api/search in every locale with a nonce control. - Consistency: one data-residency table, one license-validation sentence, ObjectSchema.create, "license" spelling, Configure title, glossary order plus AI seat and Position, logo to the docs home, a translated llms.txt example, three unsourced configure/ai claims removed (with their locale siblings), release-following lines pointed at a populated feed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…ests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…ix apiMethods primitives
The Views page declared views inside a defineObject call under an
object-level `view` key. ObjectStack provides no defineObject, and
ObjectSchema.create rejects `view` as an unknown key. Its views are a
defineView container ({ list, listViews, form, formViews }, each view
bound through `data`) registered on the stack with `views: [...]`, which
both samples now show; both parse with @objectstack/spec 17.6.0.
The REST API page's allowed apiMethods values drop the eight retired ones
the spec strips at parse.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…ype-check `next typegen` loads next.config.mjs, and fumadocs-mdx 15.0.7's createMDX() starts init() without awaiting it (dist/next/index.js:14-20). init rewrites every .source/*.ts with fs.writeFile (dist/core-DlDe_Eze.js:232-236), which truncates first. typegen ends in process.exit(0), so it can exit inside that window and leave .source/server.ts empty for tsc: TS2306, CI run 37478051451. Running the fumadocs-mdx CLI after typegen makes the CLI, which awaits its writes, the last writer before tsc. typegen does not read .source. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…ries, zh-Hant 404, Open-in links follow the page shown - patches/fumadocs-ui@16.8.12.patch: the nine accessible names fumadocs-ui 16.8.12 hard-codes in English (Open Search, Toggle Theme, Open/Collapse Sidebar, Copy Anchor Link, Copy/Copied Text, Toggle Menu, and Radix's "Main") read from its i18n context with the old literal as default. Eight keys are a backport of upstream 16.9.0's own names; lib/ui-text supplies all nine through RootProvider in every locale. - app/[lang]/docs/layout.tsx: page-tree entries (sidebar, breadcrumb, prev/next footer) for pages a locale has no translation of carry lang="en", using the docs page's own translatedLocales detection. - app/not-found.tsx: the 404 copy moves into lib/ui-text (notFound), so the zh-Hant string is generated from zh-Hans by gen-zh-hant and checked by --check like every other Traditional string. - Open in ChatGPT / Claude on a translated page sends the assistant to the translated page itself; English pages and fallbacks keep the English .mdx. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #305
Locale pages still announced fumadocs' built-in English accessible names, named untranslated pages in English with no language marked, served an English 404 to Traditional Chinese readers, and sent "Open in ChatGPT / Claude" on a translated page to the English Markdown. This PR fixes all four. Same defect family as #298, and built on its
lib/ui-textand its fallback detection.What changed
1. Accessible names come from
lib/ui-textin every locale. fumadocs-ui 16.8.12 hard-codes nine names as English literals, outside its Translations API: Open Search, Toggle Theme, Open Sidebar, Collapse Sidebar, Copy Anchor Link, Copy Text, Copied Text, Toggle Menu, and Radix's default "Main" on the legal pages' header.patches/fumadocs-ui@16.8.12.patch(pnpmpatchedDependencies, next to the existing fumadocs-core pin) makes each component read its name from the i18n context it already reads fortext.search. The default is the old literal, so English is unchanged.searchOpen,themeToggle,sidebarOpen,sidebarCollapse,headingCopyAnchor,codeBlockCopy,codeBlockCopied,menuToggle) with the same defaults. I checked this by unpacking the published tarball.navMainis the one key upstream does not have. It was still unlocalized in 16.16.2.SearchTriggerdirectly, and both "Collapse Sidebar" buttons and the drawer's "Open Sidebar" live inside the Sidebar slot, which is a fork of about 200 lines. The patch header has the analysis name by name, plus when the patch can be deleted (on upgrading to 16.9.0 or later).lib/ui-text.tsadds the nine strings, andfumadocsTranslations()passes them toRootProvider. The six translated tables gain them, andui-text/zh-Hant.jsonis regenerated bygen-zh-hant.2. Untranslated page-tree entries carry
lang="en".app/[lang]/docs/layout.tsxtransforms the locale's page tree before handing it toDocsLayout. That one transform reaches the sidebar, the breadcrumb and the previous/next footer.span lang="en". The footer shows the description, which was English too.translatedLocalesfunction the docs page uses for its body (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), so the chrome and the body cannot disagree.meta.LOCALE.json. No folder is affected today, because every folder has a translated meta title.llmsroutes read the English tree directly and are untouched.3. zh-Hant 404 text. The 404 copy moved from a constant in
app/not-found.tsxintolib/ui-text(notFound). The Traditional string is now generated from the Simplified one bygen-zh-hant, and--checkcovers it like every other zh-Hant string. The exact-key table type makes every locale carry the string.4. "Open in ChatGPT / Claude" follows the page shown. I chose to point the assistant at the shown locale's content, matching #298's Copy Markdown rule:
.mdx, which is the page on screen./ja/docs/...)..mdxsurface stays English-only, as AGENTS.md rule 1 andcheck-locale-surfacerequire.Branch and rebase
41a1994onclaude/pm-dispatch-objectos-ju9td1, a fast-forward with no force. It starts at the remote branch head5e666c3(fix(docs): run the awaited fumadocs-mdx write after next typegen in type-check #313), mergesorigin/main@92a12d2(fix(docs): run the awaited fumadocs-mdx write after next typegen in type-check #313, which is CI type-check can fail with TS2306 ".source/server.ts is not a module": next typegen exits while fumadocs-mdx's un-awaited regeneration is still writing .source #311; after the merge the diff againstmainis empty), and cherry-picks4da46c5.git diff origin/main 41a1994is byte-identical togit diff 5d2f837 4da46c5, so CI type-check can fail with TS2306 ".source/server.ts is not a module": next typegen exits while fumadocs-mdx's un-awaited regeneration is still writing .source #311's one-linetype-checkreorder does not interact with this diff. CI re-runs every gate on the pushed head.staged/issue-305, one commit4da46c5, on top of main at5d2f837(docs: contrast, phone table affordance, FAQ headings, title-weighted per-locale search, consistency pass (#301) #310, which is Docs polish from the 2026-10-06 audit: muted-text contrast, the License table on phones, FAQ formatting, search ranking, glossary order, licence/license spelling #301; docs: SEO titles for the 67 English pages whose title tag was two words or fewer #309, which is Author SEO titles for the 42 English pages whose title tag is a single word #167, sits below it).git rebase origin/mainfrom the first tip1f5ea81(cut fromcec227a). It applied with no conflicts, andgit range-diffreports the commit patch-identical (1f5ea81 = 4da46c5). Nothing needed resolving:global.css,mdx-components.tsx,source.config.ts, the search route,smoke-docs.mjsand the glossary are files this PR does not touch.seoTitlelines are content this PR does not touch./LOCALE/docs. The built-HTML scanner first read that link as a sidebar page entry (79 per locale, text "ObjectOS"). I narrowed it to page-tree items (a[data-active]). The sidebar count then returns to exactly the pre-rebase 1166 per locale, and the narrowed scanner still reproduces the main baseline exactly (1375–1387 names, 687/920 unmarked).flows), so locales now have 30 more untranslated tree entries. All of them are marked..source/server.ts) did not occur locally. Both type-check runs were green on the first try.Measurements (built HTML, JS off)
cec227acec227a(1f5ea81)5d2f837(4da46c5)lang="en", zh-Hans / zh-Hantlang="en"SLUG.LOCALE.mdxfile exists), not from the app's own detection./de/docs/operate/backup, countinglang="en"spans:4da46c5: 117 = 55 names + 55 descriptions + 7 TOC items from 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.1f5ea81: 113 = 53 + 53 + 7.opennextjs-cloudflare preview) at4da46c5, for every locale, on one fallback and one translated page:.../docs/operate/backup.mdxon the fallback and.../LOCALE/docs/build/dataon the translation.langset in all 8 locales./de/privacyannounces Hauptnavigation, Suche öffnen, Menü ein- oder ausblenden, Design wechseln and Sprache wählen.cec227a): the served HTML outside the RSC payload and asset hashes matches main's byte for byte on/docs/build/dataand/privacy. On/docs/operate/backupthe only difference is one shiki token colour inside a code block (see Acceptance notes).Verification at 4da46c5 (rebased tip)
pnpm install --frozen-lockfile: exit 0pnpm turbo run type-check --continue --force: 1 successfulpnpm turbo run build --force(NEXT_PRIVATE_STANDALONE=true): 1 successful, 1038/1038 static pagespnpm turbo run test --force: ✓ 10 self-test(s) passedgen-zh-hant --check: ✓ 60 generated file(s) match the zh-Hans sources byte for bytecheck-locale-surface,check-positioning: ✓check-search-locales: ✓ all 8 locales answer 200, find "permissions", find every own page by its title within the first 3 pages, and find nothing for a noncegit diff --name-status --no-renames origin/main...HEAD, 15 files):--files✓ (256 pre-existing findings reported, from main's corpus; this diff touches no content); Output self-test ✓.check-node-floor(+ self-test) and the half-state sweeper self-test pass.opennextjs-cloudflare build --skipNextBuildpluswrangler deploy --dry-rungives Total Upload 47077.66 KiB, under the 61440 KiB budget.smoke-docs.mjs(Docs polish from the 2026-10-06 audit: muted-text contrast, the License table on phones, FAQ formatting, search ranking, glossary order, licence/license spelling #301's version) against the local preview: ✓ 4 page(s) rendered, negative control demonstrated red, search answered in 8 locale(s) and found nothing for a nonce.1f5ea81(the commit is patch-identical after the rebase):navMainfromfumadocsTranslations()turnstscred with TS2741 "Property 'navMain' is missing … required in type 'FumadocsTranslations'". Only the patched.d.tsrequires that key.git checkout HEAD: blob equals HEAD andgit diff HEADis empty.1f5ea81to 2–11 at4da46c5, from Docs polish from the 2026-10-06 audit: muted-text contrast, the License table on phones, FAQ formatting, search ranking, glossary order, licence/license spelling #301's contrast work.valid-langpasses on the newlangattributes.Screenshots (1440 and 390), re-taken at
4da46c5because #301 changed the header:fumadocs draws no visual tooltip, so the de shots overlay each control's accessible name as a labelled "(aria-label)" annotation.
Acceptance notes
;inoperate/backup's first code block) is coloured#032F62on main's build and#24292Eon this one, from identical content. This change does not touch highlighting. The evidence is two builds only.pageActionsOpenInLLMPrompt). Carrier: none./LOCALE/privacyand/LOCALE/termson de, ja, es, fr, ko and zh-Hant render the English body insidehtml lang="LOCALE"with nolang="en"anywhere (0 on each page). zh-Hant gets English there rather than a generated Traditional version of the zh-Hans text.staged/issue-308("read the built pages for English chrome names and unmarked page-tree entries") is that gate's own card.Generated by Claude Code