po-translate 
Description
po-translate is a command-line tool for batch translating PO, Qt TS and XLIFF localization files using AI or translation services. It supports multiple backends including free services such as Lingva and MyMemory, as well as OpenAI, Anthropic and DeepL.
The tool is designed for developers, translators, and localization teams who need to quickly translate large sets of localization files with consistency and accuracy. It includes features like custom glossaries, fuzzy marking, and dry-run capabilities.
Features
- Multiple translation services (free and premium)
- Support for PO, Qt TS and XLIFF files
- Batch processing of multiple files
- Custom glossary support for consistent terminology
- AI services with context awareness
- Fuzzy marking for review workflows
- Dry-run mode for testing
- Recursive directory processing
- JSON output for automation
- Safe plural handling: every plural form is translated and preserved
- Placeholder validation and atomic writes: a failed or incomplete provider response never overwrites a catalog
Usage
Basic Examples
# Translate with free Lingva service
po-translate --source en --target sv ./translations/
# Translate with OpenAI
po-translate --service openai --api-key sk-xxx --source en --target de ./po/
# Dry run (don't save)
po-translate --dry-run --source en --target fr messages.po
# Translate single file
po-translate --source en --target ja ./resources/strings.po
# Use custom glossary
po-translate --source en --target sv --glossary terms.csv ./po/
Advanced Options
# Use DeepL with custom batch size
po-translate --service deepl --api-key your-key --batch-size 5 --source en --target de ./
# Mark translations as fuzzy for review
po-translate --fuzzy --source en --target sv ./po/
# Quiet mode with JSON output
po-translate --quiet --json --source en --target fr ./translations/
Installation
Direct DEB install (Debian/Ubuntu)
curl -LO https://yeager.github.io/debian-repo/pool/main/p/po-translate/po-translate_1.6.1_all.deb
sudo apt install ./po-translate_1.6.1_all.deb
The current package is available directly while the signed APT index awaits the repository's existing signing key.
DNF Repository (Fedora/RHEL)
sudo dnf config-manager addrepo --from-repofile=https://yeager.github.io/rpm-repo/yeager.repo
sudo dnf makecache
sudo dnf install po-translate
Safe catalog updates
Plural translations are applied to their matching plural slots, including when
--fuzzy is used. Before writing, po-translate verifies placeholders and that
the provider supplied every required form. If a request fails, returns an empty
translation or changes placeholders, the input file is left unchanged. In
--json mode, results are written to standard output and diagnostics to
standard error for reliable automation.
Building from Source
git clone https://github.com/yeager/po-translate.git
cd po-translate
pip install -e .
Translation
This application is managed on Transifex: https://app.transifex.com/danielnylander/po-translate-ai/
Available in 11 languages: Swedish, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Czech, Russian, and Chinese (Simplified).
License
GPL-3.0-or-later
Author
Daniel Nylander (daniel@danielnylander.se)
Metadata
Release files for po-translate-ai 1.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| po_translate_ai-1.6.2.tar.gz | 18.4 kB | With provenance | Details for po_translate_ai-1.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| po_translate_ai-1.6.2-py3-none-any.whl | Python 3 | none | any | Details for po_translate_ai-1.6.2-py3-none-any.whl |
Total release size: 33.0 kB
Release files / po_translate_ai-1.6.2.tar.gz
| Download URL | po_translate_ai-1.6.2.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e346364c05f357c831f2d98153b469915ceae3a18d15ab1aed5f3c26f53014ad
|
|
BLAKE2b-256 checksum How to use checksums |
49f0d94d7fe08d23f1146e961bdbbb93e1886415d1196b8ea69ce352ca37c728
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / po_translate_ai-1.6.2-py3-none-any.whl
| Download URL | po_translate_ai-1.6.2-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0787b7675b7d5a6340a5cc2bffde7511600b3feb929e12d34cd29811fcbb71f7
|
|
BLAKE2b-256 checksum How to use checksums |
1e2ac475dcaa0c9d263dbceb20c779f4e99e7027c6a13b5b9ed69be57fa07828
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for po-translate-ai 1.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for po_translate_ai-1.6.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.