dckiller51 / lovelace-body-miscale-card

Card for data of Xiaomi scales in the Lovelace user interface of Home Assistant The card is linked to the Bodymiscale custom components for Xiaomi scales. https://github.com/dckiller51/bodymiscale
MIT License
81 stars 23 forks source link

Issue with translation again #50

Open Opontios opened 7 months ago

Opontios commented 7 months ago

I have red all the issue reports about the translation and can't understand the following. The author states that there is no way yet to set the translation language manually, it follows the system settings. But despite that there are a lot of language files in the 'translation' folder of the custom component. In my setup I have only one entry that can't be translated, it's shown in the screenshot. This entry (State of the BMI interpretation) is translated in the corresponding language file, but not updated in the card. Actually, the card is not using the language files at all, because even if you delete the language file and clear the cache of the browser the card stays translated with that only entry missing, as in the screenshot. So how it actually works and how it can be corrected? Bodymiscale

dckiller51 commented 7 months ago

I will look at the error. There is an automatic translation depending on the HA system language and if someone provided the translation in their language. Now it may happen that a person does not translate 100% so translations will be missing. In this case English takes over. At first glance I didn't see any errors, I will test in my environment.

Opontios commented 7 months ago

I will look at the error. There is an automatic translation depending on the HA system language and if someone provided the translation in their language. Now it may happen that a person does not translate 100% so translations will be missing. In this case English takes over. At first glance I didn't see any errors, I will test in my environment.

Thanks for the quick reply! And thanks for the grate job done with this component. As I mentioned before, the translation file includes those states. But how exactly the card reads those entries? If I delete the translation file and clear the cash the translation is still there. Bodymiscale2

dckiller51 commented 7 months ago

@Opontios Sorry for my late return. I changed computers and had some difficulty reinstalling the card in development mode. I did some tests and I have the overweight translation. As is often the case, I advise you to switch to English and go to the card page to press F5. Switch back to the language of your choice, then F5 again on the card page. Capture d'écran 2023-12-16 111625