From 555de2deb16ccde881c73c3bbd0be8f5eac5b8c9 Mon Sep 17 00:00:00 2001 From: "dmose%mozilla.org" Date: Mon, 13 Feb 2006 19:07:21 +0000 Subject: [PATCH] Make default calendar name in Lightning localizable (bug 326430), patch by Stefan Sitter , r=dmose --- calendar/lightning/content/calendar-management.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/calendar/lightning/content/calendar-management.js b/calendar/lightning/content/calendar-management.js index 1134b2f55a8f..9c894e2695ff 100644 --- a/calendar/lightning/content/calendar-management.js +++ b/calendar/lightning/content/calendar-management.js @@ -251,9 +251,16 @@ function getCalendarManager() } if (activeCalendarManager.getCalendars({}).length == 0) { - var homeCalendar = activeCalendarManager.createCalendar("storage", makeURL("moz-profile-calendar://")); + var homeCalendar = activeCalendarManager.createCalendar("storage", + makeURL("moz-profile-calendar://")); activeCalendarManager.registerCalendar(homeCalendar); - homeCalendar.name = "Home"; + + var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"] + .getService( + Components.interfaces.nsIStringBundleService); + var props = sbs.createBundle( + "chrome://calendar/locale/calendar.properties"); + homeCalendar.name = props.GetStringFromName("homeCalendarName"); var composite = getCompositeCalendar(); composite.addCalendar(homeCalendar);