-
-
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
Replace keys with translatable friendly names in Statistics helper #136936
Conversation
Hey there @ThomDietrich, @gjohansson-ST, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Why can they not be translated? I think they can, but we seem not to do it? |
Well, anything with underscores like But when we use the field labels from the UI like 'Max age', 'Sampling size' and 'Keep last sample' this mandates a translation so it matches the rest of the UI seen by the user in his or her language. We already applied a bunch of similar fixes to other integrations to ensure proper translations. |
That's what I sort of meant. That if we put in proper text, then the friends who translate would do this also for these field names? |
As I'm doing the translations for German I can assure you that we'll do that here. :-) For the other languages I cannot tell you how much cross-checking is done there. |
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 @NoRi2909 👍
Proposed change
The Statistics helper UI still uses the internal key names for some field descriptions and error messages.
As these cannot be translated they are not helpful in localized UIs:
This PR fixes this by replacing them with the friendly names in the dialog, all capitalized to recognize them as field labels.
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
.To help with the load of incoming pull requests: