After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 508796 - Song header has wrong direction in RTL languages
Song header has wrong direction in RTL languages
Status: RESOLVED DUPLICATE of bug 610753
Product: rhythmbox
Classification: Other
Component: User Interface
HEAD
Other Linux
: Normal normal
: ---
Assigned To: Djihed Afifi
RhythmBox Maintainers
Depends on:
Blocks: Arabic
 
 
Reported: 2008-01-11 17:05 UTC by Djihed Afifi
Modified: 2010-03-07 07:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix song header when in RTL (804 bytes, patch)
2008-01-11 17:06 UTC, Djihed Afifi
reviewed Details | Review
Updated (813 bytes, patch)
2008-01-12 17:42 UTC, Djihed Afifi
committed Details | Review
Brackets in the embedded left-to-right strings aren't handled correctly. (11.99 KB, image/png)
2008-01-13 01:48 UTC, Jonathan Matthew
  Details

Description Djihed Afifi 2008-01-11 17:05:27 UTC
The song header (below the controls) has the wrong direction when in an RTL language such as Arabic, and when the song tags are latin characters.

A song name with latin characters will cause the text to be flipped, which is wrong.

To remedy this, test for the direction and insert RLM at the start of the text. I will attach a patch that does this.
Comment 1 Djihed Afifi 2008-01-11 17:06:02 UTC
Created attachment 102602 [details] [review]
Fix song header when in RTL
Comment 2 Djihed Afifi 2008-01-11 17:06:53 UTC
Hmm, just for your information, in the patch there is an RLM character being appended between those "".
Comment 3 Jonathan Matthew 2008-01-11 22:24:40 UTC
It would be a good idea to escape the RLM character.  Otherwise, the code is likely to be deleted because it doesn't appear to do anything, or get corrupted because someone used a stupid text editor, or it might choke a less capable c compiler, or...
Comment 4 Djihed Afifi 2008-01-12 17:42:08 UTC
Created attachment 102672 [details] [review]
Updated

Here is a better patch, using a clearer representation or RLM.
Comment 5 Jonathan Matthew 2008-01-13 01:46:05 UTC
Since this does seem to make a definite improvement, I've committed it.  It's not perfect, though; I'll attach an image that shows the problem I'm talking about.
Comment 6 Jonathan Matthew 2008-01-13 01:48:56 UTC
Created attachment 102703 [details]
Brackets in the embedded left-to-right strings aren't handled correctly.
Comment 7 Djihed Afifi 2008-01-13 03:06:07 UTC
Jonathan, unfortunately, currently that is unfixable without text analysis that probably does not belong to rhythmbox.

It's unpredictable what the user will have there. Since she is running an RTL version, bets are her songs are tagged in her language. If they are not, problem happens.

I'm CC'ing Behdad, may be there is a way to handle this?


Comment 8 Bastien Nocera 2008-01-13 09:30:28 UTC
See bug 413263 and bug 413266 where I have problems with brackets handling as well. Works fine in Mozilla, but not with Pango.
Comment 9 Behdad Esfahbod 2008-01-17 07:12:43 UTC
Can someone attach a shot of the problem before the patch?

The best fix is to use different labels for the label and the song detail, so each gets its own, correct, direction.  There are other fixes possible too.  I need to see what the original problem was though.
Comment 10 Jonathan Matthew 2010-03-07 07:26:29 UTC
This was fixed in bug 610753.

*** This bug has been marked as a duplicate of bug 610753 ***