In order to efficiently clean up removed languages we should have a maintenance script that can remove the Terms from the current revision of the Entity.
Acceptance Criteria
- It should take the language and entity ids to be removed as a parameter
- After running the given entities has no terms in that language in their current revision
- It should not change history (I.e. remove that language from old revisions)
- It should leave a sensible revision comment for the change
Hints
For a maintenance script that makes changes to entities you could look at extensions/Wikibase/repo/maintenance/changePropertyDataType.php