Skip to content

i18n: register 10 new locales + check-script portability fixes - #76

Closed
neoOpus wants to merge 4 commits into
scriptscat:mainfrom
neoOpus:upstream-i18n-infra
Closed

i18n: register 10 new locales + check-script portability fixes#76
neoOpus wants to merge 4 commits into
scriptscat:mainfrom
neoOpus:upstream-i18n-infra

Conversation

@neoOpus

@neoOpus neoOpus commented Aug 20, 2026

Copy link
Copy Markdown

i18n: register 10 new locales + check-script portability fixes

Enables the 10 new locale PRs (upstream-i18n-fr, -ar, -id, -tr,
-ko, -uk, -nl, -fa, -bn, -hy). Merge this first — the locale
directories are ignored by Docusaurus until the locale is registered here.
Merging it alone is safe.

Changes

  • docusaurus.config.js — register fr, ar, id, tr, ko, uk,
    nl, fa, bn, hy in i18n.locales with native labels, text
    direction (rtl for ar/fa) and htmlLang. No other config changes.
  • scripts/url-inventory.txt — baseline regenerated (150 → 650
    routes) to cover the new locales; pnpm run check stays green.
  • src/components/landing/sections.tsx + home.hero.en in
    i18n/{zh-Hans,en,ru}/code.json — the homepage hero tagline
    ("Superpowers for your browser.") was hardcoded English on every locale;
    it is now a translatable string (the 10 new locales carry their own
    translations in their PRs).
  • Windows portability fixes (no behavior change on Linux CI):
    • scripts/fetch-landing-stats.mjsfileURLToPath instead of
      URL.pathname so pnpm run build's prebuild works on Windows.
    • scripts/check-{frontmatter,i18n-parity,i18n-fallbacks,url-inventory}.mjs
      — same fileURLToPath fix, plus CRLF-tolerant frontmatter parsing and
      baseline comparison (git checks files out with CRLF on Windows).

Verified

  • pnpm run build — passes with all 13 locales.
  • pnpm run check — URL inventory (650 routes), fallbacks, strict i18n
    parity (10 new locales: 44 docs each, 0 fallback) and strict
    frontmatter (no violations) all pass on the merged tree.
  • Browser-verified: French and Arabic homepages (translated hero tagline,
    RTL for ar) and a French Agent API page.

Deliberately not included

  • SVG flag picker, webfonts, footer/nginx/redirect work — fork-side polish
    that would alter upstream's look or reintroduce assets upstream dropped.
    Available as a separate follow-up if desired.
  • The 7 legacy locales (de, es, it, ja, pt, vi, zh-Hant) —
    incomplete on the fork; not ready for upstream yet.

Register fr, ar, id, tr, ko, uk, nl, fa, bn, hy in the site config (ar/fa
RTL), regenerate the url-inventory baseline (650 routes), and fix the check
scripts for Windows contributors (fileURLToPath instead of URL.pathname,
CRLF-tolerant frontmatter parsing, prebuild path fix). The 10 locale PRs in
this set depend on this branch; merge it first.
@neoOpus

neoOpus commented Aug 21, 2026

Copy link
Copy Markdown
Author

Superseded by PR #87. Infrastructure changes now included there.

@neoOpus neoOpus closed this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant