Closed Bug 273251 Opened 17 years ago Closed 16 years ago
Calendar print preview window title not able to localize
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0 Calendar print preview window title is hardcoded into printDialog.js as "CalendarPrintWindow". Reproducible: Always Steps to Reproduce: 1. Select File -> Print active calendar (I'm using polish version of Calendar so the names could be different) 2. Enter some name and click OK Actual Results: In the title you will see "CalendarPrintWindow" - it is hardcoded. Expected Results: Some title taken from locales. To correct this just change this lines in printDialog.js: printwindow=window.openDialog("chrome://calendar/content/calPrintEngine.xul", "CalendarPrintWindow", "chrome,dialog=no,all,centerscreen", printFunction,printFunctionArg,mytitle,showprivate,gArgs,gCalendarWindow ); In the second line there should be some text taken from locales.
What version of calendar are you using? (help | about calendar) Where do you see this title? In 2004110405-cal on FF1.0 on w2k, I get a print preview window with an empty title in the titlebar, and the preview page contains the title I typed in the dialog. "CalendarPrintWindow" in the place you cite is a program name for the window, not the displayed title of the dialog. openDialog is similar to open, but accepts additional parameters. http://xulplanet.com/tutorials/xultu/dialogs.html "The name attribute is not a reference or the title of the window. It is used as a target to links and forms." http://www.mozilla.org/docs/dom/domref/dom_window_ref76.html If this is correct, please resolve this bug as INVALID.
There have been a checkin on trunk that changes the way content.title works (or was it window.title? I can never remember) That might be why the title of the window isn't set correctly
(In reply to comment #1) > What version of calendar are you using? (help | about calendar) 2004111212-cal > Where do you see this title? File -> Print active calendar -> OK Now it is in the titlebar > "CalendarPrintWindow" in the place you cite is a program name for the window, > not the displayed title of the dialog. But when I change it, it is displayed in the titlebar. Can someone confirm this?
Here's a patch adding the title-attribute and adding calendar.print.previewwindow.title (not sure if you want it called that) to calendar.dtd
Assignee: mostafah → robin.edrenius
Status: UNCONFIRMED → ASSIGNED
Attachment #204184 - Flags: first-review?(jminta)
Comment on attachment 204184 [details] [diff] [review] Add title attribute and make localizable I think we decided in IRC that the way to go here is something like "Print Preview of <user title>" or "<user title> - Print Preview". Also, we can probably get by with just calendar.print.preview.title
Attachment #204184 - Flags: first-review?(jminta) → first-review-
This version is using "Print preview of <user title>"
Comment on attachment 204962 [details] [diff] [review] Patch v2 An nsIDialogParamBlock is used to pass multiple arguments through an xpcom service that only allows 1 argument. You should only need the stringbundle service here.
Attachment #204962 - Flags: first-review?(jminta) → first-review-
Version 3, removes nsIDialogParamBlock and uses only stringbundle service.
Comment on attachment 204964 [details] [diff] [review] Patch v3 Thanks for the patch! r=jminta
Attachment #204964 - Flags: first-review?(jminta) → first-review+
patch checked in
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.