custom-cards / upcoming-media-card

📺 A card to display upcoming episodes and movies from services like: Plex, Kodi, Radarr, Sonarr, and Trakt.
258 stars 79 forks source link

[Feature Request] Day Translations #24

Closed JeffreyBouman closed 3 months ago

JeffreyBouman commented 5 years ago

Is your feature request related to a problem? Please describe. Even though my user settings are set to another language, the days are not translated to the set language, I am sure they are available.

Describe the solution you'd like What I would like to see, if possible, is for the card to tap into the translation database already maintained within Home Assistant to translate the names of the day. If possible the movie categories would be nice addition, although I do not know for sure whether those translations are available or not.

maykar commented 5 years ago

This card uses "toLocaleString" to translate using system settings: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString

Surprisingly, it doesn't seem that days of the week are included in hass translations: https://github.com/home-assistant/home-assistant-polymer/tree/master/translations

I will probably just make this a config option as you can use toLocaleString with a specified locale. That way if you prefer your system to be one locale the card can be another.

Categories are grabbed directly from the api of the service you are using (plex, radarr, kodi, etc) so if the language settings exist with that service, use those.

mkanet commented 3 months ago

@JeffreyBouman, I'm going to close this ticket since it's been years since there's been any activity on it. Lots has changed in Home Assistant as well in UMC. Please open a new issue if you still don't have a solution or workaround.