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: custom child route localization #2743

Merged

Conversation

BobbieGoede
Copy link
Collaborator

๐Ÿ”— Linked issue

โ“ Type of change

  • ๐Ÿ“– Documentation (updates to the documentation or readme)
  • ๐Ÿž 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)
  • โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

Resolves #2351

Based on debugging this, I think we may be able to improve this functionality in the future. Currently we expect users to supply a full localized path the a child route using defineI18nRoute or pages in config (e.g. /parent/child), it would be better if users only have to provide localization for the child path segment (e.g. /child or child). This way the parent route could be renamed or the child route could be moved without having to update the custom route localization in multiple files.

๐Ÿ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@BobbieGoede BobbieGoede self-assigned this Jan 30, 2024
Copy link
Collaborator

@kazupon kazupon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR is great improvement!
LGTM!

@kazupon kazupon merged commit 1cb9e70 into nuxt-modules:main Jan 31, 2024
7 checks passed
DarthGigi pushed a commit to DarthGigi/i18n that referenced this pull request Apr 16, 2024
@kazupon kazupon mentioned this pull request Jun 28, 2024
14 tasks
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.

Prerendering fails when defineI18nRoute is set for nested pages
2 participants