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

jhsoby created this task.Sep 24 2020, 12:44 PM
Restricted Application added subscribers: jeblad, Danmichaelo, Aklapper. · View Herald TranscriptSep 24 2020, 12:44 PM
Jdlrobson added a subscriber: Jdlrobson.

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

Thanks in advance for your help clarifying.

Jdlrobson moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
Danmichaelo added a comment.EditedOct 2 2020, 9:17 PM

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

But wrong in the mobile version:

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

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 added a subscriber: Nikerabbit.

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

Jdlrobson closed this task as Resolved.Oct 22 2020, 7:36 PM


This is fixed! yay!