Navigation Menu

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: defineI18nRoute not working outside setup sugar syntax pages #1929

Merged
merged 1 commit into from Mar 14, 2023

Conversation

BobbieGoede
Copy link
Collaborator

πŸ”— Linked issue

#1928

❓ 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 #1928

It looks like defineI18nRoute was only checked in components/pages using the setup sugar syntax, maybe as an optimization? I changed the logic to use work with either approaches.

In case it was an optimization I have added a simple check whether the content of the file includes defineI18nRoute before continuing, it may be too simple so I can remove that if needed.

πŸ“ Checklist

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

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.

Thank you so much always!
LGTM!

@kazupon kazupon merged commit da5534a into nuxt-modules:next Mar 14, 2023
8 checks passed
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.

defineI18nRoute macro does not work for pages without setup syntax
2 participants