Shell: stamp <html lang> from the Region & Language store - #6972
Merged
Conversation
The store switched i18n catalogs and Accept-Language but never set document.documentElement.lang, so Harmonia's locale-driven widgets (date/datetime/month pickers, x-h-date-format) always fell back to navigator.language - dates rendered in the BROWSER's locale (MM/DD/YYYY on an en-US Chrome) whatever language the user chose. Stamp at store init (before components mount) and re-stamp after the supported-set fetch corrects the value; set() reloads, so init covers it. Fixes #6971 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6971 — the store switched the i18n catalogs and the
Accept-Languageheader but never setdocument.documentElement.lang, so Harmonia's locale-driven widgets (date/datetime/month pickers,x-h-date-format) resolved tonavigator.languageand rendered dates in the browser's locale regardless of the chosen language.Stamps at store init (before Alpine components mount), re-stamps after the platform supported-set fetch corrects the value;
set()reloads the page so init covers the change path. Guarded for non-browser contexts.Related design note kept in the issue: pickers are locale-driven while list columns follow the instance's configured date PATTERN — with the stamp they now at least follow the same app language; pattern-driven pickers stay a separate ask.
🤖 Generated with Claude Code