Page MenuHomePhabricator

Article title is wrongly aligned in mixed RTL and LTR
Closed, ResolvedPublic

Description

How to reproduce:

look at the page https://he.wikipedia.org/wiki/Yes_%D7%94%D7%98%D7%9C%D7%95%D7%95%D7%99%D7%96%D7%99%D7%94_%D7%91%D7%9C%D7%95%D7%95%D7%99%D7%99%D7%9F

the Title is Correctly from Right to Left.

The same for mobile web, see attached:

But not for the app:

Details

Related Gerrit Patches:

Event Timeline

Matanya created this task.May 3 2015, 7:50 PM
Matanya raised the priority of this task from to Needs Triage.
Matanya updated the task description. (Show Details)
Matanya added a subscriber: Matanya.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 3 2015, 7:50 PM
Deskana added a subscriber: Deskana.May 3 2015, 8:19 PM

@Matanya I've got a patch that I think fixes this issue, but I noticed the same problem in search results. I applied the same fix there. Can you look at the screenshots below and confirm whether, with my patch applied, the directionality of search results is correct?

Before my patch:

After my patch:

Yes! prefect fix. Thanks confirmed.

Change 208567 had a related patch set uploaded (by Deskana):
Fix TextView directionality issue for mixed LTR and RTL strings

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

Dbrant assigned this task to Deskana.May 4 2015, 9:54 PM
Dbrant moved this task from To Do to Code Review on the Mobile-App-Sprint-56-Android board.
Dbrant moved this task from Needs Triage to Current Sprint on the Wikipedia-Android-App-Backlog board.
Dbrant added a subscriber: Dbrant.

...but in the following comment, @Vibhabamba mentions that RTL-language list items should still be left-aligned:
https://phabricator.wikimedia.org/T95895#1232690

Can we have a consensus, so that we can be consistent throughout the app?

...but in the following comment, @Vibhabamba mentions that RTL-language list items should still be left-aligned:
https://phabricator.wikimedia.org/T95895#1232690
Can we have a consensus, so that we can be consistent throughout the app?

In my experience it's very hard for people that only speak LTR languages to truly reason about what does and does not work for RTL languages. Mixed LTR and RTL scripts are even harder to reason about, because RTL speakers have been so badly treated that they often have very little in the way of expectations about how mixed scripts will be handled. I'd recommend reaching out to @Mooeypoo and @Amire80 to get their input, as they both speak RTL languages.

More generally speaking I'd like to see the Language Team produce a brief about best practices for mixed RTL and LTR content. @Amire80 would also be the person to speak to about this.

Regardless, one can see quite clearly that the directionality of the title in the screenshot provided by @Matanya also changes the word ordering, which is a big sign that something is wrong; in essence, what should be rendered as "Yes Satellite TV" is instead being rendered as "Satellite TV Yes". That should be fixed irrespective of the above. I've amended my patch to do so, without touching the way search results are displayed, although that does mean that the incorrect word ordering will persist in search...

Change 208567 merged by Mholloway:
Fix TextView directionality issue for mixed LTR and RTL strings

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

KLans_WMF closed this task as Resolved.Jun 12 2015, 6:09 PM
KLans_WMF set Security to None.
Nnemo added a subscriber: Nnemo.Jul 25 2015, 3:58 PM