routes with `redirect` are not localized even if they do have a `children` array
Environment
- Operating System: Windows_NT
- Node Version: v16.20.0
- Nuxt Version: 3.5.2
- Nitro Version: 2.4.1
- Package Manager: [email protected]
- Builder: vite
- User Config: -
- Runtime Modules: -
- Build Modules: -
Reproduction
https://stackblitz.com/edit/nuxt-starter-nj4byf?file=modules%2Frouting%2Findex.ts,modules%2Frouting%2Ftest.vue
you can open the devtools and check the route list
Describe the bug
I18n module is not translating routes that contains the redirect field.
Additional context
No response
Logs
No response
Thank you for your reporting! Lovely your contribution always!
I seem that your issue occurs because the nuxt i18n module extend pages added with extendPages.
Your module is a nuxt module in a project. It is automatically imported by nuxt.
On the other hand, if you specify it in the modules option of nuxt.config.ts, the translation will work if you did that module before the nuxt i18n module. ref: https://github.com/nuxt-modules/i18n/issues/1894#issuecomment-1450281178
Oops my bad, i forgot to add it. I've updated the stackblitz reproduction. and the issue is still here