Template talk:RelatedWikipedia

From Wikivoyage
Jump to: navigation, search

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).

Gnome-colors-view-refresh.svg 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)

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)
That sounds like a good idea (and how most other projects handle such cases). Kaldari (talk) 21:53, 18 January 2018 (UTC)
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)
@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)
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)
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)
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)
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)
That's a really nice idea! Should we do the same for Commons links? Kaldari (talk) 22:50, 19 January 2018 (UTC)
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)
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)
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)
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)
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)
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)
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)
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)

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)

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)
@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)
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)
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)
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)

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)

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)
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)

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)

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)
Maybe at d:Wikidata:Project chat? I mean, I can help too. —Justin (koavf)TCM 21:39, 6 February 2018 (UTC)
Well we could reschedule Cotm activities. --Traveler100 (talk) 22:01, 6 February 2018 (UTC)
Any idea how to pragmatically identify redirects on another project? --Traveler100 (talk) 22:01, 6 February 2018 (UTC)
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)
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)
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)
  • @Kaldari: I changed your comment to have auto-updating numbers. —Justin (koavf)TCM 08:52, 11 February 2018 (UTC)
  • @Traveler100, Koavf, AlasdairW: Looks like no one is migrating the links. Any chance we could start a community drive to fix these? Kaldari (talk) 17:31, 6 March 2018 (UTC)
    • @Kaldari: For what it's worth, I did take a look at a few of these awhile ago. What do you propose is the solution to (e.g.) Beech_Forests_of_Europe? —Justin (koavf)TCM 08:39, 7 March 2018 (UTC)
      • @Koavf: For that one, I would just remove the RelatedWikipedia link (since it's pointing to an outdated redirect). Kaldari (talk) 16:44, 7 March 2018 (UTC)
    • The redirects, generally to the correct page, are a problem. There are a large number of them and I cannot see an automatic method of identifying, checking and/or correcting them. --Traveler100 (talk) 10:03, 7 March 2018 (UTC)
      • @Traveler100: My suggestion would be: If the page is in Category:Articles with Wikipedia links different to Wikidata and the RelatedWikipedia link points to a redirect, just remove the RelatedWikipedia link, under the assumption that the Wikidata link is more up to date. This might not be 100% accurate, but it will be right most of the time. Then we can manually fix the ones that are left. Kaldari (talk) 16:44, 7 March 2018 (UTC)
        • But I cannot see a method in template or with AWB script to identify a redirect in a sister project link. --Traveler100 (talk) 22:30, 7 March 2018 (UTC)
          • Yeah, I think you would have to write a proper bot for that (that used the MediaWiki API to check for redirects). Kaldari (talk) 19:05, 9 March 2018 (UTC)

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)