As a tool builder I want to be able to change labels of an item so that work in my tool can be saved back to Wikidata.
PATCH /entities/items/{item_id}/labels
Response of a successful response:
* 200 HTTP response
* response body containing the updated labels data, using the similar structure as `GET /entities/items/{item_id}/labels`.
* Should also include ETag and Last-Modified headers of the latest revision ID of the relevant item.
"Autocomments":
* should mimic the `wbeditentity` behavior when editing labels/descriptions/aliases:
* If the change results in changing labels in not more than 50 languages: `/* wbeditentity-update-languages-short:0||LANGS */`
* If the change results in changing labels in 51 or more languages: `/* wbeditentity-update-languages:0||LANG_COUNT */`
* where `LANGS` is a comma separated list of language codes of relevant languages (e.g. `en, de, es, fr, fi, it`). `LANG_COUNT` is a number of languages with changed labels
* might not be that simple, see e.g. https://www.wikidata.org/w/index.php?title=Q10998&oldid=1793780491
Error cases considered:
- item ID does not exist
- input JSON patch invalid (similar to T306934 behavior)
- after changes, label or labels are not valid (empty, too long)
- after changes, invalid language code is used for one or multiple languages
- after changes, a duplicate label/description error occurs
Note:
* whitespace trimming of changed labels to happen "silently" (i.e. accept the label with leading/trailing whitespace but remove it before saving)
* we allow all patch operations (including "move", "copy", etc) even if they likely are not useful
**Examples**:
Add a label in French and Bavarian:
```
{
{ "op": "add", "path": "/fr", "value": "pomme de terre" },
{ "op": "add", "path": "/bar", "value": "Erdapfel" }
}
```
Remove the German label
```
{
{ "op": "remove", "path": "/de" }
}
```
Replace English label if it it is "tater":
```
{
{ "op": "test", "path": "/en", "value": "tater" },
{ "op": "replace", "path": "/en", "value": "potato" }
}
```