Page MenuHomePhabricator

Parser function - unidirectional inclusion of interwiki list
Closed, DeclinedPublic

Description

The basic function of interwiki connection is reciprocal, i.e. if en:page links to fr:page, then fr:page necessarily links back to the en:page.

The reality of Wikimedia Commons project is that the Commons category page links:

  • primarily to Wikipedia category pages, if they exist
  • alternatively to Wikipedia article pages (for the languages which have not the category page for the item)
  • possibly, links to "definition" article can be combined (alternated) with links to "list" article (for the languages which have not the definition article or in the case that the definition article doesn't exist at all - e.g. the Commons category "Writers from Bulgary" can link to the item "List of Bulgarian writers" because there exists no definition article "Bulgarian writer").

Of course, the most systematic solution would be to associate category links and article links to identic item together and to use the property "list of" (its inversion) with inclusion functions to associate the list articles. However, such solutions seem to be very unobtainable for now.

However, some simple, easy and universal tool can help. I would welcome a parser function (something like http://tools.wmflabs.org/commonsinterwiki/cgi-bin/main.py/?id=Q5551050) which would include (generate and display) the interwiki list in wiki syntax unidirectionally, without recording at the Wikidata item page. By default, such interwiki links should work as local links (i.e. the iw links from Wikidata should be prioritized) but some parameter should enable to turn the priority over. Maybe, the function can find also other utilization.

E.g., the Commons page "Category:Berlin" is associated with Q4579913 (Category:Berlin) item page of Wikidata and additionaly (using {{On Wikidata}} template with the proposed parser function], the Commons page can include (display) interwiki links to Q64 (Berlin) for the language versions which have not pages associated with Q4579913.


Version: unspecified
Severity: normal

Details

Reference
bz58861

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:19 AM
bzimport set Reference to bz58861.
bzimport added a subscriber: Unknown Object (MLST).

I am sorry but I don't understand the proposal. Can you say what the wikitext of the Berlin page you are referring to would look like?

When I request a function which would include (generate and display) the interwiki list in wiki syntax unidirectionally, without recording at the Wikidata item page, I request which is described. (An example of such extarnal tool was added for the case that somebody dont understand.) Didn't you understand what is "to display the interwiki list in wiki syntax unidirectionally, without recording at the Wikidata item page"? Didn't you understand what means "interwiki list in wiki syntax"? Didn't you understand "unidirectionally, without recording at the Wikidata item page"? Didn't you understand the word "function"? Or the word "include", even though is it explained by the words "generate and display"?

When I explained that the function is needed because Wikidata uses a couple of item pages for identic item (fhe first for article links, the second for category links) but don't allow to link both item pages from one Commons category page of the item, I explained that what was described. When I explained on the example that Commons page "Category:Berlin" is associated with Q4579913 (Category:Berlin) item page of Wikidata and asked for the function which would enable to display interwiki links to articles from the item page Q64 (Berlin) for the language versions which have not category pages associated with Q4579913, I requested which is several times described and explained on the example.

Should I explain what interwiki links in wiki syntax are? Links like [[xx:Berlin]]. Didn't you understand the words "interwiki links for the language versions which have not pages associated with Q4579913."? That means interwiki links to the article Berlin for such language versions of Wikipedia which have not the category Berlin. I am sorry but I don't understand what can be not understandable on that.

Maybe, some example of an item which have many Wikipedia articles in many various languages but only one or two categories would be more illustrative, though the principle would be quite identic.

Btw., when i noted that "the function can find also other utilization", I meant what I wrote. Is this sentence understandable for you?

sju-w: Please directly answer comment 1 by providing a clear example, instead of asking eight counterquestions and writing a long comment. Thank you for your understanding.

(In reply to comment #3)

sju-w: Please directly answer comment 1 by providing a clear example, instead
of asking eight counterquestions and writing a long comment. Thank you for
your
understanding.

If I'm not wrong, he means to have a parser function (kind of like bug 47930) to generate a list of interwiki links with a wikidata id, such as {{#iw:Q5551050}} generating "[[an:Categoría:Universo]]\n[[ar:تصنيف:فضاء كوني]]\n[[bs:Kategorija:Univerzum]]\n[[ckb:پۆل:گەردوون]]\n"...

(In reply to comment #4)
Exactly so, thank you. It seems to be a bit similar to Bug 47930 (47930 comment mentions data of statements, this bug 58861 asks interwiki links).

I hope, the reasons are intelligible too because we should report primarily bugs, not solutions. There are more possible solutions. If Wikikdata would enable to link articles and categories with identic item page, the requested function would be not so urgently necessary.

(In reply to comment #3)
When a question is clear, I can give clear answer. I din't believe that the asker doesn't understand what "interwiki list in wiki syntax" is, that's why I had doubts what she asks really, especially when i linked an external tool with such a function as an example already. I was not able to give a better example (about the function, not about Berlin).

@zhuyifei1999: Thank you! That is exactly what I was asking for.

@sju-w: I do understand interwiki links very well but your bug reports are hard to understand.

We'll not be implementing a parser function for this. It can be solved with a Lua call once bug 47930 is closed. (We also can't make a parser function for it if we wanted to without that bug being closed.)