Page MenuHomePhabricator

Allow deletion of languages during export that are under a threshold
Closed, ResolvedPublicFeature


Sometimes languages go unmaintained so long it begs the question is it of any use for the users of the software. We could optionally start deleting languages that go below some threshold.


There is a knob for removal threshold, which is configurable per project. It defaults to 0%, meaning files without translations are deleted.

Event Timeline

Change 656619 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] ExportTranslationsMaintenanceScript: Implement removal threshold

Nikerabbit changed the subtype of this task from "Task" to "Feature Request".Jan 19 2021, 7:24 AM

Change 656619 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] ExportTranslationsMaintenanceScript: Implement removal threshold

Nikerabbit added a subscriber: Raymond.

While testing I noticed an edge case which I did not consider:

  • the deletion threshold defaults to 0 if not specified
  • fuzzy translations are not counted as translated.

This means that some files will get deleted even though deletion threshold is not specified:

  • if the file is so out of date that it only contains keys which no longer exist
  • if the file only contains fuzzy translations
  • if the file did not contain keys in the first place (I suppose this could only happen if manually created in the first place)

This behavior, while not obvious if you don't know what's going on, seems reasonable to me.

FYI @Raymond

Because this started working immediately for files with no translation (aka under/at removal threshold of zero 0), we fixed T159122: Consider translated optional messages towards meeting the export threshold as well to avoid deleting existing translation in some edge cases.

Communicating this setting to projects and asking them if they want to start using this feature is left for later.