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
Built Distribution
File details
Details for the file traduire_cli-0.0.4.tar.gz
.
File metadata
- Download URL: traduire_cli-0.0.4.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71057db989d4c0d19634d32582270fe876d7ec6eebe3aebc78628a5f4101055b |
|
MD5 | e4cded147f89e9f3bfcb0ac8a649da3d |
|
BLAKE2b-256 | 1affe4d14e22c81b2be2b68c284dbccb34cfb22db493eaaf4ad2bb46b8f88ed8 |
File details
Details for the file traduire_cli-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: traduire_cli-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5c910f7e34930fe255e8778da1eb0bd6114b616d2a8205d044b7623d409721f |
|
MD5 | 4d18b653a4b915e2ca3625a241d33511 |
|
BLAKE2b-256 | 2b98d94ee807b60ea3f683ac1567a3c8d11de31754c62964fe71e02e815bd80b |