wiki-monkey icon indicating copy to clipboard operation
wiki-monkey copied to clipboard

Recent changes filter improvement (redirections)

Open Kycko opened this issue 8 years ago • 2 comments

Hi again ^_^ I doesn't know how your code work, but it will be great if you add next if:

  • if a particular page has no language tag and it is a redirection to a page with language tag then show it under corresponding header

e.g. show USB-накопители in ru section. Thanks

Kycko avatar Jul 22 '17 13:07 Kycko

Hi, it's a good idea, but it would practically require to completely rewrite the plugin, because right now I'm simply reordering the list on the client, while to implement this I should first collect all the redirects in the list, then separately query the server to find their targets (which aren't shown in the RecentChanges), and finally filter the list using their targets.

I have some other reasons to rewrite the RecentChanges filter, e.g. displaying the entries in a table with some added functionality, so I'll keep this request, and probably eventually implement it as optional.

For completeness' sake, my secret i18n plan has always also included to enforce using a language tag on redirects too: it's not currently enforced, but the current guidelines don't forbid adding language tags to redirects, so you can consider adding them to the Russian redirects for forward compatibility :)

kynikos avatar Jul 22 '17 16:07 kynikos

The funny thing about MediaWiki is that you can't list all redirecting pages and request their targets to be added to the query. You can only list the redirect targets and have the source pages added as their properties, such as this. Then you need to manually query all namespaces to get everything you need and transform the data into some usable form. I think that I still haven't wrapped my head around this properly... I have some old notes on my wiki page and in the code.

If these fancy things start to slow down, we could try to get through the cross-site request to localhost and have wiki-scripts serve its (future) local database/cache :wink:

lahwaacz avatar Aug 11 '17 19:08 lahwaacz