Page MenuHomePhabricator

Hardcoded namespace checks
Closed, DeclinedPublic

Description

Currently many parts of the tools have hardcoded namespace checks such as "indexOf( "File:") and Template:

This should be adapted to a general check routine that can recognize both normalized namespaces and localized namespace names. (Provided by wgFormattedNamespaces ).


Version: unspecified
Severity: major

Details

Reference
bz25589

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:23 PM
bzimport set Reference to bz25589.

mdale wrote:

I agree. But this is a bit tricky with cross site requests as each site has their own namespace config that does not necessarily match canonical namespace of the other site. So site A could have 102 -> wikiProject in Spanish while site B could have 102 -> TimedText in a bunch of languages.

So the representation needs to be per api-domain.. which is oky since the authoritative lookup could correspond with api request and most of the lookups could use the local wgFormattedNamespaces var.

Wondering if this is still an issue now that native support for mwEmbed via TMH is in place.

TheDJ, mdale: Is this still an issue?

TheDJ, mdale: Is this still an issue?

mdale wrote:

Not sure. I think the issue can be resolved working, in TMH we use namespaces wherever we can. And the old tool ( mwEmbed ) has been deprecated.