Page MenuHomePhabricator

Support wikilinks in Web2Cit citation fields
Open, Needs TriagePublic

Description

I'm forking this from T305574, where @Mvolz mentioned allowing wikilinks in Web2Cit citation fields as a possible reason to support a hierarchy of Web2Cit configuration files:

Another point is that having separate templates for separate wikis would allow wikilinking to pages in the fields (i.e. the publisher, for instance). (Relevant mailing list discussion here: https://lists.wikimedia.org/hyperkitty/list/webtocit@lists.wikimedia.org/thread/HRYDDXA6MLTKBEV477H6FMZ4CBSNVGS4/)

It might be better to use wikidata for this use case - but that is adding yet another part to the translator creation workflow. So instead of "fixed" it'd be "qid", and then the service fetches correct page from wikidata based on the current wiki - that info would have to be included in the request to the service, via the gadget, and the service would have to accept that as input. Maybe a can of worms you don't want to open :).

I'd like to add here some thoughts shared with @Kerry_Raymond via private email:

I generally think that we should avoid wikilinks in Web2Cit field outputs for a variety of reasons:
(...)

  • Alternatively, the language may be specified in the wikilink, as commented in the thread referenced above. For example, [[:en:Queensland Government]] in our example. But that may be problematic as well. For example, the Spanish Wikipedia apparently discourages including links to other Wikipedias. On the other hand, what if there is an article for the Queensland Government in the Spanish Wikipedia? What should go in Web2Cit configuration? [[:en:Queensland Government]]? Or [[:es:Gobierno de Queensland]]?
  • Yet another option would be using the Interlanguage link template. However, that may not be available in all Wikipedias, or the syntax may differ. For example, the template seems to work in the Spanish Wikipedia, but the order of the parameters seems to be different. Anyway, the template documentation explicitly says that it shouldn't be used in citation templates.

To avoid having to deal with this in Web2Cit or Citoid, further elaborating the idea of the interlanguage link template: would it be useful that Wikipedia (mediawiki?) supported an interwiki link that, instead of linking to a Wikidata page (as the [[wikidata:]] interwiki link currently does), links to the article (in the current wiki) sitelinked from the Wikidata item referred to?

For example, such interwiki link (e.g., [[wdsitelink:]]) pointing to Q8508468 (Government of Argentina) would link to the Spanish Wikipedia article "Gobierno de Argentina", if inserted in the Spanish Wikipedia, or to the English Wikipedia article "Government of Argentina", if inserted in the English Wikipedia, both of which are site-linked from the corresponding Wikidata item. Where should the link point to if inserted in, say, the Chinese Wikipedia, given that the Wikidata item is not linked to an article in that Wikipedia?

I haven't found whether this has been proposed before. However, I guess one problem could be that these links would be displayed as "wdsitelink:Q8508468". If one would have to enter something like [[wdsitelink:Q8508468|Gobierno de Argentina]] in the template, then we are back at the beginning :(.

  • Last, including wikilinks in Web2Cit field outputs would discourage using Web2Cit in projects other than Wikipedia, which is one of the goals of the Web2Cit proposal.

@Mvolz's proposal, that of letting Web2Cit resolve QIDs into the corresponding wikilinks or labels (in cases where wikilinks are not supported or not available) would solve this. Users may still use the fixed selection, enter a Wikidata interwiki link (e.g., [[wikidata:Q8508468]]) as config value, and Web2Cit would convert that to a wikilink or label at the end (to avoid ambiguities regarding what eventual transformation steps should do) based on a parameter (e.g., wp=en, wp=es, wp=false) included in the request to the Web2Cit-Server, as Marielle suggested.

I like this in fact. But definitively for later :)