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 created this task.Jun 23 2016, 2:31 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 23 2016, 2:31 PM
Amire80 triaged this task as High priority.Jun 23 2016, 2:33 PM
Amire80 added a project: WorkType-Maintenance.
Amire80 updated the task description. (Show Details)
Amire80 moved this task from Needs Triage to Bugs on the ContentTranslation board.
C933103 added a subscriber: C933103.Jul 7 2016, 2:54 PM
Restricted Application added a subscriber: Cosine02. · View Herald TranscriptDec 27 2016, 8:39 AM

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.

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.

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 Normal.Apr 9 2017, 2:19 PM
Amire80 moved this task from Bugs to Out of Beta on the ContentTranslation board.May 9 2017, 5:45 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

santhosh moved this task from Backlog to QA on the Language-2018-Jan-Mar board.Feb 9 2018, 4:58 AM

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!

Amire80 moved this task from QA to Done on the Language-2018-Jan-Mar board.Feb 15 2018, 9:00 PM

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.

Arrbee moved this task from Blocked to QA on the Language-2018-Jan-Mar board.Feb 16 2018, 7:04 AM

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

Etonkovidova closed this task as Resolved.Feb 16 2018, 11:49 PM
Shizhao moved this task from Backlog to Closed on the Chinese-Sites board.Feb 23 2018, 2:49 AM