-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Save user language setting to backend #2784
Conversation
I think it would make most sense if we treat the backend storage as a sync, but don't integrate it with the translations startup code. That will keep the app faster to load and keep the code cleaner.
|
Address some review comment, all functions worked as expected excepted no local app storage yet. I am still want to refactor the whole translation/language code base to make the flow more clearly to follow balloob's suggestion. More commits are coming |
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.
ok to merge when final comments addressed 🎉
fixes: #2740
Save language selection to backend's "frontend per user storage"
Still save/load selected language from local app storage, but the backend storage will override local storage
Use local app stored language or browser language setting before login (might add language selection in login form, out of this PR's scope)
Add support for zh-MY and zh-MO locales
Convert themes-mixin.js to TypeScript
Convert ha-pref-storage.js to TypeScript