Bug 1625497 - Change tab name of certificate viewer to Certificate for <Common Name>. r=johannh,fluent-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D69695

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alexuwa 2020-04-15 06:52:08 +00:00
Родитель c14ed0bdbb
Коммит 283bbcf851
3 изменённых файлов: 10 добавлений и 1 удалений

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

@ -29,7 +29,7 @@
<script defer="defer" type="module" src="chrome://global/content/certviewer/components/about-certificate-items.js"></script>
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css">
<link rel="stylesheet" href="chrome://global/content/certviewer/certviewer.css">
<title>about:certificate</title>
<title id="certTitle">about:certificate</title>
</head>
<body>
<template id="certificate-section-template" class="section">

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

@ -447,6 +447,12 @@ const buildChain = async chain => {
if (certs.length === 0) {
return Promise.reject();
}
let certTitle = document.querySelector("#certTitle");
let firstCertCommonName = certs[0].subject.cn;
document.l10n.setAttributes(certTitle, "certificate-viewer-tab-title", {
firstCertName: firstCertCommonName,
});
let adjustedCerts = certs.map(cert => adjustCertInformation(cert));
return render(adjustedCerts, false);
})

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

@ -16,6 +16,9 @@ certificate-viewer-certificate-authority = Certificate Authority
certificate-viewer-cipher-suite = Cipher Suite
certificate-viewer-common-name = Common Name
certificate-viewer-email-address = Email Address
# Variables:
# $firstCertName (String) - Common Name for the displayed certificate
certificate-viewer-tab-title = Certificate for { $firstCertName }
# Inc. means Incorporated, e.g GitHub is incorporated in Delaware
certificate-viewer-inc-country = Inc. Country
certificate-viewer-country = Country