RTL hierarchy items in LTR context are not indented properly

Reported by dotancohen on 2009-04-13
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zim
Low
Unassigned

Bug Description

When creating hierarchies in the Tree with RTL languages (Hebrew, in my case) the second- and deeper- level items are not indented.

In the screenshot, there are two top level pages:
קקק
תתת

And the first top level page has one subpage, "ררר". I tried to use distinctive letters that would be easy for non-Hebrew speakers to identify.

dotancohen (dotancohen) wrote :

What environment settings are you using ? If you are using RTL names in an environment that is otherwise LTR the screenshot shows what I think is the expected result. However in a RTL environment the whole tree should indent from the right side, effectively mirroring the whole thing compared to LTR settings. However it has been a while since I tested that behavior, so it may be broken since.

dotancohen (dotancohen) wrote :

My KDE install is in Hebrew, I do not know what Gnome settings Zim is assuming as I do not have the Gnome desktop installed. The Zim interface is in Hebrew, but it is Left aligned (the File / קובץ menu is on the left). My system locale is he_IL.UTF-8:

$ locale
LANG=en_US.UTF-8
LC_CTYPE=he_IL.UTF-8
LC_NUMERIC=he_IL.UTF-8
LC_TIME=he_IL.UTF-8
LC_COLLATE=he_IL.UTF-8
LC_MONETARY=he_IL.UTF-8
LC_MESSAGES=he_IL.UTF-8
LC_PAPER=he_IL.UTF-8
LC_NAME=he_IL.UTF-8
LC_ADDRESS=he_IL.UTF-8
LC_TELEPHONE=he_IL.UTF-8
LC_MEASUREMENT=he_IL.UTF-8
LC_IDENTIFICATION=he_IL.UTF-8
LC_ALL=

Note that application directionality should not affect indentation, as the user my have both English and Hebrew language page names. So if the interface were RTL and that made RTL page names indent properly, then LTR page names would not indent properly. If fact, I have both English and Hebrew page names.

For mixed LTR and RTL page names I do not know how to get this right.

Basically there is a text field over the full width of the side pane and this is filled depending on the unicode text filled in. To get the behavior you want we would make this text field variable width to match the text length of the name, but this is not easily done with the current widgets.

Seems to me this could be an Gtk generic issue - any examples of Gtk applications that get this kind of thing right ?

Changed in zim:
importance: Undecided → Low
status: New → Incomplete
summary: - RTL hierarchy items are not indented
+ RTL hierarchy items in LTR context are not indented properly
dotancohen (dotancohen) wrote :

> For mixed LTR and RTL page names I do not know how to get this right.

For mixed LTR and RTL page names the leading "hard" character (a-zA-Zא-ת) should determine directionality. "Soft" characters are characters that do not have directionality, such as numbers, spaces, and punctuation.

> Seems to me this could be an Gtk generic issue - any examples of
> Gtk applications that get this kind of thing right ?

I just tried Evolution, and Evolution has the same behaviour as Zim. I will file a bug as Evolution and see if it needs to go upstream from there. I will also ask on the local LUG list for help.

Tell me, other than Evolution, which other GTK apps use a hierarchy tree like Zim?

dotancohen (dotancohen) wrote :

Here is the evolution bug:
http://bugzilla.gnome.org/show_bug.cgi?id=580122

Note that Evolution uses folder icons, which I do not like as they waste very valuable horizontal space. However, they do make the hierarchy understandable in mixed RTL / LTR environments. Can an option for folder icons be added to Zim?

Thanks!

The python branch uses lines as well to show relation between parent and child pages. Does this help ?

dotancohen (dotancohen) wrote :

It helps, but it looks terrible! The pointer and the lines are on the wrong (left) side, and the subpages are not indented.

That said, it is at least usable now. I can use it as is, but I know a few other RTL Zim users who would prefer it to work correctly.

dotancohen (dotancohen) wrote :

This seems to be fixed in Zim 0.46. As both RTL and LTR text are right-aligned in the RTL environment and there are the aforementioned ant trails, the hierarchy is clear. Thanks!

I did not check the LTR environment.

Changed in zim:
status: Incomplete → Fix Released
dotancohen (dotancohen) wrote :

No, sorry, not fixed in Zim 0.52!

In an LTR environment, the RTL subitems of both RTL and LTR top-level items are not indented.

Changed in zim:
status: Fix Released → New

Can you attach a zip file with a small notebook to demonstrate this issue ? I can not easily type RTL on my system and no clue how to set that up.

Changed in zim:
status: New → Incomplete
dotancohen (dotancohen) wrote :
Changed in zim:
status: Incomplete → New
Changed in zim:
status: New → Confirmed
mjdtjm (mjdtjm) wrote :

We've the same problem in Persian language (another RTL Language)
What should we do to help fix it?
IMHO, its importance isn't low, and as you see the bug is reported about 5 years ago and still is open!

Yes, this report is open for 5 years, sorry for that. Please realize that this project is maintained by a small number of volunteers, none of which (apparently) use RTL settings. Afraid the best thing to get some fix for this and other items is to have a developer who is natively using RTL to contribute patches for these issues.

If you know of someone who could pick this up, I'm willing to put a bounty of 200 Euro on making zim robust for RTL languages.

mirkhalili (mirkhalili) wrote :

Thank you to all the directors of the project because the project is very useful and I believe you that you will fix this bug soon.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.