Skip to main content

Automate translation of gettext PO files using LibreTranslate

Project description

transpolibre

transpolibre is a Python program to automate translation of gettext PO files using LibreTranslate.

Install

PyPI Installation

To install with pip from PyPI, you can do something like this:

python -m venv venv
source venv/bin/activate
pip install -U setuptools pip wheel
pip install transpolibre

Source Installation

Thusly, suit to taste:

git clone https://spacecruft.org/deepcrayon/transpolibre
cd transpolibre/
python -m venv venv
source venv/bin/activate
pip install -U setuptools pip wheel
pip install -e .

Help

$ transpolibre --help
usage: transpolibre [-h] [-a API_KEY] [-d] [-f FILE] [-l] [-o] [-s SOURCE_LANG] [-t TARGET_LANG] [-u URL] [-v] [-V]

Translate PO files with LibreTranslate

options:
  -h, --help            show this help message and exit
  -a API_KEY, --api-key API_KEY
                        LibreTranslate API key
  -d, --debug           Debugging
  -f FILE, --file FILE  PO file to translate
  -l, --list            List available languages
  -o, --overwrite       Overwrite existing translations
  -s SOURCE_LANG, --source-lang SOURCE_LANG
                        Source Language ISO 639 code (Default en)
  -t TARGET_LANG, --target-lang TARGET_LANG
                        Target Language ISO 639 code (Default es)
  -u URL, --url URL     LibreTranslate URL (Default http://127.0.0.1:8000)
  -v, --verbose         Increase output verbosity
  -V, --version         Show version

Status

Beta.

AI

"Open Source" AI models are used to generate and edit some code.

Upstream

Projects used by transpolibre.

License

Apache 2.0 or Creative Commons CC by SA 4.0 International. You may use this code, files, and text under either license.

Unofficial project, not related to upstream projects.

Upstream sources under their respective copyrights.

Copyright © 2025 Jeff Moe.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transpolibre-0.8.4.tar.gz (535.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transpolibre-0.8.4-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file transpolibre-0.8.4.tar.gz.

File metadata

  • Download URL: transpolibre-0.8.4.tar.gz
  • Upload date:
  • Size: 535.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for transpolibre-0.8.4.tar.gz
Algorithm Hash digest
SHA256 e0db569bea642ae06ce58cdbeb084dcc9a2ac09f88516319a5d183f8eb8b371c
MD5 7bbe5bb78a03e16cb04ea0fc1c300f1c
BLAKE2b-256 01e2d0d74f062dbd64c53563245009e1dca5914fa78dc53a6b77c31f3536837b

See more details on using hashes here.

File details

Details for the file transpolibre-0.8.4-py3-none-any.whl.

File metadata

  • Download URL: transpolibre-0.8.4-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for transpolibre-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dee57a05f71c5ede661a217665fd0f5004a66510490c058e82b23d16b066a431
MD5 3556103cdb34775ae1c4d13d4baff8be
BLAKE2b-256 26b078fae37a9cbe700fed1cb2861d5fac37f3d48ee4e96ccf4e5491f1573999

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page