MTrab / landroid_cloud

Landroid Cloud component for Home Assistant
GNU General Public License v3.0
266 stars 33 forks source link

[FR]: Translation of strings #121

Closed fra87 closed 2 years ago

fra87 commented 2 years ago

Is your feature request related to a problem? Please describe. It would be great to have a translation of the different strings returned by the API

Describe the solution you'd like Maybe have translation files in the translation folder; there can be a dictionary to convert a string in another string (so that, for instance, I can have in the dictionary "Mowing" : "Taglio in corso", and whenever the API sends "Mowing" it gets translated into that), and if the string is not present in the dictionary then the input string is used.

Describe alternatives you've considered

Additional context I can provide the translations for the strings in Italian language (I recorded the label shown in the app when a specific state was published)

If necessary, I can try to write a solution so that it can be evaluated, but I don't know if HACS will then complain if I manually modify the custom_components files managed by it

MTrab commented 2 years ago

Great idea. The thought have crossed my mind several times actually

fra87 commented 2 years ago

Then let me know if I can help in some way or another :)

MTrab commented 2 years ago

Have a look at the Translation section of the new readme in the v2 branch (direct link https://github.com/MTrab/landroid_cloud/blob/02e6a25d6b0ce394428b1112d327fcfa4481e813/README.md#translation) describing how to contribute with translations

fra87 commented 2 years ago

Great! Thank you. I translated the words in Italian

Just two things for your information.

  1. I do not know what is the "Vendor" option. I wrote "Venditore" (i.e. Seller), but if it is something else just give me some context
  2. There are some strings that I did not find in the list.

It is about one year that I'm using the extension, and every time a state or an error changes Home Assistant sends me the new string. This way I collected quite a lot of strings ;) they are:

States:

Errors:

The asterisk is for strings I already found in the lokalise database

MTrab commented 2 years ago

The ones you didn't find is the ones used for errors - those are now attributes and not translatable as the Home Assistant structure currently are.

As for vendor - that's as in Worx, Kress and LandXcape. So Vendor or makes.

fra87 commented 2 years ago

As for "vendor", I think then that "Marca" (i.e. more like "Brand") is then the most correct translation

For the strings, there are also a lot linked just to the states (e.g. Home, Idle, Going home, ...)

As for the errors, then I don't understand why Rain Delay is a specific case (just to be clear, I just genuinely don't know: I was not able yet to dig into the repository to understand how strings are returned)

MTrab commented 2 years ago

Rain delay is "special" in that I decided that it would be nice to have presented up front as a state. Perhaps the other errors should be as well, but not in the initial version 2