Details
-
Suggestion
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.9.2
-
None
Description
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.
Here you can see the way it was done in Konvesation (formatFinalLine function). And here the way in PCManFM (which was much easier).
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!
Attachments
Issue Links
- relates to
-
QTBUG-57743 Unicode Bidi Algorithm outdated
-
- Closed
-