**Motivation**
For mobile edits, we don't want to create every action atomically. Reasons for this are:
- The number of edits currently created by one save creates rather cluttering watchlists
- It would create a lot of requests, and this would increase needed band width
- It would create "part error states", where some part of an edit is saved, but some other part is not
However, editors should still be able to understand as much as possible about an edit without having to look at the diff. Thus we need edit summaries that are as specific as possible, and at the same time not overwhelming.
**As a** Wikidata or a Wikipedia patroler (both are affected!)
**I want to** understand what an edit was about just by reading the edit summary
**so that I** identify vandalism right from my watchlist
**Acceptance Criteria**
[] Provide custom generated edit summaries, if only termbox contents was changed, and if no custom edit summary has been provided
[] As long as 5 or less terms (item, description or alias) were changed, display the expanded version of the edit summary (see definition below)
[] If more than 5 items were changed, use the shortened version. (see definition below)
[] If more than 50 languages received changes, use the fallback version. (see definition below)
[] If anything outside of the termbox was changed, don't use the new edit summary mechanismn accordance with **Choosing summary version mechanism**
**Technical thoughts**
- In order to create a general "edit summary creation" point, the edit summary should be generated as part of the wbeditentity endpoint.
- Dealing with change operations was a struggle in the lexeme project, maybe we can learn something from there?
**###Edit summary versions**###
**Expanded version**
Show each change seperated by comma, in the following format:
<Added/Changed/Removed> [<language code>] <label/description/alias>: <new label/description contents>,
Example:
`Added [en] label: Frame of Notre-Dame de Paris, Changed [en] label: Maja, Added [fr] alias: Marie`
The wording is attempted to be as close to the current edit summary formulation as possible
**Shortened version**
Changes for <all language codes that changed the same types>: Label, Description, Alias [whichever of these were changed] [whole line repeats for all variations changed of label, description, alias]
Example:
`Changed in fr, es, en, pl zh: label, description, alias. Changed in it, hu: label`
**Fallback version**
Changed label, description and/or alias [whichever of them has been touched anywhere] in XX languages
Example:
`Chenged label, description and/or alias in 60 languages`
###Choosing summary version mechanism###
The limit for summary length we want to stick to for now is 480 characters in total.
Go through the following steps to choose the summary version:
1. If we have <= 5 terms changed, we generate expanded version. Then if it is below the limit, we stop and use it.
2. If we have <= 50 languages changed, we generate shortend version. Then if it is below the limit, we stop and use it.
3. If we reach here, we just generate fallback version and use it.