Huji created this task. Huji added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION **List of steps to reproduce** (step by step, including full links if applicable): Here is a piece of python code that uses Pywikibot to query Wikidata and find which Persian Wikipedia page corresponds with the English Wikipedia page Category:Companies based in Edmonton <https://en.wikipedia.org/wiki/Category:Companies_based_in_Edmonton> import pywikibot page = pywikibot.Page(pywikibot.Site('en'), 'Category:Companies based in Edmonton') print(page.langlinks()) **What happens?**: Here is the response you get: [pywikibot.page.Link('شركات مقرها في إدمونتون', APISite("ar", "wikipedia")), pywikibot.page.Link('Unternehmen (Edmonton)', APISite("de", "wikipedia")), pywikibot.page.Link('شرکت\u200cهای مستقر در ادمنتن', APISite("fa", "wikipedia"))] This indicates that the `fa` equivalent page would be titled "شرکتهای مستقر در ادمنتن" (don't be confused by \u200c which is the zero-width-non-joiner <https://en.wikipedia.org/wiki/Zero-width_non-joiner> character) **What should have happened instead?**: Per the Wikidata page <https://www.wikidata.org/wiki/Q6986508> and as shown on the right side of the screenshot below, the expected answer would have been "شرکتهای ادمنتن" (more specifically, "رده:شرکتهای ادمنتن"). F34856537: image.png <https://phabricator.wikimedia.org/F34856537> It seems like `langlinks()` is not returning the links, but rather the labels of the descriptions in different languages. Case in point, the namespace prefix is also missing in the responses. **Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc**: Tested on 05ce190809b <https://phabricator.wikimedia.org/rPWBC05ce190809b679f52bd7b35c91e04ad9bdf2d90b> 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, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
