Upsert translation
upsert_translationCreate or overwrite the value of an existing key in one locale, for simple or plural keys. Records the edit as human-edited and versioned so it overrides future AI batches.
Instructions
Create or OVERWRITE the value of one existing key in one locale (it cannot create new keys; use push_file on the source locale for that). Pass value for a simple key, or plural_forms (CLDR category map, e.g. {"one": "...", "other": "..."}) for a plural key. Send exactly one of the two. A JSON project has no plural FORMS: an ICU plural or select there is ONE string, so send it as value with its selectors and argument names verbatim (e.g. {count, plural, one {# item} other {# items}}). plural_forms is for a key the project stores as separate forms (is_plural true, as gettext or Android do); splitting an ICU message into it writes a row the format cannot represent. The write is recorded as a human edit (state human_edited) and versioned server-side, so it wins over future AI batches. Overwriting the SOURCE locale marks targets stale and, if the project has auto-translate on, queues a background AI batch (spends AI word quota; its id is not returned, so check list_batches). Optional reviewer attributes the edit. Returns the fresh row. Requires the "write" ability.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>",
"locale": "<locale>"
},
"name": "upsert_translation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Exact key name of an EXISTING key. | |
| value | No | New value for a simple (non-plural) key. Use "" to clear. | |
| locale | Yes | A locale configured on the project. | |
| reviewer | No | Optional human reviewer name recorded on the edit. | |
| plural_forms | No | New values for a plural key, keyed by CLDR plural category (one, few, many, other, ...). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| row | Yes |