-
-
Notifications
You must be signed in to change notification settings - Fork 603
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 an Astro i18n → Starlight i18n config conversion issue #2122
Fix an Astro i18n → Starlight i18n config conversion issue #2122
Conversation
…gual sites with a root locale
🦋 Changeset detectedLatest commit: 7e24532 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Great work figuring that out @HiDeoo! Thank you 💖
* main: [ci] release (withastro#2110) Style `code`, `hr` and `blockquote` within asides (withastro#2119) Fix an Astro i18n → Starlight i18n config conversion issue (withastro#2122) Add Starlight Examples to community content page (withastro#2109) added feedbackspark in showcase. (withastro#2116) i18n(zh-cn): Update `sidebar.mdx` (withastro#2114) i18n(zh-cn): Update `configuration.mdx` (withastro#2113)
Description
This PR fixes the issue identified in this comment.
When using Astro’s
i18n
config for a multilingual site with a root locale (prefixDefaultLocale
set tofalse
), theconfig.defaultLocale.locale
value was not being set correctly toundefined
as expected in this case when converting the config to a Starlight i18n config.This PR fixes the issue by checking for this specific case. No new tests are added as we already have tests covering this scenario but the expected Starlight i18n config output was incorrect so we just needed to update it.
Another potential, but more manual test, is to use the Astro’s
i18n
config from #1923 in the documentation and visiting a non-existent page.