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
Capitalize a bunch of translations #95421
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@@ -302,7 +302,7 @@ | |||
} | |||
}, | |||
"device_class": { |
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.
I think that all these need to be capitalized but I am not 100% sure.
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.
Binary sensor is also the only one using this.
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.
If we change these the documentation will need to clarify the difference between GUI and YAML configuration.
https://www.home-assistant.io/integrations/binary_sensor/#device-class
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.
I think that all these need to be capitalized but I am not 100% sure.
They should not I think? They are used by the frontend rendering the logbook, and are used mid-sentence. All other use cases have been removed and replaced by the entity attribute translations.
IMHO, this whole list should be refactored out and removed.
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.
I added some auto casing logic into the frontend for binary sensor device classes in the logbook just a day or so ago. So that when a "heat" device class sensor switches on, it says "Detected heat" with a lower case "h" in EN, but keeps it capitalized for example in German.
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.
@spacegaier right, so it could use the translations provided by the entity component instead?
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.
Yes, those are now already used by the frontend for the binary sensors in the logbook as of two days ago (there might be other places, where we still need to add the auto casing as well):
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.
Nice ok, let's keep this out of scope for this PR in that case 👍
Breaking change
Proposed change
Capitalize a bunch of translations that didn't start with capital letter.
Found with
Not adding that change to hassfest as there are a few false positives.
Type of change
Additional information
Checklist
black --fast 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: