RTL Support #258
No reviewers
Labels
No labels
a11y
Bug
Bug fix
Critical Priority
Documentation
Feature
Feature request
Held for next release cycle
High Priority
Low Priority
Medium Priority
Minor change
Translation/Locale
WIP
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma-fe#258
Loading…
Reference in a new issue
No description provided.
Delete branch "yheuhtozr/pleroma-fe:rtl-enabled"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Modified interface to support RTL languages such as Arabic or Hebrew.
This PR may seem intimidating, but the first (and the second) commit only contains mindless bulk conversion to logical CSS properties and values as the groundwork (that wouldn't introduce any visual change). Only the third one contains "creative" contents including necessary JS rewiring to enable RTL features.
The RTL switch is incorporated into each i18n json in this PR. When you select any language where the key
_locale.dir
=rtl
, the whole layout will be automatically flipped.hi! native hebrew speaker here. few nitpicks regarding UX (not even looking at the code) -- in short, not Everything should be rtl.
first of all, mentions (exclusively in latin) and hashtags (predominantly in ltr languages) all render like
user@instance@
, because of RTL handling. probably shouldn't be like that.same goes for display names with custom emoji, which get completely messed up by the directionality and become practically unreadable
more generally (and more problematically), i think every field that's user-generated as opposed to part of the UI should default to LTR, so that the content is displayed faithfully. this includes posts and bios
i think this PR should wait until akkoma implements support for post locales, which would solve that problem -- post contents get rendered as rtl/ltr depending on the language they're composed in.
thanks for the work though! i'll gladly approve the groundwork without the actual RTL toggle for now
Hi, thank you for reviewing. Apparently as you say as native speaker, an RTL language is not everything goes RTL, but needs more intricate control over which part should be flipped or not, and those things can be—and only can be—done on a case by case basis.
Fortunately, styling individual elements for correct directionality is as easy as dropping a couple of CSS lines per each, so if you are fine, I think that the better course is you (or other people) tell me which part should be corrected, rather than reverting the global directionality function altogether. Actually, I believe this problem can technically only go back here whatever solution path you take, so disabling it is only postponing...
Additionally, some icons should be flipped as well, but I don't have any native insight, so your help would be much appreciated.
With your comment and some changes I saw fit, it roughly looks like this. Any suggestions are welcome.
yeah that looks good
ignoring the stuff that the hebrew locale just doesn't have 🥴
i'll take a look at the code itself soon, sorry i couldn't get around to it sooner!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.