Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device naming in German? #24

Open
FearNaBoinne opened this issue Jun 10, 2021 · 8 comments
Open

Device naming in German? #24

FearNaBoinne opened this issue Jun 10, 2021 · 8 comments

Comments

@FearNaBoinne
Copy link

Where does the module get names and such from? The devices generated were the friendly name with GERMAN extensions, whilst my Domoticz is set up in English...

Also when I look in the message/comment section, I see German phrases.

@joba-1
Copy link
Owner

joba-1 commented Jun 17, 2021

Hi,

the german messages are hardcoded in the sourcefiles since it is my native language. I asked how a plugin can determine the language main domoticz uses, but did not get an answer. So for now, all I could do are ugly worksrounds. One of them is ask you to change the handful of words in your copy and send a pull request so others can find it.

@FearNaBoinne
Copy link
Author

Cool... NP! I can live with that for now... If I have some more time on my hands again, I will see what I can do for English (and detecting language?).

@Barry40
Copy link

Barry40 commented Oct 7, 2023

Is there a way around to do all coding in english please? I have ALOT tasmota devices upcoming, i do not like to rename everything.
This plugin is working perfectly anyway, great job.

Thanks!!

@joba-1
Copy link
Owner

joba-1 commented Oct 7, 2023

Sorry, I don’t understand.
Can you give an example of what you do, what you get and what you‘d like to get instead?

@Barry40
Copy link

Barry40 commented Oct 16, 2023

Sure,

All names of tasmota devices with this plugin are in German, i want to have it in english please 🙂

@Barry40
Copy link

Barry40 commented Oct 16, 2023

Screenshot_20231016_225741_Chrome Beta
You can see here...

@FearNaBoinne
Copy link
Author

The English would be "Voltage", "Current", "Total", "Yesterday", "Today", "Power" and "Apparent Power" (The unit of the latter should also be VA rather than Watt, but that is a different discussion altogether)

@joba-1
Copy link
Owner

joba-1 commented Oct 17, 2023

So it is basically the same answer as before: when I wrote the plugin I have not found a way to reliably detect the language a user wants and then how this usually is done in python. So for now there is no good mechanism for this :(
Currently I can only recommend you change the names (and units) before the devices are created:

https://github.com/joba-1/Tasmoticz/blob/master/tasmota.py#L224

Probably I should revisit that, now that the plugin seems to have more than one user. Do you have an idea how to detect a users browser/domoticz language from within a domoticz plugin and how to do proper internationalization in python?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants