Page MenuHomePhabricator

Consider enabling maps tracking category for Main NS only
Closed, DeclinedPublic


Some users have been asking to make maps auto-tracking category to be only enabled for the Main namespace. On the other hand, for sites like Wikidata it makes no sense, as maps are never inserted there. Ideas? We could enable it for all EVEN (non-talk) namespaces?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

What we can do is to vary them by namespace in the tracking category message itself:

{{#switch:{{NAMESPACE}}|=Articles|File=Files|#default=Pages}} witch maps

discovery-stats already takes this into account and uses main namespace when there's a variation. That'll introduce a dependency on ParserFunctions though.

@MaxSem, are you suggesting we change the kartographer-tracking-category message from Pages with maps to what you wrote above? Or to tell wikis that want this to change it? Also, {{NAMESPACE}} is localized, so maybe we should use something like this (taken from MediaWiki:Broken-file-category):

{{#ifeq:{{NAMESPACE}}|{{ns:0}}|Articles with missing files|{{#ifeq:{{NAMESPACE}}|{{ns:10}}|Templates with missing files|Pages with missing files}}}}

Either way, these messages are localized, right?

MaxSem moved this task from To-do to In progress on the Maps-Sprint board.

For commons, it might be interesting t ohave "pages" and "files". Someone might also consider "categories". IMO, lets create default articles (ns:0) and pages (all other) , and for commons, we can customize it to articles, files, and pages. It might be good to have categories too.

Change 318029 had a related patch set uploaded (by MaxSem):
Make Kartographer depend on ParserFunctions

Change 318031 had a related patch set uploaded (by MaxSem):
Differentiate tracking categories by namespace

Change 318032 had a related patch set uploaded (by MaxSem):
Add ParserFunctions as a dependency for Kartographer

Change 318032 merged by jenkins-bot:
[Kartographer] Add ParserFunctions as a dependency

Change 318031 merged by jenkins-bot:
Differentiate tracking categories by namespace

Adding #switch to a default message was a bad idea. It's fine on Commons (as it has been added as a dependency), but it will fail on any third party site which has no ParserFunctions – the dependency works only on WMF sites. Commons' MediaWiki namespace should be used for such customization instead.

It fails gracefully for third parties. We can't really customize this message on every one of 898 WMF wikis by hand.

But do we need to customize this message on all WMF wikis? I think only on the largest ones – sites with a few thousand articles usually won't have more than a few dozens of maps in all namespaces, so it's not worth maintaining two or three categories for them (they should be created locally in order to avoid red category links). And what is the graceful fall on third parties? I thought it puts them in Category:{{#switch:{{NAMESPACE}}|{{ns:File}}=Files|#default=Pages}} with maps.

{{#switch:{{NAMESPACE}}|{{ns:File}}=Files|#default=Pages}} with maps is not a valid page title, so no categorization will happen.

And that is, I think, not the desired effect. I still don’t know why would all 898 WMF wikis, or at least the majority of them, need more categories. And, of course, this change has effect only on English language wikis (and those which haven’t localized it yet), all the other languages have to translate it, although vast majority of them doesn’t need it.

Change 318029 abandoned by MaxSem:
Make Kartographer depend on ParserFunctions

N.B. It has been reverted in a0156c252f2e, but the commit message didn't contain the bug ID so @gerritbot couldn't notify us about it (and neither did the author, which I would have appreciated).

Deskana added a subscriber: Deskana.

The use case here seems to be to let users find pages that have maps on them. Given the complex nature of the syntax, all such maps are likely to be contained in templates which will then have categories in them. Accordingly, I don't think that this is strictly necessary, so I am declining.