-
-
Notifications
You must be signed in to change notification settings - Fork 533
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 invalid locale issue #2548
Fix invalid locale issue #2548
Conversation
…pages not matching the default locale slug
🦋 Changeset detectedLatest commit: 6c426de The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@delucis Just realized the fix is wrong, please hold on merging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HiDeoo said the fix is wrong!
To explain with a bit more details, I just realized we actually had 2 implementations of I just pushed new changes removing the duplicated code and both code paths now use the same underlying implementation which ends up being tested. I think there could be some potential reorganization of the code needed, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching the duplication!
I guess it will depend what else is using these? But for sure I think we can release this fix and refactor later. |
Description
This PR fixes a build issue visible in withastro/docs#9890
For project without a root locale like the docs, for pages not matching the default locale slug, we were not falling back to the default locale.
I also tested the fix locally on the failing Astro Docs branch and it now builds properly.