-
Notifications
You must be signed in to change notification settings - Fork 27.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[i18n + redirects] defaultLocale was ignored #19403
Milestone
Comments
deekay44
changed the title
[i18n] defaultLocale was ignored in redirects
[i18n + redirects] defaultLocale was ignored in redirects
Nov 21, 2020
deekay44
changed the title
[i18n + redirects] defaultLocale was ignored in redirects
[i18n + redirects] defaultLocale was ignored
Nov 21, 2020
timneutkens
added
kind: bug
and removed
bug
Issue was opened via the bug report template.
labels
Nov 23, 2020
Any info about this issue, this is very critical for i18+redirects usage? |
kodiakhq bot
pushed a commit
that referenced
this issue
Dec 4, 2020
This ensures i81n custom routes are resolving correctly, it also corrects redirects for default locales when `locale: false` is not used, and this also simplifies the resolving for custom routes with i18n in `next-server` adding types for the i18n config. This also adds additional tests to prevent regression and starts leveraging a shared `NextConfig` type to allow us to share types for config values. Fixes: #19521 Fixes: #19403 Fixes: #19302 Fixes: #19227
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Describe the bug
defaultLocale
was ingored in redirects with i18n.i18n config:
{ locales: ['en', 'fr', 'zh'], defaultLocale: 'en' }
redirects config:
{ source: '/first-page', destination: '/second-page', permanent: true }
We will be redirected from
/first-page
to/en/second-page
, forfr
andzh
locales redirect is correct.To Reproduce
Described in the
Describe the bug
section.Expected behavior
defaultLocale
should be stripped from redirects.System information
The text was updated successfully, but these errors were encountered: