Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remram44/pybabel-godot
Plugin for Babel to support Godot scene files (.tscn)
https://github.com/remram44/pybabel-godot
gettext godot hacktoberfest i18n l10n localization pybabel
Last synced: 4 days ago
JSON representation
Plugin for Babel to support Godot scene files (.tscn)
- Host: GitHub
- URL: https://github.com/remram44/pybabel-godot
- Owner: remram44
- License: other
- Created: 2019-10-12T18:22:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-20T17:51:28.000Z (over 2 years ago)
- Last Synced: 2024-11-02T06:31:06.285Z (11 days ago)
- Topics: gettext, godot, hacktoberfest, i18n, l10n, localization, pybabel
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 14
- Watchers: 4
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Babel Godot plugin
==================This is a plugin for `Babel `_, the internationalization library, that adds support for scene files from the `Godot game engine `_.
Installation
------------Install Babel and this plugin::
pip install Babel Babel-Godot
Usage
-----Using a mapping file like this::
[python: **.gd]
encoding = utf-8
extract_messages = tr[godot_scene: **.tscn]
encoding = utf-8[godot_resource: **.tres]
encoding = utf-8you can extract messages to be translated from your ``.gd``, ``.tres``, and ``.tscn`` files using::
pybabel extract -F babel_mapping_file -k Label/text -k Resource/catchphrase -k tr -o translations.pot .
You can then create ``.po`` files from the POT catalog using `Poedit `_, or online services such as `Crowdin `_, `Transifex `_, or `Weblate `_.
See ``testproject/`` in the repository for an example.