Jakob_WMDE added subscribers: rosalieper, Addshore, Jakob_WMDE.
Jakob_WMDE added a comment.


  @Addshore, @alaa_wmde, @rosalieper and I just discussed possible technical 
solutions for this.
  
  We concluded that the current approach of storing the edit summary as a 
single translatable message with a list of arguments in the `comment_text` 
field of the Comment table 
<https://www.mediawiki.org/wiki/Manual:Comment_table> is not going to scale 
well. The summaries we want to generate are becoming increasingly elaborate and 
dynamic, and can no longer be represented as single messages with arguments. We 
already changed related stories (T224013#5598017 
<https://phabricator.wikimedia.org/T224013#5598017>) for this reason and are 
going to run into similar (and more!) issues for T224015 
<https://phabricator.wikimedia.org/T224015>. One additional problem is the 480 
character limit (mentioned in T224014#5562933 
<https://phabricator.wikimedia.org/T224014#5562933>) for the comment text, 
which in the worst case isn't even enough to store two labels.
  
  A more future-proof solution would be to dynamically generate the edit 
summary from the diff resulting from the edit, i.e. instead of storing a fixed 
edit summary in the database, build it from the diff via `FormatAutocomments`. 
This would work for the current task of term edit summaries, and also pave the 
way to have better edit summaries for edits on other entity parts (statements, 
lexeme fields, ...).
  
  If we want to store the diff in the `comment` table, we could likely use the 
`comment_data` 
<https://www.mediawiki.org/wiki/Manual:Comment_table#comment_data> field which 
exists for the purpose of holding "structured data that is intended to be used 
to provide localized versions of automatically-generated comments" which sounds 
promising. One major challenge we see for this is that the aforementioned 
`FormatAutocomments` hook does not (in all cases!?) contain the `comment_data`. 
See uses of `Linker::formatComment` 
<https://codesearch.wmflabs.org/search/?q=Linker%3A%3AformatComment&i=nope&files=&repos=>
 which runs the hook.

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

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

To: Jakob_WMDE
Cc: Jakob_WMDE, Addshore, rosalieper, Pintoch, Lea_Lacroix_WMDE, NicoScribe, 
Rosalie_WMDE, alaa_wmde, Lucas_Werkmeister_WMDE, Lydia_Pintscher, Aklapper, 
Lea_WMDE, darthmon_wmde, DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, 
QZanden, LawExplorer, _jensen, Scott_WUaS, Jonas, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to