From 043c89d1131cbebcacbf2423c085374c91f6cf75 Mon Sep 17 00:00:00 2001 From: "mkmelin+mozilla%iki.fi" Date: Sat, 5 Jan 2008 13:40:49 +0000 Subject: [PATCH] Bug 392407: appstrings.properties should not be using branded strings r+sr=bzbarsky, ui-r=beltzner, a=blocking1.9 git-svn-id: svn://10.0.0.236/trunk@242449 18797224-902f-48f8-a5cc-f745e15eee43 --- .../chrome/overrides/appstrings.properties | 4 ++-- mozilla/docshell/base/nsDocShell.cpp | 17 ++++++++++++----- .../locales/en-US/chrome/appstrings.properties | 3 +-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/mozilla/browser/locales/en-US/chrome/overrides/appstrings.properties b/mozilla/browser/locales/en-US/chrome/overrides/appstrings.properties index b1b2102ae55..877af4635cc 100644 --- a/mozilla/browser/locales/en-US/chrome/overrides/appstrings.properties +++ b/mozilla/browser/locales/en-US/chrome/overrides/appstrings.properties @@ -42,8 +42,8 @@ connectionFailure=Firefox can't establish a connection to the server at %S. netInterrupt=The connection to %S was interrupted while the page was loading. netTimeout=The server at %S is taking too long to respond. redirectLoop=Firefox has detected that the server is redirecting the request for this address in a way that will never complete. -## LOCALIZATION NOTE (confirmRepost): In this item, don't translate "%S" -confirmRepost=To display this page, the information previously sent by %S must be resent. This will repeat any action (such as a search or order submission) that had been performed earlier. +## LOCALIZATION NOTE (confirmRepostPrompt): In this item, don't translate "%S" +confirmRepostPrompt=To display this page, %S must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. resendButton.label=Resend unknownSocketType=Firefox doesn't know how to communicate with the server. netReset=The connection to the server was reset while the page was loading. diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index b718aa861fe..b1238def232 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -8644,13 +8644,20 @@ nsDocShell::ConfirmRepost(PRBool * aRepost) nsXPIDLString brandName; rv = brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(), getter_Copies(brandName)); - if (NS_FAILED(rv)) return rv; - const PRUnichar *formatStrings[] = { brandName.get() }; nsXPIDLString msgString, button0Title; - rv = appBundle->FormatStringFromName(NS_LITERAL_STRING("confirmRepost").get(), - formatStrings, NS_ARRAY_LENGTH(formatStrings), - getter_Copies(msgString)); + if (NS_FAILED(rv)) { // No brand, use the generic version. + rv = appBundle->GetStringFromName(NS_LITERAL_STRING("confirmRepostPrompt").get(), + getter_Copies(msgString)); + } + else { + // Brand available - if the app has an override file with formatting, the app name will + // be included. Without an override, the prompt will look like the generic version. + const PRUnichar *formatStrings[] = { brandName.get() }; + rv = appBundle->FormatStringFromName(NS_LITERAL_STRING("confirmRepostPrompt").get(), + formatStrings, NS_ARRAY_LENGTH(formatStrings), + getter_Copies(msgString)); + } if (NS_FAILED(rv)) return rv; rv = appBundle->GetStringFromName(NS_LITERAL_STRING("resendButton.label").get(), diff --git a/mozilla/dom/locales/en-US/chrome/appstrings.properties b/mozilla/dom/locales/en-US/chrome/appstrings.properties index 21b2f059293..9dffdc69246 100644 --- a/mozilla/dom/locales/en-US/chrome/appstrings.properties +++ b/mozilla/dom/locales/en-US/chrome/appstrings.properties @@ -42,8 +42,7 @@ connectionFailure=The connection was refused when attempting to contact %S. netInterrupt=The connection to %S has terminated unexpectedly. Some data may have been transferred. netTimeout=The operation timed out when attempting to contact %S. redirectLoop=Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked. -## LOCALIZATION NOTE (confirmRepost): In this item, don't translate "%S" -confirmRepost=To display this page, the information previously sent by %S must be resent. This will repeat any action (such as a search or order submission) that had been performed earlier. +confirmRepostPrompt=To display this page, the application must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. resendButton.label=Resend unknownSocketType=This document cannot be displayed unless you install the Personal Security Manager (PSM). Download and install PSM and try again, or contact your system administrator. netReset=The document contains no data.