Code Monkey home page Code Monkey logo

Comments (8)

joba-1 avatar joba-1 commented on May 31, 2024

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.

from tasmoticz.

FearNaBoinne avatar FearNaBoinne commented on May 31, 2024

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?).

from tasmoticz.

Barry40 avatar Barry40 commented on May 31, 2024

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!!

from tasmoticz.

joba-1 avatar joba-1 commented on May 31, 2024

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?

from tasmoticz.

Barry40 avatar Barry40 commented on May 31, 2024

Sure,

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

from tasmoticz.

Barry40 avatar Barry40 commented on May 31, 2024

Screenshot_20231016_225741_Chrome Beta
You can see here...

from tasmoticz.

FearNaBoinne avatar FearNaBoinne commented on May 31, 2024

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)

from tasmoticz.

joba-1 avatar joba-1 commented on May 31, 2024

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?

from tasmoticz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.