Michael added a comment.

Investigation Result

This is done in Wikibase in \Wikibase\Lib\AutoCommentFormatter by using the FormatAutocomments hook.

Also, it seems like Wikibase is the only extension using that hook.

Besides its test, the AutoCommentFormatter is used only in ClientHooks.php and RepoHooks.php. Also, AutoCommentFormatter is not subclassed.

The comment in the database is created by \Wikibase\SummaryFormatter. This class is much more integrated into the rest of Wikibase and I'm unsure how suitable it is to be extracted.

Possible Ways to Proceed

  1. We could extract AutoCommentFormatter into a library and use it in WikibaseSchema.
  2. On the other hand, this is not much more than listening to the hook for our message string and replacing it with the message. So we could also keep this pretty simple.

TASK DETAIL
https://phabricator.wikimedia.org/T214917

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Michael
Cc: Michael, Tarrow, Aklapper, Lydia_Pintscher, Lucas_Werkmeister_WMDE, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, YULdigitalpreservation, LawExplorer, _jensen, abian, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to