Page MenuHomePhabricator

in the list of languages Chinese is shown as english
Closed, ResolvedPublic

Description

Who to reproduce:

go to an article, click the "read in other languages menu"

get this list:

Screenshot_2015-05-22-02-18-12.png (1×1 px, 92 KB)

English and another English (Chinese) show in the list.

Event Timeline

Matanya raised the priority of this task from to Needs Triage.
Matanya updated the task description. (Show Details)
Matanya subscribed.
Dbrant triaged this task as High priority.May 22 2015, 5:56 AM
Dbrant subscribed.

So, what's happening here is that when the adapter asks for the language code to convert to the local name, PageTitle.getSite().getLanguage() is returning plain old "zh" which doesn't exist in our resource list of languages anymore, so as a result the local language name is defaulting to "English."

The question is: what behavior do we want? Do we want to:
(a) Show separate entries for Simplified and Traditional Chinese?
(b) Show only one "smart" generic Chinese entry that leads to the correct variant based on the user preference?
(c) Have a generic Chinese entry *in addition to* specific Simplified and Traditional entries?

Any of these can be done in principle, but none of them is obvious to me (as a non-Chinese speaker) as being the correct way of doing things.

Adding @Niedzielski for comment since he worked on this stuff not too long ago and likely has insights.

Linking for reference: https://phabricator.wikimedia.org/T62743 (Special case Traditional and Simplified Chinese in all language handling)

I'm able to repro this issue. @Mholloway, do you mind if I assign this task to me?

I do note that the native Chinese speaker in that convo seemed to approve of how Mobile Frontend handles this:
https://phabricator.wikimedia.org/T62743#1123511
https://phabricator.wikimedia.org/T62743#1225501

@Niedzielski I was wondering if you'd be in a better position to handle this actually. Will reassign.

Change 217306 had a related patch set uploaded (by Niedzielski):
Fix article language picker for Chinese

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

Change 217306 merged by jenkins-bot:
Fix article language picker for Chinese

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

Checked on 2.0.103--alpha-2015-06-12 on Samsung Tablet Ce0168(Android 4.0.4).