argaar / comfortable-environment-card

A card to display the Heat Index and Discomfort Index (aka Thom Index)
MIT License
54 stars 18 forks source link

Add display_precision and show_realvalues to pt.json #41

Closed igorsantos07 closed 6 months ago

igorsantos07 commented 6 months ago

Re #31

igorsantos07 commented 6 months ago

I was going to add a pt_BR file, but I'm not sure how the language code is selected - if pt_BR would work, for instance.

I went to my HA profile settings, changed it to pt_BR, and...... the card is still in English. Any suggestion on how to test different languages?

argaar commented 6 months ago

@igorsantos07 could you try switching between languages and save each time? As already noticed, could be something related to the lack of a variable in the browser session (see https://github.com/argaar/comfortable-environment-card/issues/7#issuecomment-1908000544)

argaar commented 6 months ago

@igorsantos07 my bad, please ignore the answer before, I just realize you need the brazilian portuguese, in HA the code is in fact pt-BR that will be changed to pt_BR when the localize script try to find the correct file/object. Unfortunately it doesn't exist at the moment (only pt is present)

I could address this just creating a new "pt_BR.json" file and importing it (cloning the actual portuguese file), but I really don't know if the "standard" portuguese is ok for brazialian's speakers (I know the two languages could be pretty similar, but of course not identical)

argaar commented 6 months ago

@igorsantos07 in the last release I've added pt_BR as language, as I said I've just cloned the pt.json but probably it could be better translated in Brazialian instead of using "standard" portuguese

Feel free to make a PR if you can translate it

igorsantos07 commented 6 months ago

Yeah, they're totally understandable, except for some words and slangs (obviously). That said, it feels "odd" haha Some people say our is the "original" Portuguese and sounds like people said back in 150 when it got "thrown here and forgotten", but I would just say both branches evolved differently haha Some words are written differently as well; the last reform helped a LOT, but not all words are the same yet - e.g. humidity has an H in Portugal and starts with the U here :man_shrugging:

That's why most thoroughly-translated apps have pt_PT and pt_BR.

I'll work on the PR! Switching the language to pt_BR on HA made the trick. No clue why the heck I didn't try pt_PT before :clown_face: Also, this could be a hint about #46.