Python script for automating Cura translation for free, using googletrans and polib
Contact [email protected] for improvements or commments
Please be nice :D
- Latest version of Python
- Add it to PATH
- polib
- You need to get Python before this
- googletrans
- You need to get Python before this
- po file editor of choice
- git bash or Github Desktop
- If you don't want to use git, you can also get all starter files here (last updated 2020/04/08)
- VPN
- I recommend Windscribe because it gives you multiple IPs for free
- Optional: any modern IDE (VS Code is pretty good)
- Download translate.py and the four files needed to be translated:
- Clone this repo to get translate.py and the 4 pot files (they're in cleanStarter)
- Clone Cura and Uranium to get latest version of pot files
- Download this if you don't want to use git
- Make sure the 4 pot files are in the same directory as translate.py.
- Open translate.py and edit destLang to your language of choice:
- Notepad will open Python files just fine
- Although having a good IDE helps
- To get list of available langugages, run this in command prompt:
import googletrans
googletrans.LANGUAGES- Run translate.py:
- Double click on .py file to run
- Run inside your IDE for nicer interface
- At some point, it will stop. Use your VPN to change your IP, then run again. Repeat until you burn through all your free connections, then wait a few days to get unblocked.
- Repeat until everything is translated. Check po files periodically to check how far things are translated. You should verify and edit the translations as Google Translate isn't perfect.
- Submit your translations by pull request or emailing [email protected].
- Will blindly translate XML tags (fixing manually is ok for now since there's only 29 of these in all 4 files)