Page MenuHomePhabricator

Content Translation should not suggest translating an article into Norwegian
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Visit https://nn.wikipedia.org/
  • Have {{#babel:nb|no}} on your user page and/or set your browser's accept-language header to include both nb and no, like mine: nb,nn;q=0.8,no;q=0.6,se;q=0.4,en;q=0.2
  • Use Vector-2022
  • Enable the "Compact links" setting in your settings
  • Two problems that are really the same problem:
  • Click the language button in the top right

What happens?:
For case 1, the text at the top says "Missing in Norwegian Bokmål, Norwegian and several other languages".
For case 2, the text at the top says "Missing in Norwegian and several other languages".

What should have happened instead?:
For case 1, only Norwegian Bokmål should be suggested.
For case 2, whatever happens when all languages you know already have articles should happen.

Note that this special handling of no should only apply to Wikipedia; if CX is enabled for other Wikimedia projects, those would still use no and "Norsk" since other projects accept both varieties.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Case 1:

Screenshot_20221109_225344.png (420×440 px, 23 KB)

Case 2:

Screenshot_20221109_225414.png (422×384 px, 24 KB)


Copied from duplicate T328435:

Based on user input, there seems to be an issue with the languages suggested as missing (T290972 ) by the language selector on desktop for the case of Norwegian (no). As illustrated by the video below, an article that is available for both versions of Norwegian (Bokmål and Nynorsk) is shown as missing for "Norwegian".

The complexity of the iso codes for Norwegian (and how they are supported in our systems) may be in the origin of this issue. In case it helps to clarify:

  • Norwegian with the "no" code represents the general language.
  • Norwegian Bokmål (nb) and Norwegian Nynorsk (nn) have their own codes to represent the specific variants.
  • Norwegian Wikipedia (using "no" for their domain: https://no.wikipedia.org/) is written using the Bokmål (nb) version since that seems the most common variant of the language, and the language code for the content is "nb" (which differs from the "no" domain)

For some reason the user seems to have "no" among their frequent languages and our system assumes the article does not exist for such version since it is not matching the "nb" version which exists for Norwegian Wikipedia.

As part of this task we may want to verify that the behaviour for the mobile version of this entry point (T298032) works as expected too.

Event Timeline

Change 1006551 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX relevant languages entrypoint: Use content code instead of domain

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

Change 1006551 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX relevant languages entrypoint: Use content code instead of domain

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

Test status: QA PASS

Added the NO, NN and SE languages under Chrome's preferred languages

opened both links in NN which is Norwegian:

https://nn.wikipedia.org/wiki/Gro%C3%9Fpetersdorf

https://nn.wikipedia.org/wiki/Gulskolm

Norwegian was not suggested as my frequently used languages was suggested as missing

The above screencast doesn't prove that the issue has gone, as it doesn't follow the logic/steps in the description. Moving this back to "Needs QA".

Moving to Pending input for QA column as discussion needed with @ngkountas

This issue has been fixed as demonstrated in the following screencasts:

Case 1 (only Norwegian Bokmål should be suggested):

Case 2 (no language should be suggested):

Given the above, this task can be closed as done.

Thank you very much for fixing this! All looks good now. :-)