Connector commands¶
The connectors add one management command, ponyglot, with five actions. All of them need at
least one adapter in INSTALLED_APPS and a valid PONYGLOT setting.
$ python manage.py ponyglot <action> [options]
check¶
Checks the settings and the connection, and introduces the site to Ponyglot (the handshake).
$ python manage.py ponyglot check
Prints the API URL, the installed adapters, the source language and the languages, then
Connected to site “…” with the writable target languages and how QA errors are handled
(editors fix them, or a separate QA review). Mismatches between your site and its settings in
Ponyglot are printed as warnings (!).
backfill¶
Queues every translatable object and sends it. Use it once after installing, and after adding an adapter or a translatable model.
Option |
|
|---|---|
|
Only this adapter: |
|
Only count units, segments and source characters; send nothing. |
backfill doesn’t fetch translations. Existing translations on your site are imported as
approved.
sync¶
Pushes what changed, reports editors’ decisions and fetches finished translations (see Run the sync).
Option |
|
|---|---|
|
Repeat every |
|
Don’t fetch translations. |
Output: pushed, unchanged, deleted, reviews reported, translations received, and how
many translations wait for a QA review. Units that couldn’t be sent are listed with ! and
their error.
status¶
Without an argument, the state of the whole site: units, segments, glossary terms, and per language how many segments are up to date (✓), stale, in review, missing, or held for QA (attention).
With a unit’s key, the state of each of its segments per language:
$ python manage.py ponyglot status djangocms:page:42
Symbol |
State |
|---|---|
|
translated and up to date |
|
the source changed since |
|
delivered, waiting for an editor |
|
missing |
|
held back by a QA check |
See Translation states, statuses and origins for what each state means.
translate¶
Requests translation of what is missing or stale, like Translate in the dialogs.
Option |
|
|---|---|
|
Only this target language. Repeatable. Default: all writable target languages. |
|
Only this unit, by its key (as |
|
Also translate segments that are up to date. Exact translation-memory matches are still reused; see Manage the glossary when changing established terminology. |
|
Only show the size and cost: segments, billable characters, translation memory hits, what’s left of this month’s allowance. |
|
Confirm a large job. Without it, a job that needs confirmation shows its estimate and stops. |
|
Wait until the job has finished. |
The translations arrive with the next sync.
$ python manage.py ponyglot translate --language de --estimate
$ python manage.py ponyglot translate --language de --wait
$ python manage.py ponyglot sync
Review the estimate before requesting translation. If the command asks for confirmation,
check the estimate it shows and repeat the translation command with --yes to accept it.