Page MenuHomePhabricator

[Epic] Create translatable edit summaries using FormatAutocomments hook
Closed, ResolvedPublic

Description

It doesn’t look like a comment_data-based multilingual comments system (T215637) will be ready in time for the initial WikibaseSchema deployment (even if the discussion in T218127 is settled soon, the MediaWiki parts will take some time to implement), so we’re going to implement a workaround similar to what Wikibase does: generate /* summaries */ like this and format them using the FormatAutocomments hook.

Event Timeline

To ease a future migration, we can still add data to the CommentStoreComment:

pseudocode
$comment = CommentStoreComment(
    '/*wbschema-newschema:en */ the label',
    [
        'type' => 'wbschema-newschema',
        'language' => 'en',
        'label' => 'the label',
        'description' => 'the description',
        'aliases' => [ 'the alias', 'the other alias' ],
        'schemaText' => 'the schema text',
    ]
);

Then, if we want to migrate away from FormatAutocomments in the future, we can write a maintenance script that goes through all the revisions in the Schema namespace and uses this data to construct a new CommentStoreComment.

Change 498444 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseSchema@master] Use autocomments for translatable edit summaries

https://gerrit.wikimedia.org/r/498444

Michael renamed this task from Create translatable edit summaries using FormatAutocomments hook to [Epic] Create translatable edit summaries using FormatAutocomments hook.Mar 26 2019, 11:57 AM