Huji edited projects, added Wikidata, MediaWiki-Interwiki; removed Pywikibot.
Huji added a comment.


  Here is my analysis of the issue:
  
  The `langlinks()` method of the `Page` class simply calls the 
`pagelanglinks()` of the `Site` class, which is defined in _generators.py 
<https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/site/_generators.py$703>.
 Notably, docstring of `pagelanglinks()` suggests that it uses API:Langlinks 
<https://www.mediawiki.org/wiki/API:Langlinks> and when I call that API, I get 
the incorrect answer: 
https://en.wikipedia.org/w/api.php?action=query&prop=langlinks&titles=Category:Companies%20based%20in%20Edmonton&redirects=
  
    {
        "batchcomplete": "",
        "query": {
            "pages": {
                "6951033": {
                    "pageid": 6951033,
                    "ns": 14,
                    "title": "Category:Companies based in Edmonton",
                    "langlinks": [
                        {
                            "lang": "ar",
                            "*": 
"\u062a\u0635\u0646\u064a\u0641:\u0634\u0631\u0643\u0627\u062a 
\u0645\u0642\u0631\u0647\u0627 \u0641\u064a 
\u0625\u062f\u0645\u0648\u0646\u062a\u0648\u0646"
                        },
                        {
                            "lang": "de",
                            "*": "Kategorie:Unternehmen (Edmonton)"
                        },
                        {
                            "lang": "fa",
                            "*": 
"\u0631\u062f\u0647:\u0634\u0631\u06a9\u062a\u200c\u0647\u0627\u06cc 
\u0645\u0633\u062a\u0642\u0631 \u062f\u0631 
\u0627\u062f\u0645\u0646\u062a\u0646"
                        }
                    ]
                }
            }
        }
    }
  
  (Note that 
"\u0631\u062f\u0647:\u0634\u0631\u06a9\u062a\u200c\u0647\u0627\u06cc 
\u0645\u0633\u062a\u0642\u0631 \u062f\u0631 
\u0627\u062f\u0645\u0646\u062a\u0646" decodes to "رده:شرکت‌های مستقر در ادمنتن")
  
  In other words, Pywikibot is not doing anything wrong; it is the API response 
from MediaWiki that doesn't match the Wikidata item.
  
  Changing tags.

TASK DETAIL
  https://phabricator.wikimedia.org/T297238

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Huji
Cc: Xqt, Aklapper, Huji, pywikibot-bugs-list, Invadibot, maantietaja, 
Akuckartz, DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331, 
Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, 
jayvdb, Masti, Alchimista
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to