Closed Bug 135272 Opened 18 years ago Closed 11 years ago

columns content doesn't flip when setting the UI aligned to the right


(Core :: XUL, defect, major)

Not set





(Reporter: tsahi_75, Unassigned)


(Blocks 1 open bug)


(Keywords: rtl, Whiteboard: [adt3] [UI] [fixed by bug 140759])


(4 files, 1 obsolete file)

ignore "component" field in this bug. someone decided that only 10 languages in
the world can have l10n problems.

this was tested on moz 0.9.8, but it's my understanding that it exists in later
builds too: some languages (hebrew, arabic and others) are written right to
left, so the command 

window,dialog,wizard,page {
direction: rtl;

needs to be added to the file intl.css in the folder locale/ab-CD/global in the
language pack ab-CD.jar file (ab-CD replaced with the language and country codes
of course). this causes the interface to be aligned to the right when the pack
is activated. 

problem: columns content, like the columns in the mail/news client or the
address book or the bookmarks manager, remaine aligned to the left, with their
content positioned as if the UI is still aligned to the left, with only the
column headers aligned to the right. e.g.: in the mail client, the "subject"
header is at the right, but the subject column is at the left.

expected result: columns should flip order and be aligned to the right, like the

reprodicible: always
Steps to Reproduce:
1. open the file en-US.jar in the chrome folder
2. extract the file intl.css
3. edit the file as described
4. add the file back to en-US.jar (while maintaining folder structure)
5. start Mozilla Mail.
Actual Results:
interface is aligned to the right, but message information (subject, sender,
date etc.) is not. the same with other components mentioned above.
Expected Results:
all columns should flip order, with the thread on the right, then subject, then
sender etc.

[my first bug report, hope it's OK ;) ]
i've set the target milestone to 1.0. i hope i'm not too optimistic...
Target Milestone: --- → mozilla1.0
Component: Bosnian/bs-BA → BiDi Hebrew & Arabic
Product: Browser Localizations → Browser
Version: unspecified → other
verifying. Tsahi, let me fool around with it and see if I can figure anything out.

P.S. Nicely-written bug :)
Ever confirmed: true
Blocks: 137995
note from varga: need to patch EnsureColumns() in outliner to support rtl. 
any work being done here? without this bug fixed, a hebrew pack is useless,
expecially for the mail/news client.
This way I really get to know many of the Mozilla l10n bugs.

Cheers from Sarajevo,

bs-ba (Bosnian) localizator
-> me
Assignee: aselimovic → varga
nominating for buffy
Keywords: nsbeta1
Nav triage team" nsbeta1+/adt3
Keywords: nsbeta1nsbeta1+
Whiteboard: [adt3]
Attached patch initial patch (obsolete) — Splinter Review
I'm not sure if this is correct behaviour. Should we also flip tree pseudo
elements (twisty, image, etc.)? This would be more difficult
Smontagu, can you try this patch?
>Should we also flip tree pseudo elements (twisty, image, etc.)?

Do you mean flip the images themselves, or their location?

If the former, there is discussion of that in bug .... If the latter, then we
should. For example in the Subject column in mailnews, the message status icon
(or whatever it's called) should be on the right of the subject text instead of
the left.

Apart from that, behaviour looks good with the patch. I noticed one bug: when
using the mouse to resize the columns, the target for the click and drag is
Comment on attachment 92579 [details] [diff] [review]
initial patch

ok, thanks for your comments.
So I need to figure out how to flip location of pseudo elements and fix the
splitter bug.
Attachment #92579 - Flags: needs-work+
I meant to go back to my last comment and fill in the bug number, but forgot to
do so before submitting. The discussion on mirroring visual chrome elements is
in bug 147232.
don't forget to verify this patch on Bookmarks Manager, History, Certificate
Manager, Device Manager, JavaScript Debugger... (am i forgetting something?)
trees are also used in bookmark manager, history, preferences, certificate
manager, device manager, online help index, and maybe other places too. i filed
bug 140759 about the trees problem.
Yeah, we know where it is used.
That other bug seems like a dupe of this bug.
just a reminder...
and there are no columns in the help AFAIK, so i'm not sure about the dupe.
As we discussed, this bug also covers flipping of tree pseudo elements like
twisties and images in one column.
varga, any progress with the patch? this bug breaks many mozilla elements.
sorry to bother you guys, but i really think this bug should be put high on the
BiDi bugs list.
I think I'll revive my previous patch and check it in.
It's better than nothing for now.
Then I'll try to find an efficient way to flip also twisties, images and thread
Attached patch up to date patchSplinter Review
Attachment #92579 - Attachment is obsolete: true
Comment on attachment 103764 [details] [diff] [review]
up to date patch

Attachment #103764 - Flags: review+
Depends on: 176243
Depends on: 176244
varga: should i ask for sr=, or would you take care of this?
I already requested an sr= from hyatt
Comment on attachment 103764 [details] [diff] [review]
up to date patch

Attachment #103764 - Flags: superreview+
This isn't a recent regression, a major crash fix or a near-zero risk fix.
Please hold off on landing this until 1.3 opens (real soon now). Thanks.
checked in
Closed: 18 years ago
Resolution: --- → FIXED
ah, sorry, this is not completely fixed yet.

Resolution: FIXED → ---
Nav triage team: Jan, can you attach a screenshot of what it looks like after
you checked in your fix and could you elaborate on what the remaining work here
is?  Thanks.
Whiteboard: [adt3] → [adt3][need info]
Attached image shot1.png
Attached image shot2.png
I think it looks much better now, although there are still 2 issues.
1. The twisty, image and connecting lines should be flipped too
2. The column reording is broken when direction is rtl.

and I forgot to mention that last time I tried to take a look, it was not
trivial to fix.

Target Milestone: mozilla1.0 → mozilla1.4beta
Whiteboard: [adt3][need info] → [adt3] [UI]
Tsahi or anyone else, I need an advice. The columns should be flipped when the
direction is RTL. But what about order of columns in the column picker?
I think it should be unchanged. What do you think?

Jan, you are correct. In Hebrew, Upper and Rightmost share similar logic with First.

By the way, is there anyway (a hidden pref maybe) to flip the column order back
to LTR? I can imagine some users who would want to use the Hebrew UI, but still
get English email almost exclusively. In this case, the traditional LTR column
order would be more natural.

Thanks for working on this,

I think you could use CSS for that purpose:

window,dialog,wizard,page {
  direction: rtl;

tree {
  direction: ltr !important;
see bug 140759 for patch. Also see last comments there, I think last patch for
this bug fixed its issue and it shouldn't be REOPENED - Reverse the rendering
order should be done only when changing the *direction* of "tree".
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: aselimovic → layout.fonts-and-text
Assignee: Jan.Varga → jag
Component: Layout: Text → XUL
Keywords: rtl
QA Contact: layout.fonts-and-text → xptoolkit.widgets
Assignee: jag → nobody
Now that bug 140759 has landed, I think we can mark this as FIXED.
Closed: 18 years ago11 years ago
OS: Windows 98 → All
Hardware: x86 → All
Resolution: --- → FIXED
Whiteboard: [adt3] [UI] → [adt3] [UI] [fixed by bug 140759]
Target Milestone: mozilla1.4beta → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.