feat(web): add i18n for all website locales (en, pt, es, ja, zh-CN, fr, de) #2
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
isyuricunha/yuinfra!2
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/i18n-en-pt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds internationalization to the public site covering every locale supported by the website: English, Portuguese, Spanish, Japanese, Simplified Chinese, French, and German.
/pt/,/es/,/ja/,/zh-CN/,/fr/,/de/) — website convention; existing URLs unchanged, no redirectsas-neededstyle (default locale unprefixed) and canonicalzh-CNcasing, matched case-insensitively (/zh-cn/resolves to/zh-CN/)src/i18n/module: typed dictionaries (en source of truth, all locales key-complete),{placeholder}formatting, idempotent locale path builder (/zh-CNnever doubles), client locale detection via<html lang>, and Intl locale tags for date/number formattinghreflangalternates for every locale plusx-default, and correctlangattributeslocaleprop and render every label, state, legend, axis caption, tooltip, host-card link, and timestamp from the dictionary/<locale>/hosts/<id>serves the matching locale host shell, localized soft-404 for prefixed unknown paths (status kept at 200 with localized content), host-id validation unchangedIntlwith per-locale tags (pt-BR,ja-JP,zh-CN,es-ES,fr-FR,de-DE,en-US)Validation
pnpm lint && pnpm typecheck && pnpm test && pnpm buildgreen (25 tests, 21 pages built)zh-CNcasing, worker locale routing and host-page detection/,/pt/,/es/,/ja/,/zh-CN/,/fr/,/de/,/<locale>/hosts/<id>all 200 with correctlang, titles, labels, and links;/<locale>/<unknown>→ localized 404; root/404 behavior unchanged