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
Implement initial support for RTL languages #3958
Conversation
Selection do not work yet. punctuation marks do not work for some reason. mixing RTL and LTR does seem to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
thank you so much! Everything seems to work correctly so far. |
Since we are using LTR layout, non-RTL characters (for some reason Arabic punctuation marks are considered non-RTL) will render in wrong place (behind the word instead of in front of it, and vice versa) The solution is to add an invisible Arabic letter mark before and after the word.
Now Compact-Emotes and Zero-Width-Emotes work after the RTL ordering
@Felanbird yes that was due to a weird thing I did, fixed after this refactor. |
I refactored the fix a bit. What is done is basically this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
due to Chatterino#4067 we should reorder the words when creating the element
neutral words which are between RTL words are treated like RTL and need the U+061C mark for proper orientation
make variable static Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
ready for final review & merge. |
I attribute the previous errors I ran into to bad fonts on Linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!!
@mohad12211 Thanks for your contribution! As a first-time contributor, you can now add yourself to the contributors list that's shown inside the application. To do so, open a new PR where you modify the resources/contributors.txt file and add yourself to the list. Make sure to read the comments at a top for instructions. |
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
This is a fix #720 for RTL languages.
& $ #
etc...) are ordered properlyreply messages are handled properly.will be another PR, we need to reorder words when creating the reply element due to Make reply thread subtext easier to click #4067Selection do not work yet.won't fix for now, use (right click -> copy message) as a workaround.