# UJ-003 Queue and apply one post translation

Audience: AI coding agents first.

- Actor + entry point: WordPress administrator; `wp-admin/admin.php?page=international-press-zone#/translate-posts/posts`.
- Priority: MUST-HAVE.
- Preconditions: Seed source post and target language through WordPress/plugin REST APIs; provision active key and credits through public subscription APIs.
- Test layer: L2.

## Steps

1. Open post translation modal and choose target language → action is enabled for missing translation.
2. Activate translate → plugin sends content job and renders queued/processing state; success toast identifies queued job (`admin/src/pages/translate-posts.js:859-880`).
3. Deliver signed completed callback → modal renders `Translation to <language> completed successfully.` (`admin/src/pages/translate-posts.js:676`).
4. Reload posts screen → translated language is no longer missing; translated WordPress post/content is visible.

## Failure branches

- Auth failure `401` → render invalid-key error; do not create translated post (`docs/contracts/plugin-client-contract.md:78-88`).
- Insufficient credits `402` → render quota/credits error; local job fails; source post remains unchanged (`docs/contracts/plugin-client-contract.md:87-88`).
- Rate limit `429` → render rate-limit error; retry behavior follows sender path, never duplicate applied translation (`docs/contracts/plugin-client-contract.md:87-88`).
- Backend unreachable → render `Failed to queue translation` or transport message (`admin/src/pages/translate-posts.js:875-882`).

## Backend touchpoints

`POST /v1/jobs`; `POST /wp-json/international-press-zone/v1/callback`; `GET /v1/jobs/{api_job_id}` recovery path.

