This commit is contained in:
Javier Casares 2026-05-28 07:22:36 +00:00
commit 1ccc13da01
14 changed files with 845 additions and 197 deletions

View file

@ -1,5 +1,38 @@
== Changelog ==
= 1.2.0 =
_Release date: 2026-05-28_
**Highlights**
* Parallel chunked content translation: long posts are split at block or paragraph boundaries and all chunks are translated concurrently, eliminating timeout errors.
* Configurable request timeout: control how long the server waits for an AI response (30300 s).
**Added**
* Configurable "Request timeout" setting (default 60 s, minimum 30 s, maximum 300 s) in both site and network admin. Controls how long the server waits for a single AI response before timing out. The PHP `max_execution_time` value is shown as a hint.
* Parallel chunked content translation — long post content is automatically split at Gutenberg block boundaries (Block editor) or paragraph/heading boundaries (Classic editor) and all chunks are sent to the AI concurrently via `Promise.all()`.
* Progress indicator — the Translate button label updates in real time: "Translating… (2/5)" after each chunk resolves.
* New REST endpoint `POST /wp-json/ai-translator/v1/translate-text` — translates a raw text string (HTML or plain text) supplied directly in the request body. Used internally by the chunked content path. Requires the same `edit_post` capability as the existing `/translate` endpoint.
**Changed**
* Content translation now reads directly from the current editor state (unsaved changes are included) instead of from the last saved post revision. Title and excerpt continue to be read from the database.
**Compatibility**
* WordPress: 7.0 - 7.1
* PHP: 7.4 - 8.5
* WP-CLI: 2.12 or newer
**Tests**
* PHP Coding Standards: WordPress-Core, WordPress-Docs, WordPress-Extra
* PHPCompatibility: 8.2 - 8.5
* PHPStan: level 9
* PHPUnit: 51/51 tests passing (single-site)
= 1.1.0 =
_Release date: 2026-05-25_