Priority: Not Evaluated
Affects Version/s: 5.9.2
Fix Version/s: None
Component/s: Core: QString and Unicode
So before starting, here a small story:
I am a programmer that wrote a nice error message for the user, saying "The folder %1 doesn't exist", and let my translator translate it.
My Arabic translator did that and produced a nice string. So now my error is shown to Arab people, but contains a problem: The direction of the folder name is not right.
"The folder /home/user/test_ doesn't exist", which is translated to:
"المجلد /home/user/test_ غير موجود"
(I added a RLE to make it look right in JIRA).
Note how the text is formatted wrongly, and that's because a strong RTL character forced the direction.
This is a suggestion for adding a function to QString that would return the string “bidi aware”, so even Arabic files like
will look like that in English strings, and not "سطح المكتب_".
We faced such a problem in Konversation (KDE) and PCManFM-Qt (LXQt), where there are different strings with different directions being joined to one string.
Another approach will be modifying `arg` functions, adding a new parameter for returning the string “bidi aware”, but this will require changing a bunch of overloads.
Any comment or suggestion is appreciated.
Thanks for reading!