Bug 625760 - Make "Remote XUL unsupported" error page localizable. r=sicking

This commit is contained in:
Mounir Lamouri 2011-04-06 14:20:23 -07:00
Родитель 5cd9198fd7
Коммит 9831130b90
6 изменённых файлов: 10 добавлений и 27 удалений

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

@ -63,3 +63,4 @@ externalProtocolLaunchBtn=Launch application
malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences. malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences.
phishingBlocked=The web site at %S has been reported as a web forgery designed to trick users into sharing personal or financial information. phishingBlocked=The web site at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way. cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way.
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.

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

@ -186,3 +186,6 @@ functionality specific to firefox. -->
<button id='getMeOutOfHereButton'>&securityOverride.getMeOutOfHereButton;</button> <button id='getMeOutOfHereButton'>&securityOverride.getMeOutOfHereButton;</button>
<button id='exceptionDialogButton'>&securityOverride.exceptionButtonLabel;</button> <button id='exceptionDialogButton'>&securityOverride.exceptionButtonLabel;</button>
"> ">
<!ENTITY remoteXUL.title "Remote XUL">
<!ENTITY remoteXUL.longDesc "<p><ul><li>Please contact the website owners to inform them of this problem.</li></ul></p>">

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

@ -3935,31 +3935,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI,
case NS_ERROR_REMOTE_XUL: case NS_ERROR_REMOTE_XUL:
{ {
error.AssignLiteral("remoteXUL"); error.AssignLiteral("remoteXUL");
/**
* We want to set an hardcoded messageStr which uses the
* brandShortName.
*/
nsCOMPtr<nsIStringBundleService> stringBundleService =
mozilla::services::GetStringBundleService();
if (!stringBundleService) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIStringBundle> brandBundle;
rv = stringBundleService->CreateBundle(kBrandBundleURL,
getter_AddRefs(brandBundle));
NS_ENSURE_SUCCESS(rv, rv);
nsXPIDLString brandName;
rv = brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(brandName));
// We could use something like nsTextFormatter::smprintf.
messageStr.AssignLiteral("This page uses an unsupported technology "
"that is no longer available by default in ");
messageStr.Append(brandName);
messageStr.AppendLiteral(".");
break; break;
} }
case NS_ERROR_UNSAFE_CONTENT_TYPE: case NS_ERROR_UNSAFE_CONTENT_TYPE:

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

@ -328,7 +328,7 @@
<h1 id="et_nssBadCert">&nssBadCert.title;</h1> <h1 id="et_nssBadCert">&nssBadCert.title;</h1>
<h1 id="et_malwareBlocked">&malwareBlocked.title;</h1> <h1 id="et_malwareBlocked">&malwareBlocked.title;</h1>
<h1 id="et_cspFrameAncestorBlocked">&cspFrameAncestorBlocked.title;</h1> <h1 id="et_cspFrameAncestorBlocked">&cspFrameAncestorBlocked.title;</h1>
<h1 id="et_remoteXUL">Remote XUL</h1> <h1 id="et_remoteXUL">&remoteXUL.title;</h1>
</div> </div>
<div id="errorDescriptionsContainer"> <div id="errorDescriptionsContainer">
<div id="ed_generic">&generic.longDesc;</div> <div id="ed_generic">&generic.longDesc;</div>
@ -352,7 +352,7 @@
<div id="ed_nssBadCert">&nssBadCert.longDesc2;</div> <div id="ed_nssBadCert">&nssBadCert.longDesc2;</div>
<div id="ed_malwareBlocked">&malwareBlocked.longDesc;</div> <div id="ed_malwareBlocked">&malwareBlocked.longDesc;</div>
<div id="ed_cspFrameAncestorBlocked">&cspFrameAncestorBlocked.longDesc;</div> <div id="ed_cspFrameAncestorBlocked">&cspFrameAncestorBlocked.longDesc;</div>
<div id="ed_remoteXUL"><ul><li>Please contact the website owners to inform them of this problem.</li></ul></div> <div id="ed_remoteXUL">&remoteXUL.longDesc;</div>
</div> </div>
</div> </div>

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

@ -62,3 +62,4 @@ externalProtocolLaunchBtn=Launch application
malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences. malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences.
phishingBlocked=The web site at %S has been reported as a web forgery designed to trick users into sharing personal or financial information. phishingBlocked=The web site at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way. cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way.
remoteXUL=This page uses an unsupported technology that is no longer available by default.

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

@ -89,3 +89,6 @@
this inclusion needs to be intact for that approach to work correctly. --> this inclusion needs to be intact for that approach to work correctly. -->
<!ENTITY % netErrorAppDTD SYSTEM "chrome://global/locale/netErrorApp.dtd"> <!ENTITY % netErrorAppDTD SYSTEM "chrome://global/locale/netErrorApp.dtd">
%netErrorAppDTD; %netErrorAppDTD;
<!ENTITY remoteXUL.title "Remote XUL">
<!ENTITY remoteXUL.longDesc "<p><ul><li>Please contact the website owners to inform them of this problem.</li></ul></p>">