horfee
June 23, 2020, 8:15pm
1
Hello,
I am developping a plugin to control led color, with a new widget in the control section.
Here it is :
As you can see all the labels are only ids I used in the code, not the actual messages.
Here is the file translations/messages.pot
Also I created a french translation, as my current locale is in french, and I still get the same result.
Could you help me to fix it please ?
I did not find much documentation regarding plugin locale and translation...
Thank you
I usually reference @OllisGit 's knowledgebase for this stuff. I think the trick is that you have to compile for it to distribute with your plugin.
horfee
June 23, 2020, 8:53pm
3
Amazing,
Thank you very much, it helped me.
Once translation files created with python setup.py babel_new --locale=fr, I missed to issue babel_compile and babel_bundle
1 Like
foosel
June 24, 2020, 7:31am
4
It's really exactly the same as with translating core:
Starting with version 1.2.0 OctoPrint is ready for being translated into various languages. In order to contribute a translation you have basically two options, online and locally via Github pull request. In any case please always make sure of the following points:
Keep whitespace like in the source, e.g. newlines
Keep/use HTML tags like in the source, e.g. <strong>...</strong>
Keep placeholders like %(...)d, %(...)s etc intact (just move them where they belong to in your target language, theβ¦