As a multi-lingual user I want to be able to change article languages quickly.
Acceptance criteria
- Add language icon to toolbar
- List is shown as "Language name" (in native language) and below "Article title" (in native language)
- Initial number of links are shortened when the list is longer than 6 items. If that happens, only 3 items are shown initially.
- The initial languages are decided based on the previous user selections and device settings
- Region titles are shown in the current language
TBD - The following are not known to be possible via the API yet, until them consider them not part of the ticket
- Geo-ip information available languages
- If there are more than 20 languages, organize the list by region. Include "Common languages" and "Worldwide" before regions
Implementation on desktop
https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links
Prototype
http://invis.io/4N2WGE17H
Design
Access in the toolbar
First screen
More Languages
Notes for QA
iOS
New language picker test cases:
- Language filter
- precondition: go to translation view
- test: type in the first few characters of a language
- expected results: languages in list should narrow down until only the matching language is displayed
- "Preferred" language section should collapse when empty
- precondition: english device language
- test: go to any page > click on translations > filter out "preferred" languages (e.g. type one of the non-preferred languages)
- expected result: "preferred" section collapses
- "Other" language section should collapse when empty
- precondition: w/ english device language
- test: go to any page > click on translations > filter out "other" languages (e.g. type one of the preferred languages)
- expected result: "non-preferred" section collapses
- Keyboard handling
- Precondition: go to translations view for a page (or site picker)
- test: tap on search bar to bring up keyboard, then drag on table
- expected result: keyboard is dismissed
- "Done" button handling
- Precondition: go to translations view for a page (or site picker)
- test: tap on search bar to bring up keyboard, then tap on "Done" keyboard button
- expected result: keyboard is dismissed
- Unsupported languages
- test: go to site picker
- expected result: none of the list items show weird unicode boxes (square w/ ? mark)
- Language loading
- precondition: go to any page
- test: tap on translation picker view
- expected results: the search bar animates into view when the "loading languages" alert is dismissed
Regression test cases
- Language selection goes to that language's main page
- Language picker works in landscape & portrait orientation