nuxt-modules / i18n

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

fix: `switchLocalePath` not working with `vue-router@^4.3.1` #2922

Closed BobbieGoede closed 7 months ago

BobbieGoede commented 7 months ago

๐Ÿ”— Linked issue

โ“ Type of change

๐Ÿ“š Description

Resolves #2920

This PR changes the route resolution to take into account the change in https://github.com/vuejs/router/pull/2189, this broke switchLocalePath as Vue Router now prioritizes fullPath during resolution if present to prevent unnecessarily encoding/decoding.

Small changes to the routing tests had to be made but these actually show that the route is resolved more accurately as query parameter order is preserved.

๐Ÿ“ Checklist