bug 288156 - Hardcoded appname in messenger.properties (filterFolderTruncateFailed), patch by Mark Banner <bugzilla@standard8.demon.co.uk>, r=Neil sr=mscott

This commit is contained in:
kairo%kairo.at 2005-04-01 22:18:16 +00:00
Родитель e6ddab7a33
Коммит 5807972621
4 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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<nsIStringBundle> 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;
}

Просмотреть файл

@ -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;