Open Bug 206010 Opened 22 years ago Updated 3 years ago

Print Preview footers mangled by BiDi reordering

Categories

(Core :: Printing: Output, defect)

x86
All
defect

Tracking

()

People

(Reporter: tsahi_75, Unassigned)

Details

(Keywords: rtl)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; he-IL; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; he-IL; rv:1.3) Gecko/20030312 the headers and footers at the print preview, and consequently at the actual printed page, don't take BiDi. this is most evident at the "page x of y" footer, but i suspect it happenes with all the headers/footers. Reproducible: Always Steps to Reproduce: 1. aligning the interface to the right: add these lines to the file intl.css, in the locale\en-US\global, in the en-US.jar file (the language pack file, in the chrome folder): window,dialog,wizard,page { direction: rtl; } menu { direction: rtl; } outliner { direction: rtl; } 2.print preview a page. 3.if the "x of y" is not seen, click the page settings button, then the margins and footers/headers tab, and set one of them to display it. Actual Results: i get "of 1 2" (in hebrew) Expected Results: should get "1 of 2"
Attached image screen shot
Attachment #123552 - Attachment description: sreen shot → screen shot
The problem is that page headers and footers are always rendered with a base direction of left-to-right. See http://lxr.mozilla.org/seamonkey/source/layout/html/base/src/nsPageFrame.cpp#564. My comment there mentions that this should change when bug 139337 is fixed, and I should have thought of localized versions and custom texts as well. Meanwhile, you could work around this problem in the localization by inserting a right-to-left mark at the beginning of the localized text.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I just checked my suggested workaround and it seems to work, using \u200f to represent the right-to-left mark.
ok, that works, but any idea where is the entity for the page title? i'll ask at the L10n group too.
I'm not sure what you mean by "the entity for the page title". &T in customized headers will give you the contents of the <title> element. &P will give you just the page number and &PT will give you the page number in "x of y" format. The localizable entities for the page number formats are pagenumber and pageofpages in layout/html/base/src/printing.properties.
the problem is that when the title is mixed RTL/LTR and the page is RTL, the title is LTR.
The page title is kind of a special case. It's always displayed LTR in the title bar even in right-to-left localized builds, no?
i believe that e.g. in localized Windows, where all titles are RTL, the page title in the window's title bar will also be RTL. i thought to mimic that, at least in the page printout.
what about the title for images, at en-US/communicator/layout/ImageDocument.properties (couldn't find it in LXR), in entities ImageTitleWithDimensions and ImageTitleWithDimensionsAndFile. i tried any concievable combination of RTL and LTR characters, and non worked. i even managed to do it in html, with <bdo> tags, but couldn't convert it to unicode.
i am told this bug happenes only in english windows. on hebrew localized windows XP, the header "x of y" of the page number is displayed correctly.
This bug in Linux too
OS: Windows XP → All
(In reply to comment #10) > i am told this bug happenes only in english windows. on hebrew localized windows > XP, the header "x of y" of the page number is displayed correctly. That seems to happen only when the document is right-to-left. When I print English (LTR) documents from Hebrew Mozilla on Hebrew XP, the bug is still present.
Summary: print preview doesn't take BiDi → Print Preview footers mangled by BiDi reordering
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
Assignee: mozilla → nobody
Component: Layout: Text → Printing: Output
Keywords: rtl
QA Contact: layout.fonts-and-text → printing
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 17 votes.
:jwatt, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwatt)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(jwatt)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: