Bug 1779248 - Backout temporary fix for missing locale (Bug 1775093). r=#thunderbird-reviewers,mkmelin

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

--HG--
extra : absorb_source : 4b032a4202a1050c8505281ce91c8b224f32a537
extra : histedit_source : d4a289e62767bc49e5a061ab33bc2c073872fd59
This commit is contained in:
John Bieling 2022-07-12 15:24:25 +00:00
Родитель a5985aacd6
Коммит 4e6bafa8ee
1 изменённых файлов: 0 добавлений и 43 удалений

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

@ -145,49 +145,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
this.addOptionsButton();
};
// Remove this after Bug 1773568 has been uplifted to ESR 102.
AddonCard.prototype.updateMessage = async function() {
const messageBar = this.card.querySelector(".addon-card-message");
const {
linkUrl,
messageId,
messageArgs,
type = "",
} = await getAddonMessageInfo(this.addon);
if (messageId) {
document.l10n.pauseObserving();
document.l10n.setAttributes(
messageBar.querySelector("span"),
messageId,
messageArgs
);
const link = messageBar.querySelector("button");
if (linkUrl) {
// Do not use the missing locale string, but instead use one having a
// similar wording.
let localeId =
messageId == "details-notification-incompatible"
? "details-notification-unsigned-and-disabled-link"
: `${messageId}-link`;
document.l10n.setAttributes(link, localeId);
link.setAttribute("url", linkUrl);
link.hidden = false;
} else {
link.hidden = true;
}
document.l10n.resumeObserving();
await document.l10n.translateFragment(messageBar);
messageBar.setAttribute("type", type);
messageBar.hidden = false;
} else {
messageBar.hidden = true;
}
};
// Override parts of the addon-permission-list customElement to be able
// to show the usage of Experiments in the permission list.
await customElements.whenDefined("addon-permissions-list");