Translator service API: GET/POST /_api/translate/{lang}
This commit is contained in:
@@ -213,8 +213,11 @@ def get_translation(path, lang, data) -> Translation | None:
|
||||
### Explicitly out of scope for phase 2
|
||||
|
||||
- The machine translation itself: chunking output goes in, translated chunks
|
||||
come back. A background job writes `trans` entries; this doc only defines
|
||||
the storage key (`chunk_hash:lang`) and the merge semantics.
|
||||
come back. The **service API exists** — `GET /_api/translate/{lang}` lists
|
||||
pending items (`{"key", "text", "path", "kind"}`, key = base64 chunk hash),
|
||||
`POST /_api/translate/{lang}` stores a batch (`{"items": [{key, text}]}`)
|
||||
into `trans` and maintains `node.langs`; an external service does the
|
||||
actual translating (gated by the /_api forward-auth like everything else).
|
||||
- Garbage collection of orphaned chunks/translations (see docs/migrate.md).
|
||||
- sitemap.xml per-language entries; translated UI chrome; per-language
|
||||
typographer options; multi-locale date/number formatting.
|
||||
|
||||
Reference in New Issue
Block a user