Template talk:RelatedWikipedia

Latest comment: 5 years ago by Traveler100 in topic Please help migrate related site links

WikiProjects tracking edit

Aim is to remove the {{RelatedWikipedia}}, {{RelatedCommons}} and {{RelatedCommonsCat}} templates when they reference the same as show via wikidata in the In other projects sidebar (directly or via redirect in the other project). If there is no direct equivalent page but a reference is desired then the rel=y parameter can be used in RelatedWikipedia and RelatedCommonsCat which will create an info box at the bottom of the page. (Once clean-up complete the extra parameter can be made default and removed).

  Refresh

Current tracking categories edit

No action required, will be emptied by bot edit

No action required, will be what remains edit

Possible investigation and areas for expansion edit

Needs attention edit

Checks edit

Tasks edit

  • remove underscore, either edit article to change underscore for space or make template smarter to not differentiate. Done, template upldated.
  • Redirects. Find method to identify page references that are redirects.
  • Design a better format for link boxes of RelatedWikipedia and RelatedCommonsCat.

We need to remove all the RelatedSites links edit

Swept in from the pub

Back in the WikiTravel days, we used an extension called RelatedSites to create interwiki links to Commons and Wikipedia in the sidebar. We now have these links created semi-automatically by Wikidata. See, for example, the sidebar at United States. It has a sidebar section called "In other projects" which links to the Commons category, the Wikipedia article and various other wikis. It then has a redundant "Related sites" section which again links to the Commons category and the Wikipedia article. The first section is created automatically via the Wikidata site links. The second section is created by links that are hard-coded into the WikiText of the Wikivoyage United States page. There is no reason for us to have both and the WMF would love to stop maintaining the RelatedSites extension and remove it. Before they can do that though, we need to remove all the hard-coded links, otherwise they will turn into regular red-links in the articles. Is anyone interested in creating a bot to do this? Are there any concerns with doing this? Kaldari (talk) 20:49, 18 January 2018 (UTC)Reply

The Wikidata links only work well when there is a 1:1 relationship between WV and WP articles - which is most but not all articles. For instance see Lynton and Lynmouth. I think that we first need to consider how handle links in these cases - maybe a text box in "Go next", which could allow more than one link in such cases. AlasdairW (talk) 21:09, 18 January 2018 (UTC)Reply
That sounds like a good idea (and how most other projects handle such cases). Kaldari (talk) 21:53, 18 January 2018 (UTC)Reply
Is there a way to list pages using the relatedsites option like [[Wikipedia:United States of America]]? Any chance of generating a category when used so we can check against wikidata entries and Category:Articles without Wikipedia links (via Wikidata). --Traveler100 (talk) 21:59, 18 January 2018 (UTC)Reply
@Traveler100: Right now, the only method is to search (example), but that probably isn't very useful for bots. I'll create a Phabricator task to add such pages to maintenance categories (which will require a bit of hackery since these are just links rather than templates). Kaldari (talk) 22:11, 18 January 2018 (UTC)Reply
Useful search syntax, thanks. Thinking about this more I have another idea. We could replace the link entry in all articles with a template which has the same name reference to Wikipedia. The template however checks via Wikidata if the Other Project link is the same, if so does not create a related link, if not it creates the related sites link or an inline see also link. --Traveler100 (talk) 07:22, 19 January 2018 (UTC)Reply
In any case, I don't think we can completely eliminate the need to have extensions which the ability to place links into the sidebar. We used to have three different extensions placing different sidebar links, mw:extension:RelatedArticles, mw:extension:RelatedSites and mw:extension:Insider. The related articles extension was replaced with another extension (with, confusingly, the same name) which places the links at the bottom of the page. Wikidata is a partial replacement for RelatedSites, but only a partial replacement - as it only handles the case wher'e there's a 1:1 correspondence between Wikivoyage and another project. Insider (Wikivoyage:Docents) has no replacement. As such, the claims that WMF "won't have to maintain this anymore" are badly premature. If anything, I would've liked to see an extension created that replaces all three by allowing the tag to contain the more general "add sidebar link to section X with title Y and link target Z" instead of arbitrarily abandoning all page-specific sidebar links. K7L (talk) 14:19, 19 January 2018 (UTC)Reply
How common is it that Wikivoyage pages don't have correspondence on other projects? I imagine that would be rare. It's important to understand that there is a real cost to keeping the RelatedSites extension maintained. Even if no features are added and no bugs are fixed, the code still has to be kept up to date with newer versions of MediaWiki and PHP, sometimes requiring significant refactoring (for example, the recent shift to extension registration). Because the WMF is such a small organization, that means not having as much time and resources to work on other projects that will be of much more benefit to Wikivoyage, like maps. Kaldari (talk) 22:46, 19 January 2018 (UTC)Reply
As a first step how about using {{RelatedWikipedia}}. The [[Wikipedia:pagename]] could be replaced by {{RelatedWikipedia|pagename}} in all articles. This template is currently set to do the same thing, but also creates some administration categories we can use to check page links. It can then later be changed to use different method of showing the link and not duplicating the link if the same as the Other projects link in the sidebar. --Traveler100 (talk) 21:13, 19 January 2018 (UTC)Reply
That's a really nice idea! Should we do the same for Commons links? Kaldari (talk) 22:50, 19 January 2018 (UTC)Reply
Yes can set that up too. Can run a bot to make the change but would like some input from other regular contributors before doing so. This will edit most articles on the site but initially will not change anything about how the page looks or works. --Traveler100 (talk) 07:15, 20 January 2018 (UTC)Reply
Anyone know what the #invoke:Wikidata syntax is to retrieve Commons link for a page? Sometimes it is under Other Sites commons, sometimes under P373 (Commons Category).--Traveler100 (talk) 07:46, 20 January 2018 (UTC)Reply
Think will have different templates for referencing a Commons page and an Commons category. {{RelatedCommons}} and {{RelatedCommonsCat}}. have not work out the correct syntax yet to get commons page, but have written bot to make change if/when decide to go with this. --Traveler100 (talk) 10:53, 20 January 2018 (UTC)Reply
The Commons category is almost (but not quite always) much better to link to than the Commons page, as it tends to be where all of the relevant photos are (or at least are linked from, in subcategories). -- Ikan Kekek (talk) 13:06, 20 January 2018 (UTC)Reply
Agree but first step would not change what decision someone has made. It will however create categories so you can easily find and go through the articles referencing the Commons page rather than the category. --Traveler100 (talk) 13:31, 20 January 2018 (UTC)Reply
OK worked out the code for Commons page from Wikidata. Templates and bot ready to go if other think we should change the syntax (but at this point no change to page or function). --Traveler100 (talk) 17:14, 20 January 2018 (UTC)Reply
There are just under 7000 pages with a Dmoz link, should I get the bot to remove it from all articles?
Yes, please. I tried to save DMOZ but it's a dead issue. :/ —Justin (koavf)TCM 07:01, 21 January 2018 (UTC)Reply
Agree, there were some tentative efforts to save DMOZ, but I think it's best to remove those links now. Kaldari (talk) 00:16, 23 January 2018 (UTC)Reply

First step - test sample edit

Updated the pages and categories in Category:North America. Please check, if no issues found will in later (say 12 hours) start the bot on the rest of the site.

First interesting result is the categories are showing links that are either redirect pages or no longer existing categories. --Traveler100 (talk) 19:41, 21 January 2018 (UTC)Reply

A large number of articles with Wikipedia links different to Wikidata are due to the moving of Wikipedia pages so are pointing to redirects. I am trying to find a programmatic way of checking this but cannot get Module:Redirect to work across projects. See Template:RelatedWikipedia/sandbox. Anyone with an idea? --Traveler100 (talk) 19:55, 22 January 2018 (UTC)Reply
@Traveler100: That might be tricky to solve. Any idea how common that is? Would it be feasible to just put those cases into a special category for a human to review and make a decision? Kaldari (talk) 00:19, 23 January 2018 (UTC)Reply
I would say about 25% of Wikipedia sidebar references do not match the Wikidata name. Of those most, maybe 90% but that is what is difficult to check, are just a different because of a move/redirect. The rest are reference to close but not exact articles on Wikipedia. I am splitting those that are difference to the wikidata name but differentiating within that group I have not found a way yet. --Traveler100 (talk) 06:50, 23 January 2018 (UTC)Reply
It looks like there are also some weird links like Special:Search/Alamosa, Colorado. I assume those should either be changed to a category or removed. Kaldari (talk) 20:04, 23 January 2018 (UTC)Reply
First step done. Related sites controlled by templates. Now need to check and clean up the data and look at changing how handled and displayed. --Traveler100 (talk) 23:32, 25 January 2018 (UTC)Reply

Remove RelatedWikipedia edit

What is the purpose of {{RelatedWikipedia}}? We already have "In other projects" followed immediately by "Related sites". Just remove related sites entirely, since we are not linking DMOZ or Citizendium and Commons and Wikipedia are linked as other projects... What am I missing here? —Justin (koavf)TCM 07:32, 23 January 2018 (UTC)Reply

The long term aim is to get rid of the Wikipedia link in articles. This template is the first step. There are a number of articles that do not have a direct equivalent WIkipedia page but have a [[Wikipedia:relatedpagename]] link to a similar and useful page. Simply removing the link from all articles would remove that information. Swapping the link to the template allows us first to see how many of these there are. Also with a very minor change to the template can automatically removed "Related sites" entries that are exactly the same as "In other sites" entries. The current running update chances nothing in the pages but set up a template that allows for quick changes. --Traveler100 (talk) 08:06, 23 January 2018 (UTC)Reply
Thanks. This is a perfect thing for d: in the future. It's possible to have a property like "Wikivoyage fallback" and define where users should be pointed on en.wp in case there isn't a single one-to-one corresponding article. —Justin (koavf)TCM 08:16, 23 January 2018 (UTC)Reply

Next step edit

@Traveler100, Koavf, AlasdairW: Now we need to get the Wikivoyage community to empty out all of these maintenance categories by reviewing and syncing the Wikidata entries (before the RelatedSites extension is turned off):

Any idea how we can drum up volunteers to do that? Kaldari (talk) 21:34, 6 February 2018 (UTC)Reply

FYI, RelatedSites may be turned off fairly soon. If you want to comment on this, go to mw:Talk:Code stewardship reviews/Feedback solicitation/RelatedSites. Kaldari (talk) 21:39, 6 February 2018 (UTC)Reply
Maybe at d:Wikidata:Project chat? I mean, I can help too. —Justin (koavf)TCM 21:39, 6 February 2018 (UTC)Reply
Well we could reschedule Cotm activities. --Traveler100 (talk) 22:01, 6 February 2018 (UTC)Reply
Any idea how to pragmatically identify redirects on another project? --Traveler100 (talk) 22:01, 6 February 2018 (UTC)Reply
If the RelatedSites gets turned off before all the categories get cleaned up can easily change the template to show Wikipedia and Commons links in a box at the bottom of pages. --Traveler100 (talk) 22:05, 6 February 2018 (UTC)Reply
The wikitext editor needs to be altered, as at the moment it has Sidebar Templates: which give the two templates which we are no longer using. Either the new related templates should be substituted or these two should just be removed. Unfortunately I don't know anything about how this can be done.
I went ahead and removed the templates from the editor (after no one responded to my comments on the talk page). Kaldari (talk) 16:13, 11 February 2018 (UTC)Reply
I think that we also need to get others involved in the discussion about what form the replacement links should take, then the related templates can be altered to achieve this. And thank you to Traveler100 for all the hard work on the new templates. AlasdairW (talk) 22:15, 6 February 2018 (UTC)Reply

So there are a number of pages with related Wikipedia links that are to article that are not direct equivalents but of interest. Please take a look at this as a method of handling it. Removed need for Related on sidebar and provides a method of marking checked articles. --Traveler100 (talk) 15:02, 18 March 2018 (UTC)Reply

Please help migrate related site links edit

Swept in from the pub

The RelatedSites extension (which creates the links in the "Related sites" sidebar section) will be disabled sometime in the next few months. In most cases, this won't cause any problems since these links are now automatically created by the Wikibase client extension (under the "In other projects" sidebar section). For example, on the article Africa (permalink in case someone fixes it), the links under "Related sites" are repeated under "In other projects" and are exactly the same links. In some cases, however, these links differ. There can be many causes of this: one link is more up to date (e.g. reflecting a page move on Wikipedia); one link is wrong (e.g. linking to a disambiguation page instead of the exact topic); one link is more specific or general (e.g. linking to a city instead of a region); two Wikidata items need to be merged, etc. Please help to resolve these difference before the extension is disabled. Here are the pages that need to be fixed:

If the link in the "In other projects" section is the better link, simply remove the {{RelatedWikipedia}}, {{RelatedCommons}}, or {{RelatedCommonsCat}} template from the page. If the link in the "Related sites" section is the better link, please update the data in Wikidata to match it and then remove the template from the Wikivoyage page. If you have questions, please ping me or Traveler100. Thanks! Ryan Kaldari (WMF) (talk) 18:47, 9 April 2018 (UTC)Reply

Unfortunately there are some special cases which I don't think Wikidata can handle. For example both Rail travel in Canada and Across Canada by train use {{RelatedWikipedia}} to link to w:Rail transport in Canada. I understand that the Wikidata page can only take one Wikivoyage link. I think that we should look at how to handle these (and the cases where the two links are different).
Maybe the related templates could become a text box in "Go next", like the WP template Wikivoyage that is used to link in the other direction. I would also like this to allow for multiple WP links (max 5?), but I am happy to back down on this if it is a step too far for some. AlasdairW (talk) 23:06, 9 April 2018 (UTC)Reply
Was thinking along similar lines. In the sandbox of the related template there is a version that makes the Wikipedia a reference box if it is not the same as that on Wikidata. --Traveler100 (talk) 06:01, 10 April 2018 (UTC)Reply
{{RelatedWikipedia}} updated, will not display the Wikipedia link in the Related Sites section of the side bar if it is identical to the In other projects name. If the parameter rel=y is added the sidebar entry will be moved to an info box at the bottom of the page. --Traveler100 (talk) 12:24, 27 April 2018 (UTC)Reply
See tasks for May Wikivoyage:Collaboration of the month. --Traveler100 (talk) 07:38, 1 May 2018 (UTC)Reply
I processed 10 articles from the second category: Eight were redirects and thus redundant, while two were erroneous. This is a small sample but it seems to indicate that a mass removal might not be such a bad idea for this category. Cheers! Syced (talk) 05:50, 8 May 2018 (UTC)Reply

  Done all main-space articles have been fixed, still a few user pages and project pages using RelatedSites. --Traveler100 (talk) 14:44, 27 May 2018 (UTC)Reply

Return to "RelatedWikipedia" page.