ndp/git-cheatsheet

Adding RTL mode for supporting RTL languages.

Closed this issue · 7 comments

Is your feature request related to a problem? Please describe.
Hi! I want to contribute to this project and Persian language, but as it's a RTL language, forcing it to be shown LTR is not a good idea.

Describe the solution you'd like
Adding a RTL mode for RTL languages.

Describe alternatives you've considered
I don't know what to write here. :/

Additional context
image
Here, I added direction: rtl; for testing the layout.

ndp commented

This would be great. I can work out the layout issues with rtl if you can provide a translation. I can't do it at the moment, but I'll look at it in the next week and make a branch to contribute to.

ndp commented

@amiria703 At the command level, is it still RTL, or does that switch to LTR at some point?

ndp commented

WIP here #42

@ndp
What does command level mean? Which part of website?

ndp commented

I don't know anything about rtl. I am also assuming you are working in a CLI (command line interface). I'm assuming this CLI is LTR and the commands are the same as the English version I'm familiar with. Please correct me if any of those assumptions are wrong.

I set up my German to be RTL, and I get screenshots like this:

Screen Shot 2022-06-09 at 10 53 15 AM

Screen Shot 2022-06-09 at 10 53 04 AM

By "command", I mean what you type on the CLI. So what I'm doing is switching the "command" to be LTR... thanks for your help.

ndp commented

It's ready to try out if you want to start a translation. There are instructions in 32a1103 To see RTL working, change the dir property of the language, per 1af3595

ndp commented

This has been merged into the master branch if anyone wants to take a whack at translating a LTR language. My implementation may not be right, as I'm not sure how this works and don't currently have the language skills to know what is right and wrong. But the basic idea of text being able to be drawn the other way works.