Bug 1434976 - Stop setting web-extension install prompt message details dynamically. r=johannh

MozReview-Commit-ID: GfewQFsgEAa

--HG--
extra : rebase_source : 4751a6874fad38dfb0dd41d67736fdfba52e1241
This commit is contained in:
Prathiksha 2018-02-15 18:44:29 +05:30
Родитель dca25b1820
Коммит 3ef0cd25b3
5 изменённых файлов: 11 добавлений и 19 удалений

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

@ -82,6 +82,6 @@
<popupnotification id="addon-installed-notification" hidden="true">
<popupnotificationcontent class="addon-installed-notification-content" orient="vertical">
<description id="addon-installed-notification-message"/>
<description>&addonPostInstallMessage.label;</description>
</popupnotificationcontent>
</popupnotification>

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

@ -148,6 +148,10 @@ let gWhitelist = [{
file: "aboutdevtools.dtd",
key: "aboutDevtools.newsletter.privacy.label",
type: "single-quote"
}, {
file: "browser.dtd",
key: "addonPostInstallMessage.label",
type: "single-quote"
}
];

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

@ -993,3 +993,8 @@ you can use these alternative items. Otherwise, their values should be empty. -
used as a textual label for the indicator used by assistive technology
users. -->
<!ENTITY accessibilityIndicator.tooltip "Accessibility Features Enabled">
<!-- LOCALIZATION NOTE: (addonPostInstallMessage.label):
The first <image> tag is replaced with the icon for the add-ons menu.
The second <image> tag is replaced with the icon for the toolbar menu. -->
<!ENTITY addonPostInstallMessage.label "Manage your add-ons by clicking <image class='addon-addon-icon'/> in the <image class='addon-toolbar-icon'/> menu.">

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

@ -162,12 +162,6 @@ webext.defaultSearchNo.accessKey=N
# just installed.
# %2$S is replaced with the localized name of the application.
addonPostInstall.message1=%1$S has been added to %2$S.
# LOCALIZATION NOTE (addonPostInstall.messageDetail)
# %1$S is replaced with the icon for the add-ons menu.
# %2$S is replaced with the icon for the toolbar menu.
# Note, this string will be used as raw markup. Avoid characters like <, >, &
addonPostInstall.messageDetail=Manage your add-ons by clicking %1$S in the %2$S menu.
addonPostInstall.okay.label=OK
addonPostInstall.okay.key=O

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

@ -393,15 +393,9 @@ this.ExtensionsUI = {
let win = target.ownerGlobal;
let popups = win.PopupNotifications;
let addonIcon = '<image class="addon-addon-icon"/>';
let toolbarIcon = '<image class="addon-toolbar-icon"/>';
let brandBundle = win.document.getElementById("bundle_brand");
let appName = brandBundle.getString("brandShortName");
let bundle = win.gNavigatorBundle;
let msg2 = bundle.getFormattedString("addonPostInstall.messageDetail",
[addonIcon, toolbarIcon]);
// Create the notification header element.
let message = {};
@ -428,12 +422,7 @@ this.ExtensionsUI = {
timeout: Date.now() + 30000,
popupIconURL: icon,
eventCallback(topic) {
if (topic == "showing") {
let doc = this.browser.ownerDocument;
// eslint-disable-next-line no-unsanitized/property
doc.getElementById("addon-installed-notification-message")
.unsafeSetInnerHTML(msg2);
} else if (topic == "dismissed") {
if (topic == "dismissed") {
resolve();
}
}