Page MenuHomePhabricator

Link modification during import process for new wikis should simplify redundantly piped links
Closed, InvalidPublic

Description

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


[[Wp/tcy/Page|page]]

on the test wiki at Incubator are converted to


[[Page|page]]

on the local wiki. It would be preferable to convert such links "all the way" to


[[page]]

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:
https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:User_scripts&diff=736331593&oldid=736254365

(Please retag if this is not relevant to the "MediaWiki-Export-or-Import" project.)

Event Timeline

This link-stripping functionality isn't in MediaWiki core. Maybe it's in the Incubator extension?

This functionality is something that we do manually when we export the pages from the Wikimedia Incubator. Have a look at our handbook on the steps that we take when a new wiki is created.

There is no code that we can change here, except that this should be taken into consideration when we write functionality for automatically fixing links when exporting from the Incubator to newly-created wikis.

OK, well, I've already talked to both of the current "new wiki importers" about this issue, so I guess this task can be closed.

Closing as per last comment.