Introduce WikiLinkPrefixer

Authored by thiemowmde on May 6 2019, 2:22 PM.


Introduce WikiLinkPrefixer

Not all interwiki prefixes need the extra colon, only interlanguage
links do. At the moment this code does not care about this difference.
It does not even try to validate the given prefix. Therefor it must add
the colon every time. It doesn't hurt to do this, even if not needed.

Note this is missing code to find the matching interwiki prefix that
points from the target back to the source wiki. Code to do this already
exists, see InterwikiTablePrefixLookup, currently only used in

Bug: T198584
Change-Id: Iac67a9256da5cc60325918ead38cdcdc54f66b8b