RocketChat / RocketChat/Rocket.Chat

Flipped RTL Text When Mixed with LTR Text

Open
#26,857 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Search before asking
  • I had searched in the issues and found no similar issues.
Operating System
  • macOS
  • Windows
  • Linux
Operating System Version

Windows 10

It happens on the web browser too?

Yes, it happens on the web browser too

Rocket.Chat Desktop App Version

3.8.9

Rocket.Chat Server Version

5.1.2

Describe the bug

I have faced an issue in Rocket Chat Desktop Client version 3.8.9.
The issue is when mixing RTL text with LTR text in the same line, after sending the message it is considering the LTR order and flipping the words written in RTL.

Although it is showing correctly in the Android App versions 4.29 and 4.30.

How to Reproduce
  1. Write an RTL text (E.g. Arabic text)
  2. Write some LTR text (E.g. English text)
  3. Send the message
Describe your Expected behavior
Expected behavior:

The Arabic Text should show on the right side followed by the English Text.

E.g.
مرحبا بكم لعالم Rocket Chat
image

Actual behavior:

After sending the message, it is flipping the Arabic Text and showing it at last although it is written first.
Noting that it is appearing correctly as-written in the Android app.

E.g.
image

Anything else

How often does this problem occur?
Always in Windows Desktop Client and Web Browser.

Are you willing to submit a code contribution?
  • Yes, I am willing to submit a Pull Request!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the report. First reproduce the mixed Arabic and English message in the Windows desktop client and web browser, then trace the message-rendering entry point and compare it with Android's correct ordering. Done means the RTL text remains in its written order before the LTR text after sending.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
internationalization, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.