Page MenuHomePhabricator

Languages that have variants are shown as a gray interlanguage link in the Wikipedia in the same language
Closed, ResolvedPublic

Description

To reproduce:

Observed: Gray interlanguage link to "中文" appears on top of the interlanguage links list.

Expected: "中文" is Chinese itself, so it must not appear there.

I debugged this a bit, and found that the reason for it is that we are filtering out wgPageContentLanguage, and for languages with variants it's not equal to the primary language code. For Chinese, the primary language code is "zh", but wgPageContentLanguage is "zh-hant", "zh-hk", "zh-hans", etc.

We need to use something other than wgPageContentLanguage or to cut the suffix from these languages—zh, sr, ku, uz, tg, ug.

Reported at https://www.mediawiki.org/wiki/Topic:T4bamtsslf4y1b0y

High prio because it affects several major languages.

See also: T116401

Related Objects

Event Timeline

Amire80 triaged this task as High priority.Jun 23 2016, 2:33 PM
Amire80 added a project: Essential-Work.
Amire80 updated the task description. (Show Details)
Amire80 moved this task from Needs Triage to Bugs on the ContentTranslation board.

If UI language from zh set as wuu, yue, zh-classical in chinnese wikipedia, a gray interlanguage link to "吴语", "粵語", "文言" appears on top of the interlanguage links list. and reset to zh, still not disappear. but if UI language from zh set as zh-hans, zh-hant, zh-tw etc, working ok. clean cookies is working ok.

捕获.PNG (343×202 px, 6 KB)

If UI language from zh set as wuu, yue, zh-classical in chinnese wikipedia, a gray interlanguage link to "吴语", "粵語", "文言" appears on top of the interlanguage links list. and reset to zh, still not disappear. but if UI language from zh set as zh-hans, zh-hant, zh-tw etc, working ok. clean cookies is working ok.

捕获.PNG (343×202 px, 6 KB)

As you even used yue, why zh-classical instead of lzh?

Because that's the wikipedia site name assignment, and human may or may not
know to actually check the option values…

Because that's the wikipedia site name assignment, and human may or may not
know to actually check the option values…

Please see T30443 for my concern about zh-classical

Amire80 lowered the priority of this task from High to Medium.Apr 9 2017, 2:19 PM

Is there any progression on this topic ...... ?

Change 409194 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Fix gray interlanguage links for languages with variants

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

Change 409194 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Fix gray interlanguage links for languages with variants

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

Thanks for fixing.

Tested in production. Looks good to me, but I'd appreciate it if more people will test it, because these languages with variants often display elusive bugs :)

@Yannmaco, @Liuxinyu970226, @Arthur2e5, can you test please? Thank you!

Checked in zh wmf.21 (Accept-language- zh-TW,zh; (also tried with zh,zh-TW;) - the issue seems to be fixed. Agree with @Amire80 - would be great if more people will look at it.

Tested and working on srwiki.
This was really annoying issue, glad it is resolved.