-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bidi / RTL support #347
Comments
I have no familiarity with this, but anyone should feel free to give it a try. |
I found this page which gives a lot ofdetails on how bidirectional text works: https://www.w3.org/International/articles/inline-bidi-markup/ |
Another great resource: https://rtlstyling.com/posts/rtl-styling |
Please notice that bidi is not about RTL. One can use RTL if it is known that the content is RTL. We are talking about a social media in which people may write text in different languages and even wrote mixed content. We don't have and we don't want to have rich text editor in which the user can specify which direction should be applied on a specific portion of the text. We want to handle this situation automatically which is called bidirectional text support. In most of the cases, adding |
Yes, to each element if you want true mixed content support. (And to the top element only for nested elements like I did a quick review of what would be needed to fully support RTL languages in lemmy-ui:
|
Things like RTLCSS wouldn't help as per my understanding. We need to modify certain styles. For example:
|
In an ideal world, yes, but lemmy-ui uses Bootstrap themes, and rewriting them is no small feat; so using a “converter”, while being a less elegant solution, sounds way more practical. |
Let's say some bidifix. I don't know when I would find time to work on this, but it should easy to implement. |
Whoever takes this on, I want to mention that lemmy-ui uses bootstrap, and it has RTL instructions here: https://getbootstrap.com/docs/5.0/getting-started/rtl/ |
Again, this is for explicitly define direction. Such solutions won't work for us. We need dynamic directions based on the content. |
Any update on this case guys? |
PRs adding this welcome. |
I checked dependencies. Lemmy uses There are some workaround. If lemmy developers are ok with adding this feature in two steps, I think we can start working on it. We can make markdown sections to follow the first character's direction till If it is ok, I try to find some time to create local development environment. |
Sweet, let me know if you need any help setting up a development environment. |
In few week I will come back again. First I try to do it on my own and if I failed, I will seek help. |
I just wanted to inform you that we are working on a plugin for I decided to do this so that not only we can help lemmy to fix this issue but many more projects can benefit from. It is under LGPL which I think is very good :). So if I didn't follow up here, that was the reason. Hopefully in sometimes we can add that in this project and... If anyone interested, please check the code and share your thoughts. |
@dessalines @ahangarha Friends, no progress with this yet? |
@jayabie I am looking for an opportunity to open some time for it. |
No update my friends? |
@jayabie I am going to try now. But let me try it on the actual project in development environment. If successful, I send PR. Would it be fine? I mean within 2 days I might ask to assign this issue to me. Would it be fine? |
Hello @ahangarha I'm just a guy seeking for RTL, i think you should ask @dessalines if any extra permissions needed. |
@ahangarha There is no rush, no one else is working on this. Just take your time and make a pull request when you are ready. Also feel free to ask if anything is unclear. |
@Nutomic I have issue in building backend. How can I get help? I don't think here is a good place. |
@ahangarha What error do you get? Make sure to run https://join-lemmy.org/docs/en/contributing/contributing.html |
This was and still is the error:
It seems it cannot get translations. |
So you are missing the submodule. Did you run the commands from my previous comment? And what does git status show? |
Yes. I ran. I ran clone with --recursive and also I ran the commands you gave me. Nothing happened. see:
|
We also saw issues with that when people were running old versions of rust, or not properly using If the files are there, make sure you're at least on rust What does |
Apparently they paid someone to code this, and keep the source code private. They would have done much better to pay someone with RTL experience to update lemmy-ui itself, then they could still get code updates. As it they'll be stuck on old versions of lemmy-ui. |
Hello guys @dessalines @Nutomic , should i move with the signup, or we wait for the response to @Nutomic ? Yes, after a further check found they didn't share their code. |
Lets wait for them to respond to nutomic first. |
Hi guys I wish i've seen this conversation before working on the code , very interesting information shared by @ahangarha. Thanks for all your efforts guys. |
Thanks! Again I personally don't have time to work on this, but hopefully that code can be helpful to someone who does. |
No update made to this? we need the RTL from lemmy`s master branch very much so we can get the updates. |
If you want this to be implemented, you can work on it yourself (or hire someone to work on it), and then make a pull request. We would definitely like to merge this functionality. |
No progress made on this @dessalines @Nutomic ? |
No. Read the comments above. |
I couldn't find anyone to make it this is why i'm asking. |
Hey @jayabie |
@xximj Thanks for your invitation, i will join soon. |
Hi guys, we had a draft PR that was supposed to work on other sections last week. is it in progress, I also want to contribute to this case |
Hey, do you mean #1963 or something else you were working on? Last week i have done some testing with comments section and it's kinda impossible to make HTML @dessalines |
For lists, only we can add direction to |
Yup, i've tested it, and if we can make it happen, it's gonna look ugly. |
May you share some screenshots of what you see as ugly? |
I couldn't make it happen, it was hypothetically. |
That is the nature of the issue. It happens the same if we do it here. See: این متن فارسی است و در به صورت یک متن RTL با تراز راستچین نمایش داده میشود. |
Any updates on this? |
I haven't worked on it yet. Since the current partial solution doesn't harm the project, I would say we can ask for merging #1963 For lists, I need to make a new release in |
Let's have this issue open as it it not totally completed, but partially. |
@hamidrezakp Can you make a checklist of what is done and what are remaining? |
Sure:
Although we should discuss if we want to have post title be bidi even if users layout is different than title direction (e.g. User with Other than post title, imo we just need comments to be bidi for now. And please update your first comment and mention current status. |
This is important but it is a design decision. |
I just submitted a backend PR which allows Arabic (and Cyrillic) in usernames and community names: LemmyNet/lemmy#4083 |
Is your proposal related to a problem?
Considering the very nature of social media platforms (like Lemmy), people with different languages would create content. It becomes problematic when one creates content in RTL languages (like Persian, Arabic, Urdu,...). Lemmy is not ready to render RTL (or even mixed RTL/LTR) text properly.
Describe the solution you'd like
There are two approaches in general. One is through HTML modification which can be done by add
dir="auto"
attribute to elements containing user generated text or by wrapping it in<bdi>
tags. The other approach would be through CSS by addingunicode-bidi: plaintext
. In either of approaches, there should be avoidance in using absolute positioning or spacing. For example instead oftext-align: left
we should usetext-align: start
or instead ofpadding-left
we should usepadding-inline-start
unless there be some strong UX reason.Describe alternatives you've considered
--
Additional context
Just keep in mind that bidi (bidirectional text) is different from using RTL or LTR in general based on the language user choose for the interface.
I have opened this issue here not on back-end because I think this can be managed on front-end.
Todo
The text was updated successfully, but these errors were encountered: