Page MenuHomePhabricator

Language name for Norwegian Bokmål Wikipedia incorrectly listed as "norsk"
Closed, ResolvedPublic

Description

Per T263294#6487346. In the mobile web version of Wikipedia (*.m.wikipedia.org), the language name for the Norwegian Bokmål Wikipdia is listed as "norsk" when it should be "norsk bokmål". This was fixed for desktop back in November with the addition of the $wgInterlanguageLinkCodeMap in InitialiseSettings.php, but apparently mobile web doesn't recognize this setting. Ideally it would, so this doesn't have to be fixed in multiple places.

In summary, no should display the name for nb, but only for Wikipedia, not other Wikimedia projects.

Event Timeline

Jdlrobson subscribed.

Hello! Could you please expand on this bug request as I'm not quite sure what it's referring to. Are you referring to the language results shown in this screenshot?:

If so the label comes from the API request so it's possible the issue actually lays inside the core API so adding the language team.

https://no.m.wikipedia.org/w/api.php?action=query&format=json&formatversion=2&meta=siteinfo&siprop=general&prop=langlinks&lllimit=max&titles=Oluf_M%C3%BCller&llprop=url%7Cautonym%7Clangname&llinlanguagecode=en

Screen Shot 2020-10-02 at 1.44.24 PM.png (946×2 px, 88 KB)

Thanks in advance for your help clarifying.

Indeed. The language name is correct in the desktop version:

desktop.png (172×175 px, 9 KB)

But wrong in the mobile version:

mobile.png (203×293 px, 10 KB)

Strangely I'm not seeing an entry for Norsk on
https://no.m.wikipedia.org/wiki/Oluf_M%C3%BCller#/languages

Screen Shot 2020-10-02 at 2.42.59 PM.png (888×2 px, 86 KB)

How can I get the Norsk item to show up on mobile?

Thanks for your patience with me!

The API response in the below URL needs to be updated to consider $wgInterlanguageLinkCodeMap
https://en.m.wikipedia.org/w/api.php?action=query&format=json&formatversion=2&meta=siteinfo&siprop=general&prop=langlinks&lllimit=max&titles=Oluf_Christian_M%C3%BCller&llprop=url|autonym|langname&llinlanguagecode=en&lang=en

I'm not sure who maintains this API, but no doubt we will need help from language team and/or platform engineer to fix the API here as Minerva is just rendering the data returned by the API.

Nikerabbit subscribed.

This shouldn't be too difficult to fix, assuming there are no unexpected consequences of changing it there. I'll bring this up in our sprint planning.

Thanks @Nikerabbit. I am happy to help review and test.

Pginer-WMF triaged this task as Medium priority.Oct 7 2020, 1:14 PM

Change 632916 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/core@master] Apply InterlanguageLinkCodeMap in Action API

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

There is a risk of breakage if someone uses the lang property in unexpected ways, link constructing the target url manually or indexing the results directly. I am not sure if it should be kept back and perhaps a new property be added.

Change 632916 merged by jenkins-bot:
[mediawiki/core@master] Apply InterlanguageLinkCodeMap in Action API

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

Screen Shot 2020-10-22 at 12.36.05 PM.png (918×2 px, 97 KB)

This is fixed! yay!