Copying from Amir:
Items in the language list are in a mix of RTL and LTR languages.
This makes the list somewhat strangely aligned.
Centering it makes sense - that's how language lists are shown on
an iPhone, for example.
Version: unspecified
Severity: normal
Acceptance criteria
- A dir attribute needs to be added to each language item.
- Left align LTR languages
- RIght align RTL languages
- Currently the API does not support this but we can use an array to determine RTL given the number of RTL languages that exist. We'll use a frontend library and submit a patch in parallel to get this into core. See ongoing conversation in https://gerrit.wikimedia.org/r/415176, T189036 and associated patchsets.
Languages that can be considered RTL are:
# array needs lowercasing ['Aeb_arab', 'Arc', 'Ar', 'Arz', 'Azb', 'Bcc', 'Bgn', 'Bqi', 'Ckb', 'Dv', 'Fa', 'Glk', 'He', 'Khw', 'Kk_cn', 'Kk_arab', 'Ks_arab', 'Ku_arab', 'Lki', 'Lrc', 'Luz', 'Mzn', 'Pnb', 'Ps', 'Sd', 'Sdh', 'Skr_arab', 'Ug_arab', 'Ur', 'Yi' ]
All other languages should be considered ltr.
Testing
- Install https://chrome.google.com/webstore/detail/cors-toggle/jioikioepegflmdnbocfhgmpmopmjkim?hl=en
- Toggle on the CORs extension
- Visit https://reading-web-staging.wmflabs.org/w/index.php?title=Israel&mobileaction=toggle_view_mobile#/languages
- RTL languages should appear right aligned. LTR left aligned.
- Verify languages display correctly on a few other pages
- When done pass to Nirzar for sign off.