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
71.35k stars 29.89k forks source link

jinja 'relative_time' doesn't localize return value #97358

Open RoepLuke opened 1 year ago

RoepLuke commented 1 year ago

The problem

When creating the following Jinja Template and using it in the UI / Developer Template, the resulting return string is not localized. I assume this is a Jinja Extension provided by Home Assistant, as i couldn't find it in the jinja documentation.

Language Settings (Profile):

Template

{{ now() ~ ' - ' ~ (today_at('01:00') | relative_time()) }}

Current Behavior

Result output in English. Result / Return string: 2023-07-21 04:24:03.678325+02:00 - 3 hours

Expected Behavior

Result output in the User language. In this case, this template would then return: 2023-07-21 04:24:03.678325+02:00 - 3 Stunden

What version of Home Assistant Core has the issue?

core-2023.7.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

Templating

Link to integration documentation on our website

https://www.home-assistant.io/docs/configuration/templating/

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

issue-triage-workflows[bot] commented 10 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

hellomarb commented 10 months ago

This feature is still needed. For all of us using the template functions it is confusing not to have access to core functions.

issue-triage-workflows[bot] commented 7 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

fetzerch commented 7 months ago

Problem still exists and should be addressed.

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

1358 commented 4 months ago

Problem still exists and should be addressed.

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

1358 commented 1 month ago

Problem still exists and should be addressed.