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

Revolutionary-Games/pybabel-godot-thrive

 
 

Repository files navigation

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

About

Plugin for Babel to support Godot scene files (.tscn)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%