deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
948 stars 169 forks source link

RTL Layout Support #4167

Open Simon-Laux opened 1 month ago

Simon-Laux commented 1 month ago

Areas:

Useful resources:

Questions:

Misc:

CC @farooqkz

r10s commented 1 month ago

Do we enable it based on language or as user preference?

if it all, it should be a debug-only-hidden setting, not even experimental. for the user, there is no reason to have this option - languages are RTL or LRT, not both. android/iOS/Windows/Mac/whatever usually do not have this option in UI accessible by the user.

so, i would not go for that at all - for testing, devs can easily just switch to an RTL language - we devs anyway know the position of buttons without reading :)

Should Icons be mirrored as well?

makes sense esp. for the "back" button, as you already noted. for all other icons, i would defer these discussions when all other parts are fine. is there just a CSS trick for mirroring? that would make the decision easier, however (cmp. https://m2.material.io/design/usability/bidirectionality.html#mirroring-layout )

Should we open context menus in the opposite direction?

i would expect that to make sense as well, however, this is again a minor issue, compared to the overall fix of showing the layout correctly mirrored

NB: i added the "bug" label as we already have at least some RTL languages that are displayed wrong

farooqkz commented 1 month ago

Do we enable it based on language or as user preference?

if it all, it should be a debug-only-hidden setting, not even experimental. for the user, there is no reason to have this option - languages are RTL or LRT, not both. android/iOS/Windows/Mac/whatever usually do not have this option in UI accessible by the user.

The thing is, that there is no conseneus on the Persian community that the layout should be RTL. Actually some folks find it "weird" after a lifetime of working with LTR layout in the softwares. Needless to say, Every single ordinary Persian user uses the computers with English UI language, and LTR. Just advanced users switch to Persian UI language for their computers. Users like me. So keep in mind that:

So overall: adding RTL support is definitely a huge plus for Iranians but not as big impact as it has for Hebrew and Arabic speakers.

Here in my comments, by Persians I mean Iranian Persians. Tajiks and Afghans respect their language and culture much more than we do.

r10s commented 1 month ago

thanks a lot for the insights and details!

some folks find it "weird"

is there a comparable user-changable option in Android/iOS/Windows/Mac or other larger apps?

surely, one can think of whatever cases, however, it also makes sense to keep things simple. for the beginning, i would not go beyond what is usual and offered by other systems and app, that could go to a feature proposal

on android/iOS, Farsi is RTL since forever, and iirc, no one complained; desktop adding more stuff here may raise expectations also there. so also consistency should be taken into account

from https://www.quora.com/Is-it-true-that-Farsi-is-written-from-left-to-right-or-is-that-not-true-What-makes-it-that-way-if-it-is-or-isnt-I-was-told-it-isnt-written-from-right-to-left :

The Farsi language, like any other language, can be written left to right if it is in an alphabet like the Roman alphabet

maybe add a second locale than, that transcribes Farsi in Latin?

is there a language code for that? cmp https://github.com/deltachat/deltachat-android/issues/3213 where we have troubles with that ... :)

farooqkz commented 1 month ago

The standard form for the app is to be mirrored. But some people within the Persian community don't like this "standard" on PC. On Android people have been using Persian UI with mirrored UI since the first day so there is no problem there. I agree it's weird that some dislike this. But it is how it is. There are other weird things within the community:

I'm pinging @ahangarha @mehr32 to get them involved.

ahangarha commented 1 month ago

A general point: Regarding the layout, everything except a few icons should be flipped. If some people dislike it, it is because they never used it that way. Thought I can accept the option to prevent flip but if the use set the app language to be one of RTLs, the default behavior should be as described.

But to me, the issue is not adding RTL support. All apps should have bidirectional text support. This means, regardless of the overall layout, any element with user generated content should show the content (and also apply padding, margin, border) based on its own content. And this is very much doable with all major technologies used today.

Regarding using Latin alphabet for Persian, I can say do not waste your time on it. I don't have even a single example in mind where an app supports Persian with Latin characters. This is just a waste of time. Either add support for Persian with its official character sets (unicode standard) or just focus on other features of the app.


To @farooqkz: By the way, Finglish is not new. It started in mass level when mobile phones came to public use and people could only send Latin characters in their SMS. Perhaps most of the shit got started from that point because technology was faulty not that English was cool. But the next generations got it wrong because of not knowing the background. They thought being advanced is to continue doing the buggy thing. This is a good example of how tools can shape our mind and then we start justifying the new behavior with absurd excuses 🤣