Repository navigation
Fix App Router locale path matching with Pages i18n - #98095
Merged
Merged
Conversation
Contributor
Tests PassedCommit: 3f46982 |
timneutkens
force-pushed
the
codex/fix-app-i18n-runtime-routing
branch
from
August 31, 2026 09:38
592f990 to
3f46982
Compare
timneutkens
marked this pull request as ready for review
August 31, 2026 10:30
gnoff
approved these changes
Sep 1, 2026
timneutkens
added a commit
that referenced
this pull request
Sep 16, 2026
Reverts #98095 A stale merge of #98095 caused failures on canary: https://github.com/vercel/next.js/actions/runs/35075051322 Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Fix hybrid App Router and Pages Router projects using Pages i18n so explicit or rewritten locale segments remain available to App Router route matching, while Pages routes continue using locale-normalized paths.
The built-in filesystem matcher now carries each route owner through
RouteKind, avoids duplicate App routes being treated as Pages routes in production, and preserves literal App path parameters through the router server, direct route-module invocation, and static export paths. The same ownership information is maintained by the development bundler.Adds regression coverage for domain locales, proxy rewrites, exact and dynamic App pages, catch-all parameters, route handlers, inferred default locales, and Pages routes. Adapter-generated routing metadata is intentionally handled in the follow-up layers #97366 and #97500.
Closes #86048
Verification
pnpm build-allNEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-webpack test/e2e/app-dir/i18n-app-pages-domain-routing/i18n-app-pages-domain-routing.test.ts(9 passed)