Page MenuHomePhabricator

Cognate doesn't properly create interwiki links for Shawiya Wiktionary (shy.wiktionary.org)
Closed, ResolvedPublic

Description

Problem:
Cognate correctly creates interwiki links from Shawiya Wiktionary to other language Wiktionaries but does not create interwiki links from the other WIktionaries to Shawiya Wiktionary.

Example:
https://shy.wiktionary.org/wiki/ameqnin has an interwikilink to French Wiktionary's https://fr.wiktionary.org/wiki/ameqnin.
https://fr.wiktionary.org/wiki/ameqnin does not have a interwiki link to https://shy.wiktionary.org/wiki/ameqnin

Acceptance criteria:

  • Interwiki links for Shawiya WIktionary are added to the sitebar for all other language Wiktionaries where an article exists.

Background information:

Event Timeline

@Meno25: Hi, how is this related to Cognate (as that is mentioned nowhere in the task description)?
Removing Wiktionary as this is about one single website - see its project description.

@Meno25: Hi, how is this related to Cognate (as that is mentioned nowhere in the task description)?
Removing Wiktionary as this is about one single website - see its project description.

Hi. I wrote this task description quickly (as I had other things to do at that time), so, I didn't put much thought about how it should be categorized. Feel free to recategorize the task as needed.

Lydia_Pintscher claimed this task.
Lydia_Pintscher added a subscriber: Lydia_Pintscher.

Interwiki links on Wiktionary are built automatically now with the Cognate extension. It works for example here: https://shy.wiktionary.org/wiki/ameqnin

Interwiki links on Wiktionary are built automatically now with the Cognate extension. It works for example here: https://shy.wiktionary.org/wiki/ameqnin

Hi @Lydia_Pintscher No, it does not work. Please see a screenshot of the link that you provided in your comment.

(Page "ameqnin" on shywiktionary)

    • The page correctly links to the frwiktionary entry. (See the red rectangle.)
    • So, links from shywiktionary to frwiktionary are OK.

    Now look to a screenshot of the same entry on frwiktionary.

    (Page "ameqnin" on frwiktionary)

    • The page does not link to shywiktionary. (See the rectangle.)
    • So, links from frwiktionary to shywiktionary are not OK.
    • This happens with links to shywiktionary on other languages of Wiktionary (enwiktionary, frwiktionary, etc)
    • There is probably something wrong in the configuration of the Cognate extension regarding shywiktionary. I would appreciate it if you reviewed the matter. Thank you.

    Aha! Thank you. Now it makes sense.

    Lydia_Pintscher renamed this task from Interwiki links to Shawiya Wiktionary (shy.wiktionary.org) are not recognized as such to Cognate doesn't properly create interwiki links for Shawiya Wiktionary (shy.wiktionary.org).Aug 14 2020, 8:59 AM
    Lydia_Pintscher added a project: Cognate.
    Lydia_Pintscher updated the task description. (Show Details)

    Somehow shywiktionary is not added to Cognate database (it's enabled there though):

    ladsgroup@mwmaint1002:~$ mwscript mysql.php --wiki=shywiktionary --cluster extension1 --wikidb cognate_wiktionary
    wikiadmin@10.64.32.11(cognate_wiktionary)> select * from cognate_sites where cgsi_dbname = 'shywiktionary' limit 5;
    Empty set (0.00 sec)
    
    wikiadmin@10.64.32.11(cognate_wiktionary)> select * from cognate_sites where cgsi_dbname = 'frwiktionary' limit 5;
    +---------------------+--------------+----------------+
    | cgsi_key            | cgsi_dbname  | cgsi_interwiki |
    +---------------------+--------------+----------------+
    | 2097444195020099748 | frwiktionary | fr             |
    +---------------------+--------------+----------------+
    1 row in set (0.00 sec)

    Mentioned in SAL (#wikimedia-operations) [2020-08-17T21:57:31Z] <Amir1> ladsgroup@mwmaint1002:~$ mwscript extensions/Cognate/maintenance/populateCognateSites.php --wiki=aawiktionary --site-group wiktionary (T259360)

    Ladsgroup added a subscriber: Amire80.

    So it's there now and if you don't see it, you just need to purge the parser cache. Here's an example: https://fr.wiktionary.org/wiki/yila

    As you can see, The rendering is sorta broken, it can be because it's not in the interwiki sorting order or the fact that core doesn't have the language name for shy (It has it for shy-latn though, you can find the list in languages/data/Names.php). But this is out of Wikidata team now. I think @Amire80 and the languages team should handle the rendering ( I tried adding it to the interwiki sorting php file but it's really complicated).

    What parser cache is meant? Some pages still don't have inverse links: https://shy.wiktionary.org/wiki/tacawit

    Note that this is still a problem even when interlanguage links are "manually" added to pages. For example, adding the link "[[shy:raisin]]" on (say) the German Wiktionary entry for "raisin" results in the wikilink "shy:raisin" showing up in the page content rather than creating an interlanguage link in the sidebar, whereas adding, say, [[af:raisin]] there does result in an interlanguage link in the sidebar (note that there's no such page in the afwiktionary, but that's beside the point). Does this mean it's not purely a Cognate issue? (I have no idea.)

    Oh clearly something is wrong with shy language setup. Look at sitematrix (https://meta.wikimedia.org/wiki/Special:SiteMatrix)

    I check and see what's going on there.

    I need some more time, this is more complex than it looks.

    Change 667757 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
    [mediawiki/core@master] Add shy to list of special languages mapping to shy-Latn

    https://gerrit.wikimedia.org/r/667757

    Mentioned in SAL (#wikimedia-operations) [2021-03-02T05:40:32Z] <Amir1> apply gerrit:667757 on mwdebug1002 to test T259360

    I confirm the patch above fixes the problem.

    Without it

    MediaWiki\MediaWikiServices::getInstance()->getLanguageNameUtils()->getLanguageName('shy',MediaWiki\Languages\LanguageNameUtils::AUTONYMS,MediaWiki\Languages\LanguageNameUtils::DEFINED);

    returns empty (this is part of Parser.php) but with the patch, it returns the name of shywiki and having it checked out locally makes the link to go in sidebar (language links) but without it, is like the issue mentioned above.

    All being said and being done, Wikidata team is not responsible for issues handling edge case languages and their setup...

    Change 667757 merged by jenkins-bot:
    [mediawiki/core@master] Add shy name (same as shy-latn)

    https://gerrit.wikimedia.org/r/667757

    I'll backport this and rebuild the interwiki cache tomorrow (hopefully, If I can find some time in meetings, if not, I'll do it on Thursday).

    Change 670350 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
    [mediawiki/core@wmf/1.36.0-wmf.34] Add shy name (same as shy-latn)

    https://gerrit.wikimedia.org/r/670350

    Change 670351 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
    [mediawiki/core@wmf/1.36.0-wmf.33] Add shy name (same as shy-latn)

    https://gerrit.wikimedia.org/r/670351

    Change 670351 merged by jenkins-bot:
    [mediawiki/core@wmf/1.36.0-wmf.33] Add shy name (same as shy-latn)

    https://gerrit.wikimedia.org/r/670351

    Mentioned in SAL (#wikimedia-operations) [2021-03-10T12:22:02Z] <ladsgroup@deploy1002> Synchronized php-1.36.0-wmf.33/languages: [[gerrit:670351|Add shy name (same as shy-latn)]] (T259360) (duration: 01m 10s)

    Change 670350 merged by jenkins-bot:
    [mediawiki/core@wmf/1.36.0-wmf.34] Add shy name (same as shy-latn)

    https://gerrit.wikimedia.org/r/670350

    Mentioned in SAL (#wikimedia-operations) [2021-03-10T12:34:25Z] <ladsgroup@deploy1002> Synchronized php-1.36.0-wmf.34/languages: [[gerrit:670350|Add shy name (same as shy-latn)]] (T259360) (duration: 01m 10s)

    Mentioned in SAL (#wikimedia-operations) [2021-03-11T21:57:26Z] <Amir1> run populate pages in cognate (T259360)

    If you don't see it for shywiktionary. Just purge the cache. Otherwise, I fixed the rest of issues.