chatterino2 icon indicating copy to clipboard operation
chatterino2 copied to clipboard

Problem with Languages using the Arabic Script - Hebrew and Arabic are reversed

Open menchxCodes opened this issue 6 years ago • 23 comments

Languages which use the Arabic Script write and read text from right to left. In chatterino however, when a message is written in these languages show up in the wrong direction, meaning the words are right-to-left, however the order in the sentence is left-to-right which makes it unreadable. Attached is a picture to better clarify what I mean:

chatterino-rtl-issue

menchxCodes avatar Sep 21 '18 05:09 menchxCodes

Could you add the arabic text you showed in the picture to the issue itself so it's copyable?

pajlada avatar Sep 21 '18 07:09 pajlada

Hey Pajlada,

یک دو سه

It also means "One two three" in case you were wondering.

menchxCodes avatar Sep 21 '18 07:09 menchxCodes

Oh no

fourtf avatar Oct 12 '18 18:10 fourtf

What is the approximate time that when this bug will be fixed? Chatterino is unusable in Arabic channels.

Wither-x avatar Sep 16 '20 14:09 Wither-x

we don't do time estimations

fourtf avatar Sep 16 '20 15:09 fourtf

@menchxCodes @Wither-x @Nishyo

I just tried to implement a rudimentary way of rendering RTL languages in #1970. However, I don't use any RTL languages. If you get the chance, it would be great if you could download the version with this feature from here (make sure to get the right file for your operating system) and try it out.

Please feel free to report back any issues with that implementation. Thanks! :smile:

leon-richardt avatar Sep 16 '20 17:09 leon-richardt

Sorry for being late. I was busy when I got the email notice and totally forgot about it until now.. 😅

It seems to be working the right way but there's a weird spacing problem image

And tbh I didn't expect to get a respond with a fix as fast as you did.

Wither-x avatar Sep 17 '20 12:09 Wither-x

Thanks for the reply. Any chance to paste a message producing weird spacing so I can test myself?

leon-richardt avatar Sep 17 '20 12:09 leon-richardt

Of course, here:

  • السلام عليكم
  • وعليكم السلام ورحمة الله وبركاته

While I was trying to copy this happened.. https://gyazo.com/614653c208cbe127244a9b633e312a81

Wither-x avatar Sep 17 '20 13:09 Wither-x

Of course, here:

  • السلام عليكم
  • وعليكم السلام ورحمة الله وبركاته

While I was trying to copy this happened.. https://gyazo.com/614653c208cbe127244a9b633e312a81

Thank you. Can't promise I can get it fixed quickly but I will keep looking into it.

leon-richardt avatar Sep 17 '20 13:09 leon-richardt

Can someone check if this build (from the pr) renders it properly? https://github.com/Chatterino/chatterino2/pull/1970/checks?check_run_id=1131097487 To download you can click the "artifacts" link

Also with emotes in-between the words since I don't know what proper behavior is in that case.

fourtf avatar Sep 26 '20 10:09 fourtf

Arabic renders correctly but there is no spacing between words: image how it should be rendered is on the bottom.

also if you but anything other then an Arabic letter it will break in a weird way(I think the arabic words overlap for some reason). It does this with emotes and any kind of punctuation marks also. image how it should be rendered is on the bottom.

hope it helps and thanks for your work.

EndlessJest avatar Nov 11 '20 20:11 EndlessJest

any updates on this?

clevernt avatar Mar 29 '21 20:03 clevernt

any updates on this?

I'm "working" on #1970 but it's kind of stale at the moment as I'm busy with other things. Planning to get back to work on it when I have time.

leon-richardt avatar Mar 29 '21 21:03 leon-richardt

Any updates on fixing this issue are appreciated since a lot of Twitch content creators who use Chatterino, Struggle with rtl languages not being shown the currect way. Thank you again for your hard work! I hope to see this issue get fixed soon

AzzySama avatar Sep 01 '21 11:09 AzzySama

Any updates on fixing this issue are appreciated since a lot of Twitch content creators who use Chatterino, Struggle with rtl languages not being shown the currect way. Thank you again for your hard work! I hope to see this issue get fixed soon

Unfortunately there's no ETA on this, we have no devs/active contributors who can read arabic/hebrew so nobody can be 100% sure the changes they are making are correct. I would assume this fact limits the rush for anybody to attempt to fix this.

edit: I should note we do have one dev who is able to read, but they aren't in any rush to fix this, so the above stays fairly true.

Felanbird avatar Sep 04 '21 11:09 Felanbird

لطفا درستش کنین

every time we translate persian to english now you do translate thank you so much

atarevals avatar Jan 28 '22 17:01 atarevals

there is a library called Better Arabic Reshaper that solves the Arabic issue for most of applications and would simply work with a simple port, it's already been ported to other languages such as python, rust etc. (not sure if it would help in this situation but it's worth checking out)

BKSalman avatar Jul 21 '22 16:07 BKSalman

I'm not really sure if that would help, but there is a library called Better Arabic Reshaper that solves the Arabic issue for most of applications and would simply work with a simple port, it's already been ported to other languages such as python, rust etc. (not sure if it would help in this situation but it's worth checking out)

Thank you for the link but I'm afraid it won't help much in this situation. Chatterino does custom text and message layouting to properly handle the quirks of Twitch chat (mainly emotes and badges) so any external library is unlikely to be helpful.

leon-richardt avatar Jul 21 '22 16:07 leon-richardt

Thank you for the link but I'm afraid it won't help much in this situation. Chatterino does custom text and message layouting to properly handle the quirks of Twitch chat (mainly emotes and badges) so any external library is unlikely to be helpful.

Oh I see, I would help if I had the experience tbh, but sadly I don't

BKSalman avatar Jul 21 '22 16:07 BKSalman

there is a library called Better Arabic Reshaper that solves the Arabic issue for most of applications and would simply work with a simple port, it's already been ported to other languages such as python, rust etc. (not sure if it would help in this situation but it's worth checking out)

I may have been a little too premature in disregarding this approach. If we find a suitable C++ port, it could be a good "bandaid fix" to improve the situation Arabic-speaking users. (Although it probably won't be as nice as a native implementation and wouldn't improve the situation for other RTL languages.)

leon-richardt avatar Jul 29 '22 11:07 leon-richardt

If we find a suitable C++ port

I don't know much about C++ but is this, or this usable?

BKSalman avatar Jul 29 '22 21:07 BKSalman

Please take a look at https://github.com/Chatterino/chatterino2/pull/3958

mohad12211 avatar Sep 08 '22 22:09 mohad12211

@menchxCodes @Wither-x @EndlessJest @AzzySama @BKSalman @Dolev24 @SpaceFahad @Nishyo

As all of you have commented/mentioned in some way about wanting RTL languages to render the correct way, I'm happy to say this has been implemented in #3958

There's a few minor issues that will be handled in the future, such as the context for Twitch replies is not fixed https://github.com/Chatterino/chatterino2/pull/4067#issuecomment-1304829849, and @mentions look slightly weird, but the main functionality works.

You can use the version of Chatterino with this change after this comment is approximately 30 minutes old, and you can find the nightly build to test said changes here. ( wiki info for nightly )

If you find an issue with the punctuation of your language, please feel free to open an issue.

Felanbird avatar Nov 10 '22 20:11 Felanbird