-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Fix language flavors in holiday #107392
Fix language flavors in holiday #107392
Conversation
Hey there @jrieger, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@jrieger what do you think? |
Looks good for me. Could you add a test? |
I added the test but what I mean do we really want to have the default language for the country as the fallback language or should that always be English or what do you think? Let's say I want to have Portugal calendar because I have a holiday home in that country. Would I (as Swede having my HA configured with Swedish as example) want to have the calendar then in English or in Portuguese? |
IMHO it's more important to provide people living in Norway their calendar in their language, than paying attention on some edge cases like holiday apartments. |
FYI: I have checked the pull request on my installation and it is working as expected with norwegian language. :-) |
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.
Thanks @gjohansson-ST 👍
Proposed change
Language fix for holiday integration.
Library only support overall country language codes mainly so for example
nb
(Norsk bokmål) isn't resolving tono
which is needed for the correct language.This fix sets the default language for the country if the language is not found.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: