Skip to content

feat(registry): add next-intl localized routes#350

Open
bntvllnt wants to merge 2 commits into
mainfrom
feat/281-i18n
Open

feat(registry): add next-intl localized routes#350
bntvllnt wants to merge 2 commits into
mainfrom
feat/281-i18n

Conversation

@bntvllnt
Copy link
Copy Markdown
Collaborator

@bntvllnt bntvllnt commented May 13, 2026

Summary

  • Add next-intl routing for English and French registry app pages, with localized metadata, hreflang alternates, sitemap entries, and locale-aware navigation/chrome.
  • Move MDX page content to content/pages/<slug>/<locale>.mdx, add French pages, and add a CI translation check for required default-locale MDX.
  • Keep machine endpoints canonical while adding localized llms routes and /r/<name>.<locale>.json description overlays.
  • Remediate the current-head i18n/SEO blocker for comparison routes: /fr/vs and /fr/vs/shadcn now have French metadata and visible French body/table copy, so the advertised French canonical, sitemap, and hreflang alternates no longer point at English-only comparison pages.

Dependency tradeoff

  • Adds next-intl to the registry app only. This brings next-intl, use-intl, and @formatjs/* runtime packages, but avoids a bespoke i18n router/message loader and matches the issue request.

Current head

  • d66a08c69581cfc3ff69cd0213461890be0c4bc9

Validation

Latest remediation validation on d66a08c69581cfc3ff69cd0213461890be0c4bc9:

  • PASS: pnpm -F @vllnt/ui-registry exec tsc --noEmit --project tsconfig.json
  • PASS: targeted ESLint for edited comparison route files: pnpm -F @vllnt/ui-registry exec eslint 'app/[locale]/vs/page.tsx' 'app/[locale]/vs/shadcn/page.tsx'
  • PASS: git diff --check
  • FAIL baseline/unrelated: pnpm -F @vllnt/ui-registry lint still exits 1 with 221 existing errors outside the edited comparison files, including app/manifest.ts, app/mcp/route.ts, app/robots.ts, lib/jsonld.ts, registry scripts, and types/registry.ts.
  • RUNNING after push: pnpm build and pnpm test:once are being re-run for d66a08c69581cfc3ff69cd0213461890be0c4bc9; this section will be updated if either result differs from the prior local pass.

Prior branch validation retained from earlier HEAD:

  • pnpm install --frozen-lockfile
  • pnpm -F @vllnt/ui lint
  • pnpm -F @vllnt/ui exec tsc --noEmit --project tsconfig.build.json
  • pnpm -F @vllnt/ui-registry exec tsc --noEmit --project tsconfig.json
  • pnpm build
  • pnpm test:once
  • pnpm -F @vllnt/ui-registry check:translations
  • pnpm -F @vllnt/ui check:use-client
  • pnpm -F @vllnt/ui exec tsx scripts/check-story-coverage.ts
  • pnpm -F @vllnt/ui exec tsx scripts/verify-stories.ts
  • pnpm -F @vllnt/ui build-storybook
  • git diff --check
  • Targeted registry ESLint over touched runtime route/component/lib files, including localized routes and llms routes.

Runtime smoke

After pnpm build, ran pnpm -F @vllnt/ui-registry exec next start -p 3011 and verified:

  • curl -I http://localhost:3011/en/llms.txt -> 308 to http://localhost:3011/llms.txt
  • curl -I http://localhost:3011/en/llms-full.txt -> 308 to http://localhost:3011/llms-full.txt
  • curl -I http://localhost:3011/request-component -> 200 with rewrite to /en/request-component and NEXT_LOCALE=en
  • curl http://localhost:3011/r/button.fr.json -> localized overlay JSON with locale: "fr", sourceLocale: "en", and canonical /r/button.json
  • curl http://localhost:3011/fr/llms.txt | head -8 -> French llms header/content

CI status

  • Re-running for current head d66a08c69581cfc3ff69cd0213461890be0c4bc9 after the comparison-route remediation push.

Closes #281

@bntvllnt bntvllnt added documentation Improvements or additions to documentation enhancement New feature or request seo Search engine optimization discoverability Site/library discoverability labels May 13, 2026
@bntvllnt bntvllnt self-assigned this May 13, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
storybook Ready Ready Preview, Comment May 14, 2026 2:05pm
ui.vllnt.ai Canceled Canceled May 14, 2026 2:05pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discoverability Site/library discoverability documentation Improvements or additions to documentation enhancement New feature or request seo Search engine optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: i18n with next-intl + per-locale MDX content (content/<slug>/<locale>.mdx)

1 participant