nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.76k stars 484 forks source link

Routing breaks for pageMeta paths with nested routes #2989

Open warflash opened 5 months ago

warflash commented 5 months ago

Environment


Reproduction

https://stackblitz.com/edit/github-yf4bvk?file=app.vue,nuxt.config.ts,pages%2Findex.vue,pages%2Fdb%2Fitem%2Flist.vue,pages%2Fdb.vue

Describe the bug

NuxtLinkLocale does not prefix the link URL with the current locale if the pageMeta path is a nested page

Additional context

This worked fine in nuxt 3.11, I assume some of the changes here https://github.com/nuxt/nuxt/pull/27134 cause issues in the i18n module

No response

Logs

No response

warflash commented 4 months ago

To briefly add to this, this is not just related to the routing of NuxtLinkLocale but instead the entire routing process. So direct access to /en/db/items in the example repro leads to a hard 404. Initially I was thinking it was only the link component for some reason