Wikibase
MediaWiki Wikibase extension
|
Wikibase uses “magic” edit summaries so that users can understand the contents of edits in their own language. They are created by SummaryFormatter, saved in the database, and later parsed and localized for display by AutoCommentFormatter.
The usual general structure of a Wikibase edit summary looks as follows:
The entire part in /* ... */
is called the autocomment, and the Wikibase-generated part after it is called the autosummary. Any custom user-provided summary is appended to the autosummary after a comma, and cannot be distinguished from the autosummary after the edit has been saved. The autocomment and autosummary are further divided as follows:
entity
if no message for the specific Entity type exists; thus, the key wbcreate-new
used on an Item will use the message wikibase-item-summary-wbcreate-new
, while the key wbeditentity
used on an Item will use the message wikibase-entity-summary-wbeditentity
, because the more specific message wikibase-item-summary-wbeditentity
does not exist. The key is often related to the API module or ChangeOp used to make the edit.Note that the roles of scount, lang and cargs are not always guaranteed (especially for older edit summaries), and should not be relied on. All the autocomment parts after the key should be passed into the message as $1, $2, $3, $4, etc.
Annotated example summary:
This summary may be localized as:
Added [en] aliases: test item alias 1, test item alias 2, add two test item aliases
Some more examples of magic summaries:
/* wbsetsitelink-add:1|site */
linktitle/* wbsetsitelink-set:1|site */
linktitle/* wbsetsitelink-remove:1|site */
/* wbsetlabel-add:1|lang */
value/* wbsetdescription-set:1|lang */
value/* wbsetaliases-remove:1|lang */
values.../* wbeditentity-update: */
/* wbeditentity-update:0| */
/* wblinktitles-create:2| */
fromSite:fromPage, toSite:toPage/* wbremoveclaims:n */
props...