diff --git a/mozilla/calendar/base/src/calCalendarManager.js b/mozilla/calendar/base/src/calCalendarManager.js index 4d04296120e..ac145b73d3a 100644 --- a/mozilla/calendar/base/src/calCalendarManager.js +++ b/mozilla/calendar/base/src/calCalendarManager.js @@ -37,6 +37,7 @@ * * ***** END LICENSE BLOCK ***** */ +const SUNBIRD_UID = "{718e30fb-e89b-41dd-9da7-e25a45638b28}"; const kStorageServiceContractID = "@mozilla.org/storage/service;1"; const kStorageServiceIID = Components.interfaces.mozIStorageService; @@ -299,7 +300,19 @@ calCalendarManager.prototype = { var brandSb = sbs.createBundle("chrome://branding/locale/brand.properties"); var calSb = sbs.createBundle("chrome://calendar/locale/calendar.properties"); - var shortName = brandSb.GetStringFromName("brandShortName"); + var hostAppName = brandSb.GetStringFromName("brandShortName"); + + // If we're Lightning, we want to include the extension name + // in the error message rather than blaming Thunderbird. + var appInfo = Components.classes["@mozilla.org/xre/app-info;1"] + .getService(Ci.nsIXULAppInfo); + var calAppName; + if (appInfo.ID == SUNBIRD_UID) { + calAppName = hostAppName; + } else { + lightningSb = sbs.createBundle("chrome://lightning/locale/lightning.properties"); + calAppName = lightningSb.GetStringFromName("brandShortName"); + } var promptSvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); @@ -310,13 +323,13 @@ calCalendarManager.prototype = { var choice = promptSvc.confirmEx( null, - calSb.formatStringFromName("tooNewSchemaErrorTitle", - [shortName], 1), - calSb.formatStringFromName("tooNewSchemaErrorText", - [shortName], 1), + calSb.formatStringFromName("tooNewSchemaErrorBoxTitle", + [calAppName], 1), + calSb.formatStringFromName("tooNewSchemaErrorBoxText", + [calAppName, hostAppName], 2), buttonFlags, calSb.formatStringFromName("tooNewSchemaButtonQuit", - [shortName], 1), + [hostAppName], 1), null, // No second button text null, // No third button text null, // No checkbox diff --git a/mozilla/calendar/locales/en-US/chrome/calendar/calendar.properties b/mozilla/calendar/locales/en-US/chrome/calendar/calendar.properties index 5edde6f191b..401ee7f01c9 100644 --- a/mozilla/calendar/locales/en-US/chrome/calendar/calendar.properties +++ b/mozilla/calendar/locales/en-US/chrome/calendar/calendar.properties @@ -94,8 +94,8 @@ None=None # Error strings ## @name UID_NOT_FOUND ## @loc none -tooNewSchemaErrorTitle=Your data isn't compatible with this version of %1$S -tooNewSchemaErrorText=The data in your profile was updated by a newer version of %1$S, and continuing will probably cause the information to be lost or corrupted. %1$S will now quit. +tooNewSchemaErrorBoxTitle=Your calendar data isn't compatible with this version of %1$S +tooNewSchemaErrorBoxText=The calendar data in your profile was updated by a newer version of %1$S, and continuing will probably cause the information to be lost or corrupted. %2$S will now quit. tooNewSchemaButtonQuit=Quit %1$S # Editing repeating items strings diff --git a/mozilla/calendar/locales/en-US/chrome/lightning/lightning.properties b/mozilla/calendar/locales/en-US/chrome/lightning/lightning.properties index 4dd9287106f..306ed3055f9 100644 --- a/mozilla/calendar/locales/en-US/chrome/lightning/lightning.properties +++ b/mozilla/calendar/locales/en-US/chrome/lightning/lightning.properties @@ -18,7 +18,8 @@ # Portions created by the Initial Developer are Copyright (C) 2006 # the Initial Developer. All Rights Reserved. # -# Contributor(s): +# Contributor(s): +# Matthew Willis # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or @@ -34,6 +35,9 @@ # # ***** END LICENSE BLOCK ***** +# Lightning branding +brandShortName=Lightning + # Lightning specific strings agendaToday=Today