Page MenuHomePhabricator

Transfer history and revision information when moving translatable bundles between wikis
Open, Needs TriagePublic

Description

Following up from T329043: Improved support for transferring translations between wikis. Add the ability to export and import revision and history information about translatable bundles from the source wiki to the target wiki.

Event Timeline

(follow-up of T354473)
Translation unit is imported from Meta-Wiki, however, translation page is recreated by FuzzyBot, making author credits hardly discoverable.

As a workaround, I think the translation pages could be actually moved if the page would have been removed from Translate system before the move. We could then re-mark the page for translation.

(follow-up of T354473)
Translation unit is imported from Meta-Wiki, however, translation page is recreated by FuzzyBot, making author credits hardly discoverable.

As a workaround, I think the translation pages could be actually moved if the page would have been removed from Translate system before the move. We could then re-mark the page for translation.

It seems with the recent improvements to mass migrating content, the inclusion of history via translate unit pages is sufficient as practically it is what translators see when they select "history" from the translation interface. I am comfortable closing this ticket, but curious if @abi_ feels more could be done on this front.

If I wanted to see who are the authors of a translation, I’d probably press the History tab on the translation itself, not the history links of each and every translation unit – and thus see FuzzyBot as the only author. If I wasn’t a translator, I’d probably not even know about the per-translation unit histories. So I hope translation pages themselves can also have histories migrated, not only units.

If I wanted to see who are the authors of a translation, I’d probably press the History tab on the translation itself, not the history links of each and every translation unit – and thus see FuzzyBot as the only author. If I wasn’t a translator, I’d probably not even know about the per-translation unit histories. So I hope translation pages themselves can also have histories migrated, not only units.

That makes sense. Perhaps it is possible for FuzzyBot to aggregate a list of contributors and use that as a comment for the import/edit.

Couldn’t just the translation pages be imported as-is, just like any other imported page? Translate prevents direct editing of translation pages, but it can make an exception and allow itself to do those direct edits.

In theory fixing this should be as easy as passing WikiExporter::FULL as the second parameter in https://gerrit.wikimedia.org/g/mediawiki/extensions/Translate/+/79074c8fee7bb8f4b59e1902950d97f47a636635/src/MessageGroupProcessing/TranslatableBundleExporter.php#30

But maybe I'm missing something.

I see translationPages being exported by the script, so I am confused why they aren't imported. Is that a bug, @abi_?

It's also especially important to import the full history of the source page, since otherwise the entire content of the page is misattributed to the most recent editor. I just painstakingly cleaned up a bunch of pages where this step was missed on MediaWiki.org.

I see translationPages being exported by the script, so I am confused why they aren't imported. Is that a bug, @abi_?

My guess is that permission restrictions that we have in place to not allow translation pages to be created by users is blocking the creation of the translation page during import.

Change #1018358 had a related patch set uploaded (by Pols12; author: Pols12):

[mediawiki/extensions/Translate@master] TranslatableBundleExporter: export full history

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

I see translationPages being exported by the script, so I am confused why they aren't imported. Is that a bug, @abi_?

My guess is that permission restrictions that we have in place to not allow translation pages to be created by users is blocking the creation of the translation page during import.

Actually, the tags are added after the page is imported, so I would not expect the hook to happen. I think we simply missed to export previous revisions: WikiExporter only export last revision by default.

Change #1018358 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatableBundleExporter: export full history

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