This has been replaced by a C# implementation directly in the Thrive repository
This is a plugin for Babel, the internationalization library, that adds support for scene files from the Godot game engine.
Extended specifically for Thrive, including and slightly editing the plugin pybabel-json.
Install Babel and this plugin:
pip install Babel Babel-Thrive
Using a mapping file like this:
[csharp: **.cs] encoding = utf-8 [godot_scene: **.tscn] encoding = utf-8 [godot_resource: **.tres] encoding = utf-8 [json: **.json] encoding = utf-8
you can extract messages to be translated from both your .gd
and .tscn
files using:
pybabel extract -F babelrc -k LineEdit -k text -k window_title -k dialog_text -k Translate -o messages.pot .
You can then create .po
files from the POT catalog using Poedit, or online services such as Crowdin, Transifex, or Weblate.
requirements-dev.txt contains packages that help with local development.
To install for local testing:
pip install . --user
A good guide: https://realpython.com/pypi-publish-python-package/#building-your-package
Basically just:
`sh
pip install twine
python setup.py sdist
twine check dist/*
twine upload dist/*
`