When the content of a test wiki is imported into a new standalone wiki (e.g., the recently created Tulu Wikipedia at tcy.wikipedia.org), links of the form
on the test wiki at Incubator are converted to
on the local wiki. It would be preferable to convert such links "all the way" to
so as to avoid "redundant pipes" (as in the 2nd example above), which may confuse new editors of the wiki into thinking that such pipes are always necessary.
I have gone through all the main-namespace pages of the Adyghe (ady:) and Tulu (tcy:) Wikipedias and simplified such redundantly piped links. A bot could do the same on the other (larger) recently imported wikis, but it would be great if such conversions were performed automatically as part of the importing process. Presumably this requires changes to some MediaWiki code somewhere -- hence this task.
Note that the required "substitutions" will have to respect the target wiki's $wgCapitalLinks setting, and if necessary be case-insensitive on the first character of the page title but case-sensitive on subsequent characters. The code snippet found in the following comment can probably be adapted to accomplish this:
(Please retag if this is not relevant to the "MediaWiki-Export-or-Import" project.)