fix(stats): show the current language in the footer select (#59772)

Co-authored-by: neriousy <34747899+neriousy@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2026-10-28 04:36:13 -05:00
committed by GitHub
Unverified
parent fa1260d6ca
commit 587f2cbb82
@@ -309,7 +309,6 @@ function FooterLanguageSwitcher() {
<label data-slot="footer-language">
<span>{i18n.t("footer.language")}</span>
<select
value={language.locale()}
aria-label={i18n.t("footer.language")}
onChange={(event) => {
const locale = event.currentTarget.value as Locale
@@ -320,7 +319,14 @@ function FooterLanguageSwitcher() {
if (href !== current) window.location.assign(href)
}}
>
<For each={language.locales}>{(locale) => <option value={locale}>{language.label(locale)}</option>}</For>
{/* Mark the option, not the select: SSR ignores a select value and hydration does not apply it. */}
<For each={language.locales}>
{(locale) => (
<option value={locale} selected={locale === language.locale()}>
{language.label(locale)}
</option>
)}
</For>
</select>
</label>
)