diff --git a/mail/locales/en-US/chrome/messenger/messenger.properties b/mail/locales/en-US/chrome/messenger/messenger.properties index 9130237f0a5d..27a182ef659c 100644 --- a/mail/locales/en-US/chrome/messenger/messenger.properties +++ b/mail/locales/en-US/chrome/messenger/messenger.properties @@ -107,7 +107,8 @@ operationFailedFolderBusy=The operation failed because an other operation is usi folderRenameFailed=The folder could not be renamed. Perhaps the folder is being reparsed, or the new name is not a valid folder name. # LOCALIZATION NOTES(verboseFolderFormat): %1$S is folder name, %2$S is server name verboseFolderFormat=%1$S on %2$S -filterFolderTruncateFailed=There was an error truncating the Inbox after filtering a message to folder '%S'. You may need to shutdown Mozilla and delete INBOX.msf. +# LOCALIZATION NOTES(filterFolderTruncateFailed): %1$S is replaced by the folder name, %2$S is replaced by the brandShortName +filterFolderTruncateFailed=There was an error truncating the Inbox after filtering a message to folder '%1$S'. You may need to shutdown %2$S and delete INBOX.msf. defaultServerTag=(Default) useDefaultServer=Use default server diff --git a/mailnews/base/resources/locale/en-US/messenger.properties b/mailnews/base/resources/locale/en-US/messenger.properties index e028b91efdaf..b2a4c930b607 100644 --- a/mailnews/base/resources/locale/en-US/messenger.properties +++ b/mailnews/base/resources/locale/en-US/messenger.properties @@ -105,7 +105,8 @@ operationFailedFolderBusy=The operation failed because an other operation is usi folderRenameFailed=The folder could not be renamed. Perhaps the folder is being reparsed, or the new name is not a valid folder name. # LOCALIZATION NOTES(verboseFolderFormat): %1$S is folder name, %2$S is server name verboseFolderFormat=%1$S on %2$S -filterFolderTruncateFailed=There was an error truncating the Inbox after filtering a message to folder '%S'. You may need to shutdown Mozilla and delete INBOX.msf. +# LOCALIZATION NOTES(filterFolderTruncateFailed): %1$S is replaced by the folder name, %2$S is replaced by the brandShortName +filterFolderTruncateFailed=There was an error truncating the Inbox after filtering a message to folder '%1$S'. You may need to shutdown %2$S and delete INBOX.msf. defaultServerTag=(Default) useDefaultServer=Use default server diff --git a/mailnews/base/util/nsMsgDBFolder.cpp b/mailnews/base/util/nsMsgDBFolder.cpp index 8d21a021e144..15e82f34efbd 100644 --- a/mailnews/base/util/nsMsgDBFolder.cpp +++ b/mailnews/base/util/nsMsgDBFolder.cpp @@ -121,6 +121,7 @@ PRUnichar *nsMsgDBFolder::kLocalizedDraftsName; PRUnichar *nsMsgDBFolder::kLocalizedTemplatesName; PRUnichar *nsMsgDBFolder::kLocalizedUnsentName; PRUnichar *nsMsgDBFolder::kLocalizedJunkName; +PRUnichar *nsMsgDBFolder::kLocalizedBrandShortName; nsrefcnt nsMsgDBFolder::mInstanceCount=0; @@ -200,6 +201,7 @@ nsMsgDBFolder::~nsMsgDBFolder(void) CRTFREEIF(kLocalizedTemplatesName); CRTFREEIF(kLocalizedUnsentName); CRTFREEIF(kLocalizedJunkName); + CRTFREEIF(kLocalizedBrandShortName); #ifdef MSG_FASTER_URI_PARSING mParsingURL = nsnull; #endif @@ -2143,6 +2145,14 @@ nsMsgDBFolder::initializeStrings() &kLocalizedJunkName); bundle->GetStringFromName(NS_LITERAL_STRING("unsentFolderName").get(), &kLocalizedUnsentName); + + nsCOMPtr brandBundle; + rv = bundleService->CreateBundle("chrome://branding/locale/brand.properties", getter_AddRefs(bundle)); + NS_ENSURE_SUCCESS(rv, rv); + + bundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(), + &kLocalizedBrandShortName); + return NS_OK; } @@ -4765,10 +4775,11 @@ nsMsgDBFolder::GetStringWithFolderNameFromBundle(const char *msgName, PRUnichar GetName(getter_Copies(folderName)); const PRUnichar *formatStrings[] = { - folderName + folderName, + kLocalizedBrandShortName }; rv = bundle->FormatStringFromName(NS_ConvertASCIItoUCS2(msgName).get(), - formatStrings, 1, aResult); + formatStrings, 2, aResult); } return rv; } diff --git a/mailnews/base/util/nsMsgDBFolder.h b/mailnews/base/util/nsMsgDBFolder.h index 0993a9bff96c..dcbae9678eb8 100644 --- a/mailnews/base/util/nsMsgDBFolder.h +++ b/mailnews/base/util/nsMsgDBFolder.h @@ -246,6 +246,7 @@ protected: static NS_MSG_BASE_STATIC_MEMBER_(PRUnichar*) kLocalizedTemplatesName; static NS_MSG_BASE_STATIC_MEMBER_(PRUnichar*) kLocalizedUnsentName; static NS_MSG_BASE_STATIC_MEMBER_(PRUnichar*) kLocalizedJunkName; + static NS_MSG_BASE_STATIC_MEMBER_(PRUnichar*) kLocalizedBrandShortName; static NS_MSG_BASE_STATIC_MEMBER_(nsIAtom*) kTotalUnreadMessagesAtom; static NS_MSG_BASE_STATIC_MEMBER_(nsIAtom*) kBiffStateAtom;