Page MenuHomePhabricator

[Bug] Article cells are backwards for RTL languages
Closed, ResolvedPublic

Description

Simulator Screen Shot - iPhone X - 2017-10-03 at 16.51.40.png (1×2 px, 277 KB)

Steps to reproduce

  1. Switch device language to Hebrew
  2. Install the app with Hebrew wikipedia as your only language
  3. Open the app, tap the search icon
  4. Enter text, tap search
  5. Verify cell layout direction
  6. Tap an article
  7. Tap search, tap clear
  8. Verify recent search layout direction

Expected result
Article cells and recent search cells are right aligned

Actual result
Article cells and recent search cells are left aligned

Notes
Recent search alignment will match device language (for example, even if you search enwiki using the english keyboard, the recent search entry will be right aligned if your system language is hebrew)
Search result alignment should match article language (left aligned for enwiki, right aligned for hewiki)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I had the English keyboard up, this works fine with the Arabic keyboard!

JoeWalsh reopened this task as Open.EditedOct 4 2017, 11:35 AM
JoeWalsh claimed this task.
JoeWalsh subscribed.

The text field is fine, but the cells are backwards. Re-opening this bug to fix that issue (since the screenshot already illustrates the problem)

JoeWalsh renamed this task from [Bug] Text appearing from wrong side in RTL languages in search field to [Bug] Article cells are backwards for RTL languages.Oct 4 2017, 11:37 AM
JoeWalsh updated the task description. (Show Details)

Expected behavior:

Simulator Screen Shot - iPhone X - 2017-10-04 at 07.34.12.png (2×1 px, 150 KB)

Simulator Screen Shot - iPhone X - 2017-10-04 at 07.34.16.png (2×1 px, 326 KB)

@JoeWalsh thanks for re-opening this! Can't believe I missed the backwards cells!

ABorbaWMF subscribed.

Works on iPhone X on Beta 5.7.1 (1244)

Looks to me. I was wondering if the same logic should apply the search view and list view in places? The images/icons on those views are currently on the right. @cmadeo, What do you think?

@ABorbaWMF, good catch! @JoeWalsh how hard would it be to have this logic apply to the list view in Places?

The issue I'm seeing with places is that when there's a device language/wiki language mismatch, the cells always respect the device language. For example, the cells are RTL for Hebrew Wikipedia on a Hebrew device, but LTR for Hebrew Wikipedia on an English device.

I tried setting the cells' semanticContentAttribute but the problem persisted. Might be a more involved workaround.