Repository navigation
Conversation
Language switcher only exposes en/zh; adding ja and es following the existing zh implementation pattern.
Extend the site to en/zh/ja/es. Adds ja.json/es.json translations following the existing zh pattern, new /ja and /es routes, and generalizes locale-aware logic (routing, hreflang alternates, sitemap, language switcher, key-parity check) that was previously hardcoded to two locales. Also updates ARCHITECTURE.md with UML diagrams documenting the site's route, component, and class structure.
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.
Summary
project.inlang/messages/ja.jsonandes.jsonwith full translations of all 80 message keys./jaand/esroutes (src/routes/ja.tsx,es.tsx), mirroringzh.tsx.src/lib/locale.ts:AppLocaletype,localeMeta, andlocalizedPathnow cover all four locales.src/routes/__root.tsx: locale detection and the 404 "back home" link are locale-generic.src/lib/seo.ts:hreflangalternate links are generated for all locales instead of being hardcoded.src/routes/sitemap[.]xml.ts: sitemap now emits a<url>entry with alternates for every locale.src/components/layout/language-switcher.tsx: switcher now lists all four languages.scripts/check-locale-keys.ts: key-parity check now validates all locale files against the base locale.ARCHITECTURE.mdwith Mermaid UML diagrams (component, class, sequence) documenting the site's route and component structure.docs/superpowers/specs/2026-08-23-add-ja-es-locales-design.md.Test plan
pnpm exec tsc --noEmit— passespnpm exec vitest run— 5 tests passpnpm exec tsx scripts/check-locale-keys.ts— 80 keys parity across en/zh/ja/espnpm build— client and server bundles build successfully,ja/eschunks generated/jaand/esrender fully translated pages, language switcher exposes all four languages with correct hrefs,/sitemap.xmlemits correct per-locale alternate linksNote:
pnpm check's Biome formatting step fails repo-wide in this environment due tocore.autocrlf=trueconverting LF to CRLF on checkout (reproducible on files untouched by this PR, e.g.src/lib/utils.ts). This is a pre-existing environment issue unrelated to this change.