Bug 1523757 - Convert panelUI.inc.xul to Fluent r=flod,Gijs
authorChristian Frey <christianhfrey@gmail.com>
Mon, 15 Apr 2019 18:10:46 +0000
changeset 469561 ddb852bfc987
parent 469560 3654d1720dab
child 469562 2c2b6f2cb293
push id35874
push userccoroiu@mozilla.com
push dateTue, 16 Apr 2019 04:04:58 +0000
treeherdermozilla-central@be3f40425b52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflod, Gijs
bugs1523757
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1523757 - Convert panelUI.inc.xul to Fluent r=flod,Gijs Differential Revision: https://phabricator.services.mozilla.com/D26447
browser/base/content/test/static/browser_misused_characters_in_strings.js
browser/components/customizableui/content/panelUI.inc.xul
browser/components/customizableui/content/panelUI.js
browser/locales/en-US/browser/appMenuNotifications.ftl
browser/locales/en-US/chrome/browser/browser.dtd
python/l10n/fluent_migrations/bug_1523757_panelUI.py
--- a/browser/base/content/test/static/browser_misused_characters_in_strings.js
+++ b/browser/base/content/test/static/browser_misused_characters_in_strings.js
@@ -95,20 +95,16 @@ let gWhitelist = [{
   }, {
     file: "netErrorApp.dtd",
     key: "securityOverride.warningContent",
     type: "single-quote",
   }, {
     file: "pocket.properties",
     key: "tos",
     type: "double-quote",
-  }, {
-    file: "browser.dtd",
-    key: "addonPostInstallMessage.label",
-    type: "single-quote",
   },
 ];
 
 /**
  * Check if an error should be ignored due to matching one of the whitelist
  * objects defined in gWhitelist.
  *
  * @param filepath The URI spec of the locale file
--- a/browser/components/customizableui/content/panelUI.inc.xul
+++ b/browser/components/customizableui/content/panelUI.inc.xul
@@ -92,102 +92,92 @@
        flip="slide"
        orient="vertical"
        noautofocus="true"
        noautohide="true"
        nopreventnavboxhide="true"
        role="alert">
   <popupnotification id="appMenu-update-available-notification"
                      popupid="update-available"
-                     label="&updateAvailable.header.message;"
-                     buttonlabel="&updateAvailable.acceptButton.label;"
-                     buttonaccesskey="&updateAvailable.acceptButton.accesskey;"
+                     data-lazy-l10n-id="appmenu-update-available"
+                     data-l10n-attrs="buttonlabel, buttonaccesskey, secondarybuttonlabel, secondarybuttonaccesskey"
                      closebuttonhidden="true"
-                     secondarybuttonlabel="&updateAvailable.cancelButton.label;"
-                     secondarybuttonaccesskey="&updateAvailable.cancelButton.accesskey;"
                      dropmarkerhidden="true"
                      checkboxhidden="true"
                      buttonhighlight="true"
                      hidden="true">
     <popupnotificationcontent id="update-available-notification-content" orient="vertical">
-      <description id="update-available-description">&updateAvailable.message;</description>
-      <label id="update-available-whats-new" is="text-link" value="&updateAvailable.whatsnew.label;" />
+      <description id="update-available-description" data-lazy-l10n-id="appmenu-update-available-message"></description>
+      <label id="update-available-whats-new" is="text-link" data-lazy-l10n-id="appmenu-update-whats-new"/>
     </popupnotificationcontent>
   </popupnotification>
 
   <popupnotification id="appMenu-update-manual-notification"
                      popupid="update-manual"
-                     label="&updateManual.header.message;"
-                     buttonlabel="&updateManual.acceptButton.label;"
-                     buttonaccesskey="&updateManual.acceptButton.accesskey;"
+                     data-lazy-l10n-id="appmenu-update-manual"
+                     data-l10n-attrs="buttonlabel, buttonaccesskey, secondarybuttonlabel, secondarybuttonaccesskey"
                      closebuttonhidden="true"
-                     secondarybuttonlabel="&updateManual.cancelButton.label;"
-                     secondarybuttonaccesskey="&updateManual.cancelButton.accesskey;"
                      dropmarkerhidden="true"
                      checkboxhidden="true"
                      buttonhighlight="true"
                      hidden="true">
     <popupnotificationcontent id="update-manual-notification-content" orient="vertical">
-      <description id="update-manual-description">&updateManual.message;</description>
-      <label id="update-manual-whats-new" is="text-link" value="&updateManual.whatsnew.label;" />
+      <description id="update-manual-description" data-lazy-l10n-id="appmenu-update-manual-message"></description>
+      <label id="update-manual-whats-new" is="text-link"  data-lazy-l10n-id="appmenu-update-whats-new"/>
     </popupnotificationcontent>
   </popupnotification>
 
   <popupnotification id="appMenu-update-restart-notification"
                      popupid="update-restart"
-                     label="&updateRestart.header.message2;"
-                     buttonlabel="&updateRestart.acceptButton.label;"
-                     buttonaccesskey="&updateRestart.acceptButton.accesskey;"
+                     data-lazy-l10n-id="appmenu-update-restart"
+                     data-l10n-attrs="buttonlabel, buttonaccesskey, secondarybuttonlabel, secondarybuttonaccesskey"
                      closebuttonhidden="true"
-                     secondarybuttonlabel="&updateRestart.cancelButton.label;"
-                     secondarybuttonaccesskey="&updateRestart.cancelButton.accesskey;"
                      dropmarkerhidden="true"
                      checkboxhidden="true"
                      buttonhighlight="true"
                      hidden="true">
     <popupnotificationcontent id="update-restart-notification-content" orient="vertical">
-      <description id="update-restart-description">&updateRestart.message2;</description>
+      <description id="update-restart-description" data-lazy-l10n-id="appmenu-update-restart-message"></description>
     </popupnotificationcontent>
   </popupnotification>
 
   <popupnotification id="appMenu-addon-installed-notification"
                      popupid="addon-installed"
                      closebuttonhidden="true"
                      secondarybuttonhidden="true"
-                     buttonlabel="&addonPrivateBrowsing.okButton.label;"
-                     buttonaccesskey="&addonPrivateBrowsing.okButton.accesskey;"
+                     data-lazy-l10n-id="appmenu-addon-private-browsing-installed"
+                     data-l10n-attrs="buttonlabel, buttonaccesskey"
                      dropmarkerhidden="true"
                      checkboxhidden="true"
                      buttonhighlight="true"
                      hidden="true">
     <popupnotificationcontent class="addon-installed-notification-content" orient="vertical">
-      <description>&addonPostInstallMessage.label;</description>
+      <description id="addon-install-description" data-lazy-l10n-id="appmenu-addon-post-install-message">
+        <image data-l10n-name="addon-install-icon" class="addon-addon-icon"></image>
+        <image data-l10n-name="addon-menu-icon" class="addon-toolbar-icon"></image>
+      </description>
       <checkbox id="addon-incognito-checkbox"
-                label="&addonPostInstall.incognito.checkbox.label;"
-                accesskey="&addonPostInstall.incognito.checkbox.accesskey;"/>
+                data-lazy-l10n-id="appmenu-addon-post-install-incognito-checkbox"/>
     </popupnotificationcontent>
   </popupnotification>
 
   <popupnotification id="appMenu-addon-private-browsing-notification"
                      popupid="addon-private-browsing"
-                     label="&addonPrivateBrowsing.header2.label;"
+                     data-lazy-l10n-id="appmenu-addon-private-browsing"
+                     data-l10n-attrs="buttonlabel, buttonaccesskey, secondarybuttonlabel, secondarybuttonaccesskey"
                      closebuttonhidden="true"
                      secondarybuttonhidden="false"
-                     buttonlabel="&addonPrivateBrowsing.manageButton.label;"
-                     buttonaccesskey="&addonPrivateBrowsing.manageButton.accesskey;"
-                     secondarybuttonlabel="&addonPrivateBrowsing.okButton.label;"
-                     secondarybuttonaccesskey="&addonPrivateBrowsing.okButton.accesskey;"
                      dropmarkerhidden="true"
                      checkboxhidden="true"
                      buttonhighlight="true"
                      hidden="true">
     <popupnotificationcontent class="addon-private-browsing-notification-content" orient="vertical">
-      <description>&addonPrivateBrowsing.body2.label;</description>
+      <description id="addon-private-browsing-description" data-lazy-l10n-id="appmenu-addon-private-browsing-message"></description>
       <label id="addon-private-browsing-learn-more"
-             class="text-link" is="text-link">&addonPrivateBrowsing.learnMore.label;</label>
+             class="text-link" is="text-link" data-lazy-l10n-id="appmenu-addon-private-browsing-learn-more"></label>
     </popupnotificationcontent>
   </popupnotification>
 </panel>
 
 <menupopup id="customizationPaletteItemContextMenu"
            onpopupshowing="gCustomizeMode.onPaletteContextMenuShowing(event)">
   <menuitem oncommand="gCustomizeMode.addToToolbar(document.popupNode)"
             class="customize-context-addToToolbar"
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -732,16 +732,27 @@ const PanelUI = {
 
     if (notification.options.beforeShowDoorhanger) {
       notification.options.beforeShowDoorhanger(document);
     }
 
     let anchor = this._getPanelAnchor(this.menuButton);
 
     this.notificationPanel.hidden = false;
+
+    // Insert Fluent files when needed before notification is opened
+    MozXULElement.insertFTLIfNeeded("branding/brand.ftl");
+    MozXULElement.insertFTLIfNeeded("browser/appMenuNotifications.ftl");
+
+    // After Fluent files are loaded into document replace data-lazy-l10n-ids with actual ones
+    document.getElementById("appMenu-notification-popup").querySelectorAll("[data-lazy-l10n-id]").forEach(el => {
+      el.setAttribute("data-l10n-id", el.getAttribute("data-lazy-l10n-id"));
+      el.removeAttribute("data-lazy-l10n-id");
+    });
+
     this.notificationPanel.openPopup(anchor, "bottomcenter topright");
   },
 
   _clearNotificationPanel() {
     for (let popupnotification of this.notificationPanel.children) {
       popupnotification.hidden = true;
       popupnotification.notification = null;
     }
new file mode 100644
--- /dev/null
+++ b/browser/locales/en-US/browser/appMenuNotifications.ftl
@@ -0,0 +1,42 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+appmenu-update-available =
+    .label = A new { -brand-shorter-name } update is available.
+    .buttonlabel = Download Update
+    .buttonaccesskey = D
+    .secondarybuttonlabel = Not Now
+    .secondarybuttonaccesskey = N
+appmenu-update-available-message = Update your { -brand-shorter-name } for the latest in speed and privacy.
+appmenu-update-manual =
+    .label = { -brand-shorter-name } can’t update to the latest version.
+    .buttonlabel = Download { -brand-shorter-name }
+    .buttonaccesskey = D
+    .secondarybuttonlabel = Not Now
+    .secondarybuttonaccesskey = N
+appmenu-update-manual-message = Download a fresh copy of { -brand-shorter-name } and we’ll help you to install it.
+appmenu-update-whats-new =
+    .value = See what’s new.
+appmenu-update-restart =
+    .label = Restart to update { -brand-shorter-name }.
+    .buttonlabel = Restart and Restore
+    .buttonaccesskey = R
+    .secondarybuttonlabel = Not Now
+    .secondarybuttonaccesskey = N
+appmenu-update-restart-message = After a quick restart, { -brand-shorter-name } will restore all your open tabs and windows that are not in Private Browsing mode.
+appmenu-addon-private-browsing-installed =
+    .buttonlabel = Okay, Got It
+    .buttonaccesskey = O
+appmenu-addon-post-install-message = Manage your add-ons by clicking <image data-l10n-name='addon-install-icon'></image> in the <image data-l10n-name='addon-menu-icon'></image> menu.
+appmenu-addon-post-install-incognito-checkbox =
+    .label = Allow this extension to run in Private Windows
+    .accesskey = A
+appmenu-addon-private-browsing =
+    .label = Change to extensions in Private Windows
+    .buttonlabel = Manage Extensions
+    .buttonaccesskey = M
+    .secondarybuttonlabel = Okay, Got It
+    .secondarybuttonaccesskey = O
+appmenu-addon-private-browsing-message = Any new extensions you add to { -brand-shorter-name } won’t work in Private Windows unless you allow this in the settings.
+appmenu-addon-private-browsing-learn-more = Learn how to manage extension settings
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -935,40 +935,18 @@ you can use these alternative items. Oth
 
 <!ENTITY panicButton.thankyou.msg1                "Your recent history is cleared.">
 <!ENTITY panicButton.thankyou.msg2                "Safe browsing!">
 <!ENTITY panicButton.thankyou.buttonlabel         "Thanks!">
 
 <!ENTITY emeLearnMoreContextMenu.label            "Learn more about DRM…">
 <!ENTITY emeLearnMoreContextMenu.accesskey        "D">
 
-<!ENTITY updateAvailable.message "Update your &brandShorterName; for the latest in speed and privacy.">
-<!ENTITY updateAvailable.whatsnew.label "See what’s new.">
-<!ENTITY updateAvailable.header.message "A new &brandShorterName; update is available.">
-<!ENTITY updateAvailable.acceptButton.label "Download Update">
-<!ENTITY updateAvailable.acceptButton.accesskey "D">
-<!ENTITY updateAvailable.cancelButton.label "Not Now">
-<!ENTITY updateAvailable.cancelButton.accesskey "N">
 <!ENTITY updateAvailable.panelUI.label "Download &brandShorterName; update">
-
-<!ENTITY updateManual.message "Download a fresh copy of &brandShorterName; and we’ll help you to install it.">
-<!ENTITY updateManual.whatsnew.label "See what’s new.">
-<!ENTITY updateManual.header.message "&brandShorterName; can’t update to the latest version.">
-<!ENTITY updateManual.acceptButton.label "Download &brandShorterName;">
-<!ENTITY updateManual.acceptButton.accesskey "D">
-<!ENTITY updateManual.cancelButton.label "Not Now">
-<!ENTITY updateManual.cancelButton.accesskey "N">
 <!ENTITY updateManual.panelUI.label "Download a fresh copy of &brandShorterName;">
-
-<!ENTITY updateRestart.message2 "After a quick restart, &brandShorterName; will restore all your open tabs and windows that are not in Private Browsing mode.">
-<!ENTITY updateRestart.header.message2 "Restart to update &brandShorterName;.">
-<!ENTITY updateRestart.acceptButton.label "Restart and Restore">
-<!ENTITY updateRestart.acceptButton.accesskey "R">
-<!ENTITY updateRestart.cancelButton.label "Not Now">
-<!ENTITY updateRestart.cancelButton.accesskey "N">
 <!ENTITY updateRestart.panelUI.label2 "Restart to update &brandShorterName;">
 
 <!ENTITY newTabControlled.header.message "Your New Tab has changed.">
 <!ENTITY newTabControlled.keepButton.label "Keep Changes">
 <!ENTITY newTabControlled.keepButton.accesskey "K">
 <!ENTITY newTabControlled.disableButton.label "Disable Extension">
 <!ENTITY newTabControlled.disableButton.accesskey "D">
 
@@ -997,23 +975,8 @@ you can use these alternative items. Oth
 
 <!ENTITY libraryButton.tooltip "View history, saved bookmarks, and more">
 
 <!-- LOCALIZATION NOTE: (accessibilityIndicator.tooltip): This is used to
      display a tooltip for accessibility indicator in toolbar/tabbar. It is also
      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.">
-<!ENTITY addonPostInstall.incognito.checkbox.label "Allow this extension to run in Private Windows">
-<!ENTITY addonPostInstall.incognito.checkbox.accesskey "A">
-
-<!ENTITY addonPrivateBrowsing.header2.label "Change to extensions in Private Windows">
-<!ENTITY addonPrivateBrowsing.body2.label "Any new extensions you add to &brandShorterName; won’t work in Private Windows unless you allow this in the settings.">
-<!ENTITY addonPrivateBrowsing.learnMore.label "Learn how to manage extension settings">
-<!ENTITY addonPrivateBrowsing.okButton.label "Okay, Got It">
-<!ENTITY addonPrivateBrowsing.okButton.accesskey "O">
-<!ENTITY addonPrivateBrowsing.manageButton.label "Manage Extensions">
-<!ENTITY addonPrivateBrowsing.manageButton.accesskey "M">
new file mode 100644
--- /dev/null
+++ b/python/l10n/fluent_migrations/bug_1523757_panelUI.py
@@ -0,0 +1,227 @@
+# coding=utf8
+
+# Any copyright is dedicated to the Public Domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+
+from __future__ import absolute_import
+import fluent.syntax.ast as FTL
+from fluent.migrate.helpers import transforms_from
+from fluent.migrate.helpers import MESSAGE_REFERENCE, TERM_REFERENCE, VARIABLE_REFERENCE
+from fluent.migrate import COPY, CONCAT, REPLACE
+
+
+def migrate(ctx):
+    """Bug 1523757 - Migrate appMenu notification DTD strings from browser.dtd, part {index}"""
+    ctx.add_transforms(
+        "browser/browser/appMenuNotifications.ftl",
+        "browser/browser/appMenuNotifications.ftl",
+        transforms_from(
+"""
+appmenu-update-whats-new =
+    .value = { COPY(from_path,"updateAvailable.whatsnew.label") }
+appmenu-addon-private-browsing-installed =
+    .buttonlabel = { COPY(from_path,"addonPrivateBrowsing.okButton.label") }
+    .buttonaccesskey = { COPY(from_path,"addonPrivateBrowsing.okButton.accesskey") }
+appmenu-addon-post-install-incognito-checkbox =
+    .label = { COPY(from_path,"addonPostInstall.incognito.checkbox.label") }
+    .accesskey = { COPY(from_path,"addonPostInstall.incognito.checkbox.accesskey") }
+appmenu-addon-private-browsing =
+    .label = { COPY(from_path,"addonPrivateBrowsing.header2.label") }
+    .buttonlabel = { COPY(from_path,"addonPrivateBrowsing.manageButton.label") }
+    .buttonaccesskey = { COPY(from_path,"addonPrivateBrowsing.manageButton.accesskey") }
+    .secondarybuttonlabel = { COPY(from_path,"addonPrivateBrowsing.okButton.label") }
+    .secondarybuttonaccesskey = { COPY(from_path,"addonPrivateBrowsing.okButton.accesskey") }
+appmenu-addon-private-browsing-learn-more = { COPY(from_path,"addonPrivateBrowsing.learnMore.label") }
+""", from_path="browser/chrome/browser/browser.dtd"
+        )
+    )
+
+    ctx.add_transforms(
+        "browser/browser/appMenuNotifications.ftl",
+        "browser/browser/appMenuNotifications.ftl",
+        [
+            FTL.Message(
+                id=FTL.Identifier("appmenu-update-available"),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier("label"),
+                        REPLACE(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateAvailable.header.message",
+                            {
+                                "&brandShorterName;": TERM_REFERENCE("brand-shorter-name"),
+                            }
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("buttonlabel"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateAvailable.acceptButton.label",
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("buttonaccesskey"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateAvailable.acceptButton.accesskey",
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("secondarybuttonlabel"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateAvailable.cancelButton.label",
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("secondarybuttonaccesskey"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateAvailable.cancelButton.accesskey",
+                        )
+                    ),
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier("appmenu-update-manual"),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier("label"),
+                        REPLACE(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateManual.header.message",
+                            {
+                                "&brandShorterName;": TERM_REFERENCE("brand-shorter-name"),
+                            }
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("buttonlabel"),
+                        REPLACE(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateManual.acceptButton.label",
+                            {
+                                "&brandShorterName;": TERM_REFERENCE("brand-shorter-name"),
+                            }
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("buttonaccesskey"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateManual.acceptButton.accesskey",
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("secondarybuttonlabel"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateManual.cancelButton.label",
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("secondarybuttonaccesskey"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateManual.cancelButton.accesskey",
+                        )
+                    ),
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier("appmenu-update-restart"),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier("label"),
+                        REPLACE(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateRestart.header.message2",
+                            {
+                                "&brandShorterName;": TERM_REFERENCE("brand-shorter-name"),
+                            }
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("buttonlabel"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateRestart.acceptButton.label",
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("buttonaccesskey"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateRestart.acceptButton.accesskey",
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("secondarybuttonlabel"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateRestart.cancelButton.label",
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier("secondarybuttonaccesskey"),
+                        COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "updateRestart.cancelButton.accesskey",
+                        )
+                    ),
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier("appmenu-update-available-message"),
+                value=REPLACE(
+                    "browser/chrome/browser/browser.dtd",
+                    "updateAvailable.message",
+                    {
+                        "&brandShorterName;": TERM_REFERENCE("brand-shorter-name")
+                    }
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier("appmenu-update-manual-message"),
+                value=REPLACE(
+                    "browser/chrome/browser/browser.dtd",
+                    "updateManual.message",
+                    {
+                        "&brandShorterName;": TERM_REFERENCE("brand-shorter-name")
+                    }
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier("appmenu-update-restart-message"),
+                value=REPLACE(
+                    "browser/chrome/browser/browser.dtd",
+                    "updateRestart.message2",
+                    {
+                        "&brandShorterName;": TERM_REFERENCE("brand-shorter-name")
+                    }
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier("appmenu-addon-post-install-message"),
+                value=REPLACE(
+                    "browser/chrome/browser/browser.dtd",
+                    "addonPostInstallMessage.label",
+                    {
+                        "<image class='addon-addon-icon'/>": FTL.TextElement("<image data-l10n-name='addon-install-icon'></image>"),
+                        "<image class='addon-toolbar-icon'/>": FTL.TextElement("<image data-l10n-name='addon-menu-icon'></image>"),
+                    }
+                )
+            ),
+            FTL.Message(
+                id=FTL.Identifier("appmenu-addon-private-browsing-message"),
+                value=REPLACE(
+                    "browser/chrome/browser/browser.dtd",
+                    "addonPrivateBrowsing.body2.label",
+                    {
+                        "&brandShorterName;": TERM_REFERENCE("brand-shorter-name")
+                    }
+                )
+            ),
+        ]
+    )