Skip to main content

po-translate Version

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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for po-translate-ai 1.6.1
File Size Uploaded Provenance Actions
po_translate_ai-1.6.1.tar.gz 18.0 kB With provenance Details for po_translate_ai-1.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for po-translate-ai 1.6.1
File Interpreter ABI Platform Actions
po_translate_ai-1.6.1-py3-none-any.whl Python 3 none any Details for po_translate_ai-1.6.1-py3-none-any.whl

Total release size: 32.8 kB

Release files / po_translate_ai-1.6.1.tar.gz

Download URL po_translate_ai-1.6.1.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7ee3a79667f821292b1f1fb62be098571468a00e274cc107fd0c25dae4958f52
BLAKE2b-256 checksum
How to use checksums
c2b38584b46d0a1dbfa87948e39c91d3b38b1b2bfed07932404bf8f56ff83ba5
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 Oct 25, 2026.

Transparency log

Release files / po_translate_ai-1.6.1-py3-none-any.whl

Download URL po_translate_ai-1.6.1-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f33ee696be434e3634c95f58ddbfab34a7f5962e7b64808cac3c0fdf42974427
BLAKE2b-256 checksum
How to use checksums
b3687ce750ff28145b038cd7f6a65600c488b88d529c1230eade088dfc994163
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 Oct 25, 2026.

Transparency log

Security for po-translate-ai 1.6.1

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.

Select from 2 files

Attestation for po_translate_ai-1.6.1.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 Oct 25, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page