Page MenuHomePhabricator

[BUG] Unable to switch between Chinese language variants using the article language picker
Open, NormalPublic

Description

How many times were you able to reproduce it?

Always

Steps to reproduce

  1. View an article on zh wiki
  2. Open the language picker

Expected results

Able to switch between available Chinese language variants

Actual results

Unable to switch between available language variants


Proposed solution

All available Chinese language variants should be listed as a separate language in the language selection overlay.

Scenarios as proposed by @cooltey in the comments for this ticket

Scenario 1
  1. Read Barack_Obama in English
  2. Open Other Languages, the Traditional Chinese and Simplified Chinese are both listed
  3. Select Traditional Chinese.
  4. Open Other Languages again, should see the Simplified Chinese in the list.
Scenario 2
  1. On Chrome browser, clicks the link https://zh.wikipedia.org/wiki/贝拉克·奥巴马 and read the article in the Wikipedia app.
  2. The article shows in Chinese, but it might be in mixed variants
  3. Open Other Languages, the Traditional Chinese and Simplified Chinese are both listed
  4. Select Traditional Chinese.
  5. Open Other Languages again, should see the Simplified Chinese in the list.

Known bug related to this bug on Android

During development, we should be sure to test against the scenario below. More information on T191629.

Steps to reproduce

Pre-conditions: While logged in with no user-preferences set on zh.wiki for reading in a particular variant.

  1. Open an article in one variant of Chinese, for example 美國 (America) in Traditional Chinese (ZH-HANT)
  2. Note the article content (ignore the title for now since work T178201 has altered its display logic) is all shown in Traditional Chinese (for example all references to "美國" uses the traditional character "國" for country/land)
  3. Open "Other languages" and select to view the Simple Chinese variant of the article

Expected

Article reloads in Simplified Chinese variant

Actual

Nothing changes since the default user preference of 'zh - 中文' overrides the variant transform and shows article with mixed content.

This is the case for ALL Chinese articles, whatever the first starting point variant is chosen, changing to the other does not work.
See demo video of this bug: https://youtu.be/sB_KZR1TdY8

Event Timeline

JoeWalsh created this task.Sep 27 2017, 7:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 27 2017, 7:03 PM
JoeWalsh updated the task description. (Show Details)Sep 27 2017, 7:13 PM
JMinor triaged this task as Low priority.
JMinor moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App-Backlog board.
cmadeo added a subscriber: cmadeo.Nov 16 2017, 12:34 AM

Has this been fixed in the most recent internal build?
I was able to switch between the Chinese variants in the screen shots below:

Sadly I can't read Chinese or distinguish well enough across the different variants, so any insight on how I'm misinterpreting the current state of the app would be very helpful!

Thanks!

@cmadeo
From the screenshot you have provided, I do not see two of the mainly Chinese variants show in the list: Traditional Chinese and Simplified Chinese.

If one enters:

  • pure zh article (an article mixed with Traditional & Simplified Chinese) => Should see Traditional Chinese and Simplified Chinese in the other language list
  • zh-hant article (an article in Traditional Chinese) => Should see Simplified Chinese in the other language list
  • zh-hans article (an article in Simplified Chinese) => Should see Traditional Chinese in the other language list

For example, if a user is reading the zh-hant (Traditional Chinese) version of Barack_Obama, then the user should see the Simplified Chinese in the other language list.

@cooltey Thank you so much! This is super helpful!
Do you think that it would be an acceptable solution to have each of the Chinese language variants available for a given article to be listed as a separate language (similar to how they are handled on the iOS language preferences) or would you expect to select the language 'Chinese' and then pick from there?

@cmadeo
In my opinion, it is totally acceptable for each of the Chinese variants to be listed as a separate language.

For the Android version, we programmatically convert the zh to zh-hant and zh-hans and list as a separate language.
When reading an article in either zh-hant or zh-hans, it can be converted into each other.

Sometimes a user might open an article from a hyperlink via web browser, in that time the article might be displayed in only zh, and we should be able to switch from the zh to either zh-hant or zh-hans

Examples:

Scenario 1
  1. Read Barack_Obama in English
  2. Open Other Languages, the Traditional Chinese and Simplified Chinese are both listed
  3. Select Traditional Chinese.
  4. Open Other Languages again, should see the Simplified Chinese in the list.
Scenario 2
  1. On Chrome browser, clicks the link https://zh.wikipedia.org/wiki/贝拉克·奥巴马 and read the article in the Wikipedia app.
  2. The article shows in Chinese, but it might be in mixed variants
  3. Open Other Languages, the Traditional Chinese and Simplified Chinese are both listed
  4. Select Traditional Chinese.
  5. Open Other Languages again, should see the Simplified Chinese in the list.

@cooltey Great, thank you so much for explaining the approach taken on Android. We'll do the same on iOS.

JMinor raised the priority of this task from Low to Normal.Mar 8 2018, 6:37 PM
RHo added a subscriber: RHo.Apr 9 2018, 5:21 PM

Hi @cmadeo - FYI T191629 may also be an issue to be aware of on iOS.

Basically when someone is logged in, the user-preferences (on zh.wiki) are overtaking the whichever variant is selected.
By default, a user's preferences is just zh - 中文, which overrides whatever variant is selected and shows mixed variant content.

cmadeo added a comment.Apr 9 2018, 5:25 PM

@RHo, thanks so much for sharing this. As this ticket hasn't been picked up yet, I'll add the bug to this ticket.

cmadeo updated the task description. (Show Details)Apr 9 2018, 5:27 PM