Bug 952431 - Replace a bunch of NS_LITERAL_STRING uses with MOZ_UTF16. r=Neil

This commit is contained in:
Suyash Agarwal 2014-01-02 15:29:05 -05:00
Родитель 6a8b6f2e41
Коммит 148de34d32
59 изменённых файлов: 252 добавлений и 255 удалений

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

@ -297,7 +297,7 @@ nsMailGNOMEIntegration::MakeDefault(const char* const *aProtocols,
NS_ENSURE_SUCCESS(rv, rv);
nsString brandShortName;
brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
brandBundle->GetStringFromName(MOZ_UTF16("brandShortName"),
getter_Copies(brandShortName));
// use brandShortName as the application id.

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

@ -685,10 +685,10 @@ nsresult nsAbCardProperty::ConvertToEscapedVCard(nsACString &aResult)
uint32_t format;
rv = GetPropertyAsUint32(kPreferMailFormatProperty, &format);
if (NS_SUCCEEDED(rv) && format == nsIAbPreferMailFormat::html) {
myAddPropValue(vObj, VCUseHTML, NS_LITERAL_STRING("TRUE").get(), &vCardHasData);
myAddPropValue(vObj, VCUseHTML, MOZ_UTF16("TRUE"), &vCardHasData);
}
else if (NS_SUCCEEDED(rv) && format == nsIAbPreferMailFormat::plaintext) {
myAddPropValue(vObj, VCUseHTML, NS_LITERAL_STRING("FALSE").get(), &vCardHasData);
myAddPropValue(vObj, VCUseHTML, MOZ_UTF16("FALSE"), &vCardHasData);
}
rv = GetPropertyAsAString(kWorkWebPageProperty, str);
@ -697,7 +697,7 @@ nsresult nsAbCardProperty::ConvertToEscapedVCard(nsACString &aResult)
myAddPropValue(vObj, VCURLProp, str.get(), &vCardHasData);
}
myAddPropValue(vObj, VCVersionProp, NS_LITERAL_STRING("2.1").get(), nullptr);
myAddPropValue(vObj, VCVersionProp, MOZ_UTF16("2.1"), nullptr);
if (!vCardHasData) {
aResult.Truncate();
@ -732,7 +732,7 @@ nsresult nsAbCardProperty::ConvertToBase64EncodedXML(nsACString &result)
rv = stringBundleService->CreateBundle(sAddrbookProperties, getter_AddRefs(bundle));
if (NS_SUCCEEDED(rv)) {
nsString addrBook;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("addressBook").get(), getter_Copies(addrBook));
rv = bundle->GetStringFromName(MOZ_UTF16("addressBook"), getter_Copies(addrBook));
if (NS_SUCCEEDED(rv)) {
xmlStr.AppendLiteral("<title xmlns=\"http://www.w3.org/1999/xhtml\">");
xmlStr.Append(addrBook);
@ -824,7 +824,7 @@ nsresult nsAbCardProperty::ConvertToXMLPrintData(nsAString &aXMLSubstr)
xmlStr.AppendLiteral("<section><sectiontitle>");
nsString headingAddresses;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("headingAddresses").get(), getter_Copies(headingAddresses));
rv = bundle->GetStringFromName(MOZ_UTF16("headingAddresses"), getter_Copies(headingAddresses));
NS_ENSURE_SUCCESS(rv, rv);
xmlStr.Append(headingAddresses);
@ -1046,18 +1046,18 @@ nsresult nsAbCardProperty::AppendCityStateZip(const AppendItem &aItem,
if (!cityResult.IsEmpty() && !stateResult.IsEmpty() && !zipResult.IsEmpty()) {
const PRUnichar *formatStrings[] = { cityResult.get(), stateResult.get(), zipResult.get() };
rv = aBundle->FormatStringFromName(NS_LITERAL_STRING("cityAndStateAndZip").get(), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
rv = aBundle->FormatStringFromName(MOZ_UTF16("cityAndStateAndZip"), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
NS_ENSURE_SUCCESS(rv,rv);
}
else if (!cityResult.IsEmpty() && !stateResult.IsEmpty() && zipResult.IsEmpty()) {
const PRUnichar *formatStrings[] = { cityResult.get(), stateResult.get() };
rv = aBundle->FormatStringFromName(NS_LITERAL_STRING("cityAndStateNoZip").get(), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
rv = aBundle->FormatStringFromName(MOZ_UTF16("cityAndStateNoZip"), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
NS_ENSURE_SUCCESS(rv,rv);
}
else if ((!cityResult.IsEmpty() && stateResult.IsEmpty() && !zipResult.IsEmpty()) ||
(cityResult.IsEmpty() && !stateResult.IsEmpty() && !zipResult.IsEmpty())) {
const PRUnichar *formatStrings[] = { cityResult.IsEmpty() ? stateResult.get() : cityResult.get(), zipResult.get() };
rv = aBundle->FormatStringFromName(NS_LITERAL_STRING("cityOrStateAndZip").get(), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
rv = aBundle->FormatStringFromName(MOZ_UTF16("cityOrStateAndZip"), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
NS_ENSURE_SUCCESS(rv,rv);
}
else {
@ -1111,13 +1111,13 @@ NS_IMETHODIMP nsAbCardProperty::GenerateName(int32_t aGenerateFormat,
if (aGenerateFormat == GENERATE_LAST_FIRST_ORDER) {
const PRUnichar *stringParams[2] = {lastName.get(), firstName.get()};
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("lastFirstFormat").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("lastFirstFormat"),
stringParams, 2, getter_Copies(result));
}
else {
const PRUnichar *stringParams[2] = {firstName.get(), lastName.get()};
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("firstLastFormat").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("firstLastFormat"),
stringParams, 2, getter_Copies(result));
}
NS_ENSURE_SUCCESS(rv, rv);

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

@ -261,12 +261,12 @@ nsresult nsAbLDAPProcessChangeLogData::GetAuthData()
return rv ;
nsString title;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("AuthDlgTitle").get(), getter_Copies(title));
rv = bundle->GetStringFromName(MOZ_UTF16("AuthDlgTitle"), getter_Copies(title));
if (NS_FAILED (rv))
return rv ;
nsString desc;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("AuthDlgDesc").get(), getter_Copies(desc));
rv = bundle->GetStringFromName(MOZ_UTF16("AuthDlgDesc"), getter_Copies(desc));
if (NS_FAILED (rv))
return rv ;

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

@ -256,8 +256,8 @@ NS_IMETHODIMP nsAbLDAPDirectory::SetLDAPURL(nsILDAPURL *aUrl)
// We inherit from nsIAbDirectory, so this static cast should be safe.
abManager->NotifyItemPropertyChanged(static_cast<nsIAbDirectory*>(this),
"IsSecure",
(newIsNotSecure ? NS_LITERAL_STRING("true") : NS_LITERAL_STRING("false")).get(),
(newIsNotSecure ? NS_LITERAL_STRING("false") : NS_LITERAL_STRING("true")).get());
(newIsNotSecure ? MOZ_UTF16("true") : MOZ_UTF16("false")),
(newIsNotSecure ? MOZ_UTF16("false") : MOZ_UTF16("true")));
}
return NS_OK;

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

@ -100,7 +100,7 @@ NS_IMETHODIMP nsAbLDAPListenerBase::OnLDAPInit(nsILDAPConnection *aConn, nsresul
// get the title for the authentication prompt
//
nsString authPromptTitle;
rv = ldapBundle->GetStringFromName(NS_LITERAL_STRING("authPromptTitle").get(),
rv = ldapBundle->GetStringFromName(MOZ_UTF16("authPromptTitle"),
getter_Copies(authPromptTitle));
if (NS_FAILED(rv))
{
@ -133,7 +133,7 @@ NS_IMETHODIMP nsAbLDAPListenerBase::OnLDAPInit(nsILDAPConnection *aConn, nsresul
// format the hostname into the authprompt text string
//
nsString authPromptText;
rv = ldapBundle->FormatStringFromName(NS_LITERAL_STRING("authPromptText").get(),
rv = ldapBundle->FormatStringFromName(MOZ_UTF16("authPromptText"),
hostArray,
sizeof(hostArray) / sizeof(const PRUnichar *),
getter_Copies(authPromptText));

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

@ -509,26 +509,26 @@ NS_IMETHODIMP nsAbManager::ExportAddressBook(nsIDOMWindow *aParentWin, nsIAbDire
NS_ENSURE_SUCCESS(rv, rv);
nsString title;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("ExportAddressBookTitle").get(), getter_Copies(title));
rv = bundle->GetStringFromName(MOZ_UTF16("ExportAddressBookTitle"), getter_Copies(title));
NS_ENSURE_SUCCESS(rv, rv);
rv = filePicker->Init(aParentWin, title, nsIFilePicker::modeSave);
NS_ENSURE_SUCCESS(rv, rv);
nsString filterString;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("LDIFFiles").get(), getter_Copies(filterString));
rv = bundle->GetStringFromName(MOZ_UTF16("LDIFFiles"), getter_Copies(filterString));
NS_ENSURE_SUCCESS(rv, rv);
rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.ldi; *.ldif"));
NS_ENSURE_SUCCESS(rv, rv);
rv = bundle->GetStringFromName(NS_LITERAL_STRING("CSVFiles").get(), getter_Copies(filterString));
rv = bundle->GetStringFromName(MOZ_UTF16("CSVFiles"), getter_Copies(filterString));
NS_ENSURE_SUCCESS(rv, rv);
rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.csv"));
NS_ENSURE_SUCCESS(rv, rv);
rv = bundle->GetStringFromName(NS_LITERAL_STRING("TABFiles").get(), getter_Copies(filterString));
rv = bundle->GetStringFromName(MOZ_UTF16("TABFiles"), getter_Copies(filterString));
NS_ENSURE_SUCCESS(rv, rv);
rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.tab; *.txt"));

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

@ -414,7 +414,7 @@ nsresult nsAbView::GetCardValue(nsIAbCard *card, const PRUnichar *colID,
// Use LN/FN order for the phonetic name
return card->GeneratePhoneticName(true, _retval);
if (!NS_strcmp(colID, NS_LITERAL_STRING("ChatName").get()))
if (!NS_strcmp(colID, MOZ_UTF16("ChatName")))
return card->GenerateChatName(_retval);
nsresult rv = card->GetPropertyAsAString(NS_ConvertUTF16toUTF8(colID).get(), _retval);
@ -609,7 +609,7 @@ static void SetSortClosure(const PRUnichar *sortColumn, const PRUnichar *sortDir
{
closure->colID = sortColumn;
if (sortDirection && !NS_strcmp(sortDirection, NS_LITERAL_STRING("descending").get()))
if (sortDirection && !NS_strcmp(sortDirection, MOZ_UTF16("descending")))
closure->factor = DESCENDING_SORT_FACTOR;
else
closure->factor = ASCENDING_SORT_FACTOR;
@ -664,7 +664,7 @@ NS_IMETHODIMP nsAbView::SortBy(const PRUnichar *colID, const PRUnichar *sortDir)
nsAutoString sortDirection;
if (!sortDir)
sortDirection = NS_LITERAL_STRING("ascending").get(); // default direction
sortDirection = NS_LITERAL_STRING("ascending"); // default direction
else
sortDirection = sortDir;
@ -1210,8 +1210,8 @@ NS_IMETHODIMP nsAbView::SwapFirstNameLastName()
// The format should stays the same before/after we swap the names
formatString = displayNameLastnamefirst ?
NS_LITERAL_STRING("lastFirstFormat").get() :
NS_LITERAL_STRING("firstLastFormat").get();
MOZ_UTF16("lastFirstFormat") :
MOZ_UTF16("firstLastFormat");
// Generate both ln/fn and fn/ln combination since we need both later
// to check to see if the current display name was edited

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

@ -240,7 +240,7 @@ nsAddbookProtocolHandler::BuildDirectoryXML(nsIAbDirectory *aDirectory,
rv = stringBundleService->CreateBundle("chrome://messenger/locale/addressbook/addressBook.properties", getter_AddRefs(bundle));
if (NS_SUCCEEDED(rv)) {
nsString addrBook;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("addressBook").get(), getter_Copies(addrBook));
rv = bundle->GetStringFromName(MOZ_UTF16("addressBook"), getter_Copies(addrBook));
if (NS_SUCCEEDED(rv)) {
aOutput.AppendLiteral("<title xmlns=\"http://www.w3.org/1999/xhtml\">");
aOutput.Append(addrBook);

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

@ -432,15 +432,15 @@ nsresult nsAddrDatabase::DisplayAlert(const PRUnichar *titleName, const PRUnicha
nsresult nsAddrDatabase::AlertAboutCorruptMabFile(const PRUnichar *aOldFileName, const PRUnichar *aNewFileName)
{
const PRUnichar *formatStrings[] = { aOldFileName, aOldFileName, aNewFileName };
return DisplayAlert(NS_LITERAL_STRING("corruptMabFileTitle").get(),
NS_LITERAL_STRING("corruptMabFileAlert").get(), formatStrings, 3);
return DisplayAlert(MOZ_UTF16("corruptMabFileTitle"),
MOZ_UTF16("corruptMabFileAlert"), formatStrings, 3);
}
nsresult nsAddrDatabase::AlertAboutLockedMabFile(const PRUnichar *aFileName)
{
const PRUnichar *formatStrings[] = { aFileName };
return DisplayAlert(NS_LITERAL_STRING("lockedMabFileTitle").get(),
NS_LITERAL_STRING("lockedMabFileAlert").get(), formatStrings, 1);
return DisplayAlert(MOZ_UTF16("lockedMabFileTitle"),
MOZ_UTF16("lockedMabFileAlert"), formatStrings, 1);
}
nsresult

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

@ -536,7 +536,7 @@ NS_IMETHODIMP nsMsgFilter::LogRuleHit(nsIMsgRuleAction *aFilterAction, nsIMsgDBH
const PRUnichar *filterLogDetectFormatStrings[4] = { filterName.get(), authorValue.get(), subjectValue.get(), dateValue.get() };
nsString filterLogDetectStr;
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("filterLogDetectStr").get(),
MOZ_UTF16("filterLogDetectStr"),
filterLogDetectFormatStrings, 4,
getter_Copies(filterLogDetectStr));
NS_ENSURE_SUCCESS(rv, rv);
@ -559,8 +559,7 @@ NS_IMETHODIMP nsMsgFilter::LogRuleHit(nsIMsgRuleAction *aFilterAction, nsIMsgDBH
nsString logMoveStr;
rv = bundle->FormatStringFromName(
(actionType == nsMsgFilterAction::MoveToFolder) ?
NS_LITERAL_STRING("logMoveStr").get() :
NS_LITERAL_STRING("logCopyStr").get(),
MOZ_UTF16("logMoveStr") : MOZ_UTF16("logCopyStr"),
logMoveFormatStrings, 2,
getter_Copies(logMoveStr));
NS_ENSURE_SUCCESS(rv, rv);
@ -576,7 +575,7 @@ NS_IMETHODIMP nsMsgFilter::LogRuleHit(nsIMsgRuleAction *aFilterAction, nsIMsgDBH
customAction->GetName(filterActionName);
if (filterActionName.IsEmpty())
bundle->GetStringFromName(
NS_LITERAL_STRING("filterMissingCustomAction").get(),
MOZ_UTF16("filterMissingCustomAction"),
getter_Copies(filterActionName));
buffer += NS_ConvertUTF16toUTF8(filterActionName);
}

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

@ -1059,7 +1059,7 @@ bool nsMsgFilterAfterTheFact::ContinueExecutionPrompt()
{
filterName.get()
};
nsresult rv = bundle->FormatStringFromName(NS_LITERAL_STRING("continueFilterExecution").get(),
nsresult rv = bundle->FormatStringFromName(MOZ_UTF16("continueFilterExecution"),
formatStrings, 1, getter_Copies(confirmText));
if (NS_FAILED(rv))
return false;

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

@ -154,7 +154,7 @@ nsMsgSearchAdapter::GetImapCharsetParam(const PRUnichar *destCharset)
char *result = nullptr;
// Specify a character set unless we happen to be US-ASCII.
if (NS_strcmp(destCharset, NS_LITERAL_STRING("us-ascii").get()))
if (NS_strcmp(destCharset, MOZ_UTF16("us-ascii")))
result = PR_smprintf("%s%s", nsMsgSearchAdapter::m_kImapCharset, NS_ConvertUTF16toUTF8(destCharset).get());
return result;

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

@ -256,8 +256,8 @@ NS_IMETHODIMP nsMessenger::SetWindow(nsIDOMWindow *aWin, nsIMsgWindow *aMsgWindo
if (rootDocShellAsNode)
{
nsCOMPtr<nsIDocShellTreeItem> childAsItem;
rv = rootDocShellAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
true, false, nullptr, nullptr, getter_AddRefs(childAsItem));
rv = rootDocShellAsNode->FindChildWithName(MOZ_UTF16("messagepane"), true, false,
nullptr, nullptr, getter_AddRefs(childAsItem));
mDocShell = do_QueryInterface(childAsItem);
if (NS_SUCCEEDED(rv) && mDocShell) {
@ -334,7 +334,7 @@ nsMessenger::PromptIfFileExists(nsIFile *file)
rv = InitStringBundle();
NS_ENSURE_SUCCESS(rv, rv);
}
rv = mStringBundle->FormatStringFromName(NS_LITERAL_STRING("fileExists").get(),
rv = mStringBundle->FormatStringFromName(MOZ_UTF16("fileExists"),
pathFormatStrings, 1,
getter_Copies(errorMessage));
NS_ENSURE_SUCCESS(rv, rv);
@ -2966,7 +2966,7 @@ nsMessenger::PromptIfDeleteAttachments(bool aSaveFirst,
// format the message and display
nsString promptMessage;
const PRUnichar * propertyName = aSaveFirst ?
NS_LITERAL_STRING("detachAttachments").get() : NS_LITERAL_STRING("deleteAttachments").get();
MOZ_UTF16("detachAttachments") : MOZ_UTF16("deleteAttachments");
rv = mStringBundle->FormatStringFromName(propertyName, formatStrings, 1,getter_Copies(promptMessage));
NS_ENSURE_SUCCESS(rv, rv);

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

@ -333,7 +333,7 @@ nsMessengerOSXIntegration::FillToolTipInfo(nsIMsgFolder *aFolder, int32_t aNewCo
nsAutoString numNotDisplayedText;
numNotDisplayedText.AppendInt(numNotDisplayed);
const PRUnichar *formatStrings[3] = { numNewMsgsText.get(), authors.get(), numNotDisplayedText.get() };
bundle->FormatStringFromName(NS_LITERAL_STRING("macBiffNotification_messages_extra").get(),
bundle->FormatStringFromName(MOZ_UTF16("macBiffNotification_messages_extra"),
formatStrings,
3,
getter_Copies(finalText));
@ -344,7 +344,7 @@ nsMessengerOSXIntegration::FillToolTipInfo(nsIMsgFolder *aFolder, int32_t aNewCo
if (aNewCount == 1)
{
bundle->FormatStringFromName(NS_LITERAL_STRING("macBiffNotification_message").get(),
bundle->FormatStringFromName(MOZ_UTF16("macBiffNotification_message"),
formatStrings,
2,
getter_Copies(finalText));
@ -368,7 +368,7 @@ nsMessengerOSXIntegration::FillToolTipInfo(nsIMsgFolder *aFolder, int32_t aNewCo
}
}
else
bundle->FormatStringFromName(NS_LITERAL_STRING("macBiffNotification_messages").get(),
bundle->FormatStringFromName(MOZ_UTF16("macBiffNotification_messages"),
formatStrings,
2,
getter_Copies(finalText));
@ -492,7 +492,7 @@ nsMessengerOSXIntegration::BounceDockIcon()
if (mediator)
{
nsCOMPtr<nsIDOMWindow> domWindow;
mediator->GetMostRecentWindow(NS_LITERAL_STRING("mail:3pane").get(), getter_AddRefs(domWindow));
mediator->GetMostRecentWindow(MOZ_UTF16("mail:3pane"), getter_AddRefs(domWindow));
if (domWindow)
{
nsCOMPtr<nsIDOMChromeWindow> chromeWindow(do_QueryInterface(domWindow));
@ -631,7 +631,7 @@ nsMessengerOSXIntegration::GetNewMailAuthors(nsIMsgFolder* aFolder,
if (NS_SUCCEEDED(rv))
{
nsString listSeparator;
bundle->GetStringFromName(NS_LITERAL_STRING("macBiffNotification_separator").get(), getter_Copies(listSeparator));
bundle->GetStringFromName(MOZ_UTF16("macBiffNotification_separator"), getter_Copies(listSeparator));
int32_t displayed = 0;
for (int32_t i = numNewKeys - 1; i >= 0; i--, aNewCount--)

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

@ -173,8 +173,8 @@ nsMessengerUnixIntegration::BuildNotificationTitle(nsIMsgFolder *aFolder, nsIStr
};
aBundle->FormatStringFromName(numNewMessages == 1 ?
NS_LITERAL_STRING("newMailNotification_message").get() :
NS_LITERAL_STRING("newMailNotification_messages").get(),
MOZ_UTF16("newMailNotification_message") :
MOZ_UTF16("newMailNotification_messages"),
formatStrings, 2, getter_Copies(aTitle));
return true;
}
@ -292,7 +292,7 @@ nsMessengerUnixIntegration::BuildNotificationBody(nsIMsgDBHdr *aHdr,
{
subject.get(), author.get()
};
aBundle->FormatStringFromName(NS_LITERAL_STRING("newMailNotification_messagetitle").get(),
aBundle->FormatStringFromName(MOZ_UTF16("newMailNotification_messagetitle"),
formatStrings, 2, getter_Copies(msgTitle));
alertBody.Append(msgTitle);
}

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

@ -731,9 +731,9 @@ void nsMessengerWinIntegration::FillToolTipInfo()
nsString finalText;
if (numNewMessages == 1)
bundle->FormatStringFromName(NS_LITERAL_STRING("biffNotification_message").get(), formatStrings, 1, getter_Copies(finalText));
bundle->FormatStringFromName(MOZ_UTF16("biffNotification_message"), formatStrings, 1, getter_Copies(finalText));
else
bundle->FormatStringFromName(NS_LITERAL_STRING("biffNotification_messages").get(), formatStrings, 1, getter_Copies(finalText));
bundle->FormatStringFromName(MOZ_UTF16("biffNotification_messages"), formatStrings, 1, getter_Copies(finalText));
// the alert message is special...we actually only want to show the first account with
// new mail in the alert.

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

@ -2362,7 +2362,7 @@ nsresult nsMsgAccountManager::GetLocalFoldersPrettyName(nsString &localFoldersNa
getter_AddRefs(bundle));
NS_ENSURE_SUCCESS(rv, rv);
return bundle->GetStringFromName(NS_LITERAL_STRING("localFolders").get(), getter_Copies(localFoldersName));
return bundle->GetStringFromName(MOZ_UTF16("localFolders"), getter_Copies(localFoldersName));
}
NS_IMETHODIMP

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

@ -154,7 +154,7 @@ nsMsgAccountManagerDataSource::nsMsgAccountManagerDataSource()
getRDFService()->GetResource(NS_LITERAL_CSTRING(NC_RDF_ACCOUNTROOT),
&kNC_AccountRoot);
getRDFService()->GetLiteral(NS_LITERAL_STRING("true").get(),
getRDFService()->GetLiteral(MOZ_UTF16("true"),
&kTrueLiteral);
// eventually these need to exist in some kind of array
@ -281,26 +281,26 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
nsString pageTitle;
if (source == kNC_PageTitleServer)
mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-server").get(),
mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-server"),
getter_Copies(pageTitle));
else if (source == kNC_PageTitleCopies)
mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-copies").get(),
mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-copies"),
getter_Copies(pageTitle));
else if (source == kNC_PageTitleSynchronization)
mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-synchronization").get(),
mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-synchronization"),
getter_Copies(pageTitle));
else if (source == kNC_PageTitleDiskSpace)
mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-diskspace").get(),
mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-diskspace"),
getter_Copies(pageTitle));
else if (source == kNC_PageTitleAddressing)
mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-addressing").get(),
mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-addressing"),
getter_Copies(pageTitle));
else if (source == kNC_PageTitleSMTP)
mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-smtp").get(),
mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-smtp"),
getter_Copies(pageTitle));
else if (source == kNC_PageTitleJunk)
mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-junk").get(),
mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-junk"),
getter_Copies(pageTitle));
else {

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

@ -156,16 +156,16 @@ void nsMsgDBView::InitializeAtomsAndLiterals()
kNotJunkMsgAtom = MsgNewAtom("notjunk").get();
// priority strings
kHighestPriorityString = GetString(NS_LITERAL_STRING("priorityHighest").get());
kHighPriorityString = GetString(NS_LITERAL_STRING("priorityHigh").get());
kLowestPriorityString = GetString(NS_LITERAL_STRING("priorityLowest").get());
kLowPriorityString = GetString(NS_LITERAL_STRING("priorityLow").get());
kNormalPriorityString = GetString(NS_LITERAL_STRING("priorityNormal").get());
kHighestPriorityString = GetString(MOZ_UTF16("priorityHighest"));
kHighPriorityString = GetString(MOZ_UTF16("priorityHigh"));
kLowestPriorityString = GetString(MOZ_UTF16("priorityLowest"));
kLowPriorityString = GetString(MOZ_UTF16("priorityLow"));
kNormalPriorityString = GetString(MOZ_UTF16("priorityNormal"));
kReadString = GetString(NS_LITERAL_STRING("read").get());
kRepliedString = GetString(NS_LITERAL_STRING("replied").get());
kForwardedString = GetString(NS_LITERAL_STRING("forwarded").get());
kNewString = GetString(NS_LITERAL_STRING("new").get());
kReadString = GetString(MOZ_UTF16("read"));
kRepliedString = GetString(MOZ_UTF16("replied"));
kForwardedString = GetString(MOZ_UTF16("forwarded"));
kNewString = GetString(MOZ_UTF16("new"));
}
nsMsgDBView::~nsMsgDBView()
@ -1694,14 +1694,14 @@ NS_IMETHODIMP nsMsgDBView::GetCellValue(int32_t aRow, nsITreeColumn* aCol, nsASt
case 'a': // attachment column
if (flags & nsMsgMessageFlags::Attachment) {
nsString tmp_str;
tmp_str.Adopt(GetString(NS_LITERAL_STRING("messageHasAttachment").get()));
tmp_str.Adopt(GetString(MOZ_UTF16("messageHasAttachment")));
aValue.Assign(tmp_str);
}
break;
case 'f': // flagged (starred) column
if (flags & nsMsgMessageFlags::Marked) {
nsString tmp_str;
tmp_str.Adopt(GetString(NS_LITERAL_STRING("messageHasFlag").get()));
tmp_str.Adopt(GetString(MOZ_UTF16("messageHasFlag")));
aValue.Assign(tmp_str);
}
break;
@ -1733,8 +1733,8 @@ NS_IMETHODIMP nsMsgDBView::GetCellValue(int32_t aRow, nsITreeColumn* aCol, nsASt
IsContainerOpen(aRow, &isContainerOpen);
tmp_str.Adopt(GetString(isContainerOpen ?
NS_LITERAL_STRING("messageExpanded").get() :
NS_LITERAL_STRING("messageCollapsed").get()));
MOZ_UTF16("messageExpanded") :
MOZ_UTF16("messageCollapsed")));
aValue.Assign(tmp_str);
}
}
@ -1743,7 +1743,7 @@ NS_IMETHODIMP nsMsgDBView::GetCellValue(int32_t aRow, nsITreeColumn* aCol, nsASt
case 'u': // read/unread column
if (!(flags & nsMsgMessageFlags::Read)) {
nsString tmp_str;
tmp_str.Adopt(GetString(NS_LITERAL_STRING("messageUnread").get()));
tmp_str.Adopt(GetString(MOZ_UTF16("messageUnread")));
aValue.Assign(tmp_str);
}
break;
@ -3060,14 +3060,14 @@ nsresult nsMsgDBView::DeleteMessages(nsIMsgWindow *window, nsMsgViewIndex *indic
nsString confirmString;
nsString checkboxText;
nsString buttonApplyNowText;
dialogTitle.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.title").get()));
checkboxText.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.dontAsk.label").get()));
buttonApplyNowText.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.delete.label").get()));
dialogTitle.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.title")));
checkboxText.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.dontAsk.label")));
buttonApplyNowText.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.delete.label")));
if (activePref == warnCollapsedPref)
confirmString.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.collapsed.desc").get()));
confirmString.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.collapsed.desc")));
else // if (activePref == warnShiftDelPref || activePref == warnNewsPref)
confirmString.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.deleteNoTrash.desc").get()));
confirmString.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.deleteNoTrash.desc")));
const uint32_t buttonFlags =
(nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_0) +

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

@ -279,9 +279,9 @@ nsMsgFolderDataSource::~nsMsgFolderDataSource (void)
nsresult nsMsgFolderDataSource::CreateLiterals(nsIRDFService *rdf)
{
createNode(NS_LITERAL_STRING("true").get(),
createNode(MOZ_UTF16("true"),
getter_AddRefs(kTrueLiteral), rdf);
createNode(NS_LITERAL_STRING("false").get(),
createNode(MOZ_UTF16("false"),
getter_AddRefs(kFalseLiteral), rdf);
return NS_OK;
@ -1037,9 +1037,9 @@ nsresult nsMsgFolderDataSource::CreateUnreadMessagesNameString(int32_t unreadMes
//Only do this if unread messages are positive
if(unreadMessages > 0)
{
nameString.Append(NS_LITERAL_STRING(" (").get());
nameString.Append(NS_LITERAL_STRING(" ("));
nameString.AppendInt(unreadMessages);
nameString.Append(NS_LITERAL_STRING(")").get());
nameString.Append(MOZ_UTF16(')'));
}
return NS_OK;
}
@ -1501,13 +1501,13 @@ nsMsgFolderDataSource::createBiffStateNodeFromFlag(uint32_t flag, nsIRDFNode **t
switch (flag) {
case nsIMsgFolder::nsMsgBiffState_NewMail:
biffStateStr = NS_LITERAL_STRING("NewMail").get();
biffStateStr = MOZ_UTF16("NewMail");
break;
case nsIMsgFolder::nsMsgBiffState_NoMail:
biffStateStr = NS_LITERAL_STRING("NoMail").get();
biffStateStr = MOZ_UTF16("NoMail");
break;
default:
biffStateStr = NS_LITERAL_STRING("UnknownMail").get();
biffStateStr = MOZ_UTF16("UnknownMail");
break;
}
@ -1780,7 +1780,7 @@ nsMsgFolderDataSource::GetNumMessagesNode(int32_t aNumMessages, nsIRDFNode **nod
{
uint32_t numMessages = aNumMessages;
if(numMessages == kDisplayQuestionCount)
createNode(NS_LITERAL_STRING("???").get(), node, getRDFService());
createNode(MOZ_UTF16("???"), node, getRDFService());
else if (numMessages == kDisplayBlankCount || numMessages == 0)
createNode(EmptyString().get(), node, getRDFService());
else
@ -1796,7 +1796,7 @@ nsMsgFolderDataSource::GetFolderSizeNode(int32_t aFolderSize, nsIRDFNode **aNode
if (folderSize == kDisplayBlankCount || folderSize == 0)
createNode(EmptyString().get(), aNode, getRDFService());
else if(folderSize == kDisplayQuestionCount)
createNode(NS_LITERAL_STRING("???").get(), aNode, getRDFService());
createNode(MOZ_UTF16("???"), aNode, getRDFService());
else
{
nsAutoString sizeString;
@ -1971,7 +1971,7 @@ nsresult nsMsgFolderDataSource::DoDeleteFromFolder(nsIMsgFolder *folder, nsISupp
nsString confirmMsg;
rv = sBundleService->CreateBundle(MESSENGER_STRING_URL, getter_AddRefs(sMessengerStringBundle));
NS_ENSURE_SUCCESS(rv, rv);
sMessengerStringBundle->GetStringFromName(NS_LITERAL_STRING("confirmSavedSearchDeleteMessage").get(), getter_Copies(confirmMsg));
sMessengerStringBundle->GetStringFromName(MOZ_UTF16("confirmSavedSearchDeleteMessage"), getter_Copies(confirmMsg));
nsCOMPtr<nsIPrompt> dialog;
rv = msgWindow->GetPromptDialog(getter_AddRefs(dialog));

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

@ -754,27 +754,27 @@ NS_IMETHODIMP nsMsgGroupView::CellTextForColumn(int32_t aRow,
{
case 1:
if (m_kTodayString.IsEmpty())
m_kTodayString.Adopt(GetString(NS_LITERAL_STRING("today").get()));
m_kTodayString.Adopt(GetString(MOZ_UTF16("today")));
aValue.Assign(m_kTodayString);
break;
case 2:
if (m_kYesterdayString.IsEmpty())
m_kYesterdayString.Adopt(GetString(NS_LITERAL_STRING("yesterday").get()));
m_kYesterdayString.Adopt(GetString(MOZ_UTF16("yesterday")));
aValue.Assign(m_kYesterdayString);
break;
case 3:
if (m_kLastWeekString.IsEmpty())
m_kLastWeekString.Adopt(GetString(NS_LITERAL_STRING("lastWeek").get()));
m_kLastWeekString.Adopt(GetString(MOZ_UTF16("lastWeek")));
aValue.Assign(m_kLastWeekString);
break;
case 4:
if (m_kTwoWeeksAgoString.IsEmpty())
m_kTwoWeeksAgoString.Adopt(GetString(NS_LITERAL_STRING("twoWeeksAgo").get()));
m_kTwoWeeksAgoString.Adopt(GetString(MOZ_UTF16("twoWeeksAgo")));
aValue.Assign(m_kTwoWeeksAgoString);
break;
case 5:
if (m_kOldMailString.IsEmpty())
m_kOldMailString.Adopt(GetString(NS_LITERAL_STRING("older").get()));
m_kOldMailString.Adopt(GetString(MOZ_UTF16("older")));
aValue.Assign(m_kOldMailString);
break;
default:
@ -789,21 +789,21 @@ NS_IMETHODIMP nsMsgGroupView::CellTextForColumn(int32_t aRow,
case nsMsgViewSortType::byStatus:
rv = FetchStatus(m_flags[aRow], aValue);
if (aValue.IsEmpty()) {
tmp_str.Adopt(GetString(NS_LITERAL_STRING("messagesWithNoStatus").get()));
tmp_str.Adopt(GetString(MOZ_UTF16("messagesWithNoStatus")));
aValue.Assign(tmp_str);
}
break;
case nsMsgViewSortType::byTags:
rv = FetchTags(msgHdr, aValue);
if (aValue.IsEmpty()) {
tmp_str.Adopt(GetString(NS_LITERAL_STRING("untaggedMessages").get()));
tmp_str.Adopt(GetString(MOZ_UTF16("untaggedMessages")));
aValue.Assign(tmp_str);
}
break;
case nsMsgViewSortType::byPriority:
FetchPriority(msgHdr, aValue);
if (aValue.IsEmpty()) {
tmp_str.Adopt(GetString(NS_LITERAL_STRING("noPriority").get()));
tmp_str.Adopt(GetString(MOZ_UTF16("noPriority")));
aValue.Assign(tmp_str);
}
break;
@ -814,15 +814,13 @@ NS_IMETHODIMP nsMsgGroupView::CellTextForColumn(int32_t aRow,
FetchRecipients(msgHdr, aValue);
break;
case nsMsgViewSortType::byAttachments:
tmp_str.Adopt(GetString(flags & nsMsgMessageFlags::Attachment
? NS_LITERAL_STRING("attachments").get()
: NS_LITERAL_STRING("noAttachments").get()));
tmp_str.Adopt(GetString(flags & nsMsgMessageFlags::Attachment ?
MOZ_UTF16("attachments") : MOZ_UTF16("noAttachments")));
aValue.Assign(tmp_str);
break;
case nsMsgViewSortType::byFlagged:
tmp_str.Adopt(GetString(flags & nsMsgMessageFlags::Marked
? NS_LITERAL_STRING("groupFlagged").get()
: NS_LITERAL_STRING("notFlagged").get()));
tmp_str.Adopt(GetString(flags & nsMsgMessageFlags::Marked ?
MOZ_UTF16("groupFlagged") : MOZ_UTF16("notFlagged")));
aValue.Assign(tmp_str);
break;
// byLocation is a special case; we don't want to have duplicate

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

@ -79,7 +79,7 @@ nsMsgPrintEngine::OnStateChange(nsIWebProgress* aWebProgress,
if (progressStateFlags & nsIWebProgressListener::STATE_START) {
// Tell the user we are loading...
nsString msg;
GetString(NS_LITERAL_STRING("LoadingMessageToPrint").get(), msg);
GetString(MOZ_UTF16("LoadingMessageToPrint"), msg);
SetStatusMessage(msg);
}
@ -122,7 +122,7 @@ nsMsgPrintEngine::OnStateChange(nsIWebProgress* aWebProgress,
// Tell the user the message is loaded...
nsString msg;
GetString(NS_LITERAL_STRING("MessageLoaded").get(), msg);
GetString(MOZ_UTF16("MessageLoaded"), msg);
SetStatusMessage(msg);
NS_ASSERTION(mDocShell,"can't print, there is no docshell");
@ -239,7 +239,7 @@ nsMsgPrintEngine::SetWindow(nsIDOMWindow *aWin)
NS_ENSURE_TRUE(rootAsNode, NS_ERROR_FAILURE);
nsCOMPtr<nsIDocShellTreeItem> childItem;
rootAsNode->FindChildWithName(NS_LITERAL_STRING("content").get(), true,
rootAsNode->FindChildWithName(MOZ_UTF16("content"), true,
false, nullptr, nullptr,
getter_AddRefs(childItem));
@ -316,7 +316,7 @@ nsMsgPrintEngine::StartPrintOperation(nsIPrintSettings* aPS)
mPrintSettings = aPS;
// Load the about:blank on the tail end...
nsresult rv = AddPrintURI(NS_LITERAL_STRING("about:blank").get());
nsresult rv = AddPrintURI(MOZ_UTF16("about:blank"));
if (NS_FAILED(rv)) return rv;
return StartNextPrintOperation();
}
@ -382,9 +382,9 @@ nsMsgPrintEngine::ShowProgressDialog(bool aIsForPrinting, bool& aDoNotify)
NS_ADDREF(wpl);
nsString msg;
if (mIsDoingPrintPreview) {
GetString(NS_LITERAL_STRING("LoadingMailMsgForPrintPreview").get(), msg);
GetString(MOZ_UTF16("LoadingMailMsgForPrintPreview"), msg);
} else {
GetString(NS_LITERAL_STRING("LoadingMailMsgForPrint").get(), msg);
GetString(MOZ_UTF16("LoadingMailMsgForPrint"), msg);
}
if (!msg.IsEmpty())
mPrintProgressParams->SetDocTitle(msg.get());
@ -415,7 +415,7 @@ nsMsgPrintEngine::StartNextPrintOperation()
// Tell the user we are done...
nsString msg;
GetString(NS_LITERAL_STRING("PrintingComplete").get(), msg);
GetString(MOZ_UTF16("PrintingComplete"), msg);
SetStatusMessage(msg);
return NS_OK;
}
@ -604,7 +604,7 @@ nsMsgPrintEngine::PrintMsgWindow()
// for mail, it can review the salt. for addrbook, it's a data:// url, which
// means nothing to the end user.
// needs to be " " and not "" or nullptr, otherwise, we'll still print the url
mPrintSettings->SetDocURL(NS_LITERAL_STRING(" ").get());
mPrintSettings->SetDocURL(MOZ_UTF16(" "));
nsresult rv = NS_ERROR_FAILURE;
if (mIsDoingPrintPreview)

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

@ -87,7 +87,7 @@ nsMsgStatusFeedback::OnStateChange(nsIWebProgress* aWebProgress,
m_lastPercent = 0;
StartMeteors();
nsString loadingDocument;
rv = mBundle->GetStringFromName(NS_LITERAL_STRING("documentLoading").get(),
rv = mBundle->GetStringFromName(MOZ_UTF16("documentLoading"),
getter_Copies(loadingDocument));
if (NS_SUCCEEDED(rv))
ShowStatusString(loadingDocument);
@ -141,7 +141,7 @@ nsMsgStatusFeedback::OnStateChange(nsIWebProgress* aWebProgress,
}
StopMeteors();
nsString documentDone;
rv = mBundle->GetStringFromName(NS_LITERAL_STRING("documentDone").get(),
rv = mBundle->GetStringFromName(MOZ_UTF16("documentDone"),
getter_Copies(documentDone));
if (NS_SUCCEEDED(rv))
ShowStatusString(documentDone);
@ -291,7 +291,7 @@ NS_IMETHODIMP nsMsgStatusFeedback::OnStatus(nsIRequest *request, nsISupports* ct
const PRUnichar *params[] = { accountName.get(),
str.get() };
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("statusMessage").get(),
MOZ_UTF16("statusMessage"),
params, 2, getter_Copies(statusMessage));
NS_ENSURE_SUCCESS(rv, rv);
}

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

@ -88,7 +88,7 @@ NS_IMETHODIMP nsMsgWindow::GetMessageWindowDocShell(nsIDocShell ** aDocShell)
nsCOMPtr<nsIDocShellTreeNode> rootAsNode(do_QueryInterface(rootShell));
nsCOMPtr<nsIDocShellTreeItem> msgDocShellItem;
if(rootAsNode)
rootAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
rootAsNode->FindChildWithName(MOZ_UTF16("messagepane"),
true, false, nullptr, nullptr,
getter_AddRefs(msgDocShellItem));
NS_ENSURE_TRUE(msgDocShellItem, NS_ERROR_FAILURE);
@ -478,9 +478,9 @@ nsMsgWindow::DisplayHTMLInMessagePane(const nsAString& title, const nsAString& b
mMsgWindowCommands->ClearMsgPane();
nsString htmlStr;
htmlStr.Append(NS_LITERAL_STRING("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>").get());
htmlStr.Append(NS_LITERAL_STRING("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>"));
htmlStr.Append(body);
htmlStr.Append(NS_LITERAL_STRING("</body></html>").get());
htmlStr.Append(NS_LITERAL_STRING("</body></html>"));
char *encodedHtml = PL_Base64Encode(NS_ConvertUTF16toUTF8(htmlStr).get(), 0, nullptr);
if (!encodedHtml)

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

@ -684,7 +684,7 @@ NS_IMETHODIMP nsSpamSettings::LogJunkHit(nsIMsgDBHdr *aMsgHdr, bool aMoveMessage
const PRUnichar *junkLogDetectFormatStrings[3] = { authorValue.get(), subjectValue.get(), dateValue.get() };
nsString junkLogDetectStr;
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("junkLogDetectStr").get(),
MOZ_UTF16("junkLogDetectStr"),
junkLogDetectFormatStrings, 3,
getter_Copies(junkLogDetectStr));
NS_ENSURE_SUCCESS(rv, rv);
@ -706,7 +706,7 @@ NS_IMETHODIMP nsSpamSettings::LogJunkHit(nsIMsgDBHdr *aMsgHdr, bool aMoveMessage
const PRUnichar *logMoveFormatStrings[2] = { msgIdValue.get(), junkFolderURIValue.get() };
nsString logMoveStr;
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("logMoveStr").get(),
MOZ_UTF16("logMoveStr"),
logMoveFormatStrings, 2,
getter_Copies(logMoveStr));
NS_ENSURE_SUCCESS(rv, rv);

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

@ -40,10 +40,10 @@ nsSubscribableServer::Init()
getter_AddRefs(kNC_Subscribed));
NS_ENSURE_SUCCESS(rv,rv);
rv = mRDFService->GetLiteral(NS_LITERAL_STRING("true").get(),getter_AddRefs(kTrueLiteral));
rv = mRDFService->GetLiteral(MOZ_UTF16("true"), getter_AddRefs(kTrueLiteral));
NS_ENSURE_SUCCESS(rv,rv);
rv = mRDFService->GetLiteral(NS_LITERAL_STRING("false").get(),getter_AddRefs(kFalseLiteral));
rv = mRDFService->GetLiteral(MOZ_UTF16("false"), getter_AddRefs(kFalseLiteral));
NS_ENSURE_SUCCESS(rv,rv);
return NS_OK;
}

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

@ -67,10 +67,10 @@ nsSubscribeDataSource::Init()
getter_AddRefs(kNC_ServerType));
NS_ENSURE_SUCCESS(rv,rv);
rv = mRDFService->GetLiteral(NS_LITERAL_STRING("true").get(),getter_AddRefs(kTrueLiteral));
rv = mRDFService->GetLiteral(MOZ_UTF16("true"), getter_AddRefs(kTrueLiteral));
NS_ENSURE_SUCCESS(rv,rv);
rv = mRDFService->GetLiteral(NS_LITERAL_STRING("false").get(),getter_AddRefs(kFalseLiteral));
rv = mRDFService->GetLiteral(MOZ_UTF16("false"), getter_AddRefs(kFalseLiteral));
NS_ENSURE_SUCCESS(rv,rv);
return NS_OK;
}

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

@ -1919,15 +1919,15 @@ nsresult nsMsgDBFolder::HandleAutoCompactEvent(nsIMsgWindow *aWindow)
nsString confirmString;
nsString checkboxText;
nsString buttonCompactNowText;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("autoCompactAllFoldersTitle").get(), getter_Copies(dialogTitle));
rv = bundle->GetStringFromName(MOZ_UTF16("autoCompactAllFoldersTitle"), getter_Copies(dialogTitle));
NS_ENSURE_SUCCESS(rv, rv);
rv = bundle->GetStringFromName(NS_LITERAL_STRING("autoCompactAllFolders").get(), getter_Copies(confirmString));
rv = bundle->GetStringFromName(MOZ_UTF16("autoCompactAllFolders"), getter_Copies(confirmString));
NS_ENSURE_SUCCESS(rv, rv);
rv = bundle->GetStringFromName(NS_LITERAL_STRING("autoCompactAlwaysAskCheckbox").get(),
getter_Copies(checkboxText));
rv = bundle->GetStringFromName(MOZ_UTF16("autoCompactAlwaysAskCheckbox"),
getter_Copies(checkboxText));
NS_ENSURE_SUCCESS(rv, rv);
rv = bundle->GetStringFromName(NS_LITERAL_STRING("compactNowButton").get(),
getter_Copies(buttonCompactNowText));
rv = bundle->GetStringFromName(MOZ_UTF16("compactNowButton"),
getter_Copies(buttonCompactNowText));
NS_ENSURE_SUCCESS(rv, rv);
bool alwaysAsk = true; // "Always ask..." - checked by default.
int32_t buttonPressed = 0;
@ -2919,27 +2919,27 @@ nsMsgDBFolder::initializeStrings()
getter_AddRefs(bundle));
NS_ENSURE_SUCCESS(rv, rv);
bundle->GetStringFromName(NS_LITERAL_STRING("inboxFolderName").get(),
bundle->GetStringFromName(MOZ_UTF16("inboxFolderName"),
&kLocalizedInboxName);
bundle->GetStringFromName(NS_LITERAL_STRING("trashFolderName").get(),
bundle->GetStringFromName(MOZ_UTF16("trashFolderName"),
&kLocalizedTrashName);
bundle->GetStringFromName(NS_LITERAL_STRING("sentFolderName").get(),
bundle->GetStringFromName(MOZ_UTF16("sentFolderName"),
&kLocalizedSentName);
bundle->GetStringFromName(NS_LITERAL_STRING("draftsFolderName").get(),
bundle->GetStringFromName(MOZ_UTF16("draftsFolderName"),
&kLocalizedDraftsName);
bundle->GetStringFromName(NS_LITERAL_STRING("templatesFolderName").get(),
bundle->GetStringFromName(MOZ_UTF16("templatesFolderName"),
&kLocalizedTemplatesName);
bundle->GetStringFromName(NS_LITERAL_STRING("junkFolderName").get(),
bundle->GetStringFromName(MOZ_UTF16("junkFolderName"),
&kLocalizedJunkName);
bundle->GetStringFromName(NS_LITERAL_STRING("outboxFolderName").get(),
bundle->GetStringFromName(MOZ_UTF16("outboxFolderName"),
&kLocalizedUnsentName);
bundle->GetStringFromName(NS_LITERAL_STRING("archivesFolderName").get(),
bundle->GetStringFromName(MOZ_UTF16("archivesFolderName"),
&kLocalizedArchivesName);
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(),
bundle->GetStringFromName(MOZ_UTF16("brandShortName"),
&kLocalizedBrandShortName);
return NS_OK;
}

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

@ -233,7 +233,7 @@ bool nsMsgI18Nmultibyte_charset(const char *charset)
if (NS_SUCCEEDED(res)) {
nsAutoString charsetData;
res = ccm->GetCharsetData(charset, NS_LITERAL_STRING(".isMultibyte").get(), charsetData);
res = ccm->GetCharsetData(charset, MOZ_UTF16(".isMultibyte"), charsetData);
if (NS_SUCCEEDED(res)) {
result = charsetData.LowerCaseEqualsLiteral("true");
}

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

@ -1617,11 +1617,11 @@ NS_IMETHODIMP nsMsgIncomingServer::DisplayOfflineMsg(nsIMsgWindow *aMsgWindow)
{
nsString errorMsgTitle;
nsString errorMsgBody;
bundle->GetStringFromName(NS_LITERAL_STRING("nocachedbodybody").get(), getter_Copies(errorMsgBody));
bundle->GetStringFromName(NS_LITERAL_STRING("nocachedbodytitle").get(), getter_Copies(errorMsgTitle));
bundle->GetStringFromName(MOZ_UTF16("nocachedbodybody"), getter_Copies(errorMsgBody));
bundle->GetStringFromName(MOZ_UTF16("nocachedbodytitle"), getter_Copies(errorMsgTitle));
aMsgWindow->DisplayHTMLInMessagePane(errorMsgTitle, errorMsgBody, true);
}
return NS_OK;
}

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

@ -2124,25 +2124,25 @@ NS_MSG_BASE nsresult MsgPromptLoginFailed(nsIMsgWindow *aMsgWindow,
NS_ConvertUTF8toUTF16 hostNameUTF16(aHostname);
const PRUnichar *formatStrings[] = { hostNameUTF16.get() };
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("mailServerLoginFailed").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("mailServerLoginFailed"),
formatStrings, 1,
getter_Copies(message));
NS_ENSURE_SUCCESS(rv, rv);
nsString title;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("mailServerLoginFailedTitle").get(), getter_Copies(title));
MOZ_UTF16("mailServerLoginFailedTitle"), getter_Copies(title));
NS_ENSURE_SUCCESS(rv, rv);
nsString button0;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("mailServerLoginFailedRetryButton").get(),
MOZ_UTF16("mailServerLoginFailedRetryButton"),
getter_Copies(button0));
NS_ENSURE_SUCCESS(rv, rv);
nsString button2;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("mailServerLoginFailedEnterNewPasswordButton").get(),
MOZ_UTF16("mailServerLoginFailedEnterNewPasswordButton"),
getter_Copies(button2));
NS_ENSURE_SUCCESS(rv, rv);

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

@ -2022,7 +2022,7 @@ nsresult nsMsgCompose::CreateMessage(const char * originalMsgURI,
rv = bundleService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties",
getter_AddRefs(composeBundle));
NS_ENSURE_SUCCESS(rv, rv);
composeBundle->GetStringFromName(NS_LITERAL_STRING("messageAttachmentSafeName").get(),
composeBundle->GetStringFromName(MOZ_UTF16("messageAttachmentSafeName"),
getter_Copies(sanitizedSubj));
}
else

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

@ -417,7 +417,7 @@ nsMsgComposeService::GetOrigWindowSelection(MSG_ComposeType type, nsIMsgWindow *
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocShellTreeItem> childAsItem;
rv = rootDocShellAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
rv = rootDocShellAsNode->FindChildWithName(MOZ_UTF16("messagepane"),
true, false, nullptr, nullptr, getter_AddRefs(childAsItem));
NS_ENSURE_SUCCESS(rv, rv);

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

@ -69,13 +69,13 @@ nsMsgBuildMessageByName(const PRUnichar *aName, nsIFile *aFile, nsString& aResul
nsresult
nsMsgBuildMessageWithFile(nsIFile *aFile, nsString& aResult)
{
return nsMsgBuildMessageByName(NS_LITERAL_STRING("unableToOpenFile").get(), aFile, aResult);
return nsMsgBuildMessageByName(MOZ_UTF16("unableToOpenFile"), aFile, aResult);
}
nsresult
nsMsgBuildMessageWithTmpFile(nsIFile *aFile, nsString& aResult)
{
return nsMsgBuildMessageByName(NS_LITERAL_STRING("unableToOpenTmpFile").get(), aFile, aResult);
return nsMsgBuildMessageByName(MOZ_UTF16("unableToOpenTmpFile"), aFile, aResult);
}
nsresult

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

@ -3989,7 +3989,7 @@ nsMsgComposeAndSend::NotifyListenerOnStopCopy(nsresult aStatus)
nsString msg;
const PRUnichar *formatStrings[] = { mSavedToFolderName.get() };
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("errorSavingMsg").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("errorSavingMsg"),
formatStrings, 1,
getter_Copies(msg));
if (NS_SUCCEEDED(rv))

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

@ -98,7 +98,7 @@ nsresult nsExplainErrorDetails(nsISmtpUrl * aSmtpUrl, nsresult code, ...)
{
case NS_ERROR_ILLEGAL_LOCALPART:
bundle->GetStringFromName(
NS_LITERAL_STRING("errorIllegalLocalPart").get(),
MOZ_UTF16("errorIllegalLocalPart"),
getter_Copies(eMsg));
msg = nsTextFormatter::vsmprintf(eMsg.get(), args);
break;
@ -2048,11 +2048,11 @@ nsSmtpProtocol::PromptForPassword(nsISmtpServer *aSmtpServer, nsISmtpUrl *aSmtpU
nsString passwordPromptString;
if(formatStrings[1])
rv = composeStringBundle->FormatStringFromName(
NS_LITERAL_STRING("smtpEnterPasswordPromptWithUsername").get(),
MOZ_UTF16("smtpEnterPasswordPromptWithUsername"),
formatStrings, 2, getter_Copies(passwordPromptString));
else
rv = composeStringBundle->FormatStringFromName(
NS_LITERAL_STRING("smtpEnterPasswordPrompt").get(),
MOZ_UTF16("smtpEnterPasswordPrompt"),
formatStrings, 1, getter_Copies(passwordPromptString));
NS_ENSURE_SUCCESS(rv, rv);
@ -2062,7 +2062,7 @@ nsSmtpProtocol::PromptForPassword(nsISmtpServer *aSmtpServer, nsISmtpUrl *aSmtpU
nsString passwordTitle;
rv = composeStringBundle->GetStringFromName(
NS_LITERAL_STRING("smtpEnterPasswordPromptTitle").get(),
MOZ_UTF16("smtpEnterPasswordPromptTitle"),
getter_Copies(passwordTitle));
NS_ENSURE_SUCCESS(rv,rv);

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

@ -71,15 +71,15 @@ NS_IMETHODIMP nsMsgMailView::GetPrettyName(PRUnichar ** aMailViewName)
// see if mName has an associated pretty name inside our string bundle and if so, use that as the pretty name
// otherwise just return mName
if (mName.EqualsLiteral(kDefaultViewPeopleIKnow))
rv = mBundle->GetStringFromName(NS_LITERAL_STRING("mailViewPeopleIKnow").get(), aMailViewName);
rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewPeopleIKnow"), aMailViewName);
else if (mName.EqualsLiteral(kDefaultViewRecent))
rv = mBundle->GetStringFromName(NS_LITERAL_STRING("mailViewRecentMail").get(), aMailViewName);
rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewRecentMail"), aMailViewName);
else if (mName.EqualsLiteral(kDefaultViewFiveDays))
rv = mBundle->GetStringFromName(NS_LITERAL_STRING("mailViewLastFiveDays").get(), aMailViewName);
rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewLastFiveDays"), aMailViewName);
else if (mName.EqualsLiteral(kDefaultViewNotJunk))
rv = mBundle->GetStringFromName(NS_LITERAL_STRING("mailViewNotJunk").get(), aMailViewName);
rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewNotJunk"), aMailViewName);
else if (mName.EqualsLiteral(kDefaultViewHasAttachments))
rv = mBundle->GetStringFromName(NS_LITERAL_STRING("mailViewHasAttachments").get(), aMailViewName);
rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewHasAttachments"), aMailViewName);
else
*aMailViewName = ToNewUnicode(mName);

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

@ -471,7 +471,7 @@ nsresult nsMsgMdnGenerator::CreateFirstPart()
parm = PR_smprintf("From: %s" CRLF, convbuf ? convbuf : m_email.get());
rv = FormatStringFromName(NS_LITERAL_STRING("MsgMdnMsgSentTo").get(), NS_ConvertASCIItoUTF16(m_email).get(),
rv = FormatStringFromName(MOZ_UTF16("MsgMdnMsgSentTo"), NS_ConvertASCIItoUTF16(m_email).get(),
getter_Copies(firstPart1));
if (NS_FAILED(rv))
return rv;
@ -493,32 +493,32 @@ nsresult nsMsgMdnGenerator::CreateFirstPart()
{
case nsIMsgMdnGenerator::eDisplayed:
rv = GetStringFromName(
NS_LITERAL_STRING("MdnDisplayedReceipt").get(),
MOZ_UTF16("MdnDisplayedReceipt"),
getter_Copies(receipt_string));
break;
case nsIMsgMdnGenerator::eDispatched:
rv = GetStringFromName(
NS_LITERAL_STRING("MdnDispatchedReceipt").get(),
MOZ_UTF16("MdnDispatchedReceipt"),
getter_Copies(receipt_string));
break;
case nsIMsgMdnGenerator::eProcessed:
rv = GetStringFromName(
NS_LITERAL_STRING("MdnProcessedReceipt").get(),
MOZ_UTF16("MdnProcessedReceipt"),
getter_Copies(receipt_string));
break;
case nsIMsgMdnGenerator::eDeleted:
rv = GetStringFromName(
NS_LITERAL_STRING("MdnDeletedReceipt").get(),
MOZ_UTF16("MdnDeletedReceipt"),
getter_Copies(receipt_string));
break;
case nsIMsgMdnGenerator::eDenied:
rv = GetStringFromName(
NS_LITERAL_STRING("MdnDeniedReceipt").get(),
MOZ_UTF16("MdnDeniedReceipt"),
getter_Copies(receipt_string));
break;
case nsIMsgMdnGenerator::eFailed:
rv = GetStringFromName(
NS_LITERAL_STRING("MdnFailedReceipt").get(),
MOZ_UTF16("MdnFailedReceipt"),
getter_Copies(receipt_string));
break;
default:
@ -594,32 +594,32 @@ report-type=disposition-notification;\r\n\tboundary=\"%s\"" CRLF CRLF,
{
case nsIMsgMdnGenerator::eDisplayed:
rv = GetStringFromName(
NS_LITERAL_STRING("MsgMdnDisplayed").get(),
MOZ_UTF16("MsgMdnDisplayed"),
getter_Copies(firstPart2));
break;
case nsIMsgMdnGenerator::eDispatched:
rv = GetStringFromName(
NS_LITERAL_STRING("MsgMdnDispatched").get(),
MOZ_UTF16("MsgMdnDispatched"),
getter_Copies(firstPart2));
break;
case nsIMsgMdnGenerator::eProcessed:
rv = GetStringFromName(
NS_LITERAL_STRING("MsgMdnProcessed").get(),
MOZ_UTF16("MsgMdnProcessed"),
getter_Copies(firstPart2));
break;
case nsIMsgMdnGenerator::eDeleted:
rv = GetStringFromName(
NS_LITERAL_STRING("MsgMdnDeleted").get(),
MOZ_UTF16("MsgMdnDeleted"),
getter_Copies(firstPart2));
break;
case nsIMsgMdnGenerator::eDenied:
rv = GetStringFromName(
NS_LITERAL_STRING("MsgMdnDenied").get(),
MOZ_UTF16("MsgMdnDenied"),
getter_Copies(firstPart2));
break;
case nsIMsgMdnGenerator::eFailed:
rv = GetStringFromName(
NS_LITERAL_STRING("MsgMdnFailed").get(),
MOZ_UTF16("MsgMdnFailed"),
getter_Copies(firstPart2));
break;
default:

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

@ -464,8 +464,8 @@ nsresult nsMsgComposeSecure::MimeInitEncryption(bool aSign, nsIMsgSendReport *se
if (!sMIMEBundle)
return NS_ERROR_FAILURE;
sMIMEBundle->GetStringFromName(NS_LITERAL_STRING("mime_smimeEncryptedContentDesc").get(),
sMIMEBundle->GetStringFromName(MOZ_UTF16("mime_smimeEncryptedContentDesc"),
getter_Copies(mime_smime_enc_content_desc));
NS_ConvertUTF16toUTF8 enc_content_desc_utf8(mime_smime_enc_content_desc);
@ -525,7 +525,7 @@ nsresult nsMsgComposeSecure::MimeInitEncryption(bool aSign, nsIMsgSendReport *se
if (NS_FAILED(rv)) return rv;
rv = mEncryptionCinfo->CreateEncrypted(mCerts);
if (NS_FAILED(rv)) {
SetError(sendReport, NS_LITERAL_STRING("ErrorEncryptMail").get());
SetError(sendReport, MOZ_UTF16("ErrorEncryptMail"));
goto FAIL;
}
@ -542,7 +542,7 @@ nsresult nsMsgComposeSecure::MimeInitEncryption(bool aSign, nsIMsgSendReport *se
rv = mEncryptionContext->Start(mEncryptionCinfo, mime_crypto_write_base64, mCryptoEncoder);
if (NS_FAILED(rv)) {
SetError(sendReport, NS_LITERAL_STRING("ErrorEncryptMail").get());
SetError(sendReport, MOZ_UTF16("ErrorEncryptMail"));
goto FAIL;
}
@ -580,8 +580,8 @@ nsresult nsMsgComposeSecure::MimeFinishMultipartSigned (bool aOuter, nsIMsgSendR
if (!sMIMEBundle)
return NS_ERROR_FAILURE;
sMIMEBundle->GetStringFromName(NS_LITERAL_STRING("mime_smimeSignatureContentDesc").get(),
sMIMEBundle->GetStringFromName(MOZ_UTF16("mime_smimeSignatureContentDesc"),
getter_Copies(mime_smime_sig_content_desc));
NS_ConvertUTF16toUTF8 sig_content_desc_utf8(mime_smime_sig_content_desc);
@ -644,7 +644,7 @@ nsresult nsMsgComposeSecure::MimeFinishMultipartSigned (bool aOuter, nsIMsgSendR
rv = cinfo->CreateSigned(mSelfSigningCert, mSelfEncryptionCert, (unsigned char*)hashString.get(), hashString.Length());
if (NS_FAILED(rv)) {
SetError(sendReport, NS_LITERAL_STRING("ErrorCanNotSignMail").get());
SetError(sendReport, MOZ_UTF16("ErrorCanNotSignMail"));
goto FAIL;
}
@ -658,14 +658,14 @@ nsresult nsMsgComposeSecure::MimeFinishMultipartSigned (bool aOuter, nsIMsgSendR
PR_SetError(0,0);
rv = encoder->Start(cinfo, mime_crypto_write_base64, mSigEncoder);
if (NS_FAILED(rv)) {
SetError(sendReport, NS_LITERAL_STRING("ErrorCanNotSignMail").get());
SetError(sendReport, MOZ_UTF16("ErrorCanNotSignMail"));
goto FAIL;
}
// We're not passing in any data, so no update needed.
rv = encoder->Finish();
if (NS_FAILED(rv)) {
SetError(sendReport, NS_LITERAL_STRING("ErrorCanNotSignMail").get());
SetError(sendReport, MOZ_UTF16("ErrorCanNotSignMail"));
goto FAIL;
}
@ -736,10 +736,10 @@ nsresult nsMsgComposeSecure::MimeFinishEncryption (bool aSign, nsIMsgSendReport
goto FAIL;
}
}
rv = mEncryptionContext->Finish();
if (NS_FAILED(rv)) {
SetError(sendReport, NS_LITERAL_STRING("ErrorEncryptMail").get());
SetError(sendReport, MOZ_UTF16("ErrorEncryptMail"));
goto FAIL;
}
@ -787,12 +787,12 @@ nsresult nsMsgComposeSecure::MimeCryptoHackCerts(const char *aRecipients,
// must have both the signing and encryption certs to sign
if ((mSelfSigningCert == nullptr) && aSign) {
SetError(sendReport, NS_LITERAL_STRING("NoSenderSigningCert").get());
SetError(sendReport, MOZ_UTF16("NoSenderSigningCert"));
return NS_ERROR_FAILURE;
}
if ((mSelfEncryptionCert == nullptr) && aEncrypt) {
SetError(sendReport, NS_LITERAL_STRING("NoSenderEncryptionCert").get());
SetError(sendReport, MOZ_UTF16("NoSenderEncryptionCert"));
return NS_ERROR_FAILURE;
}
@ -826,7 +826,7 @@ nsresult nsMsgComposeSecure::MimeCryptoHackCerts(const char *aRecipients,
// Failure to find a valid encryption cert is fatal.
// Here I assume that mailbox is ascii rather than utf8.
SetErrorWithParam(sendReport,
NS_LITERAL_STRING("MissingRecipientEncryptionCert").get(),
MOZ_UTF16("MissingRecipientEncryptionCert"),
mailboxes[i].get());
return res;

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

@ -516,7 +516,7 @@ int32_t nsIMAPBodypart::GenerateEmptyFilling(nsIMAPBodyShell *aShell, bool strea
nsAutoString emptyString;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("imapEmptyMimePart").get(),
MOZ_UTF16("imapEmptyMimePart"),
getter_Copies(emptyString));
if (NS_SUCCEEDED(rv) && !emptyString.IsEmpty())
{

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

@ -1804,7 +1804,7 @@ nsImapIncomingServer::FEAlert(const nsAString& aAlertString,
const PRUnichar *params[] = { hostName.get(), tempString.get() };
rv = m_stringBundle->FormatStringFromName(
NS_LITERAL_STRING("imapServerAlert").get(),
MOZ_UTF16("imapServerAlert"),
params, 2, getter_Copies(message));
if (NS_SUCCEEDED(rv))
return AlertUser(message, aUrl);

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

@ -1604,7 +1604,7 @@ NS_IMETHODIMP nsImapMailFolder::Rename (const nsAString& newName, nsIMsgWindow *
};
nsString alertString;
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("imapSpecialChar").get(),
MOZ_UTF16("imapSpecialChar"),
formatStrings, 1, getter_Copies(alertString));
nsCOMPtr<nsIPrompt> dialog(do_GetInterface(docShell));
// setting up the dialog title
@ -1617,7 +1617,7 @@ NS_IMETHODIMP nsImapMailFolder::Rename (const nsAString& newName, nsIMsgWindow *
NS_ENSURE_SUCCESS(rv, rv);
const PRUnichar *titleParams[] = { accountName.get() };
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("imapAlertDialogTitle").get(),
MOZ_UTF16("imapAlertDialogTitle"),
titleParams, 1, getter_Copies(dialogTitle));
if (dialog && !alertString.IsEmpty())
@ -2415,20 +2415,20 @@ nsImapMailFolder::DeleteSubFolders(nsIArray* folders, nsIMsgWindow *msgWindow)
nsAutoString deleteFolderDialogTitle;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("imapDeleteFolderDialogTitle").get(),
MOZ_UTF16("imapDeleteFolderDialogTitle"),
getter_Copies(deleteFolderDialogTitle));
NS_ENSURE_SUCCESS(rv, rv);
nsAutoString deleteFolderButtonLabel;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("imapDeleteFolderButtonLabel").get(),
MOZ_UTF16("imapDeleteFolderButtonLabel"),
getter_Copies(deleteFolderButtonLabel));
NS_ENSURE_SUCCESS(rv, rv);
nsAutoString confirmationStr;
rv = bundle->FormatStringFromName((deleteNoTrash) ?
NS_LITERAL_STRING("imapDeleteNoTrash").get() :
NS_LITERAL_STRING("imapMoveFolderToTrash").get(),
MOZ_UTF16("imapDeleteNoTrash") :
MOZ_UTF16("imapMoveFolderToTrash"),
formatStrings, 1, getter_Copies(confirmationStr));
NS_ENSURE_SUCCESS(rv, rv);
if (!msgWindow)
@ -6014,7 +6014,7 @@ nsImapMailFolder::FillInFolderProps(nsIMsgImapFolderProps *aFolderProps)
}
const PRUnichar *params[] = { uniOwner.get() };
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("imapOtherUsersFolderTypeDescription").get(),
MOZ_UTF16("imapOtherUsersFolderTypeDescription"),
params, 1, getter_Copies(folderTypeDesc));
}
else if (GetFolderACL()->GetIsFolderShared())
@ -6551,7 +6551,7 @@ nsresult nsMsgIMAPFolderACL::CreateACLRightsString(nsAString& aRightsString)
if (GetDoIHaveFullRightsForFolder()) {
nsAutoString result;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("imapAclFullRights").get(),
rv = bundle->GetStringFromName(MOZ_UTF16("imapAclFullRights"),
getter_Copies(result));
aRightsString.Assign(result);
return rv;
@ -6560,42 +6560,42 @@ nsresult nsMsgIMAPFolderACL::CreateACLRightsString(nsAString& aRightsString)
{
if (GetCanIReadFolder())
{
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclReadRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclReadRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
if (GetCanIWriteFolder())
{
if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclWriteRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclWriteRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
if (GetCanIInsertInFolder())
{
if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclInsertRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclInsertRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
if (GetCanILookupFolder())
{
if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclLookupRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclLookupRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
if (GetCanIStoreSeenInFolder())
{
if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclSeenRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclSeenRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
if (GetCanIDeleteInFolder())
{
if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclDeleteRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclDeleteRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
@ -6603,28 +6603,28 @@ nsresult nsMsgIMAPFolderACL::CreateACLRightsString(nsAString& aRightsString)
{
if (!aRightsString.IsEmpty())
aRightsString.AppendLiteral(", ");
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclExpungeRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclExpungeRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
if (GetCanICreateSubfolder())
{
if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclCreateRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclCreateRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
if (GetCanIPostToFolder())
{
if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclPostRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclPostRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
if (GetCanIAdministerFolder())
{
if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
bundle->GetStringFromName(NS_LITERAL_STRING("imapAclAdministerRight").get(),
bundle->GetStringFromName(MOZ_UTF16("imapAclAdministerRight"),
getter_Copies(curRight));
aRightsString.Append(curRight);
}
@ -8137,7 +8137,7 @@ nsImapMailFolder::CopyStreamMessage(nsIMsgDBHdr* message,
rv = IMAPGetStringBundle(getter_AddRefs(bundle));
NS_ENSURE_SUCCESS(rv, rv);
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("imapCopyingMessageOf").get(),
MOZ_UTF16("imapCopyingMessageOf"),
formatStrings, 3, getter_Copies(progressText));
nsCOMPtr <nsIMsgStatusFeedback> statusFeedback;
if (m_copyState->m_msgWindow)

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

@ -2739,16 +2739,16 @@ NS_IMETHODIMP nsImapService::NewChannel(nsIURI *aURI, nsIChannel **aRetVal)
if (NS_FAILED(CopyMUTF7toUTF16(fullFolderName, unescapedName)))
CopyASCIItoUTF16(fullFolderName, unescapedName);
const PRUnichar *formatStrings[1] = { unescapedName.get() };
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("imapSubscribePrompt").get(),
MOZ_UTF16("imapSubscribePrompt"),
formatStrings, 1, getter_Copies(confirmText));
NS_ENSURE_SUCCESS(rv,rv);
bool confirmResult = false;
rv = dialog->Confirm(nullptr, confirmText.get(), &confirmResult);
NS_ENSURE_SUCCESS(rv, rv);
if (confirmResult)
{
nsCOMPtr <nsIImapIncomingServer> imapServer = do_QueryInterface(server);

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

@ -370,7 +370,7 @@ nsresult nsEudoraFilters::Init()
{
nsAutoString Eudora(NS_LITERAL_STRING("Eudora"));
const PRUnichar *moduleName[] = { Eudora.get() };
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("ImportModuleFolderName").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("ImportModuleFolderName"),
moduleName, 1, getter_Copies(folderName));
}
localRootFolder->GetChildNamed(folderName, getter_AddRefs(m_pMailboxesRoot));

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

@ -913,12 +913,12 @@ bool nsImportGenericMail::CreateFolder(nsIMsgFolder **ppFolder)
nsString folderName;
if (!m_pName.IsEmpty()) {
const PRUnichar *moduleName[] = { m_pName.get() };
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("ImportModuleFolderName").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("ImportModuleFolderName"),
moduleName, 1,
getter_Copies(folderName));
}
else {
rv = bundle->GetStringFromName(NS_LITERAL_STRING("DefaultFolderName").get(),
rv = bundle->GetStringFromName(MOZ_UTF16("DefaultFolderName"),
getter_Copies(folderName));
}
if (NS_FAILED(rv)) {

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

@ -841,19 +841,19 @@ nsresult nsMsgLocalMailFolder::ConfirmFolderDeletion(nsIMsgWindow *aMsgWindow,
nsAutoString deleteFolderDialogTitle;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("pop3DeleteFolderDialogTitle").get(),
MOZ_UTF16("pop3DeleteFolderDialogTitle"),
getter_Copies(deleteFolderDialogTitle));
NS_ENSURE_SUCCESS(rv, rv);
nsAutoString deleteFolderButtonLabel;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("pop3DeleteFolderButtonLabel").get(),
MOZ_UTF16("pop3DeleteFolderButtonLabel"),
getter_Copies(deleteFolderButtonLabel));
NS_ENSURE_SUCCESS(rv, rv);
nsAutoString confirmationStr;
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("pop3MoveFolderToTrash").get(), formatStrings, 1,
MOZ_UTF16("pop3MoveFolderToTrash"), formatStrings, 1,
getter_Copies(confirmationStr));
NS_ENSURE_SUCCESS(rv, rv);
@ -3163,8 +3163,8 @@ nsresult nsMsgLocalMailFolder::DisplayMoveCopyStatusMsg()
const PRUnichar * stringArray[] = { numMsgSoFarString.get(), totalMessagesString.get(), folderName.get() };
rv = mCopyState->m_stringBundle->FormatStringFromName(
(mCopyState->m_isMove) ?
NS_LITERAL_STRING("movingMessagesStatus").get() :
NS_LITERAL_STRING("copyingMessagesStatus").get(),
MOZ_UTF16("movingMessagesStatus") :
MOZ_UTF16("copyingMessagesStatus"),
stringArray, 3, getter_Copies(finalString));
int64_t nowMS = PR_IntervalToMilliseconds(PR_IntervalNow());

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

@ -870,19 +870,19 @@ NS_IMETHODIMP nsPop3Protocol::OnPromptStart(bool *aResult)
}
}
mLocalBundle->FormatStringFromName(
NS_LITERAL_STRING("pop3PreviouslyEnteredPasswordIsInvalidPrompt").get(),
MOZ_UTF16("pop3PreviouslyEnteredPasswordIsInvalidPrompt"),
passwordParams, 2, getter_Copies(passwordPrompt));
}
else
// Otherwise this is the first time we've asked about the server's
// password so show a first time prompt.
mLocalBundle->FormatStringFromName(
NS_LITERAL_STRING("pop3EnterPasswordPrompt").get(),
MOZ_UTF16("pop3EnterPasswordPrompt"),
passwordParams, 2, getter_Copies(passwordPrompt));
nsString passwordTitle;
mLocalBundle->GetStringFromName(
NS_LITERAL_STRING("pop3EnterPasswordPromptTitle").get(),
MOZ_UTF16("pop3EnterPasswordPromptTitle"),
getter_Copies(passwordTitle));
// Now go and get the password.
@ -1269,7 +1269,7 @@ nsPop3Protocol::Error(const char* err_code,
const PRUnichar *titleParams[] = { accountName.get() };
nsString dialogTitle;
mLocalBundle->FormatStringFromName(
NS_LITERAL_STRING("pop3ErrorDialogTitle").get(),
MOZ_UTF16("pop3ErrorDialogTitle"),
titleParams, 1, getter_Copies(dialogTitle));
nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_url, &rv);
// we handle "pop3TmpDownloadError" earlier...
@ -1307,7 +1307,7 @@ nsPop3Protocol::Error(const char* err_code,
CopyASCIItoUTF16(hostName, hostStr);
const PRUnichar *params[] = { hostStr.get() };
mLocalBundle->FormatStringFromName(
NS_LITERAL_STRING("pop3ServerSaid").get(),
MOZ_UTF16("pop3ServerSaid"),
params, 1, getter_Copies(serverSaidPrefix));
}
@ -3443,7 +3443,7 @@ nsPop3Protocol::TopResponse(nsIInputStream* inputStream, uint32_t length)
nsString statusTemplate;
mLocalBundle->GetStringFromName(
NS_LITERAL_STRING("pop3ServerDoesNotSupportTopCommand").get(),
MOZ_UTF16("pop3ServerDoesNotSupportTopCommand"),
getter_Copies(statusTemplate));
if (!statusTemplate.IsEmpty())
{

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

@ -466,10 +466,10 @@ void nsPop3Service::AlertServerBusy(nsIMsgMailNewsUrl *url)
nsString alertString;
nsString dialogTitle;
bundle->FormatStringFromName(
NS_LITERAL_STRING("pop3ServerBusy").get(),
MOZ_UTF16("pop3ServerBusy"),
params, 1, getter_Copies(alertString));
bundle->FormatStringFromName(
NS_LITERAL_STRING("pop3ErrorDialogTitle").get(),
MOZ_UTF16("pop3ErrorDialogTitle"),
params, 1, getter_Copies(dialogTitle));
if (!alertString.IsEmpty())
dialog->Alert(dialogTitle.get(), alertString.get());

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

@ -707,7 +707,7 @@ nsresult nsPop3Sink::HandleTempDownloadFailed(nsIMsgWindow *msgWindow)
m_newMailParser->m_newMsgHdr->GetMime2DecodedAuthor(fromStr);
const PRUnichar *params[] = { fromStr.get(), subjectStr.get() };
bundle->FormatStringFromName(
NS_LITERAL_STRING("pop3TmpDownloadError").get(),
MOZ_UTF16("pop3TmpDownloadError"),
params, 2, getter_Copies(confirmString));
nsCOMPtr<nsIDOMWindow> parentWindow;
nsCOMPtr<nsIPromptService> promptService = do_GetService(NS_PROMPTSERVICE_CONTRACTID);

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

@ -149,7 +149,7 @@ bool nsMapiHook::DisplayLoginDialog(bool aLogin, PRUnichar **aUsername,
nsString brandName;
rv = brandBundle->GetStringFromName(
NS_LITERAL_STRING("brandFullName").get(),
MOZ_UTF16("brandFullName"),
getter_Copies(brandName));
if (NS_FAILED(rv)) return false;
@ -164,7 +164,7 @@ bool nsMapiHook::DisplayLoginDialog(bool aLogin, PRUnichar **aUsername,
if (aLogin)
{
nsString loginText;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("loginTextwithName").get(),
rv = bundle->GetStringFromName(MOZ_UTF16("loginTextwithName"),
getter_Copies(loginText));
if (NS_FAILED(rv) || loginText.IsEmpty()) return false;
@ -258,12 +258,12 @@ nsMapiHook::IsBlindSendAllowed()
if (NS_FAILED(rv) || !bundle) return false;
nsString warningMsg;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("mapiBlindSendWarning").get(),
rv = bundle->GetStringFromName(MOZ_UTF16("mapiBlindSendWarning"),
getter_Copies(warningMsg));
if (NS_FAILED(rv)) return false;
nsString dontShowAgainMessage;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("mapiBlindSendDontShowAgain").get(),
rv = bundle->GetStringFromName(MOZ_UTF16("mapiBlindSendDontShowAgain"),
getter_Copies(dontShowAgainMessage));
if (NS_FAILED(rv)) return false;

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

@ -83,7 +83,7 @@ static void PgpMimeGetNeedsAddonString(nsCString &aResult)
const PRUnichar *formatStrings[] = { url16.get() };
nsString result;
rv = stringBundle->FormatStringFromName(NS_LITERAL_STRING(PGPMIME_STR_NOT_SUPPORTED_ID).get(),
rv = stringBundle->FormatStringFromName(MOZ_UTF16(PGPMIME_STR_NOT_SUPPORTED_ID),
formatStrings, 1, getter_Copies(result));
if (NS_FAILED(rv))
return;

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

@ -743,7 +743,7 @@ nsMimeBaseEmitter::GenerateDateString(const char * dateString,
explodedMsgTime.tm_params.tp_dst_offset) / 60;
// append offset to date string
PRUnichar *tzstring =
nsTextFormatter::smprintf(NS_LITERAL_STRING(" %+05d").get(),
nsTextFormatter::smprintf(MOZ_UTF16(" %+05d"),
(senderoffset / 60 * 100) +
(senderoffset % 60));
formattedDateString.Append(tzstring);

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

@ -419,7 +419,7 @@ nsMimeHtmlDisplayEmitter::StartAttachmentInBody(const nsACString &name,
NS_ENSURE_SUCCESS(rv, rv);
nsString attachmentsHeader;
bundle->GetStringFromName(NS_LITERAL_STRING("attachmentsPrintHeader").get(),
bundle->GetStringFromName(MOZ_UTF16("attachmentsPrintHeader"),
getter_Copies(attachmentsHeader));
UtilityWrite("<legend class=\"mimeAttachmentHeaderName\">");

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

@ -852,16 +852,16 @@ MimeMessage_partial_message_html(const char *data, void *closure,
partialMsgHtml.AppendLiteral("<span style=\"font-size: 120%;\">");
if (msgBaseTruncated)
item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_TRUNCATED").get()));
item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_TRUNCATED")));
else
item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_NOT_DOWNLOADED").get()));
item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_NOT_DOWNLOADED")));
partialMsgHtml += item;
partialMsgHtml.AppendLiteral("</span><hr>");
if (msgBaseTruncated)
item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_TRUNCATED_EXPLANATION").get()));
item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_TRUNCATED_EXPLANATION")));
else
item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_NOT_DOWNLOADED_EXPLANATION").get()));
item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_NOT_DOWNLOADED_EXPLANATION")));
partialMsgHtml += item;
partialMsgHtml.AppendLiteral("<br><br>");
@ -887,7 +887,7 @@ MimeMessage_partial_message_html(const char *data, void *closure,
}
partialMsgHtml.AppendLiteral("\">");
item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_CLICK_FOR_REST").get()));
item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_CLICK_FOR_REST")));
partialMsgHtml += item;
partialMsgHtml.AppendLiteral("</a>");

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

@ -312,7 +312,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload(nsIMsgWindow *aMsgWindow,
rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle));
NS_ENSURE_SUCCESS(rv, rv);
rv = bundle->GetStringFromName(NS_LITERAL_STRING("noNewMessages").get(), getter_Copies(statusString));
rv = bundle->GetStringFromName(MOZ_UTF16("noNewMessages"), getter_Copies(statusString));
NS_ENSURE_SUCCESS(rv, rv);
SetProgressStatus(statusString.get());
@ -887,7 +887,7 @@ nsNNTPNewsgroupList::FinishXOVERLINE(int status, int *newstatus)
NS_ENSURE_SUCCESS(rv, rv);
const PRUnichar *formatStrings[2] = { firstStr.get(), lastStr.get() };
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("downloadingArticles").get(), formatStrings, 2, getter_Copies(statusString));
rv = bundle->FormatStringFromName(MOZ_UTF16("downloadingArticles"), formatStrings, 2, getter_Copies(statusString));
NS_ENSURE_SUCCESS(rv, rv);
SetProgressStatus(statusString.get());
@ -1278,14 +1278,14 @@ nsNNTPNewsgroupList::UpdateStatus(bool filtering, int32_t numDLed, int32_t totTo
NS_ConvertUTF8toUTF16 header(m_filterHeaders[m_currentXHDRIndex]);
const PRUnichar *formatStrings[4] = { header.get(),
numDownloadedStr.get(), totalToDownloadStr.get(), newsgroupName.get() };
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("newNewsgroupFilteringHeaders").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("newNewsgroupFilteringHeaders"),
formatStrings, 4, getter_Copies(statusString));
}
else
{
const PRUnichar *formatStrings[3] = { numDownloadedStr.get(),
totalToDownloadStr.get(), newsgroupName.get() };
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("newNewsgroupHeaders").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("newNewsgroupHeaders"),
formatStrings, 3, getter_Copies(statusString));
}
if (!NS_SUCCEEDED(rv))

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

@ -1032,7 +1032,7 @@ nsresult nsNNTPProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer)
const PRUnichar *formatStrings[1] = { unescapedName.get() };
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("autoSubscribeText").get(), formatStrings, 1,
MOZ_UTF16("autoSubscribeText"), formatStrings, 1,
getter_Copies(confirmText));
NS_ENSURE_SUCCESS(rv,rv);
@ -2781,7 +2781,7 @@ nsresult nsNNTPProtocol::ReadNewsList(nsIInputStream * inputStream, uint32_t len
NS_ConvertASCIItoUTF16 rateStr(rate_buf);
const PRUnichar *formatStrings[3] = { numGroupsStr.get(), bytesStr.get(), rateStr.get()};
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("bytesReceived").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("bytesReceived"),
formatStrings, 3,
getter_Copies(statusString));
@ -3554,7 +3554,7 @@ nsresult nsNNTPProtocol::DoCancel()
NS_ENSURE_TRUE(brandBundle, NS_ERROR_FAILURE);
nsString brandFullName;
rv = brandBundle->GetStringFromName(NS_LITERAL_STRING("brandFullName").get(),
rv = brandBundle->GetStringFromName(MOZ_UTF16("brandFullName"),
getter_Copies(brandFullName));
NS_ENSURE_SUCCESS(rv,rv);
NS_ConvertUTF16toUTF8 appName(brandFullName);

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

@ -197,7 +197,7 @@ bool nsNewsDownloader::GetNextHdrToRetrieve()
m_folder->GetPrettiestName(prettiestName);
const PRUnichar *formatStrings[3] = { firstStr.get(), totalStr.get(), prettiestName.get() };
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("downloadingArticlesForOffline").get(),
rv = bundle->FormatStringFromName(MOZ_UTF16("downloadingArticlesForOffline"),
formatStrings, 3, getter_Copies(statusString));
NS_ENSURE_SUCCESS(rv, false);
ShowProgress(statusString.get(), percent);

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

@ -1359,7 +1359,7 @@ nsMsgNewsFolder::GetAuthenticationCredentials(nsIMsgWindow *aMsgWindow,
{
// Format the prompt text strings
nsString promptTitle, promptText;
bundle->GetStringFromName(NS_LITERAL_STRING("enterUserPassTitle").get(),
bundle->GetStringFromName(MOZ_UTF16("enterUserPassTitle"),
getter_Copies(promptTitle));
nsString serverName;
@ -1381,11 +1381,11 @@ nsMsgNewsFolder::GetAuthenticationCredentials(nsIMsgWindow *aMsgWindow,
params[1] = serverName.get();
if (singleSignon)
bundle->FormatStringFromName(
NS_LITERAL_STRING("enterUserPassServer").get(),
MOZ_UTF16("enterUserPassServer"),
&params[1], 1, getter_Copies(promptText));
else
bundle->FormatStringFromName(
NS_LITERAL_STRING("enterUserPassGroup").get(),
MOZ_UTF16("enterUserPassGroup"),
params, 2, getter_Copies(promptText));
// Fill the signon url for the dialog

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

@ -1578,7 +1578,7 @@ nsNntpIncomingServer::GroupNotFound(nsIMsgWindow *aMsgWindow,
const PRUnichar *formatStrings[2] = { groupName.get(), hostStr.get() };
nsString confirmText;
rv = bundle->FormatStringFromName(
NS_LITERAL_STRING("autoUnsubscribeText").get(),
MOZ_UTF16("autoUnsubscribeText"),
formatStrings, 2,
getter_Copies(confirmText));
NS_ENSURE_SUCCESS(rv,rv);