Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Latest commit

 

History

History
63 lines (39 loc) · 1.75 KB

README.rst

File metadata and controls

63 lines (39 loc) · 1.75 KB

Babel Godot - Thrive plugin

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.

Installation

Install Babel and this plugin:

pip install Babel Babel-Thrive

Usage

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.

Developing

requirements-dev.txt contains packages that help with local development.

To install for local testing:

pip install . --user

Publishing

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/* `