Bug 187101 - Kmenu: RTL display issues
Summary: Kmenu: RTL display issues
Status: RESOLVED UPSTREAM
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-kickoff (show other bugs)
Version: unspecified
Platform: Ubuntu Unspecified
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: rtl
Depends on:
Blocks:
 
Reported: 2009-03-14 04:27 UTC by Dotan Cohen
Modified: 2009-06-29 15:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot illustrating problem (106.00 KB, image/png)
2009-03-14 04:32 UTC, Dotan Cohen
Details
Screenshot illustrating problem (112.77 KB, image/png)
2009-03-14 04:36 UTC, Dotan Cohen
Details
Screenshot illustrating problem (53.11 KB, image/png)
2009-04-12 12:18 UTC, Dotan Cohen
Details
Screenshot for Klipper illustrating problem, which arrows showing specific instances (17.29 KB, image/png)
2009-04-12 12:32 UTC, Dotan Cohen
Details
This is Lancelot without the --reverse flag. (113.01 KB, image/png)
2009-06-26 18:42 UTC, Dotan Cohen
Details
This is Lancelot with the --reverse flag. (113.94 KB, image/png)
2009-06-26 18:46 UTC, Dotan Cohen
Details
This is Lancelot with the --reverse flag in the Computer submenu (91.80 KB, image/png)
2009-06-26 18:49 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:27:12 UTC
Version:            (using KDE 4.2.0)
Installed from:    Ubuntu Packages

Please see screenshots with descriptions below. These issues appear to be specific to RTL-enabled systems.
Comment 1 Dotan Cohen 2009-03-14 04:32:08 UTC
Created attachment 32085 [details]
Screenshot illustrating problem

1) It can be seen that the punctuation in the protocol is backwards. For instance "remote://" shows up as "/:remote".
2) The submenus' rounded corners are facing the wrong side.
3) The username and machine name are displayed in the wrong order. On this system the username Is "jaunty".
Comment 2 Dotan Cohen 2009-03-14 04:36:24 UTC
Created attachment 32086 [details]
Screenshot illustrating problem

In this screenshot, it can be seen that:
1) The English-language menu items fade on the left when they should fade on the right.
2) The blue "back arrow" is on the left side of the menu items, whereas it should be on the right.
3) There is a white bar across the second-from-the-bottom menu item. Appears consistently in the Applications submenu, not in any other submenu. Appears in this submenu consistently in Hebrew KDE4, and not in English KDE4.
Comment 3 Dotan Cohen 2009-04-12 12:18:52 UTC
Created attachment 32780 [details]
Screenshot illustrating problem

These issues affect the Lancelot menus as well. In this Hebrew setup, the beginning (right side) of Hebrew text is faded, instead of the end (left side).
Comment 4 Dotan Cohen 2009-04-12 12:30:56 UTC
The punctuation in Klipper is affected as well, which leads me to believe that this is not a Plasma issue but a larger Qt issue.

Note that this issue could be solved by adding the Unicode LRM character after all English/LTR strings in Hebrew/Arabic/Persian desktops, and adding the RLM character after all Hebrew/Arabic/Persian strings in English/LTR desktops.

RLM character: http://www.fileformat.info/info/unicode/char/200f/index.htm
LRM character: http://www.fileformat.info/info/unicode/char/200e/index.htm
Comment 5 Dotan Cohen 2009-04-12 12:32:36 UTC
Created attachment 32781 [details]
Screenshot for Klipper illustrating problem, which arrows showing specific instances
Comment 6 Ivan Čukić 2009-04-12 13:52:52 UTC
Painting in Lancelot fixed.
Comment 7 Dotan Cohen 2009-06-26 16:46:48 UTC
The issues from comment #1 have been fixed!
The issues from comment #2 have been fixed!

Comment #3 is still valid: The Hebrew-language menu items fade on the right when they should fade on the left.

Shall I file a separate issue on this, retitle this bug, or leave it as is?

Thanks, Ivan!
Comment 8 Ivan Čukić 2009-06-26 17:03:25 UTC
@Dotan
Is this Lancelot from 4.3? It should have been fixed in 4.3... (and works for me - I'm testing with --reverse flag enabled)
Comment 9 Dotan Cohen 2009-06-26 17:27:54 UTC
Yes, this is the KDE 4.3 beta. Would you like a screenshot?
Comment 10 Ivan Čukić 2009-06-26 17:38:24 UTC
Yes please :)

P.s. And please try running "lancelot --reverse" (kill lancelot before invoking the command) to see wgether there is any change
Comment 11 Dotan Cohen 2009-06-26 18:10:54 UTC
How do I kill Lancelot? I suppose that I could kill plasma, but pkill lancelot does nothing.
Comment 12 Ivan Čukić 2009-06-26 18:16:38 UTC
pkill lancelot should do the trick. Mind that you will not /see/ that it is killed - the moment you click/hover the launcher, lancelot will be automatically stared.

After pkill, check that 
    ps aux | grep '[l]ancelot'
doesn't return anything (anything important at least :) )
Comment 13 Dotan Cohen 2009-06-26 18:38:57 UTC
With the --reverse flag, These are the current issues:

א) The punctuation in the protocol is backwards. For instance "remote://" shows up as "/:remote".

ב) The English-language menu items fade on the left when they should fade on
the right.


So it seems that the only issues that were fixed are the issues that do not apply to the current version of Lancelot! (Features that were removed such as the hostname or features that are no longer directional, such as the submenus' rounded corners).

Screenshots coming.
Comment 14 Dotan Cohen 2009-06-26 18:42:12 UTC
Created attachment 34839 [details]
This is Lancelot without the --reverse flag.

Note Stellarium and Ksnapshot in the upper left corner for examples of fading. As you know, English should fade to the right and Hebrew to the left. In this example, the English incorrectly fades to the left, and the Hebrew correctly fades to the left. An Arabic user has confirmed that he sees the same behaviour in his language as well.
Comment 15 Dotan Cohen 2009-06-26 18:43:32 UTC
Wow, I messed up the previous comment. It should have read like this:

Note Stellarium and Ksnapshot in the upper left corner for examples of fading.
As you know, English should fade to the right and Hebrew to the left. In this
example, the English correctly fades to the right, and the Hebrew incorrectly
fades to the right. An Arabic user has confirmed that he sees the same behaviour
in his language as well.
Comment 16 Dotan Cohen 2009-06-26 18:46:56 UTC
Created attachment 34840 [details]
This is Lancelot with the --reverse flag.

In this screenshot _with_ the --reverse flag it can be seen that the English incorrectly fades to the left, and the Hebrew correctly fades to the left.
Comment 17 Dotan Cohen 2009-06-26 18:49:32 UTC
Created attachment 34841 [details]
This is Lancelot with the --reverse flag in the Computer submenu

Here it can be seen that trash:/ is shown as /:trash and /home/jaunty2 is shown as home/jaunty2/
Comment 18 Ivan Čukić 2009-06-26 18:52:02 UTC
--reverse is meant *only* for RTL languages (that is, it is normal that English language fades left when --reverse is used).

The thing I don't understand is why the --reverse is not enabled automatically when a RTL language is active... It should be...

And I'm not sure whether I can do anything about things that are not translated when in RTL mode.
Comment 19 Dotan Cohen 2009-06-26 19:02:21 UTC
> --reverse is meant *only* for RTL languages (that is, it is normal
> that English language fades left when --reverse is used).

Naturally, --reverse is meant only for RTL languages. However, I disagree that it means that English should fade to the left. I expect the _end_ of the text to fade, not a particular side of it.


> The thing I don't understand is why the --reverse is not enabled
> automatically when a RTL language is active... It should be...

It should be! But this may be part of a wider KDE 4.3 issue:
https://bugs.kde.org/show_bug.cgi?id=196222


> And I'm not sure whether I can do anything about things that are
> not translated when in RTL mode.

No, that is the translator's job. But I do not see anything not translated. The trash:/ issue is not a translation issue. It is an LTR string with punctuation. The punctuation, being non-directional, goes after the directional Latin letters. In an RTL interface, after means "to the left of". The solution is to wrap LTR strings in LRM characters when shown in an RTL interface. The opposite is true for showing RTL strings in an LTR interface: they need to be wrapped in RLM characters.
Comment 20 Ivan Čukić 2009-06-27 10:25:21 UTC
1. I agree with you on "I disagree that it means that English should fade to the left". But it does mean that Lancelot has no clue about which language is in which icon - it just shows the text, the internationalization system gives it.

IMO, there should be NO text in English at all. (when another language is selected) So, when that is concerned, there are a lot of things that are not translated (Home, Firefox, Volume, the rest of L's UI)

2. The rest of the problems are KDE-wide problems - Dolphin shows screwed up urls in icon descriptions, and RTL loading is also global according to bug 196222 you've mentioned.


I'll try to investigate the 1. to see whether there is a normal solution, but that's all I can do...
Comment 21 Dotan Cohen 2009-06-27 13:04:26 UTC
Thanks. There will always be Latin-based text in non-Latin (even RTL) interfaces as some terms are defined in Latin characters. A typical example would be /home/user.
Comment 22 Ivan Čukić 2009-06-27 13:10:51 UTC
It is not the question of latin vs non-latin, but rather RTL vs LTR.

But, I agree that the paths (and similar stuff) should be left alone.

We definitely need more core developers from RTL areas...
Comment 23 Ivan Čukić 2009-06-27 14:09:17 UTC
p.s. This definitely is a global issue - I've checked Kickoff and it behaves the same... It looks like the order of the characters is changed while painting (that is, it is built in Qt)
Comment 24 Dotan Cohen 2009-06-28 21:14:16 UTC
Agreed, this is a global issue. Should I change the product, or how to proceed?
Comment 25 Ivan Čukić 2009-06-28 21:31:46 UTC
I'm marking this as /upstream/ problem. So, you can open a new report. (it will receive more audience if if doesn't say 'KMenu')
Comment 26 Dotan Cohen 2009-06-29 15:45:00 UTC
Thanks, Ivan, I will try to reproduce the issues in other applications as well and file bugs that show them in multiple apps.

Thanks for your patience and your code!