Page MenuHomePhabricator

Translate "no translations" RC filter doesn't actually filter all translations
Closed, ResolvedPublic

Description

Steps to reproduce: Open up RC on mediawiki.org, and notice how 90% of it is translations despite the filter.

The filter only filters out the Translate namespace. Which is important. But the expected behaviour is to filter out the subpages too. e.g. pages like https://www.mediawiki.org/wiki/API:Revisions/fr should not show up.

Event Timeline

But the expected behaviour is to filter out the subpages too

[Consensus needed]. It is expected behavior in so far that it hides one of two edits.

Pginer-WMF moved this task from Backlog to tux on the MediaWiki-extensions-Translate board.

I also expect that neither of the two edits appear. If I wanted to exclude only the one edit, I’d simply use the namespace filter.

Targeting translatable pages with a filter is not easy and efficient. Besides, MediaWiki core doesn't even know the concept of translatable pages. Maybe those could be tagged at save-time, but the recentchanges table itself doesn't have any such fields, so I guess it would need to join a yet another table? Could use some advice here what could be a possible implementation.

Besides, MediaWiki core doesn't even know the concept of translatable pages.

Isn’t this filter provided by the Translate extension?

Targeting translatable pages with a filter is not easy and efficient. […] Maybe those could be tagged at save-time, but the recentchanges table itself doesn't have any such fields, so I guess it would need to join a yet another table?

What about adding an edit tag? I’m not sure if it’s possible to create an edit tag that’s not displayed, as adding a visible tag would make page histories of translated pages (where each and every edit would be tagged) harder to use. If it’s possible, a cheap solution would be to tag the edits made by the extension, and make the filter mean tagged edits + Translations-namespace edits.

Isn’t this filter provided by the Translate extension?

Oops. For some reason I thought it was moved to core with the new interface. Tags could be on option, with the downside of visual noise and not sure if combining tag filtering to a non-tag filter is possible.

with the downside of visual noise

Disabling the tag message (setting it to -) hides the tag, avoiding the visual noise (see user documentation).

and not sure if combining tag filtering to a non-tag filter is possible.

Yes, it’s possible manually, but I thought that Translate could implement this filtering in the “translations” filter. At that level, it’s an SQL query, so everything can be combined.

Change 844566 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/extensions/Translate@master] Add a hidden tag 'translate-rendered-translation' to rendered translations

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

Change 844567 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/extensions/Translate@master] Add a filter to hide rendered page translations

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

Change 844566 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Add hidden tag 'translate-translation-pages' to translation page changes

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

Change 844567 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Add a filter to hide changes to translation pages

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

abi_ subscribed.

A new filter to hide automatic edits to translation pages by the Translate extension is now available on translatewiki.net.

Any new translation page edits will be hidden by this filter.

Thanks @Bawolff for the patch.