Skip to main content

Traduire CLI

Project description

Traduire CLI interface

First, install the client program. The trd program is contained in the traduire-cli package. I recommend using pipx or something comparable:

pipx install traduire-cli

You need a configuration file, ~/.config/traduire.toml which contains one or more records of the following form:

[[project]]
name = "Project name"
token = "asdf...-1"
url = "https://traduire.example.com/api/pofile/project-name/"
path = "..."

The name, token, and URL are taken from your Traduire installation. The path is the folder where your local checkout of the project resides. The trd client uses the configured path to automatically find the correct settings. Right now there's no support forspecifying the necessary token and URL parameters directly. (Contributions would be very welcome for this!)

Then, assuming you have your gettext .po files inside project/locale you you should first ensure that they are up-to-date:

python manage.py makemigrations -a

Next, you can upload the pofiles to the Traduire server. All trd invocations automatically find all *.po files in the provided folder and act on all of them.

trd submit project/locale

After translating everything you can fetch all updates from the server:

trd get project/locale

You probably want to compile the catalogs now:

python manage.py compilemessages

Submitting pofiles only uses the msgid values except on the first submit. Also, it doesn't delete obsolete strings. If you know what you're doing you can replace the .po files on the server:

trd replace project/locale

The CLI currently doesn't support deleting translation catalogs, that's restricted to the administration interface.

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

traduire_cli-0.0.5.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

traduire_cli-0.0.5-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file traduire_cli-0.0.5.tar.gz.

File metadata

  • Download URL: traduire_cli-0.0.5.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.1

File hashes

Hashes for traduire_cli-0.0.5.tar.gz
Algorithm Hash digest
SHA256 f556d6e420af758d31ac85e277593209a9cd89225c2dda093554571fc2f2cec8
MD5 5cbb080c671b2da46fe09164015198c4
BLAKE2b-256 656a30402c84928a7e6a7e1294ab51677fe85a4c4109e2f578a335b409b88b34

See more details on using hashes here.

File details

Details for the file traduire_cli-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for traduire_cli-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 77a6bbdf15e0537cf4bb9e82160e0a9c7e6233e0d13d797c4c81177adda91b62
MD5 cf8abea1a08fe229bb518638ef61e3ab
BLAKE2b-256 8c25eb55b8ad0783a58d747587abd4a167e95c1344c16b70f2ef99a6030646ca

See more details on using hashes here.

Supported by

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