Page MenuHomePhabricator

Avoid flooding recent changes when importing CSV file
Closed, ResolvedPublic2 Estimated Story Points

Description

When running imports for T313051: Mass import translations from CSV file for MSG termbase we noticed that the imports were flooding the recent changes and no easy way to filter.

There are two approaches to solve this problem:

  • Mark the edits as a bot edit.
  • Skip logging each individual message and log the final import. We will have to ensure that we add the file somewhere so users can review what was imported.

Event Timeline

Can copy this implementation from ReplaceText extension:

				if ( $permissionManager->userHasRight( $current_user, 'bot' ) ) {
					$flags |= EDIT_FORCE_BOT;
				}

Change 820131 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] CsvTranslationImporter: Mark translations imported as bot edits

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

Change 820131 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] CsvTranslationImporter: Mark translations imported as bot edits

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

The patch for this has been deployed and tested on Translatewiki.net. Imports made via this script are now marked as bot imports.