diff --git a/calendar/resources/content/calPrintEngine.js b/calendar/resources/content/calPrintEngine.js index a8eaff7c22c8..6bf3a21e5ac3 100644 --- a/calendar/resources/content/calPrintEngine.js +++ b/calendar/resources/content/calPrintEngine.js @@ -172,6 +172,13 @@ function OnLoadPrintEngine(){ var args = window.arguments[0]; gContent = document.getElementById("content"); + var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"] + .getService(Components.interfaces.nsIStringBundleService); + + var props = sbs.createBundle("chrome://calendar/locale/calendar.properties"); + var windowTitle = props.formatStringFromName("PrintPreviewWindowTitle", [args.title], 1); + document.title = windowTitle; + var htmlexporter = Components.classes["@mozilla.org/calendar/export;1?type=html"].createInstance(Components.interfaces.calIExporter); // Fail-safe check to not init twice, to prevent leaking files diff --git a/calendar/resources/locale/en-US/calendar.properties b/calendar/resources/locale/en-US/calendar.properties index 57652f805d73..6bd13b8690d6 100644 --- a/calendar/resources/locale/en-US/calendar.properties +++ b/calendar/resources/locale/en-US/calendar.properties @@ -38,6 +38,7 @@ # Misc. strings in JS AllDayEvents=All Day Events +PrintPreviewWindowTitle=Print Preview of %1$S # Event status: Tentative, Confirmed, Cancelled # ToDo task status: NeedsAction, InProcess, Completed, Cancelled