-
Notifications
You must be signed in to change notification settings - Fork 7
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
l10n (localization) support #8
Conversation
Yeah GPT should be good option for translating into at least few main languages, unless someone hops in and contributes most correct translation from English, mainly the about panel has bulk of the text. I will look into this PR tomorrow and provide some translation but they won't be as good as native speaker. I could do Serbian without issues. |
the about panel may need a couple of changes to make sure it keeps a consistant size across languages, currently it's using html breaks to prevent horizontal expansion and the text has to be split to simulate word wrap ideally the right side of the about panel should have a fixed width and not use htlm breaks at all |
I couldn't build seems the script is broken and its not this PR its latest upstream commit have no idea what I changed for it to break... Oh I think i don't have java 8 jdk I think that has to do something with it haha. |
took me a couple hours to figure out I was using jdk11 too 🤣 if the CI didn't complain then it's probably a local problem |
I will add check to do nothing or at least display something is wrong with java jdk for build_specific scripts. Your cl scripts should work just fine my scripts for building specific tool was not able to run bc of missing jdk it just did some folder creation and extraction but no jar. Once i installed jdk 8 it worked just fine. |
btw I'm not sure languages not listed in that file can be used in the plugin (arduino version), it seems the Arduino IDE overwrites the default system locale with its own default supported locale |
I tried to do serbian display language in my windows 11 and set system default in arduino ide but it changed to english but it did work for french. I assume it won't work if the language doesn't exist in that list in arduino preferences? |
it should work with platformio version though, try this:
|
Oh so platformio version also has support for localization as well it has auto detect system language right? If so I could add my language properties file as well if thats the case. |
this is how the locale is extracted for both platformio and arduino:
Arduino IDE probably overrides this with English when the language isn't in the translations list |
No worries I verified at least for Arduino IDE it detects the language and does load the properties file correctly. If you need anything else to add feel free this is fine for merge. |
I'll probably make the aboutPanel localizable later in a separate PR, I have nothing to add to this PR no peer review for the translations -> I hope the AI didn't hallucinate too much 🤣 |
I worry if the text label will fit in the ui hahah. I checked for my language it was semi correct not very specific terms used but it wasn't off by a lot. |
Obviously English is the default language; I've added French as a first example, maybe ChatGPT could take care of more languages?