[Feature Request] Add RTL support
MohamedElashri opened this issue · 11 comments
It would be nice if haven would support RTL languages. It means that when you wrote in these languages, then the text will appear from right to left instead from left to right.
Hi @MohamedElashri ,
Thanks for the suggestion! I am definitely in favor of RTL support and better internationalization for Haven. I can't promise I'll get to these features soon but I'll put them on the list!
Matt
That's great, thank you for that.
Might be as simple as dir='auto'
?
https://mough.xyz/312/psa-add-dir-auto-to-your-inputs-and-textareas
Better article about bidirectional text:
I have to add this line <div dir="rtl">
at the beginning of each post to support RTL. It would be nice if this get implemented automatically.
Hey @MohamedElashri , do you mind testing if <div dir="auto">
at the beginning of a post also creates the proper behavior for you?
Thanks!
Hey @MohamedElashri , do you mind testing if
<div dir="auto">
at the beginning of a post also creates the proper behavior for you?Thanks!
Hi @mawise
Thank you for suggesting that. Yes, it will have the same effect. This is an example using Arabic script.
Thanks @MohamedElashri ,
Is it easy enough for you to checkout a branch and test a proposed change I've made before I merge it?
If it works as expected, this would only be really basic RTL support, and only for posts -- not blog titles, or emails, or comments etc..
I checkedout the rtl
branch and built the docker image and re-created the containers but cannot access posts
or posts/new
or posts/edit
endpoints. It give me this error
We're sorry, but something went wrong.
If you are the application owner check the logs for more information.
and there is nothing in the container logs
haven-haven-1 | Database 'haven' already exists
haven-haven-1 | yarn install v1.22.21
haven-haven-1 | [1/4] Resolving packages...
haven-haven-1 | success Already up-to-date.
haven-haven-1 | Done in 0.10s.
haven-haven-1 | User with email haven@elashri.com already exists, skipping user creation
haven-haven-1 | => Booting Puma
haven-haven-1 | => Rails 6.1.7.6 application starting in production
haven-haven-1 | => Run `bin/rails server --help` for more startup options
haven-haven-1 | Puma starting in single mode...
haven-haven-1 | * Puma version: 5.6.8 (ruby 3.1.4-p223) ("Birdie's Version")
haven-haven-1 | * Min threads: 5
haven-haven-1 | * Max threads: 5
haven-haven-1 | * Environment: production
haven-haven-1 | * PID: 41
haven-haven-1 | * Listening on http://0.0.0.0:3000
haven-haven-1 | Use Ctrl-C to stop
Sorry, it was my mistake. When building from checked out branch, the image name changed. But I still used docker-compose.yml file from main branch. I fixed that and now it is working as expected. So this solves the RTL showing right to left in posts.
Thank you for your efforts.
I've merged that change, thanks for your help @MohamedElashri !