Bug 187098 - Dolphin RTL display issues
Summary: Dolphin RTL display issues
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Ubuntu Unspecified
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords: rtl
Depends on:
Blocks:
 
Reported: 2009-03-14 04:07 UTC by Dotan Cohen
Modified: 2010-03-16 13:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot illutrating problem (79.39 KB, image/png)
2009-03-14 04:07 UTC, Dotan Cohen
Details
Screenshot illutrating problem (17.92 KB, image/png)
2009-03-14 04:08 UTC, Dotan Cohen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dotan Cohen 2009-03-14 04:07:16 UTC
Version:            (using KDE 4.2.0)
Installed from:    Ubuntu Packages

Dolphin currently has at leas these three RTL (Right to Left) display issues:
1) The Places panel has the close parenthesis shown on the wrong side of the string.
2) The Information panel has the metadata titles on the left (wrong) facing left (right), and the metadata itself on the right (wrong).
3) The statusbar shows words in the wrong order.
Comment 1 Dotan Cohen 2009-03-14 04:07:58 UTC
Created attachment 32081 [details]
Screenshot illutrating problem
Comment 2 Dotan Cohen 2009-03-14 04:08:21 UTC
Created attachment 32082 [details]
Screenshot illutrating problem
Comment 3 Peter Penz 2009-03-14 13:24:55 UTC
Thanks for the report! The first issue seems to be a kdelibs/solid related issue, but I can have a look on this too.
Comment 4 Kevin Ottens 2009-03-14 13:51:23 UTC
This one is in fact a bug in HAL, we can't do anything about it. The label is forwarded from HAL itself.
Comment 5 Dotan Cohen 2009-03-14 14:44:28 UTC
@Kevin: Which issue are you referring to? Also, please file the bug at HAL and link to it from here. Thanks.
Comment 6 Kevin Ottens 2009-03-14 15:17:32 UTC
The number 1: misplaced close parenthesis.
You should find the same borked strings in lshal output.

As for reporting the bug on FreeDesktop bugzilla, you're better placed than me to reproduce and provide a test case, so I'll happily let you do it (also I'm lacking time to do a proper report).
Comment 7 Dotan Cohen 2009-03-14 15:55:37 UTC
@Kevin: No, hal is returning them correctly. The effect that you see is common when a non-directional character (such as punctuation) is used at the end of a string that belongs to one directionality (in this case, LTR) but is configured for the other (in this case, RTL). If the string would be displayed as LTR as opposed to RTL then it would display correctly.

In fact, this is the issue with (3) as well. That string is obviously LTR (despite the units of kiB in Hebrew) so it should be directed as LTR, not RTL. It needs to be either translated to Hebrew (better solution) or directed LTR.
Comment 8 Dotan Cohen 2009-03-14 23:46:17 UTC
It seems that issues (1) and (3) could be solved by adding an LRM (Left to Right Mark) character to strings that are known LTR (Left To Right), such as those returned by hal. I suggest parsing the string returned by hal for any RTL characters [ا-يא-ת] or by using a library meant for the purpose, such as Python's Pango's find_base_dir function. More information on the LRM (U+200E) can be found here:
http://www.fileformat.info/info/unicode/char/200e/index.htm
Comment 9 Kevin Ottens 2009-07-24 18:13:41 UTC
This one should be fixed now thanks to Albert's effort to give back translated strings instead of purely relaying HAL outputs.

The relevant patch was committed in revision 995502, and will be in the 4.4 release.
Comment 10 Dotan Cohen 2010-03-16 09:18:48 UTC
No, the first issue is still not fixed. The statusbar still has the parenthesis on the wrong side. This seems to be because although it is right-aligned, it is apparently still with LTR directionality. KDE 4.1.1
Comment 11 Dotan Cohen 2010-03-16 13:26:43 UTC
To keep this bug closed and to concentrate on the issue, I filed a separate bug for the statusbar:
https://bugs.kde.org/show_bug.cgi?id=230963

I should have filed three separate bugs to begin with. Thanks for putting up with me!