Hypfer / lovelace-valetudo-map-card

Display the map from a valetudo-enabled robot in a home assistant dashboard card.
MIT License
243 stars 36 forks source link

Translate in French? #125

Closed inrepublica closed 2 years ago

inrepublica commented 2 years ago

Is it possible to translate in French your lovelace Card like this project -> https://github.com/denysdovhan/vacuum-card ?

Hypfer commented 2 years ago

What exactly would there be to translate in a card that just displays an image?

inrepublica commented 2 years ago

lovelace

Hypfer commented 2 years ago

Yeah.. no.

Please consider reading https://valetudo.cloud/pages/general/why-not-valetudo.html for an explanation regarding the decision against i18n. Thank you for your understanding and your interest in the project.

TheLastProject commented 2 years ago

Right now, that state is directly taken from Valetudo itself. The only change that's made is that the first letter is capitalized:

https://github.com/TheLastProject/lovelace-valetudo-map-card/blob/c9fe9659d78500dc7f44c00c68abf97b8fe1e0ad/valetudo-map-card.js#L564-L568

So translating this isn't an easy task, it'd require:

  1. To add some kind of index of all possible states to the map card
  2. To add i18n support
  3. To keep this up-to-date when now things are added.

I do personally believe translations can be helpful for accessibility purposes, but I personally don't have the time to take this on either and the card's codebase is honestly already quite messy. I'm also quite worried we'll end up with half-implemented translations and subtle bugs.

As a "workaround", it may be easiest to just set show_status to false. While it isn't as complete, the start/pause button will change depending on the internal state and the "go to dock" button will be hidden when docked so it should still give you a reasonable-ish sense of if the vacuum is cleaning or not.

inrepublica commented 2 years ago

Ok thanks for your explain and for your work.