mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 445374 - In </browser/*>, use a xul <stringbundle/> instead of including the strres.js code. r=Mano.
This commit is contained in:
parent
bfbe1d97e0
commit
02663e3a4b
@ -70,11 +70,11 @@
|
||||
<script type="application/x-javascript" src="chrome://browser/content/pageinfo/feeds.js"/>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/pageinfo/permissions.js"/>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/pageinfo/security.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
<stringbundleset id="pageinfobundleset">
|
||||
<stringbundle id="pageinfobundle" src="chrome://browser/locale/pageInfo.properties"/>
|
||||
<stringbundle id="pkiBundle" src="chrome://pippki/locale/pippki.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
<commandset id="pageInfoCommandSet">
|
||||
|
@ -186,9 +186,6 @@ var security = {
|
||||
};
|
||||
|
||||
function securityOnLoad() {
|
||||
var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties");
|
||||
var pageInfoBundle = document.getElementById("pageinfobundle");
|
||||
|
||||
var info = security._getSecurityInfo();
|
||||
if (!info) {
|
||||
document.getElementById("securityTab").hidden = true;
|
||||
@ -200,6 +197,8 @@ function securityOnLoad() {
|
||||
document.getElementById("securityBox").collapsed = false;
|
||||
}
|
||||
|
||||
const pageInfoBundle = document.getElementById("pageinfobundle");
|
||||
|
||||
/* Set Identity section text */
|
||||
setText("security-identity-domain-value", info.hostName);
|
||||
|
||||
@ -273,35 +272,36 @@ function securityOnLoad() {
|
||||
}
|
||||
|
||||
/* Set the Technical Detail section messages */
|
||||
const pkiBundle = document.getElementById("pkiBundle");
|
||||
var hdr;
|
||||
var msg1;
|
||||
var msg2;
|
||||
|
||||
if (info.isBroken) {
|
||||
hdr = bundle.GetStringFromName("pageInfo_MixedContent");
|
||||
msg1 = bundle.GetStringFromName("pageInfo_Privacy_Mixed1");
|
||||
msg2 = bundle.GetStringFromName("pageInfo_Privacy_None2");
|
||||
hdr = pkiBundle.getString("pageInfo_MixedContent");
|
||||
msg1 = pkiBundle.getString("pageInfo_Privacy_Mixed1");
|
||||
msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
|
||||
}
|
||||
else if (info.encryptionStrength >= 90) {
|
||||
hdr = bundle.formatStringFromName("pageInfo_StrongEncryption",
|
||||
[ info.encryptionAlgorithm, info.encryptionStrength + "" ], 2);
|
||||
msg1 = bundle.GetStringFromName("pageInfo_Privacy_Strong1");
|
||||
msg2 = bundle.GetStringFromName("pageInfo_Privacy_Strong2");
|
||||
hdr = pkiBundle.getFormattedString("pageInfo_StrongEncryption",
|
||||
[info.encryptionAlgorithm, info.encryptionStrength + ""]);
|
||||
msg1 = pkiBundle.getString("pageInfo_Privacy_Strong1");
|
||||
msg2 = pkiBundle.getString("pageInfo_Privacy_Strong2");
|
||||
security._cert = info.cert;
|
||||
}
|
||||
else if (info.encryptionStrength > 0) {
|
||||
hdr = bundle.formatStringFromName("pageInfo_WeakEncryption",
|
||||
[ info.encryptionAlgorithm, info.encryptionStrength + "" ], 2);
|
||||
msg1 = bundle.formatStringFromName("pageInfo_Privacy_Weak1", [ info.hostName ], 1);
|
||||
msg2 = bundle.GetStringFromName("pageInfo_Privacy_Weak2");
|
||||
hdr = pkiBundle.getFormattedString("pageInfo_WeakEncryption",
|
||||
[info.encryptionAlgorithm, info.encryptionStrength + ""]);
|
||||
msg1 = pkiBundle.getFormattedString("pageInfo_Privacy_Weak1", [info.hostName]);
|
||||
msg2 = pkiBundle.getString("pageInfo_Privacy_Weak2");
|
||||
}
|
||||
else {
|
||||
hdr = bundle.GetStringFromName("pageInfo_NoEncryption");
|
||||
hdr = pkiBundle.getString("pageInfo_NoEncryption");
|
||||
if (info.hostName != null)
|
||||
msg1 = bundle.formatStringFromName("pageInfo_Privacy_None1", [ info.hostName ], 1);
|
||||
msg1 = pkiBundle.getFormattedString("pageInfo_Privacy_None1", [info.hostName]);
|
||||
else
|
||||
msg1 = bundle.GetStringFromName("pageInfo_Privacy_None3");
|
||||
msg2 = bundle.GetStringFromName("pageInfo_Privacy_None2");
|
||||
msg1 = pkiBundle.getString("pageInfo_Privacy_None3");
|
||||
msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
|
||||
}
|
||||
setText("security-technical-shortform", hdr);
|
||||
setText("security-technical-longform1", msg1);
|
||||
|
Loading…
Reference in New Issue
Block a user