Skip to content

feat(landing): real i18n /en + /ja static routes for key pages#59

Open
Daisuke134 wants to merge 2 commits into
mainfrom
feature/landing-i18n-lang-routes
Open

feat(landing): real i18n /en + /ja static routes for key pages#59
Daisuke134 wants to merge 2 commits into
mainfrom
feature/landing-i18n-lang-routes

Conversation

@Daisuke134

Copy link
Copy Markdown
Owner

What

Real i18n for aniccaai.com key pages. A user visiting `/en/` or `/ja/` now gets that page in the right language, with a working language toggle and `` (in the emitted static HTML) matching content.

Fixes the audit findings:

  • Root layout hardcoded `` over Japanese copy (even `/ja` home emitted `lang="en"`).
  • `/en/install`, `/ja/install` (+ me/dashboard/life-manager) were 404.
  • `/install` was mixed-language (EN hero + JA body).

Architecture (verified via Next.js docs + empirical build)

Next.js 14 App Router, `output: 'export'`. Multiple root layouts via route groups:

  • `app/[lang]/layout.tsx` renders its own `` with `generateStaticParams → en/ja` + `dynamicParams=false`. Because nothing sits above it, it is a root layout for the localized subtree → exactly one `` with correct lang.
  • All non-localized routes moved into `app/(main)/` with their own root layout (the old `app/layout.tsx`). Route-group parens don't change URLs, so every existing route keeps the same path.
  • Removed top-level `app/layout.tsx` and the literal `app/en` / `app/ja` home dirs (now `app/[lang]`).

Empirically confirmed: a single top-level `app/layout.tsx` causes nested double `` for `[lang]` — the route-group split is what makes `` correct in static HTML.

Files

  • `lib/launch-dict.ts` — real EN/JA copy (install, me, dashboard, life-manager).
  • `components/launch/{InstallContent,MeContent,LifeManagerContent,DashboardClient}.tsx` — locale-parameterized; root pages reduced to thin wrappers (JA default for install/me, EN for life-manager/dashboard) → no duplicate copy, root routes keep working.
  • `components/site/LaunchNav.tsx` — optional `lang` prop, localized labels, `/`-prefixed hrefs, EN⇄JA toggle that swaps locale on the same page.
  • `app/[lang]/...` — home + install/me/dashboard/life-manager.
  • `scripts/gen-dashboard-snapshot.mjs` — output path updated to `app/(main)/dashboard/_snapshot.json`.

Non-regression (preserved)

  • Install Cloud CTA real Stripe link `https://buy.stripe.com/cNi7sL0dEdVI0iI7ki2880U\` on `/install`, `/en/install`, `/ja/install`.
  • Dashboard build-time snapshot real numbers seeded into static HTML (en/ja/root).
  • `/me` GATE-0 integrity badge logic (swap ≠ external revenue) + live `MeClient` unchanged.
  • All ~40 root routes still emit.

Build evidence (`cd apps/landing && npm run build` → exit 0; tsc → 0 errors)

```

+ tag count per page (out/): en/install Stripe link present: install.html, en/install.html, ja/install.html
en/install: "AI agent that earns money" (English), 0 stray JP markers
ja/install: "推奨", "どちらのパスでも" (Japanese)
en/me "Your Anicca instance" / ja/me "あなたの Anicca 個体"
en/life-manager "Life Manager" / ja/life-manager "ライフマネージャー"
dashboard real numbers in static HTML: $5.04 (en/dashboard, ja/dashboard, root /dashboard)
toggle: en/install shows 日本語 → /ja/install ; ja/install shows English → /en/install
/me integrity badge: "No external revenue yet" / "外部収益はまだ" (swap not counted external)
```

Director reviews + merges + deploys + camofox-verifies. Do not merge.

Spec: `docs/superpowers/specs/2026-06-16-landing-i18n-lang-routes-design.md`

…me/dashboard/life-manager/home)

- app/[lang]/ owns its own root <html lang={lang}> via route-group root layout;
  non-localized routes moved under app/(main)/ with their own root layout (Next.js
  multiple-root-layouts). Removed top-level app/layout.tsx + literal app/en|ja home dirs.
- /en/<page> and /ja/<page> now emit single <html> with correct lang (verified in out/).
- lib/launch-dict.ts: real EN/JA copy for install, me, dashboard, life-manager.
- components/launch/{InstallContent,MeContent,LifeManagerContent,DashboardClient}.tsx:
  locale-parameterized; root pages reduced to thin wrappers (JA default for install/me,
  EN for life-manager/dashboard) so no duplicate copy + root routes keep working.
- LaunchNav: optional lang prop, localized labels, /<lang>-prefixed hrefs, EN<->JA toggle.
- Cleaned /install mixed-language mess (now fully-EN and fully-JA).
- Preserved: real Stripe checkout link, dashboard build-time snapshot real numbers,
  /me GATE-0 integrity badge logic + MeClient. Snapshot generator output path updated.
- tsc: 0 errors. npm run build: succeeds.
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Daisuke134, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 minute and 24 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: d9484029-9a6b-49a1-91a7-d78e7211688f

📥 Commits

Reviewing files that changed from the base of the PR and between a740f0d and 1c0fde9.

📒 Files selected for processing (105)
  • apps/landing/app/(main)/account/page.tsx
  • apps/landing/app/(main)/achan/page.tsx
  • apps/landing/app/(main)/affirmation-app/ja/page.tsx
  • apps/landing/app/(main)/affirmation-app/page.tsx
  • apps/landing/app/(main)/alarm/page.tsx
  • apps/landing/app/(main)/alarm/setup/page.tsx
  • apps/landing/app/(main)/anicca-mobile/page.tsx
  • apps/landing/app/(main)/app/page.tsx
  • apps/landing/app/(main)/blog/[slug]/page.tsx
  • apps/landing/app/(main)/blog/page.tsx
  • apps/landing/app/(main)/breath-calm/page.tsx
  • apps/landing/app/(main)/breath-calm/privacy/en/page.tsx
  • apps/landing/app/(main)/breath-calm/privacy/ja/page.tsx
  • apps/landing/app/(main)/breath-calm/terms/page.tsx
  • apps/landing/app/(main)/breath-reset/privacy/en/page.tsx
  • apps/landing/app/(main)/breath-reset/privacy/ja/page.tsx
  • apps/landing/app/(main)/breath-reset/terms/en/page.tsx
  • apps/landing/app/(main)/breath-reset/terms/ja/page.tsx
  • apps/landing/app/(main)/breathstory/privacy/en/page.tsx
  • apps/landing/app/(main)/breathstory/privacy/ja/page.tsx
  • apps/landing/app/(main)/breathstory/privacy/page.tsx
  • apps/landing/app/(main)/cafe/page.tsx
  • apps/landing/app/(main)/calmcortisol/page.tsx
  • apps/landing/app/(main)/calmcortisol/privacy/en/page.tsx
  • apps/landing/app/(main)/calmcortisol/privacy/ja/page.tsx
  • apps/landing/app/(main)/cemetery/ja/page.tsx
  • apps/landing/app/(main)/cemetery/page.tsx
  • apps/landing/app/(main)/cfo/page.tsx
  • apps/landing/app/(main)/comedy/ja/page.tsx
  • apps/landing/app/(main)/comedy/page.tsx
  • apps/landing/app/(main)/dailydharma/privacy/page.tsx
  • apps/landing/app/(main)/dailydharma/support/page.tsx
  • apps/landing/app/(main)/dashboard/_snapshot.json
  • apps/landing/app/(main)/dashboard/layout.tsx
  • apps/landing/app/(main)/dashboard/page.tsx
  • apps/landing/app/(main)/donation/page.tsx
  • apps/landing/app/(main)/factory/page.tsx
  • apps/landing/app/(main)/faq/page.tsx
  • apps/landing/app/(main)/fashion/page.tsx
  • apps/landing/app/(main)/fellows/ja/page.tsx
  • apps/landing/app/(main)/fellows/page.tsx
  • apps/landing/app/(main)/impulse-log/page.tsx
  • apps/landing/app/(main)/impulse-log/privacy/en/page.tsx
  • apps/landing/app/(main)/impulse-log/privacy/ja/page.tsx
  • apps/landing/app/(main)/income/onboarded/page.tsx
  • apps/landing/app/(main)/income/page.tsx
  • apps/landing/app/(main)/install/page.tsx
  • apps/landing/app/(main)/layout.tsx
  • apps/landing/app/(main)/letter/page.tsx
  • apps/landing/app/(main)/life-call/page.tsx
  • apps/landing/app/(main)/life-manager/page.tsx
  • apps/landing/app/(main)/manifesto/ja/page.tsx
  • apps/landing/app/(main)/manifesto/page.tsx
  • apps/landing/app/(main)/me/MeClient.tsx
  • apps/landing/app/(main)/me/page.tsx
  • apps/landing/app/(main)/monk/page.tsx
  • apps/landing/app/(main)/page.tsx
  • apps/landing/app/(main)/playbook/page.tsx
  • apps/landing/app/(main)/politics/page.tsx
  • apps/landing/app/(main)/privacy/en/page.tsx
  • apps/landing/app/(main)/privacy/ja/page.tsx
  • apps/landing/app/(main)/privacy/page.tsx
  • apps/landing/app/(main)/private/AUTH_README.md
  • apps/landing/app/(main)/private/page.tsx
  • apps/landing/app/(main)/research/page.tsx
  • apps/landing/app/(main)/retreat/build/page.tsx
  • apps/landing/app/(main)/retreat/page.tsx
  • apps/landing/app/(main)/seo/best-ai-tools-for-productivity-and-focus/page.tsx
  • apps/landing/app/(main)/seo/best-ai-tools-for-startup-founders/page.tsx
  • apps/landing/app/(main)/seo/buddhist-ai-agent/page.tsx
  • apps/landing/app/(main)/socials/page.tsx
  • apps/landing/app/(main)/support/en/page.tsx
  • apps/landing/app/(main)/support/ja/page.tsx
  • apps/landing/app/(main)/support/page.tsx
  • apps/landing/app/(main)/tegami/page.tsx
  • apps/landing/app/(main)/terms/en/page.tsx
  • apps/landing/app/(main)/terms/ja/page.tsx
  • apps/landing/app/(main)/terms/page.tsx
  • apps/landing/app/(main)/thankful/page.tsx
  • apps/landing/app/(main)/thankful/privacy/en/page.tsx
  • apps/landing/app/(main)/thankful/privacy/ja/page.tsx
  • apps/landing/app/(main)/thankful/terms/page.tsx
  • apps/landing/app/(main)/tokushoho/page.tsx
  • apps/landing/app/[lang]/dashboard/layout.tsx
  • apps/landing/app/[lang]/dashboard/page.tsx
  • apps/landing/app/[lang]/install/page.tsx
  • apps/landing/app/[lang]/layout.tsx
  • apps/landing/app/[lang]/life-manager/page.tsx
  • apps/landing/app/[lang]/me/page.tsx
  • apps/landing/app/[lang]/page.tsx
  • apps/landing/app/dashboard/_snapshot.json
  • apps/landing/app/en/layout.tsx
  • apps/landing/app/en/page.tsx
  • apps/landing/app/ja/layout.tsx
  • apps/landing/app/ja/page.tsx
  • apps/landing/app/life-manager/page.tsx
  • apps/landing/components/launch/DashboardClient.tsx
  • apps/landing/components/launch/InstallContent.tsx
  • apps/landing/components/launch/LifeManagerContent.tsx
  • apps/landing/components/launch/MeContent.tsx
  • apps/landing/components/site/LaunchNav.tsx
  • apps/landing/lib/launch-dict.ts
  • apps/landing/scripts/gen-dashboard-snapshot.mjs
  • apps/landing/tsconfig.tsbuildinfo
  • docs/superpowers/specs/2026-06-16-landing-i18n-lang-routes-design.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/landing-i18n-lang-routes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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