Page MenuHomePhabricator

In mobile language switcher prioritize available general language if user's specific client side variant isn't available
Closed, ResolvedPublic1 Story Points

Description

As a user who has a device that classifies my language in a variant-specific way, when I visit the language switcher on the mobile web, if the variant-specific language isn't strictly represented, yet the general language is represented, I want the language switcher to prioritize the general language to the top of the language switcher, so that I don't have to scroll to find my language.

Example

As noted in T123384#2024824, suppose a user has a client side langauge of es-lx, which is Spanish in Latin America, and taps the language modal while visiting a page on EN Wikipedia. In this case if there's a Spanish translation it's in ES, not ES-LX. In this case the user ought to have ES prioritized to the top of the language listing.

This is fairly generalizable. As an example, although we may have more specifically defined interwiki links for Chinese dialects, and in which case the prioritized specific language code at the top of the prioritized list is a nice UX flourish, in the case where the interwiki coding isn't sent across the wire from the server to the client side JavaScript, it will still be nice to prioritize ZH to the top of the list.

Event Timeline

dr0ptp4kt raised the priority of this task from to Needs Triage.
dr0ptp4kt updated the task description. (Show Details)
dr0ptp4kt added a subscriber: dr0ptp4kt.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 13 2016, 2:50 PM

Change 270882 had a related patch set uploaded (by Bmansurov):
Structured language overlay: prioritize available general language ...

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

bd808 triaged this task as Normal priority.Feb 16 2016, 5:10 PM
bd808 set Security to None.
bd808 edited a custom field.
bd808 added a subscriber: bd808.

Change 270882 merged by jenkins-bot:
Structured language overlay: prioritize available general language ...

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

Which URL should be tested?

This: http://en.m.wikipedia.beta.wmflabs.org/wiki/Language_test?mobileaction=beta#/languages (The change is still being merged, it will take about 10 mins).

You need to set your device language to 'es-lx' and check if 'es' shows up in your preferred languages. You may want to clear the local storage to start afresh: localStorage.clear()

That worked.

I'm actually going to remove the acceptance criteria on this task, as the A/B test task to get things working beta covers the actual deployment and its verification.

dr0ptp4kt updated the task description. (Show Details)Feb 18 2016, 2:43 PM
dr0ptp4kt added a subscriber: bmansurov.

Signing off.

dr0ptp4kt closed this task as Resolved.Feb 18 2016, 2:43 PM