Page MenuHomePhabricator

Introduce a "project/farm/host/provider prefix lookup", for example, current "wikipedia:xxx:xxx:" for Wikimedia, "fandom:w:c:xxx:" for Fandom, "miraheze:mh:xxx:" for Miraheze
Open, Needs TriagePublic

Description

Introduce a "project/farm/host/provider prefix lookup", for example, current "wikipedia:xxx:xxx:" for Wikimedia, "fandom:w:c:xxx:" for Fandom, "miraheze:mh:xxx:" for Miraheze

Examples:

  • "wikipedia:xxx:xxx:" for Wikimedia: Writing "[[wikipedia:wikisource:zh:" should directly give "https://zh.wikisource.org/wiki/" instead of "https://en.wikipedia.org/wiki/wikisource:zh:"
  • "fandom:w:c:xxx:" for Fandom: Writing "[[w:c:zh.community:" should directly give "https://community.fandom.com/zh/wiki/" instead of "https://community.fandom.com/wiki/w:c:zh.community:"
  • "miraheze:mh:xxx:" for Miraheze: Writing "[[mh:dev:" should directly give "https://dev.miraheze.org/wiki/" instead of "https://meta.miraheze.org/wiki/mh:dev:"

Maybe we need some "project/farm/host/provider" API?

Event Timeline

Restricted Application added subscribers: Reception123, Stang. · View Herald Transcript

How would that work? Third-party wikis probably won't want to bother maintaining an up-to-date list of all Wikimedia wikis. (For that matter, we probably don't want to bother maintaining an up-to-date list of all Fandom wikis either.)

Also what problems would it solve? There would be a minor performance gain when navigating those links (it'd avoid two extra redirects), but I doubt that justifies the complexity.

This is not meant to query "there is an actual site" but "knowing how to parse it in the format".

https://meta.miraheze.org/wiki/Special:Interwiki#interwikidispatchertable

fandom   https://$2.fandom.com/wiki/$1
         https://$2.fandom.com/$3/wiki/$1

miraheze https://$2.miraheze.org/wiki/$1