You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 86365a9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(i18n): normalize object-form codes in computePreferredLocaleList
The codes branch compared the configured code against the browser locale
raw, while the sibling string branch and sortAndFilterLocales both compare
normalized values. A code differing only by case or separator passed the
filter and was then dropped by the raw compare, so preferredLocaleList came
back empty while preferredLocale returned the code on the same request.
Fixes `Astro.preferredLocaleList` returning an empty list when a locale is configured with the object form (`{ path, codes }`) and the browser sends the code with different casing or an underscore, such as `en-US` matching a configured `en-us`
0 commit comments