Page MenuHomePhabricator

Make banner translations get deleted when banners are removed automatically
Open, LowPublic

Description

Currently when a banner is 'removed' through the interface banner translations are not and end up being left behind as orphans. Preferred action would be to have those removed with the auto removal script.


Version: unspecified
Severity: normal

Details

Reference
bz28903

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:26 PM
bzimport set Reference to bz28903.
bzimport added a subscriber: Unknown Object (MLST).

The translated messages live as 'pages' in the MediaWiki namespace. For example, the message 'share' for the banner '2011MobileReaders' lives at:
http://meta.wikimedia.org/wiki/MediaWiki:Centralnotice-2011MobileReaders-share

To delete these messages, you'll want to delete the pages. I'm sure there's some core function for doing this, but I don't know what it is off the top of my head.

The different language versions (subpages) of the messages need to be deleted as well. For example:
http://meta.wikimedia.org/wiki/MediaWiki:Centralnotice-2011MobileReaders-share/de

I think there's a function for finding all subpages of a page, but I don't remember it. A lot of good I am!

Looks like WikiPage->doDeleteArticle() might be useful.

jpostlethwaite wrote:

Thanks, it looks like everything I need to get started.

bugs wrote:

(In reply to comment #0)

Currently when a banner is 'removed' through the interface banner translations
are not and end up being left behind as orphans. Preferred action would be to
have those removed with the auto removal script.

We might want this to be a checkbox instead of doing it by default. That's kinda like how we deal with moving subpages and other things like that.

You might not always want to delete all of the pages, so we shouldn't assume that we always do.

I can't think of any case where we would actually want to delete the banner, but not the messages. Can you give me an example? It seem like if we had a banner that had lots of useful translations in it, like the 'shared' banner, we wouldn't want to delete the banner (as it would then be very hard to find the translations).

yeah I have to agree with Kaldari. Essentially translations/messages without a banner are orphaned pages with no place to change them in the interface. I think they would be better off always linked with a banner and deleted if the banner is deleted.

Pcoombe lowered the priority of this task from Medium to Low.Jan 23 2015, 6:54 PM
Pcoombe added a project: I18n.
Pcoombe set Security to None.