-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Language Select incorrectly appends locale when switching index pages #1423
Comments
Thanks for finding this @kevinzunigacuellar! I can confirm I see this in the build output of your reproduction. The language picker produces the following HTML: <select value="/en/en.html">
<option value="/en/en.html" selected="true">English</option>
<option value="/es/en.html">Spanish</option>
</select>
So this would be a bug in the Are you up for Even More Fun With URLs™️? |
Happy to tackle this if we have no other takers. I will leave it open if anyone is interested. |
Thanks @kevinzunigacuellar! I tried writing a few tests on the train earlier and the one thing I realised I'm not sure about with sites using |
I think they would expect |
I think we can definitely take that as our working hypothesis. I'm still feeling like our use of |
What version of
starlight
are you using?0.17
What version of
astro
are you using?4.2.6
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
Using different locales (en,es) and setting my build to format
file
. My index page is located inen.html
andes.html
respectively.When switching from one language to the other using the select element, it incorrectly adds a locale in front of my route instead of replacing the route.
Current behavior ❌
When going from
es
toen
:es.html
->en/es.html
When going from
en
toes
:en.html
->es/en.html
Expected behavior ✅
en.html
->es.html
and viceversaLink to Minimal Reproducible Example
https://github.com/kevinzunigacuellar/bug-language-pick
Participation
The text was updated successfully, but these errors were encountered: