Skip to content
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

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

Conversation

BobbieGoede
Copy link
Collaborator

@BobbieGoede BobbieGoede commented Apr 18, 2024

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Resolves #2920

This PR changes the route resolution to take into account the change in vuejs/router#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

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

@BobbieGoede BobbieGoede changed the title fix: named locale route resolution should omit fullPath if present [DRAFT] fix: named locale route resolution should omit fullPath if present Apr 18, 2024
@BobbieGoede BobbieGoede changed the title [DRAFT] fix: named locale route resolution should omit fullPath if present [DRAFT] fix: switchLocalePath not working with vue-router@^4.3.1 Apr 18, 2024
@BobbieGoede BobbieGoede changed the title [DRAFT] fix: switchLocalePath not working with vue-router@^4.3.1 fix: switchLocalePath not working with vue-router@^4.3.1 Apr 18, 2024
@BobbieGoede BobbieGoede self-assigned this Apr 18, 2024
@BobbieGoede BobbieGoede marked this pull request as ready for review April 18, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The switchLocalePath method cannot get the incoming language address
1 participant