On the client, ChangeHandler currently ignores the (currently empty) comment field from the incoming EntityChange. When creating a RecentChanges entry, ChangeHandler sets rc_comment to the empty string. RecentChanges stores the fields and metadata from the EntityChange in the 'wikibase-repo-change' RC attribute, which is handled by ExternaLRecentChange. However, the 'comment' and 'composite-comment' fields are overwritten with the output of getEditComment() first. This is later picked up and processed by ExternalChangeFactory and ChangeLineFormatter. This should be changed so that ChangeHandler generates and stores human readable summaries in rc_comment, while preserving the original edit summary somewhere in the RC params:
- ExternalRecentChange::buildAttributes() should pass $attribs['comment'] to rc_comment (if set).
- ChangeHandler::getRCAttributes() should return 'wikibase-repo-change' => array_merge( $fields, $rcinfo ) with $fields and $rcinfo unchanged. $rcinfo['comment'] and $rcinfo['composite-comment'] should not be set.
- ChangeHandler::getRCAttributes() should separately return a value for the 'comment' attribute, constructed by calling getEditComment( $change ); if there are multiple coalesced changes in $fields['info']['changes'], getEditComment( $change ) is called fro each of them, and the results combined using Language::semicolonList. If the result is too long (>250 char or so), add "... and N more changes" to the end.
- ChangeHandler::getRCAttributes() should drop the "instanceof ItemChange" conditional.
- ChangeHandler::getEditComment() should always return a string, a human readable edit summary in the wiki's conent language. If the change is a sitelink change, the summary is generated by SiteLinkCommentCreator. Otherwise, it is generated by AutoCommentFormatter (which needs extra functionality to find and replace the autocomment block). Side note: investigate whether ExternalRecentChange really has to serialize everything into rc_params.NOTE: the plans above assume that it's ok (for now) to have edit summaries in the client wiki's content language. For multilingual wikis, this isn't very nice, but it's consistent with other edit summaries there.