feat(registry): add next-intl localized routes#350
Open
bntvllnt wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
next-intlrouting for English and French registry app pages, with localized metadata, hreflang alternates, sitemap entries, and locale-aware navigation/chrome.content/pages/<slug>/<locale>.mdx, add French pages, and add a CI translation check for required default-locale MDX./r/<name>.<locale>.jsondescription overlays./fr/vsand/fr/vs/shadcnnow 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
next-intlto the registry app only. This bringsnext-intl,use-intl, and@formatjs/*runtime packages, but avoids a bespoke i18n router/message loader and matches the issue request.Current head
d66a08c69581cfc3ff69cd0213461890be0c4bc9Validation
Latest remediation validation on
d66a08c69581cfc3ff69cd0213461890be0c4bc9:pnpm -F @vllnt/ui-registry exec tsc --noEmit --project tsconfig.jsonpnpm -F @vllnt/ui-registry exec eslint 'app/[locale]/vs/page.tsx' 'app/[locale]/vs/shadcn/page.tsx'git diff --checkpnpm -F @vllnt/ui-registry lintstill exits 1 with 221 existing errors outside the edited comparison files, includingapp/manifest.ts,app/mcp/route.ts,app/robots.ts,lib/jsonld.ts, registry scripts, andtypes/registry.ts.pnpm buildandpnpm test:onceare being re-run ford66a08c69581cfc3ff69cd0213461890be0c4bc9; this section will be updated if either result differs from the prior local pass.Prior branch validation retained from earlier HEAD:
pnpm install --frozen-lockfilepnpm -F @vllnt/ui lintpnpm -F @vllnt/ui exec tsc --noEmit --project tsconfig.build.jsonpnpm -F @vllnt/ui-registry exec tsc --noEmit --project tsconfig.jsonpnpm buildpnpm test:oncepnpm -F @vllnt/ui-registry check:translationspnpm -F @vllnt/ui check:use-clientpnpm -F @vllnt/ui exec tsx scripts/check-story-coverage.tspnpm -F @vllnt/ui exec tsx scripts/verify-stories.tspnpm -F @vllnt/ui build-storybookgit diff --checkRuntime smoke
After
pnpm build, ranpnpm -F @vllnt/ui-registry exec next start -p 3011and verified:curl -I http://localhost:3011/en/llms.txt->308tohttp://localhost:3011/llms.txtcurl -I http://localhost:3011/en/llms-full.txt->308tohttp://localhost:3011/llms-full.txtcurl -I http://localhost:3011/request-component->200with rewrite to/en/request-componentandNEXT_LOCALE=encurl http://localhost:3011/r/button.fr.json-> localized overlay JSON withlocale: "fr",sourceLocale: "en", and canonical/r/button.jsoncurl http://localhost:3011/fr/llms.txt | head -8-> French llms header/contentCI status
d66a08c69581cfc3ff69cd0213461890be0c4bc9after the comparison-route remediation push.Closes #281