home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.88k stars 30.96k forks source link

Trend Helper: Missing translations as list of state attributes for sensors is relatively short #130778

Open NoRi2909 opened 6 days ago

NoRi2909 commented 6 days ago

The problem

When creating a Trend helper this also allows to reference several sensor attributes. So far only last_reset, options and state_class have defined names that get localized in the frontend:

https://github.com/home-assistant/core/blob/9711816542b581d7c40a3d69668c3711d5af7c23/homeassistant/components/sensor/strings.json#L119-L127

Any other attributes do not have an entry here so the show up in English only:

379439787-724d426c-7ce6-4d69-9361-e2f9d1e05fca

379439864-038979b8-535f-4fa7-aa0e-69367fb94859

Perhaps a few more of the most common attributes like device_class, friendly_name and unit_of_measurement could be added to the list so the frontend can display them with translated names.

What version of Home Assistant Core has the issue?

core-2024.11.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Sensor

Link to integration documentation on our website

https://www.home-assistant.io/integrations/sensor/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 6 days ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (sensor) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `sensor` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign sensor` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


sensor documentation sensor source (message by IssueLinks)