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

--adapter NAME

Only this adapter: djangocms, parler or modeltranslation. Repeatable.

--dry-run

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

--loop SECONDS

Repeat every SECONDS, as a worker. A failed round is reported and retried; SIGTERM exits after the current round.

--no-pull

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

stale

the source changed since

review

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

--language CODE

Only this target language. Repeatable. Default: all writable target languages.

--unit KEY

Only this unit, by its key (as status shows it). Repeatable. Default: the whole site.

--force

Also translate segments that are up to date. Exact translation-memory matches are still reused; see Manage the glossary when changing established terminology.

--estimate

Only show the size and cost: segments, billable characters, translation memory hits, what’s left of this month’s allowance.

--yes

Confirm a large job. Without it, a job that needs confirmation shows its estimate and stops.

--wait

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.