Bug 1501886 - Migrate menubar to Fluent. r=fluent-reviewers,Pike,flod
authorZibi Braniecki <zbraniecki@mozilla.com>
Fri, 02 Aug 2019 16:07:44 +0000
changeset 485987 1f622156e9eab1d2c58d5d77bb5908fcc83db253
parent 485986 cc5b3d1d6869db8c61a46f87b635386279503329
child 485988 dd3a15beada7d76d23693d67ad119826f9f05ae9
push id91568
push userzbraniecki@mozilla.com
push dateFri, 02 Aug 2019 16:08:31 +0000
treeherderautoland@1f622156e9ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfluent-reviewers, Pike, flod
bugs1501886
milestone70.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 1501886 - Migrate menubar to Fluent. r=fluent-reviewers,Pike,flod Differential Revision: https://phabricator.services.mozilla.com/D34379
browser/base/content/browser-doctype.inc
browser/base/content/browser-menubar.inc
browser/base/content/browser.js
browser/base/content/browser.xhtml
browser/base/content/hiddenWindowMac.xhtml
browser/base/content/macWindow.inc.xul
browser/locales/en-US/browser/menubar.ftl
browser/locales/en-US/chrome/browser/browser.dtd
browser/locales/en-US/chrome/browser/safebrowsing/report-phishing.dtd
browser/locales/jar.mn
intl/l10n/L10nRegistry.jsm
python/l10n/fluent_migrations/bug_1501886_browser-menubar.py
toolkit/locales/en-US/chrome/global/charsetMenu.dtd
--- a/browser/base/content/browser-doctype.inc
+++ b/browser/base/content/browser-doctype.inc
@@ -11,12 +11,10 @@
 <!ENTITY % downloadsDTD SYSTEM "chrome://browser/locale/downloads/downloads.dtd">
 %downloadsDTD;
 <!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
 %placesDTD;
 <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
 %syncBrandDTD;
 <!ENTITY % brandingsDTD SYSTEM "chrome://browser/locale/brandings.dtd">
 %brandingsDTD;
-<!ENTITY % reportphishDTD SYSTEM "chrome://browser/locale/safebrowsing/report-phishing.dtd">
-%reportphishDTD;
 <!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
 %editBookmarkOverlayDTD;
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
@@ -3,623 +3,477 @@
 # 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/.
 
        <menubar id="main-menubar"
                 onpopupshowing="if (event.target.parentNode.parentNode == this &amp;&amp;
                                     !('@mozilla.org/widget/nativemenuservice;1' in Cc))
                                   this.setAttribute('openedwithkey',
                                                     event.target.parentNode.openedWithKey);">
-            <menu id="file-menu" label="&fileMenu.label;"
-                  accesskey="&fileMenu.accesskey;">
+            <menu id="file-menu" data-l10n-id="menu-file">
               <menupopup id="menu_FilePopup"
                          onpopupshowing="updateFileMenuUserContextUIVisibility('menu_newUserContext');
                                          updateFileMenuImportUIVisibility('cmd_importFromAnotherBrowser');">
                 <menuitem id="menu_newNavigatorTab"
-                          label="&tabCmd.label;"
                           command="cmd_newNavigatorTab"
-                          key="key_newNavigatorTab"
-                          accesskey="&tabCmd.accesskey;"/>
+                          key="key_newNavigatorTab" data-l10n-id="menu-file-new-tab"/>
                 <menu id="menu_newUserContext"
-                      label="&newUserContext.label;"
-                      accesskey="&newUserContext.accesskey;"
-                      hidden="true">
+                      hidden="true" data-l10n-id="menu-file-new-container-tab">
                   <menupopup onpopupshowing="return createUserContextMenu(event);" />
                 </menu>
                 <menuitem id="menu_newNavigator"
-                          label="&newNavigatorCmd.label;"
-                          accesskey="&newNavigatorCmd.accesskey;"
                           key="key_newNavigator"
-                          command="cmd_newNavigator"/>
+                          command="cmd_newNavigator" data-l10n-id="menu-file-new-window"/>
                 <menuitem id="menu_newPrivateWindow"
-                          label="&newPrivateWindow.label;"
-                          accesskey="&newPrivateWindow.accesskey;"
                           command="Tools:PrivateBrowsing"
-                          key="key_privatebrowsing"/>
+                          key="key_privatebrowsing" data-l10n-id="menu-file-new-private-window"/>
                 <menuitem id="menu_openLocation"
                           hidden="true"
-                          label="&openLocationCmd.label;"
                           command="Browser:OpenLocation"
-                          key="focusURLBar"/>
+                          key="focusURLBar" data-l10n-id="menu-file-open-location"/>
                 <menuitem id="menu_openFile"
-                          label="&openFileCmd.label;"
                           command="Browser:OpenFile"
-                          key="openFileKb"
-                          accesskey="&openFileCmd.accesskey;"/>
+                          key="openFileKb" data-l10n-id="menu-file-open-file"/>
                 <menuitem id="menu_close"
                           class="show-only-for-keyboard"
-                          label="&closeCmd.label;"
                           key="key_close"
-                          accesskey="&closeCmd.accesskey;"
-                          command="cmd_close"/>
+                          command="cmd_close" data-l10n-id="menu-file-close"/>
                 <menuitem id="menu_closeWindow"
                           class="show-only-for-keyboard"
                           hidden="true"
                           command="cmd_closeWindow"
-                          key="key_closeWindow"
-                          label="&closeWindow.label;"
-                          accesskey="&closeWindow.accesskey;"/>
+                          key="key_closeWindow" data-l10n-id="menu-file-close-window"/>
                 <menuseparator/>
                 <menuitem id="menu_savePage"
-                          label="&savePageCmd.label;"
-                          accesskey="&savePageCmd.accesskey;"
                           key="key_savePage"
-                          command="Browser:SavePage"/>
+                          command="Browser:SavePage" data-l10n-id="menu-file-save-page"/>
                 <menuitem id="menu_sendLink"
-                          label="&emailPageCmd.label;"
-                          accesskey="&emailPageCmd.accesskey;"
-                          command="Browser:SendLink"/>
+                          command="Browser:SendLink" data-l10n-id="menu-file-email-link"/>
                 <menuseparator/>
 #if !defined(MOZ_WIDGET_GTK)
                 <menuitem id="menu_printSetup"
-                          label="&printSetupCmd.label;"
-                          accesskey="&printSetupCmd.accesskey;"
-                          command="cmd_pageSetup"/>
+                          command="cmd_pageSetup" data-l10n-id="menu-file-print-setup"/>
 #endif
 #ifndef XP_MACOSX
                 <menuitem id="menu_printPreview"
-                          label="&printPreviewCmd.label;"
-                          accesskey="&printPreviewCmd.accesskey;"
-                          command="cmd_printPreview"/>
+                          command="cmd_printPreview" data-l10n-id="menu-file-print-preview"/>
 #endif
                 <menuitem id="menu_print"
-                          label="&printCmd.label;"
-                          accesskey="&printCmd.accesskey;"
                           key="printKb"
-                          command="cmd_print"/>
+                          command="cmd_print" data-l10n-id="menu-file-print"/>
                 <menuseparator/>
                 <menuitem id="menu_importFromAnotherBrowser"
-                          label="&importFromAnotherBrowserCmd.label;"
-                          accesskey="&importFromAnotherBrowserCmd.accesskey;"
-                          command="cmd_importFromAnotherBrowser"/>
+                          command="cmd_importFromAnotherBrowser" data-l10n-id="menu-file-import-from-another-browser"/>
                 <menuseparator/>
                 <menuitem id="goOfflineMenuitem"
-                          label="&goOfflineCmd.label;"
-                          accesskey="&goOfflineCmd.accesskey;"
                           type="checkbox"
-                          command="cmd_toggleOfflineStatus"/>
+                          command="cmd_toggleOfflineStatus" data-l10n-id="menu-file-go-offline"/>
+<!-- We need to leave those strings in DTD until bug 1568133 is fixed. -->
                 <menuitem id="menu_FileQuitItem"
 #ifdef XP_WIN
                           label="&quitApplicationCmdWin2.label;"
                           accesskey="&quitApplicationCmdWin2.accesskey;"
 #elifdef XP_MACOSX
                           label="&quitApplicationCmdMac2.label;"
 #else
                           label="&quitApplicationCmd.label;"
                           accesskey="&quitApplicationCmd.accesskey;"
 #endif
                           key="key_quitApplication"
                           command="cmd_quitApplication"/>
               </menupopup>
             </menu>
 
-            <menu id="edit-menu" label="&editMenu.label;"
-                  accesskey="&editMenu.accesskey;">
+            <menu id="edit-menu" data-l10n-id="menu-edit">
               <menupopup id="menu_EditPopup"
                          onpopupshowing="updateEditUIVisibility()"
                          onpopuphidden="updateEditUIVisibility()">
                 <menuitem id="menu_undo"
-                          label="&undoCmd.label;"
                           key="key_undo"
-                          accesskey="&undoCmd.accesskey;"
-                          command="cmd_undo"/>
+                          command="cmd_undo" data-l10n-id="menu-edit-undo"/>
                 <menuitem id="menu_redo"
-                          label="&redoCmd.label;"
                           key="key_redo"
-                          accesskey="&redoCmd.accesskey;"
-                          command="cmd_redo"/>
+                          command="cmd_redo" data-l10n-id="menu-edit-redo"/>
                 <menuseparator/>
                 <menuitem id="menu_cut"
-                          label="&cutCmd.label;"
                           key="key_cut"
-                          accesskey="&cutCmd.accesskey;"
-                          command="cmd_cut"/>
+                          command="cmd_cut" data-l10n-id="menu-edit-cut"/>
                 <menuitem id="menu_copy"
-                          label="&copyCmd.label;"
                           key="key_copy"
-                          accesskey="&copyCmd.accesskey;"
-                          command="cmd_copy"/>
+                          command="cmd_copy" data-l10n-id="menu-edit-copy"/>
                 <menuitem id="menu_paste"
-                          label="&pasteCmd.label;"
                           key="key_paste"
-                          accesskey="&pasteCmd.accesskey;"
-                          command="cmd_paste"/>
+                          command="cmd_paste" data-l10n-id="menu-edit-paste"/>
                 <menuitem id="menu_delete"
-                          label="&deleteCmd.label;"
                           key="key_delete"
-                          accesskey="&deleteCmd.accesskey;"
-                          command="cmd_delete"/>
+                          command="cmd_delete" data-l10n-id="menu-edit-delete"/>
                 <menuseparator/>
                 <menuitem id="menu_selectAll"
-                          label="&selectAllCmd.label;"
                           key="key_selectAll"
-                          accesskey="&selectAllCmd.accesskey;"
-                          command="cmd_selectAll"/>
+                          command="cmd_selectAll" data-l10n-id="menu-edit-select-all"/>
                 <menuseparator/>
                 <menuitem id="menu_find"
-                          label="&findOnCmd.label;"
-                          accesskey="&findOnCmd.accesskey;"
                           key="key_find"
-                          command="cmd_find"/>
+                          command="cmd_find" data-l10n-id="menu-edit-find-on"/>
                 <menuitem id="menu_findAgain"
                           class="show-only-for-keyboard"
-                          label="&findAgainCmd.label;"
-                          accesskey="&findAgainCmd.accesskey;"
                           key="key_findAgain"
-                          command="cmd_findAgain"/>
+                          command="cmd_findAgain" data-l10n-id="menu-edit-find-again"/>
                 <menuseparator hidden="true" id="textfieldDirection-separator"/>
                 <menuitem id="textfieldDirection-swap"
                           command="cmd_switchTextDirection"
                           key="key_switchTextDirection"
-                          label="&bidiSwitchTextDirectionItem.label;"
-                          accesskey="&bidiSwitchTextDirectionItem.accesskey;"
-                          hidden="true"/>
+                          hidden="true" data-l10n-id="menu-edit-bidi-switch-text-direction"/>
 #ifdef XP_UNIX
 #ifndef XP_MACOSX
                 <menuseparator/>
                 <menuitem id="menu_preferences"
-                          label="&preferencesCmdUnix.label;"
-                          accesskey="&preferencesCmdUnix.accesskey;"
-                          oncommand="openPreferences(undefined);"/>
+                          oncommand="openPreferences(undefined);" data-l10n-id="menu-preferences"/>
 #endif
 #endif
               </menupopup>
             </menu>
 
-            <menu id="view-menu" label="&viewMenu.label;"
-                  accesskey="&viewMenu.accesskey;">
+            <menu id="view-menu" data-l10n-id="menu-view">
               <menupopup id="menu_viewPopup"
                          onpopupshowing="updateCharacterEncodingMenuState();">
-                <menu id="viewToolbarsMenu"
-                      label="&viewToolbarsMenu.label;"
-                      accesskey="&viewToolbarsMenu.accesskey;">
+                <menu id="viewToolbarsMenu" data-l10n-id="menu-view-toolbars-menu">
                   <menupopup onpopupshowing="onViewToolbarsPopupShowing(event);">
                     <menuseparator/>
                     <menuitem id="menu_customizeToolbars"
-                              label="&viewCustomizeToolbar.label;"
-                              accesskey="&viewCustomizeToolbar.accesskey;"
-                              command="cmd_CustomizeToolbars"/>
+                              command="cmd_CustomizeToolbars" data-l10n-id="menu-view-customize-toolbar"/>
                   </menupopup>
                 </menu>
-                <menu id="viewSidebarMenuMenu"
-                      label="&viewSidebarMenu.label;"
-                      accesskey="&viewSidebarMenu.accesskey;">
+                <menu id="viewSidebarMenuMenu" data-l10n-id="menu-view-sidebar">
                   <menupopup id="viewSidebarMenu">
                     <menuitem id="menu_bookmarksSidebar"
                               type="checkbox"
                               key="viewBookmarksSidebarKb"
-                              oncommand="SidebarUI.toggle('viewBookmarksSidebar');"
-                              label="&bookmarksButton.label;"/>
+                              oncommand="SidebarUI.toggle('viewBookmarksSidebar');" data-l10n-id="menu-view-bookmarks"/>
                     <menuitem id="menu_historySidebar"
                               type="checkbox"
                               key="key_gotoHistory"
-                              oncommand="SidebarUI.toggle('viewHistorySidebar');"
-                              label="&historyButton.label;"/>
+                              oncommand="SidebarUI.toggle('viewHistorySidebar');" data-l10n-id="menu-view-history-button"/>
                     <menuitem id="menu_tabsSidebar"
                               type="checkbox"
                               class="sync-ui-item"
-                              oncommand="SidebarUI.toggle('viewTabsSidebar');"
-                              label="&syncedTabs.sidebar.label;"/>
+                              oncommand="SidebarUI.toggle('viewTabsSidebar');" data-l10n-id="menu-view-synced-tabs-sidebar"/>
                   </menupopup>
                 </menu>
                 <menuseparator/>
-                <menu id="viewFullZoomMenu" label="&fullZoom.label;"
-                      accesskey="&fullZoom.accesskey;"
-                      onpopupshowing="FullZoom.updateMenu();">
+                <menu id="viewFullZoomMenu"
+                      onpopupshowing="FullZoom.updateMenu();" data-l10n-id="menu-view-full-zoom">
                   <menupopup>
                     <menuitem id="menu_zoomEnlarge"
                               key="key_fullZoomEnlarge"
-                              label="&fullZoomEnlargeCmd.label;"
-                              accesskey="&fullZoomEnlargeCmd.accesskey;"
-                              command="cmd_fullZoomEnlarge"/>
+                              command="cmd_fullZoomEnlarge" data-l10n-id="menu-view-full-zoom-enlarge"/>
                     <menuitem id="menu_zoomReduce"
                               key="key_fullZoomReduce"
-                              label="&fullZoomReduceCmd.label;"
-                              accesskey="&fullZoomReduceCmd.accesskey;"
-                              command="cmd_fullZoomReduce"/>
+                              command="cmd_fullZoomReduce" data-l10n-id="menu-view-full-zoom-reduce"/>
                     <menuseparator/>
                     <menuitem id="menu_zoomReset"
                               key="key_fullZoomReset"
-                              label="&fullZoomResetCmd.label;"
-                              accesskey="&fullZoomResetCmd.accesskey;"
-                              command="cmd_fullZoomReset"/>
+                              command="cmd_fullZoomReset" data-l10n-id="menu-view-full-zoom-reset"/>
                     <menuseparator/>
                     <menuitem id="toggle_zoom"
-                              label="&fullZoomToggleCmd.label;"
-                              accesskey="&fullZoomToggleCmd.accesskey;"
                               type="checkbox"
                               command="cmd_fullZoomToggle"
-                              checked="false"/>
+                              checked="false" data-l10n-id="menu-view-full-zoom-toggle"/>
                   </menupopup>
                 </menu>
-                <menu id="pageStyleMenu" label="&pageStyleMenu.label;"
-                      accesskey="&pageStyleMenu.accesskey;">
+                <menu id="pageStyleMenu" data-l10n-id="menu-view-page-style-menu">
                   <menupopup onpopupshowing="gPageStyleMenu.fillPopup(this);">
                     <menuitem id="menu_pageStyleNoStyle"
-                              label="&pageStyleNoStyle.label;"
-                              accesskey="&pageStyleNoStyle.accesskey;"
                               oncommand="gPageStyleMenu.disableStyle();"
-                              type="radio"/>
+                              type="radio" data-l10n-id="menu-view-page-style-no-style"/>
                     <menuitem id="menu_pageStylePersistentOnly"
-                              label="&pageStylePersistentOnly.label;"
-                              accesskey="&pageStylePersistentOnly.accesskey;"
                               oncommand="gPageStyleMenu.switchStyleSheet('');"
                               type="radio"
-                              checked="true"/>
+                              checked="true" data-l10n-id="menu-view-page-basic-style"/>
                     <menuseparator/>
                   </menupopup>
                 </menu>
                 <menu id="charsetMenu"
-                    label="&charsetMenu2.label;"
-                    accesskey="&charsetMenu2.accesskey;"
                     oncommand="BrowserSetForcedCharacterSet(event.target.getAttribute('charset'));"
-                    onpopupshowing="CharsetMenu.build(event.target); UpdateCurrentCharset(this);">
+                    onpopupshowing="CharsetMenu.build(event.target); UpdateCurrentCharset(this);" data-l10n-id="menu-view-charset">
                   <menupopup>
                   </menupopup>
                 </menu>
                 <menuseparator/>
 #ifdef XP_MACOSX
                 <menuitem id="enterFullScreenItem"
-                          accesskey="&enterFullScreenCmd.accesskey;"
-                          label="&enterFullScreenCmd.label;"
-                          key="key_fullScreen">
+                          key="key_fullScreen" data-l10n-id="menu-view-enter-full-screen">
                   <observes element="View:FullScreen" attribute="oncommand"/>
                   <observes element="View:FullScreen" attribute="disabled"/>
                 </menuitem>
                 <menuitem id="exitFullScreenItem"
-                          accesskey="&exitFullScreenCmd.accesskey;"
-                          label="&exitFullScreenCmd.label;"
                           key="key_fullScreen"
-                          hidden="true">
+                          hidden="true" data-l10n-id="menu-view-exit-full-screen">
                   <observes element="View:FullScreen" attribute="oncommand"/>
                   <observes element="View:FullScreen" attribute="disabled"/>
                 </menuitem>
 #else
                 <menuitem id="fullScreenItem"
-                          accesskey="&fullScreenCmd.accesskey;"
-                          label="&fullScreenCmd.label;"
                           key="key_fullScreen"
                           type="checkbox"
-                          observes="View:FullScreen"/>
+                          observes="View:FullScreen" data-l10n-id="menu-view-full-screen"/>
 #endif
                 <menuitem id="menu_readerModeItem"
                           observes="View:ReaderView"
                           key="key_toggleReaderMode"
                           hidden="true"/>
                 <menuitem id="menu_showAllTabs"
                           hidden="true"
-                          accesskey="&showAllTabsCmd.accesskey;"
-                          label="&showAllTabsCmd.label;"
                           command="Browser:ShowAllTabs"
-                          key="key_showAllTabs"/>
+                          key="key_showAllTabs" data-l10n-id="menu-view-show-all-tabs"/>
                 <menuseparator hidden="true" id="documentDirection-separator"/>
                 <menuitem id="documentDirection-swap"
                           hidden="true"
-                          label="&bidiSwitchPageDirectionItem.label;"
-                          accesskey="&bidiSwitchPageDirectionItem.accesskey;"
-                          oncommand="gBrowser.selectedBrowser.sendMessageToActor('SwitchDocumentDirection', {}, 'SwitchDocumentDirection', true);"/>
+                          oncommand="gBrowser.selectedBrowser.sendMessageToActor('SwitchDocumentDirection', {}, 'SwitchDocumentDirection', true);" data-l10n-id="menu-view-bidi-switch-page-direction"/>
               </menupopup>
             </menu>
 
-            <menu id="history-menu"
-                  label="&historyMenu.label;"
-                  accesskey="&historyMenu.accesskey;">
+            <menu id="history-menu" data-l10n-id="menu-history">
               <menupopup id="goPopup"
 #ifndef XP_MACOSX
                          placespopup="true"
 #endif
                          oncommand="this.parentNode._placesView._onCommand(event);"
                          onclick="checkForMiddleClick(this, event);"
                          onpopupshowing="if (!this.parentNode._placesView)
                                            new HistoryMenu(event);"
                          tooltip="bhTooltip"
                          popupsinherittooltip="true">
                 <menuitem id="menu_showAllHistory"
-                          label="&showAllHistoryCmd2.label;"
 #ifndef XP_MACOSX
                           key="showAllHistoryKb"
 #endif
-                          command="Browser:ShowAllHistory"/>
+                          command="Browser:ShowAllHistory" data-l10n-id="menu-history-show-all-history"/>
                 <menuitem id="sanitizeItem"
-                          label="&clearRecentHistory.label;"
                           key="key_sanitize"
-                          command="Tools:Sanitize"/>
+                          command="Tools:Sanitize" data-l10n-id="menu-history-clear-recent-history"/>
                 <menuseparator id="sanitizeSeparator"/>
                 <menuitem id="sync-tabs-menuitem"
-                          label="&syncTabsMenu3.label;"
                           oncommand="gSync.openSyncedTabsPanel();"
-                          hidden="true"/>
+                          hidden="true" data-l10n-id="menu-history-synced-tabs"/>
                 <menuitem id="historyRestoreLastSession"
-                          label="&historyRestoreLastSession.label;"
-                          command="Browser:RestoreLastSession"/>
+                          command="Browser:RestoreLastSession" data-l10n-id="menu-history-restore-last-session"/>
                 <menuitem id="hiddenTabsMenu"
-                          label="&hiddenTabs.label;"
                           oncommand="gTabsPanel.showHiddenTabsPanel();"
-                          hidden="true"/>
+                          hidden="true" data-l10n-id="menu-history-hidden-tabs"/>
                 <menu id="historyUndoMenu"
-                      label="&historyUndoMenu.label;"
-                      disabled="true">
+                      disabled="true" data-l10n-id="menu-history-undo-menu">
                   <menupopup id="historyUndoPopup"
 #ifndef XP_MACOSX
                              placespopup="true"
 #endif
                              onpopupshowing="document.getElementById('history-menu')._placesView.populateUndoSubmenu();"/>
                 </menu>
                 <menu id="historyUndoWindowMenu"
-                      label="&historyUndoWindowMenu.label;"
-                      disabled="true">
+                      disabled="true" data-l10n-id="menu-history-undo-window-menu">
                   <menupopup id="historyUndoWindowPopup"
 #ifndef XP_MACOSX
                              placespopup="true"
 #endif
                              onpopupshowing="document.getElementById('history-menu')._placesView.populateUndoWindowSubmenu();"/>
                 </menu>
                 <menuseparator id="startHistorySeparator"
                                class="hide-if-empty-places-result"/>
               </menupopup>
             </menu>
 
   <menu id="bookmarksMenu"
-        label="&bookmarksMenu.label;"
-        accesskey="&bookmarksMenu.accesskey;"
         ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
         ondragover="PlacesMenuDNDHandler.onDragOver(event);"
-        ondrop="PlacesMenuDNDHandler.onDrop(event);">
+        ondrop="PlacesMenuDNDHandler.onDrop(event);" data-l10n-id="menu-bookmarks-menu">
     <menupopup id="bookmarksMenuPopup"
 #ifndef XP_MACOSX
                placespopup="true"
 #endif
                context="placesContext"
                openInTabs="children"
                onmouseup="BookmarksEventHandler.onMouseUp(event);"
                oncommand="BookmarksEventHandler.onCommand(event);"
                onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
                onpopupshowing="BookmarkingUI.onMainMenuPopupShowing(event);
                                if (!this.parentNode._placesView)
                                  new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.menuGuid}`);"
                tooltip="bhTooltip" popupsinherittooltip="true">
       <menuitem id="bookmarksShowAll"
-                label="&showAllBookmarks2.label;"
                 command="Browser:ShowAllBookmarks"
-                key="manBookmarkKb"/>
+                key="manBookmarkKb" data-l10n-id="menu-bookmarks-show-all"/>
       <menuseparator id="organizeBookmarksSeparator"/>
       <menuitem id="menu_bookmarkThisPage"
                 command="Browser:AddBookmarkAs"
                 key="addBookmarkAsKb"/>
       <menuitem id="menu_bookmarkAllTabs"
-                label="&addCurPagesCmd.label;"
                 class="show-only-for-keyboard"
                 command="Browser:BookmarkAllTabs"
-                key="bookmarkAllTabsKb"/>
+                key="bookmarkAllTabsKb" data-l10n-id="menu-bookmarks-all-tabs"/>
       <menuseparator id="bookmarksToolbarSeparator"/>
       <menu id="bookmarksToolbarFolderMenu"
             class="menu-iconic bookmark-item"
-            label="&personalbarCmd.label;"
-            container="true">
+            container="true" data-l10n-id="menu-bookmarks-toolbar">
         <menupopup id="bookmarksToolbarFolderPopup"
 #ifndef XP_MACOSX
                    placespopup="true"
 #endif
                    context="placesContext"
                    onpopupshowing="if (!this.parentNode._placesView)
                                      new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.toolbarGuid}`);"/>
       </menu>
       <menu id="menu_unsortedBookmarks"
             class="menu-iconic bookmark-item"
-            label="&otherBookmarksCmd.label;"
-            container="true">
+            container="true" data-l10n-id="menu-bookmarks-other">
         <menupopup id="otherBookmarksFolderPopup"
 #ifndef XP_MACOSX
                    placespopup="true"
 #endif
                    context="placesContext"
                    onpopupshowing="if (!this.parentNode._placesView)
                                      new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.unfiledGuid}`);"/>
       </menu>
       <menu id="menu_mobileBookmarks"
             class="menu-iconic bookmark-item"
-            label="&mobileBookmarksCmd.label;"
             hidden="true"
-            container="true">
+            container="true" data-l10n-id="menu-bookmarks-mobile">
         <menupopup id="mobileBookmarksFolderPopup"
 #ifndef XP_MACOSX
                    placespopup="true"
 #endif
                    context="placesContext"
                    onpopupshowing="if (!this.parentNode._placesView)
                                      new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.mobileGuid}`);"/>
       </menu>
       <menuseparator id="bookmarksMenuItemsSeparator"/>
       <!-- Bookmarks menu items -->
     </menupopup>
   </menu>
 
-            <menu id="tools-menu"
-                  label="&toolsMenu.label;"
-                  accesskey="&toolsMenu.accesskey;">
+            <menu id="tools-menu" data-l10n-id="menu-tools">
               <menupopup id="menu_ToolsPopup">
               <menuitem id="menu_openDownloads"
-                        label="&downloads.label;"
-                        accesskey="&downloads.accesskey;"
                         key="key_openDownloads"
-                        command="Tools:Downloads"/>
+                        command="Tools:Downloads" data-l10n-id="menu-tools-downloads"/>
               <menuitem id="menu_openAddons"
-                        label="&addons.label;"
-                        accesskey="&addons.accesskey;"
                         key="key_openAddons"
-                        command="Tools:Addons"/>
+                        command="Tools:Addons" data-l10n-id="menu-tools-addons"/>
 
               <!-- only one of sync-setup, sync-unverifieditem, sync-syncnowitem or sync-reauthitem will be showing at once -->
               <menuitem id="sync-setup"
                         class="sync-ui-item"
-                        label="&syncSignIn.label;"
-                        accesskey="&syncSignIn.accesskey;"
                         hidden="true"
-                        oncommand="gSync.openPrefs('menubar')"/>
+                        oncommand="gSync.openPrefs('menubar')" data-l10n-id="menu-tools-sync-sign-in"/>
               <menuitem id="sync-unverifieditem"
                         class="sync-ui-item"
-                        label="&syncSignIn.label;"
-                        accesskey="&syncSignIn.accesskey;"
                         hidden="true"
-                        oncommand="gSync.openPrefs('menubar')"/>
+                        oncommand="gSync.openPrefs('menubar')" data-l10n-id="menu-tools-sync-sign-in"/>
               <menuitem id="sync-syncnowitem"
                         class="sync-ui-item"
-                        label="&syncSyncNowItem.label;"
-                        accesskey="&syncSyncNowItem.accesskey;"
                         hidden="true"
-                        oncommand="gSync.doSync(event);"/>
+                        oncommand="gSync.doSync(event);" data-l10n-id="menu-tools-sync-now"/>
               <menuitem id="sync-reauthitem"
                         class="sync-ui-item"
-                        label="&syncReAuthItem.label;"
-                        accesskey="&syncReAuthItem.accesskey;"
                         hidden="true"
-                        oncommand="gSync.openSignInAgainPage('menubar');"/>
+                        oncommand="gSync.openSignInAgainPage('menubar');" data-l10n-id="menu-tools-sync-re-auth"/>
               <menuseparator id="devToolsSeparator"/>
-              <menu id="webDeveloperMenu"
-                    label="&webDeveloperMenu.label;"
-                    accesskey="&webDeveloperMenu.accesskey;">
+              <menu id="webDeveloperMenu" data-l10n-id="menu-tools-web-developer">
                 <menupopup id="menuWebDeveloperPopup">
                   <menuitem id="menu_pageSource"
-                            label="&pageSourceCmd.label;"
                             key="key_viewSource"
-                            command="View:PageSource"
-                            accesskey="&pageSourceCmd.accesskey;"/>
+                            command="View:PageSource" data-l10n-id="menu-tools-page-source"/>
                 </menupopup>
               </menu>
               <menuitem id="menu_pageInfo"
-                        accesskey="&pageInfoCmd.accesskey;"
-                        label="&pageInfoCmd.label;"
 #ifndef XP_WIN
                         key="key_viewInfo"
 #endif
-                        command="View:PageInfo"/>
+                        command="View:PageInfo" data-l10n-id="menu-tools-page-info"/>
 #ifndef XP_UNIX
               <menuseparator id="prefSep"/>
               <menuitem id="menu_preferences"
-                        label="&preferencesCmd2.label;"
-                        accesskey="&preferencesCmd2.accesskey;"
-                        oncommand="openPreferences(undefined);"/>
+                        oncommand="openPreferences(undefined);" data-l10n-id="menu-preferences"/>
 #endif
 #ifdef MOZ_DEBUG
               <menuitem id="menu_layout_debugger"
-                        label="&ldbCmd.label;"
-                        accesskey="&ldbCmd.accesskey;"
+                        data-l10n-id="menu-tools-layout-debugger"
                         oncommand="toOpenWindowByType('mozapp:layoutdebug',
                                           'chrome://layoutdebug/content/');"/>
 #endif
 #ifdef XP_MACOSX
 <!-- nsMenuBarX hides these and uses them to build the Application menu. -->
+<!-- We need to leave those strings in DTD until bug 1568133 is fixed. -->
               <menuitem id="menu_preferences" label="&preferencesCmdMac.label;" key="key_preferencesCmdMac" oncommand="openPreferences(undefined);"/>
               <menuitem id="menu_mac_services" label="&servicesMenuMac.label;"/>
               <menuitem id="menu_mac_hide_app" label="&hideThisAppCmdMac2.label;" key="key_hideThisAppCmdMac"/>
               <menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmdMac.label;" key="key_hideOtherAppsCmdMac"/>
               <menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
               <menuitem id="menu_mac_touch_bar" label="&touchBarCmdMac.label;"/>
 #endif
               </menupopup>
             </menu>
 #ifdef XP_MACOSX
             <menu id="windowMenu"
-                  label="&windowMenu.label;"
                   onpopupshowing="macWindowMenuDidShow();"
                   onpopuphidden="macWindowMenuDidHide();"
-                  >
+                   data-l10n-id="menu-window-menu">
                 <menupopup id="windowPopup">
                     <menuitem command="minimizeWindow" key="key_minimizeWindow"/>
                     <menuitem command="zoomWindow"/>
                     <!-- decomment when "BringAllToFront" is implemented
                         <menuseparator/>
-                        <menuitem label="&bringAllToFront.label;" disabled="true"/> -->
+                        <menuitem disabled="true" data-l10n-id="menu-window-bring-all-to-front"/> -->
                     <menuseparator id="sep-window-list"/>
                 </menupopup>
             </menu>
 #endif
             <menu id="helpMenu"
 #ifdef XP_WIN
-                  label="&helpMenuWin.label;"
-                  accesskey="&helpMenuWin.accesskey;"
 #else
-                  label="&helpMenu.label;"
-                  accesskey="&helpMenu.accesskey;"
 #endif
-                  >
+                   data-l10n-id="menu-help">
               <menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
                 <menuitem id="menu_openHelp"
                           oncommand="openHelpLink('firefox-help')"
                           onclick="checkForMiddleClick(this, event);"
-                          label="&productHelp2.label;"
-                          accesskey="&productHelp2.accesskey;"
 #ifdef XP_MACOSX
-                          key="key_openHelpMac"/>
+                          key="key_openHelpMac" data-l10n-id="menu-help-product"/>
 #else
                           />
 #endif
                 <menuitem id="menu_openTour"
-                          oncommand="openTourPage();"
-                          label="&helpShowTour2.label;"
-                          accesskey="&helpShowTour2.accesskey;"/>
+                          oncommand="openTourPage();" data-l10n-id="menu-help-show-tour"/>
                 <menuitem id="menu_keyboardShortcuts"
                           oncommand="openHelpLink('keyboard-shortcuts')"
-                          onclick="checkForMiddleClick(this, event);"
-                          label="&helpKeyboardShortcuts.label;"
-                          accesskey="&helpKeyboardShortcuts.accesskey;"/>
+                          onclick="checkForMiddleClick(this, event);" data-l10n-id="menu-help-keyboard-shortcuts"/>
                 <menuitem id="troubleShooting"
-                          accesskey="&helpTroubleshootingInfo.accesskey;"
-                          label="&helpTroubleshootingInfo.label;"
                           oncommand="openTroubleshootingPage()"
-                          onclick="checkForMiddleClick(this, event);"/>
+                          onclick="checkForMiddleClick(this, event);" data-l10n-id="menu-help-troubleshooting-info"/>
                 <menuitem id="feedbackPage"
-                          accesskey="&helpFeedbackPage.accesskey;"
-                          label="&helpFeedbackPage.label;"
                           oncommand="openFeedbackPage()"
-                          onclick="checkForMiddleClick(this, event);"/>
+                          onclick="checkForMiddleClick(this, event);" data-l10n-id="menu-help-feedback-page"/>
                 <menuitem id="helpSafeMode"
-                          accesskey="&helpSafeMode.accesskey;"
-                          label="&helpSafeMode.label;"
-                          stopaccesskey="&helpSafeMode.stop.accesskey;"
-                          stoplabel="&helpSafeMode.stop.label;"
-                          oncommand="safeModeRestart();"/>
+                          oncommand="safeModeRestart();" data-l10n-id="menu-help-safe-mode-without-addons"/>
                 <menuitem id="menu_HelpPopup_reportPhishingtoolmenu"
-                          label="&reportDeceptiveSiteMenu.title;"
-                          accesskey="&reportDeceptiveSiteMenu.accesskey;"
                           disabled="true"
                           oncommand="openUILink(gSafeBrowsing.getReportURL('Phish'), event, {triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({})});"
                           onclick="checkForMiddleClick(this, event);"
-                          hidden="true"/>
+                          hidden="true" data-l10n-id="menu-help-report-deceptive-site"/>
                 <menuitem id="menu_HelpPopup_reportPhishingErrortoolmenu"
                           disabled="true"
                           oncommand="ReportFalseDeceptiveSite();"
                           onclick="checkForMiddleClick(this, event);"
                           hidden="true"/>
                 <menuseparator id="helpPolicySeparator"
                           hidden="true"/>
                 <menuitem id="helpPolicySupport"
                           hidden="true"
                           oncommand="openUILinkIn(Services.policies.getSupportMenu().URL.href, 'tab', {triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({})});"
                           onclick="checkForMiddleClick(this, event);"/>
                 <menuseparator id="aboutSeparator"/>
+                <!-- We need to leave those strings in DTD until bug 1568133 is fixed. -->
                 <menuitem id="aboutName"
                           accesskey="&aboutProduct2.accesskey;"
                           label="&aboutProduct2.label;"
                           oncommand="openAboutDialog();"/>
               </menupopup>
           </menu>
         </menubar>
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -2033,18 +2033,17 @@ var gBrowserInit = {
 
     BookmarkingUI.init();
     BrowserSearch.delayedStartupInit();
     AutoShowBookmarksToolbar.init();
     gProtectionsHandler.init();
 
     let safeMode = document.getElementById("helpSafeMode");
     if (Services.appinfo.inSafeMode) {
-      safeMode.label = safeMode.getAttribute("stoplabel");
-      safeMode.accessKey = safeMode.getAttribute("stopaccesskey");
+      document.l10n.setAttributes(safeMode, "menu-help-safe-mode-with-addons");
     }
 
     // BiDi UI
     gBidiUI = isBidiEnabled();
     if (gBidiUI) {
       document.getElementById("documentDirection-separator").hidden = false;
       document.getElementById("documentDirection-swap").hidden = false;
       document.getElementById("textfieldDirection-separator").hidden = false;
--- a/browser/base/content/browser.xhtml
+++ b/browser/base/content/browser.xhtml
@@ -65,17 +65,23 @@
         titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
         windowtype="navigator:browser"
         macanimationtype="document"
         screenX="4" screenY="4"
         fullscreenbutton="true"
         sizemode="normal"
         retargetdocumentfocus="urlbar-input"
         persist="screenX screenY width height sizemode"
-        >
+        data-l10n-sync="true">
+
+<linkset>
+  <html:link rel="localization" href="branding/brand.ftl"/>
+  <html:link rel="localization" href="browser/branding/sync-brand.ftl"/>
+  <html:link rel="localization" href="browser/menubar.ftl"/>
+</linkset>
 
 # All JS files which are needed by browser.xhtml and other top level windows to
 # support MacOS specific features *must* go into the global-scripts.inc file so
 # that they can be shared with macWindow.inc.xul.
 #include global-scripts.inc
 
 <script>
   /* eslint-env mozilla/browser-window */
--- a/browser/base/content/hiddenWindowMac.xhtml
+++ b/browser/base/content/hiddenWindowMac.xhtml
@@ -7,17 +7,19 @@
 
 <?xml-stylesheet href="chrome://browser/skin/webRTC-indicator.css" type="text/css"?>
 
 <!DOCTYPE window [
 #include browser-doctype.inc
 ]>
 
 <window id="main-window"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+        xmlns:html="http://www.w3.org/1999/xhtml"
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        data-l10n-sync="true">
 
 #include macWindow.inc.xul
 
 <!-- Dock menu -->
 <popupset>
   <menupopup id="menu_mac_dockmenu">
     <!-- The command cannot be cmd_newNavigator because we need to activate
          the application. -->
--- a/browser/base/content/macWindow.inc.xul
+++ b/browser/base/content/macWindow.inc.xul
@@ -5,16 +5,22 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # This include file should only contain things that are needed to support MacOS
 # specific features that are needed for all top level windows. If the feature is
 # also needed in browser.xhtml, it should go in one of the various include files
 # below that are shared with browser.xhtml. When including this file,
 # browser-doctype.inc must also be included.
 
+<linkset>
+  <html:link rel="localization" href="branding/brand.ftl"/>
+  <html:link rel="localization" href="browser/branding/sync-brand.ftl"/>
+  <html:link rel="localization" href="browser/menubar.ftl"/>
+</linkset>
+
 # All JS files which are needed by browser.xhtml and other top level windows to
 # support MacOS specific features *must* go into the global-scripts.inc file so
 # that they can be shared with browser.xhtml.
 #include global-scripts.inc
 
 <script src="chrome://browser/content/nonbrowser-mac.js"></script>
 
 # All sets except for popupsets (commands, keys, and stringbundles)
new file mode 100644
--- /dev/null
+++ b/browser/locales/en-US/browser/menubar.ftl
@@ -0,0 +1,282 @@
+# 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/.
+
+## File Menu
+
+menu-file =
+    .label = File
+    .accesskey = F
+menu-file-new-tab =
+    .label = New Tab
+    .accesskey = T
+menu-file-new-container-tab =
+    .label = New Container Tab
+    .accesskey = b
+menu-file-new-window =
+    .label = New Window
+    .accesskey = N
+menu-file-new-private-window =
+    .label = New Private Window
+    .accesskey = W
+# "Open Location" is only displayed on macOS, and only on windows
+# that aren't main browser windows, or when there are no windows
+# but Firefox is still running.
+menu-file-open-location =
+    .label = Open Location…
+menu-file-open-file =
+    .label = Open File…
+    .accesskey = O
+menu-file-close =
+    .label = Close
+    .accesskey = C
+menu-file-close-window =
+    .label = Close Window
+    .accesskey = d
+menu-file-save-page =
+    .label = Save Page As…
+    .accesskey = A
+menu-file-email-link =
+    .label = Email Link…
+    .accesskey = E
+menu-file-print-setup =
+    .label = Page Setup…
+    .accesskey = u
+menu-file-print-preview =
+    .label = Print Preview
+    .accesskey = v
+menu-file-print =
+    .label = Print…
+    .accesskey = P
+menu-file-import-from-another-browser =
+    .label = Import from Another Browser…
+    .accesskey = I
+menu-file-go-offline =
+    .label = Work Offline
+    .accesskey = k
+
+## Edit Menu
+
+menu-edit =
+    .label = Edit
+    .accesskey = E
+menu-edit-undo =
+    .label = Undo
+    .accesskey = U
+menu-edit-redo =
+    .label = Redo
+    .accesskey = R
+menu-edit-cut =
+    .label = Cut
+    .accesskey = t
+menu-edit-copy =
+    .label = Copy
+    .accesskey = C
+menu-edit-paste =
+    .label = Paste
+    .accesskey = P
+menu-edit-delete =
+    .label = Delete
+    .accesskey = D
+menu-edit-select-all =
+    .label = Select All
+    .accesskey = A
+menu-edit-find-on =
+    .label = Find in This Page…
+    .accesskey = F
+menu-edit-find-again =
+    .label = Find Again
+    .accesskey = g
+menu-edit-bidi-switch-text-direction =
+    .label = Switch Text Direction
+    .accesskey = w
+
+## View Menu
+
+menu-view =
+    .label = View
+    .accesskey = V
+menu-view-toolbars-menu =
+    .label = Toolbars
+    .accesskey = T
+menu-view-customize-toolbar =
+    .label = Customize…
+    .accesskey = C
+menu-view-sidebar =
+    .label = Sidebar
+    .accesskey = e
+menu-view-bookmarks =
+    .label = Bookmarks
+menu-view-history-button =
+    .label = History
+menu-view-synced-tabs-sidebar =
+    .label = Synced Tabs
+menu-view-full-zoom =
+    .label = Zoom
+    .accesskey = Z
+menu-view-full-zoom-enlarge =
+    .label = Zoom In
+    .accesskey = I
+menu-view-full-zoom-reduce =
+    .label = Zoom Out
+    .accesskey = O
+menu-view-full-zoom-reset =
+    .label = Reset
+    .accesskey = R
+menu-view-full-zoom-toggle =
+    .label = Zoom Text Only
+    .accesskey = T
+menu-view-page-style-menu =
+    .label = Page Style
+    .accesskey = y
+menu-view-page-style-no-style =
+    .label = No Style
+    .accesskey = n
+menu-view-page-basic-style =
+    .label = Basic Page Style
+    .accesskey = B
+menu-view-charset =
+    .label = Text Encoding
+    .accesskey = c
+
+## These should match what Safari and other Apple applications
+## use on macOS.
+
+menu-view-enter-full-screen =
+    .label = Enter Full Screen
+    .accesskey = F
+menu-view-exit-full-screen =
+    .label = Exit Full Screen
+    .accesskey = F
+menu-view-full-screen =
+    .label = Full Screen
+    .accesskey = F
+
+##
+
+menu-view-show-all-tabs =
+    .label = Show All Tabs
+    .accesskey = A
+menu-view-bidi-switch-page-direction =
+    .label = Switch Page Direction
+    .accesskey = D
+
+## History Menu
+
+menu-history =
+    .label = History
+    .accesskey = s
+menu-history-show-all-history =
+    .label = Show All History
+menu-history-clear-recent-history =
+    .label = Clear Recent History…
+menu-history-synced-tabs =
+    .label = Synced Tabs
+menu-history-restore-last-session =
+    .label = Restore Previous Session
+menu-history-hidden-tabs =
+    .label = Hidden Tabs
+menu-history-undo-menu =
+    .label = Recently Closed Tabs
+menu-history-undo-window-menu =
+    .label = Recently Closed Windows
+
+## Bookmarks Menu
+
+menu-bookmarks-menu =
+    .label = Bookmarks
+    .accesskey = B
+menu-bookmarks-show-all =
+    .label = Show All Bookmarks
+menu-bookmarks-all-tabs =
+    .label = Bookmark All Tabs…
+menu-bookmarks-toolbar =
+    .label = Bookmarks Toolbar
+menu-bookmarks-other =
+    .label = Other Bookmarks
+menu-bookmarks-mobile =
+    .label = Mobile Bookmarks
+
+## Tools Menu
+
+menu-tools =
+    .label = Tools
+    .accesskey = T
+menu-tools-downloads =
+    .label = Downloads
+    .accesskey = D
+menu-tools-addons =
+    .label = Add-ons
+    .accesskey = A
+menu-tools-sync-sign-in =
+    .label = Sign In To { -sync-brand-short-name }…
+    .accesskey = y
+menu-tools-sync-now =
+    .label = Sync Now
+    .accesskey = S
+menu-tools-sync-re-auth =
+    .label = Reconnect to { -sync-brand-short-name }…
+    .accesskey = R
+menu-tools-web-developer =
+    .label = Web Developer
+    .accesskey = W
+menu-tools-page-source =
+    .label = Page Source
+    .accesskey = o
+menu-tools-page-info =
+    .label = Page Info
+    .accesskey = I
+menu-preferences =
+    .label =
+        { PLATFORM() ->
+            [windows] Options
+           *[other] Preferences
+        }
+    .accesskey =
+        { PLATFORM() ->
+            [windows] O
+           *[other] n
+        }
+menu-tools-layout-debugger =
+    .label = Layout Debugger
+    .accesskey = L
+
+## Window Menu
+
+menu-window-menu =
+    .label = Window
+menu-window-bring-all-to-front =
+    .label = Bring All to Front
+
+## Help Menu
+
+menu-help =
+    .label = Help
+    .accesskey = H
+menu-help-product =
+    .label = { -brand-shorter-name } Help
+    .accesskey = H
+menu-help-show-tour =
+    .label = { -brand-shorter-name } Tour
+    .accesskey = o
+menu-help-keyboard-shortcuts =
+    .label = Keyboard Shortcuts
+    .accesskey = K
+menu-help-troubleshooting-info =
+    .label = Troubleshooting Information
+    .accesskey = T
+menu-help-feedback-page =
+    .label = Submit Feedback…
+    .accesskey = S
+menu-help-safe-mode-without-addons =
+    .label = Restart with Add-ons Disabled…
+    .accesskey = R
+menu-help-safe-mode-with-addons =
+    .label = Restart with Add-ons Enabled
+    .accesskey = R
+# Label of the Help menu item. Either this or
+# safeb.palm.notdeceptive.label from
+# phishing-afterload-warning-message.dtd is shown.
+menu-help-report-deceptive-site =
+    .label = Report Deceptive Site…
+    .accesskey = D
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -44,39 +44,25 @@ same accesskey but will never be visible
 <!ENTITY  hiddenTabs.label                   "Hidden Tabs">
 
 <!ENTITY  listAllTabs.label      "List all tabs">
 <!-- LOCALIZATION NOTE (allTabsMenu.searchTabs.label): "Search" is a verb, as
 in "Search through tabs". -->
 <!ENTITY  allTabsMenu.searchTabs.label       "Search Tabs">
 
 <!ENTITY tabCmd.label "New Tab">
-<!ENTITY tabCmd.accesskey "T">
 <!ENTITY tabCmd.commandkey "t">
-<!-- LOCALIZATION NOTE (openLocationCmd.label): "Open Location" is only
-displayed on OS X, and only on windows that aren't main browser windows, or
-when there are no windows but Firefox is still running. -->
-<!ENTITY openLocationCmd.label "Open Location…">
 <!ENTITY openFileCmd.label "Open File…">
-<!ENTITY openFileCmd.accesskey "O">
 <!ENTITY openFileCmd.commandkey "o">
-<!ENTITY printSetupCmd.label "Page Setup…">
-<!ENTITY printSetupCmd.accesskey "u">
-<!ENTITY printPreviewCmd.label "Print Preview">
-<!ENTITY printPreviewCmd.accesskey "v">
 <!ENTITY printCmd.label "Print…">
-<!ENTITY printCmd.accesskey "P">
 <!ENTITY printCmd.commandkey "p">
-<!ENTITY importFromAnotherBrowserCmd.label "Import from Another Browser…">
-<!ENTITY importFromAnotherBrowserCmd.accesskey "I">
 
 <!ENTITY taskManagerCmd.label "Task Manager">
 
 <!ENTITY goOfflineCmd.label "Work Offline">
-<!ENTITY goOfflineCmd.accesskey "k">
 
 <!ENTITY menubarCmd.label "Menu Bar">
 <!ENTITY menubarCmd.accesskey "M">
 <!ENTITY navbarCmd.label "Navigation Toolbar">
 <!ENTITY personalbarCmd.label "Bookmarks Toolbar">
 <!ENTITY personalbarCmd.accesskey "B">
 <!ENTITY bookmarksToolbarItem.label "Bookmarks Toolbar Items">
 
@@ -88,31 +74,20 @@ Option+Command keyboard shortcut letter 
 Source" on macOS. pageSourceCmd.commandkey above is Firefox's official keyboard
 shortcut shown in the GUI. SafariCommandKey is an alias provided for the
 convenience of Safari and Chrome users on macOS. See bug 1398988. -->
 <!ENTITY pageSourceCmd.SafariCommandKey "u">
 
 <!ENTITY pageInfoCmd.label "Page Info">
 <!ENTITY pageInfoCmd.accesskey "I">
 <!ENTITY pageInfoCmd.commandkey "i">
-<!ENTITY ldbCmd.label "Layout Debugger">
-<!ENTITY ldbCmd.accesskey "L">
 <!ENTITY mirrorTabCmd.label "Mirror Tab">
 <!ENTITY mirrorTabCmd.accesskey "m">
-<!-- LOCALIZATION NOTE (enterFullScreenCmd.label, exitFullScreenCmd.label):
-These should match what Safari and other Apple applications use on OS X Lion. -->
-<!ENTITY enterFullScreenCmd.label "Enter Full Screen">
-<!ENTITY enterFullScreenCmd.accesskey "F">
-<!ENTITY exitFullScreenCmd.label "Exit Full Screen">
-<!ENTITY exitFullScreenCmd.accesskey "F">
 <!ENTITY fullScreenCmd.label "Full Screen">
-<!ENTITY fullScreenCmd.accesskey "F">
 <!ENTITY fullScreenCmd.macCommandKey "f">
-<!ENTITY showAllTabsCmd.label "Show All Tabs">
-<!ENTITY showAllTabsCmd.accesskey "A">
 <!ENTITY toggleReaderMode.key "R">
 <!ENTITY toggleReaderMode.win.keycode "VK_F9">
 
 <!ENTITY fullScreenMinimize.tooltip "Minimize">
 <!ENTITY fullScreenRestore.tooltip "Restore">
 <!ENTITY fullScreenClose.tooltip "Close">
 <!ENTITY fullScreenAutohide.label "Hide Toolbars">
 <!ENTITY fullScreenAutohide.accesskey "H">
@@ -165,30 +140,24 @@ These should match what Safari and other
      pointerlockWarning.afterDomain.label): these two strings are used
      respectively before and after the domain requiring pointerlock.
      Localizers can use one of them, or both, to better adapt this
      sentence to their language. -->
 <!ENTITY pointerlockWarning.beforeDomain.label "">
 <!ENTITY pointerlockWarning.afterDomain.label "has control of your pointer. Press Esc to take back control.">
 <!ENTITY pointerlockWarning.generic.label "This document has control of your pointer. Press Esc to take back control.">
 
-<!ENTITY closeWindow.label "Close Window">
-<!ENTITY closeWindow.accesskey "d">
-
 <!ENTITY bookmarksMenu.label "Bookmarks">
 <!ENTITY bookmarksMenu.accesskey "B">
 <!ENTITY bookmarkThisPageCmd.label "Bookmark This Page">
 <!ENTITY editThisBookmarkCmd.label "Edit This Bookmark">
 <!ENTITY bookmarkThisPageCmd.commandkey "d">
 
-<!ENTITY addCurPagesCmd.label "Bookmark All Tabs…">
 <!ENTITY showAllBookmarks2.label "Show All Bookmarks">
 <!ENTITY recentBookmarks.label "Recently Bookmarked">
-<!ENTITY otherBookmarksCmd.label "Other Bookmarks">
-<!ENTITY mobileBookmarksCmd.label "Mobile Bookmarks">
 <!ENTITY bookmarksToolbarChevron.tooltip "Show more bookmarks">
 
 <!ENTITY backCmd.label                "Back">
 <!ENTITY backCmd.accesskey            "B">
 <!ENTITY backButton.tooltip           "Go back one page">
 <!ENTITY forwardCmd.label             "Forward">
 <!ENTITY forwardCmd.accesskey         "F">
 <!ENTITY forwardButton.tooltip        "Go forward one page">
@@ -270,55 +239,43 @@ These should match what Safari and other
   -  key should not contain the letters A-F, since these are reserved
   -  shortcut keys on Linux. -->
 <!ENTITY bookmarksGtkCmd.commandkey "o">
 <!ENTITY bookmarksWinCmd.commandkey "i">
 
 <!ENTITY historyButton.label            "History">
 <!ENTITY historySidebarCmd.commandKey   "h">
 
-<!ENTITY toolsMenu.label              "Tools">
-<!ENTITY toolsMenu.accesskey          "T">
-
 <!ENTITY keywordfield.label           "Add a Keyword for this Search…">
 <!ENTITY keywordfield.accesskey       "K">
 
 <!ENTITY downloads.label              "Downloads">
 <!-- LOCALIZATION NOTE (libraryDownloads.label): This label is similar to
   -  downloads.label, but used in the Library panel. -->
 <!ENTITY libraryDownloads.label       "Downloads">
-<!ENTITY downloads.accesskey          "D">
 <!ENTITY downloads.commandkey         "j">
 <!ENTITY downloadsUnix.commandkey     "y">
 <!ENTITY addons.label                 "Add-ons">
-<!ENTITY addons.accesskey             "A">
 <!ENTITY addons.commandkey            "A">
 
 <!ENTITY webDeveloperMenu.label       "Web Developer">
-<!ENTITY webDeveloperMenu.accesskey   "W">
 
 <!ENTITY inspectContextMenu.label     "Inspect Element">
 <!ENTITY inspectContextMenu.accesskey "Q">
 
 <!ENTITY inspectA11YContextMenu.label     "Inspect Accessibility Properties">
 
-<!ENTITY fileMenu.label         "File">
-<!ENTITY fileMenu.accesskey       "F">
 <!ENTITY newUserContext.label             "New Container Tab">
-<!ENTITY newUserContext.accesskey         "B">
 <!ENTITY manageUserContext.label          "Manage Containers">
 <!ENTITY manageUserContext.accesskey      "O">
 <!ENTITY newNavigatorCmd.label        "New Window">
 <!ENTITY newNavigatorCmd.key        "N">
-<!ENTITY newNavigatorCmd.accesskey      "N">
 <!ENTITY newPrivateWindow.label     "New Private Window">
-<!ENTITY newPrivateWindow.accesskey "W">
 
 <!ENTITY editMenu.label         "Edit">
-<!ENTITY editMenu.accesskey       "E">
 <!ENTITY undoCmd.label            "Undo">
 <!ENTITY undoCmd.key            "Z">
 <!ENTITY undoCmd.accesskey          "U">
 <!ENTITY redoCmd.label            "Redo">
 <!ENTITY redoCmd.key            "Y">
 <!ENTITY redoCmd.accesskey          "R">
 <!ENTITY cutCmd.label           "Cut">
 <!ENTITY cutCmd.key             "X">
@@ -331,44 +288,31 @@ These should match what Safari and other
 <!ENTITY pasteCmd.accesskey         "P">
 <!ENTITY deleteCmd.label          "Delete">
 <!ENTITY deleteCmd.key            "D">
 <!ENTITY deleteCmd.accesskey        "D">
 <!ENTITY selectAllCmd.label         "Select All">
 <!ENTITY selectAllCmd.key         "A">
 <!ENTITY selectAllCmd.accesskey       "A">
 <!ENTITY preferencesCmd2.label       "Options">
-<!ENTITY preferencesCmd2.accesskey     "O">
 <!ENTITY preferencesCmdUnix.label       "Preferences">
-<!ENTITY preferencesCmdUnix.accesskey     "n">
 <!ENTITY logins.label                           "Logins and Passwords">
 
-<!ENTITY clearRecentHistory.label               "Clear Recent History…">
-
 <!ENTITY privateBrowsingCmd.commandkey          "P">
 
-<!ENTITY viewMenu.label         "View">
-<!ENTITY viewMenu.accesskey       "V">
-<!ENTITY viewToolbarsMenu.label       "Toolbars">
-<!ENTITY viewToolbarsMenu.accesskey     "T">
-<!ENTITY viewSidebarMenu.label "Sidebar">
-<!ENTITY viewSidebarMenu.accesskey "e">
 <!ENTITY viewCustomizeToolbar.label       "Customize…">
 <!ENTITY viewCustomizeToolbar.accesskey     "C">
 <!ENTITY overflowCustomizeToolbar.label       "Customize Toolbar…">
 <!ENTITY overflowCustomizeToolbar.accesskey   "C">
 
 <!ENTITY historyMenu.label "History">
-<!ENTITY historyMenu.accesskey "s">
 <!ENTITY historyUndoMenu.label "Recently Closed Tabs">
 <!-- LOCALIZATION NOTE (historyUndoWindowMenu): see bug 394759 -->
 <!ENTITY historyUndoWindowMenu.label "Recently Closed Windows">
-<!ENTITY historyRestoreLastSession.label "Restore Previous Session">
 
-<!ENTITY showAllHistoryCmd2.label "Show All History">
 <!ENTITY showAllHistoryCmd.commandkey "H">
 
 <!ENTITY appMenuHistory.showAll.label "Show All History">
 <!ENTITY appMenuHistory.clearRecent.label "Clear Recent History…">
 <!ENTITY appMenuHistory.restoreSession.label "Restore Previous Session">
 <!ENTITY appMenuHistory.viewSidebar.label "View History Sidebar">
 <!ENTITY appMenuHistory.hideSidebar.label "Hide History Sidebar">
 <!ENTITY appMenuHistory.recentHistory.label "Recent History">
@@ -569,20 +513,18 @@ These should match what Safari and other
 <!ENTITY pocketButton.tooltiptext     "Save to Pocket">
 <!ENTITY saveToPocketCmd.label        "Save Page to Pocket">
 <!ENTITY saveToPocketCmd.accesskey    "k">
 <!ENTITY saveLinkToPocketCmd.label    "Save Link to Pocket">
 <!ENTITY saveLinkToPocketCmd.accesskey "o">
 <!ENTITY pocketMenuitem.label         "View Pocket List">
 
 <!ENTITY emailPageCmd.label           "Email Link…">
-<!ENTITY emailPageCmd.accesskey       "E">
+<!-- alternate for content area context menu -->
 <!ENTITY savePageCmd.label            "Save Page As…">
-<!ENTITY savePageCmd.accesskey        "A">
-<!-- alternate for content area context menu -->
 <!ENTITY savePageCmd.accesskey2       "P">
 <!ENTITY savePageCmd.commandkey       "s">
 <!ENTITY saveFrameCmd.label           "Save Frame As…">
 <!ENTITY saveFrameCmd.accesskey       "F">
 <!ENTITY printFrameCmd.label          "Print Frame…">
 <!ENTITY printFrameCmd.accesskey      "P">
 <!ENTITY saveLinkCmd.label            "Save Link As…">
 <!ENTITY saveLinkCmd.accesskey        "k">
@@ -675,83 +617,63 @@ items are mutually exclusive. -->
 <!ENTITY videoHideStats.accesskey    "t">
 
 <!-- LOCALIZATION NOTE :
 fullZoomEnlargeCmd.commandkey3, fullZoomReduceCmd.commandkey2 and
 fullZoomResetCmd.commandkey2 are alternative acceleration keys for zoom.
 If shift key is needed with your locale popular keyboard for them,
 you can use these alternative items. Otherwise, their values should be empty.  -->
 
-<!ENTITY fullZoomEnlargeCmd.label       "Zoom In">
-<!ENTITY fullZoomEnlargeCmd.accesskey   "I">
 <!ENTITY fullZoomEnlargeCmd.commandkey  "+">
 <!ENTITY fullZoomEnlargeCmd.commandkey2 "="> <!-- + is above this key on many keyboards -->
 <!ENTITY fullZoomEnlargeCmd.commandkey3 "">
 
-<!ENTITY fullZoomReduceCmd.label        "Zoom Out">
-<!ENTITY fullZoomReduceCmd.accesskey    "O">
 <!ENTITY fullZoomReduceCmd.commandkey   "-">
 <!ENTITY fullZoomReduceCmd.commandkey2  "">
 
-<!ENTITY fullZoomResetCmd.label         "Reset">
-<!ENTITY fullZoomResetCmd.accesskey     "R">
 <!ENTITY fullZoomResetCmd.commandkey    "0">
 <!ENTITY fullZoomResetCmd.commandkey2   "">
 
-<!ENTITY fullZoomToggleCmd.label        "Zoom Text Only">
-<!ENTITY fullZoomToggleCmd.accesskey    "T">
 <!ENTITY fullZoom.label                 "Zoom">
 <!ENTITY fullZoom.accesskey             "Z">
 
 <!ENTITY sidebarCloseButton.tooltip     "Close sidebar">
 <!ENTITY sidebarMenuClose.label         "Close Sidebar">
 
 <!ENTITY quitApplicationCmdWin2.label       "Exit">
 <!ENTITY quitApplicationCmdWin2.accesskey   "x">
 <!ENTITY quitApplicationCmdWin2.tooltip     "Exit &brandShorterName;">
 <!ENTITY goBackCmd.commandKey "[">
 <!ENTITY goForwardCmd.commandKey "]">
 <!ENTITY quitApplicationCmd.label       "Quit">
 <!ENTITY quitApplicationCmd.accesskey   "Q">
 <!ENTITY quitApplicationCmdMac2.label   "Quit &brandShorterName;">
 <!ENTITY quitApplicationCmd.key         "Q">
 
-<!ENTITY closeCmd.label                 "Close">
 <!ENTITY closeCmd.key                   "W">
-<!ENTITY closeCmd.accesskey             "C">
 
 <!ENTITY toggleMuteCmd.key              "M">
 
-<!ENTITY pageStyleMenu.label "Page Style">
-<!ENTITY pageStyleMenu.accesskey "y">
-<!ENTITY pageStyleNoStyle.label "No Style">
-<!ENTITY pageStyleNoStyle.accesskey "n">
-<!ENTITY pageStylePersistentOnly.label "Basic Page Style">
-<!ENTITY pageStylePersistentOnly.accesskey "b">
-
 <!ENTITY allowPopups.accesskey "p">
 <!-- On Windows we use the term "Options" to describe settings, but
      on Linux and Mac OS X we use "Preferences" - carry that distinction
      over into this string, which is used in the "popup blocked" info bar . -->
 <!ENTITY editPopupSettingsUnix.label "Edit Pop-up Blocker Preferences…">
 <!ENTITY editPopupSettings.label "Edit Pop-up Blocker Options…">
 <!ENTITY editPopupSettings.accesskey "E">
 <!ENTITY dontShowMessage.accesskey "D">
 
 <!ENTITY bidiSwitchPageDirectionItem.label        "Switch Page Direction">
 <!ENTITY bidiSwitchPageDirectionItem.accesskey    "D">
 <!ENTITY bidiSwitchTextDirectionItem.label        "Switch Text Direction">
 <!ENTITY bidiSwitchTextDirectionItem.accesskey    "w">
 <!ENTITY bidiSwitchTextDirectionItem.commandkey   "X">
 
 <!ENTITY findOnCmd.label     "Find in This Page…">
-<!ENTITY findOnCmd.accesskey "F">
 <!ENTITY findOnCmd.commandkey "f">
-<!ENTITY findAgainCmd.label  "Find Again">
-<!ENTITY findAgainCmd.accesskey "g">
 <!ENTITY findAgainCmd.commandkey "g">
 <!ENTITY findAgainCmd.commandkey2 "VK_F3">
 <!ENTITY findSelectionCmd.commandkey "e">
 
 <!ENTITY spellAddDictionaries.label "Add Dictionaries…">
 <!ENTITY spellAddDictionaries.accesskey "A">
 
 <!-- LOCALIZATION NOTE (editBookmark.panel.width): width of the bookmark panel.
@@ -855,30 +777,23 @@ you can use these alternative items. Oth
 <!ENTITY protections.socialMediaTrackers.description "Social networks place trackers on other websites to follow what you do, see, and watch online. This allows social media companies to learn more about you beyond what you share on your social media profiles.">
 
 <!ENTITY protections.manageProtectionSettings.label "Manage Protection Settings">
 
 <!-- Name for the tabs toolbar as spoken by screen readers.
      The word "toolbar" is appended automatically and should not be contained below! -->
 <!ENTITY tabsToolbar.label "Browser tabs">
 
-<!-- LOCALIZATION NOTE (syncTabsMenu3.label): This appears in the history menu -->
-<!ENTITY syncTabsMenu3.label     "Synced Tabs">
-
 <!ENTITY syncedTabs.sidebar.label              "Synced Tabs">
 
 <!ENTITY syncBrand.shortName.label    "Sync">
 
-<!ENTITY syncSignIn.label             "Sign In To &syncBrand.shortName.label;…">
-<!ENTITY syncSignIn.accesskey         "Y">
 <!ENTITY syncSyncNowItem.label        "Sync Now">
 <!ENTITY syncSyncNowItemSyncing.label "Syncing…">
 <!ENTITY syncSyncNowItem.accesskey    "S">
-<!ENTITY syncReAuthItem.label         "Reconnect to &syncBrand.shortName.label;…">
-<!ENTITY syncReAuthItem.accesskey     "R">
 <!ENTITY syncToolbarButton.label      "Sync">
 
 <!ENTITY customizeMode.autoHideDownloadsButton.label "Auto-hide">
 
 <!ENTITY getUserMedia.selectCamera.label "Camera to share:">
 <!ENTITY getUserMedia.selectCamera.accesskey "C">
 <!ENTITY getUserMedia.selectMicrophone.label "Microphone to share:">
 <!ENTITY getUserMedia.selectMicrophone.accesskey "M">
deleted file mode 100644
--- a/browser/locales/en-US/chrome/browser/safebrowsing/report-phishing.dtd
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- 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/. -->
-
-<!-- Localization note (reportDeceptiveSiteMenu.title) - Label of the Help menu
-  item. Either this or safeb.palm.notdeceptive.label from
-  phishing-afterload-warning-message.dtd is shown. -->
-<!ENTITY reportDeceptiveSiteMenu.title      "Report Deceptive Site…">
-<!-- Localization note (reportDeceptiveSiteMenu.accesskey) - Because
-  safeb.palm.notdeceptive.label from phishing-afterload-warning-message.dtd and
-  reportDeceptiveSiteMenu.title are never shown at the same time, the same
-  accesskey can be used for them. -->
-<!ENTITY reportDeceptiveSiteMenu.accesskey  "D">
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -36,17 +36,16 @@
     locale/browser/translation.properties          (%chrome/browser/translation.properties)
     locale/browser/webrtcIndicator.properties      (%chrome/browser/webrtcIndicator.properties)
     locale/browser/downloads/downloads.dtd         (%chrome/browser/downloads/downloads.dtd)
     locale/browser/downloads/downloads.properties  (%chrome/browser/downloads/downloads.properties)
     locale/browser/places/places.dtd               (%chrome/browser/places/places.dtd)
     locale/browser/places/places.properties        (%chrome/browser/places/places.properties)
     locale/browser/places/editBookmarkOverlay.dtd  (%chrome/browser/places/editBookmarkOverlay.dtd)
     locale/browser/places/bookmarkProperties.properties (%chrome/browser/places/bookmarkProperties.properties)
-    locale/browser/safebrowsing/report-phishing.dtd                    (%chrome/browser/safebrowsing/report-phishing.dtd)
     locale/browser/safebrowsing/safebrowsing.properties   (%chrome/browser/safebrowsing/safebrowsing.properties)
     locale/browser/feeds/subscribe.properties       (%chrome/browser/feeds/subscribe.properties)
     locale/browser/migration/migration.dtd         (%chrome/browser/migration/migration.dtd)
     locale/browser/migration/migration.properties  (%chrome/browser/migration/migration.properties)
     locale/browser/preferences/preferences.properties     (%chrome/browser/preferences/preferences.properties)
     locale/browser/syncBrand.dtd                (%chrome/browser/syncBrand.dtd)
     locale/browser/syncSetup.properties         (%chrome/browser/syncSetup.properties)
 % locale browser-region @AB_CD@ %locale/browser-region/
--- a/intl/l10n/L10nRegistry.jsm
+++ b/intl/l10n/L10nRegistry.jsm
@@ -650,17 +650,22 @@ class FileSource {
 
     if (this.cache.hasOwnProperty(fullPath)) {
       if (this.cache[fullPath] === false) {
         return false;
       }
       // `true` means that the file is indexed, but hasn't
       // been fetched yet.
       if (this.cache[fullPath] !== true) {
-        return this.cache[fullPath];
+        if (this.cache[fullPath] instanceof Promise && options.sync) {
+          console.warn(`[l10nregistry] Attempting to synchronously load file
+            ${fullPath} while it's being loaded asynchronously.`);
+        } else {
+          return this.cache[fullPath];
+        }
       }
     } else if (this.indexed) {
       return false;
     }
     if (options.sync) {
       let data = L10nRegistry.loadSync(fullPath);
 
       if (data === false) {
new file mode 100644
--- /dev/null
+++ b/python/l10n/fluent_migrations/bug_1501886_browser-menubar.py
@@ -0,0 +1,347 @@
+
+# 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 1501886 - Migrate browser main menubar to Fluent, part {index}"""
+
+    ctx.add_transforms(
+        'browser/browser/menubar.ftl',
+        'browser/browser/menubar.ftl',
+        transforms_from(
+"""
+menu-file =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "fileMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "fileMenu.accesskey") }
+menu-file-new-tab =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "tabCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "tabCmd.accesskey") }
+menu-file-new-container-tab =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "newUserContext.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "newUserContext.accesskey") }
+menu-file-new-window =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "newNavigatorCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "newNavigatorCmd.accesskey") }
+menu-file-new-private-window =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "newPrivateWindow.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "newPrivateWindow.accesskey") }
+menu-file-open-location =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "openLocationCmd.label") }
+menu-file-open-file =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "openFileCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "openFileCmd.accesskey") }
+menu-file-close =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "closeCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "closeCmd.accesskey") }
+menu-file-close-window =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "closeWindow.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "closeWindow.accesskey") }
+menu-file-save-page =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "savePageCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "savePageCmd.accesskey") }
+menu-file-email-link =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "emailPageCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "emailPageCmd.accesskey") }
+menu-file-print-setup =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "printSetupCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "printSetupCmd.accesskey") }
+menu-file-print-preview =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "printPreviewCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "printPreviewCmd.accesskey") }
+menu-file-print =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "printCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "printCmd.accesskey") }
+menu-file-import-from-another-browser =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "importFromAnotherBrowserCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "importFromAnotherBrowserCmd.accesskey") }
+menu-file-go-offline =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "goOfflineCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "goOfflineCmd.accesskey") }
+menu-edit =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "editMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "editMenu.accesskey") }
+menu-edit-undo =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "undoCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "undoCmd.accesskey") }
+menu-edit-redo =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "redoCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "redoCmd.accesskey") }
+menu-edit-cut =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "cutCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "cutCmd.accesskey") }
+menu-edit-copy =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "copyCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "copyCmd.accesskey") }
+menu-edit-paste =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "pasteCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "pasteCmd.accesskey") }
+menu-edit-delete =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "deleteCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "deleteCmd.accesskey") }
+menu-edit-select-all =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "selectAllCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "selectAllCmd.accesskey") }
+menu-edit-find-on =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "findOnCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "findOnCmd.accesskey") }
+menu-edit-find-again =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "findAgainCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "findAgainCmd.accesskey") }
+menu-edit-bidi-switch-text-direction =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "bidiSwitchTextDirectionItem.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "bidiSwitchTextDirectionItem.accesskey") }
+menu-view =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "viewMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "viewMenu.accesskey") }
+menu-view-toolbars-menu =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "viewToolbarsMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "viewToolbarsMenu.accesskey") }
+menu-view-customize-toolbar =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "viewCustomizeToolbar.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "viewCustomizeToolbar.accesskey") }
+menu-view-sidebar =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "viewSidebarMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "viewSidebarMenu.accesskey") }
+menu-view-bookmarks =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "bookmarksButton.label") }
+menu-view-history-button =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "historyButton.label") }
+menu-view-synced-tabs-sidebar =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "syncedTabs.sidebar.label") }
+menu-view-full-zoom =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "fullZoom.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "fullZoom.accesskey") }
+menu-view-full-zoom-enlarge =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "fullZoomEnlargeCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "fullZoomEnlargeCmd.accesskey") }
+menu-view-full-zoom-reduce =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "fullZoomReduceCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "fullZoomReduceCmd.accesskey") }
+menu-view-full-zoom-reset =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "fullZoomResetCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "fullZoomResetCmd.accesskey") }
+menu-view-full-zoom-toggle =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "fullZoomToggleCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "fullZoomToggleCmd.accesskey") }
+menu-view-page-style-menu =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "pageStyleMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "pageStyleMenu.accesskey") }
+menu-view-page-style-no-style =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "pageStyleNoStyle.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "pageStyleNoStyle.accesskey") }
+menu-view-page-basic-style =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "pageStylePersistentOnly.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "pageStylePersistentOnly.accesskey") }
+menu-view-charset =
+    .label = { COPY("toolkit/chrome/global/charsetMenu.dtd", "charsetMenu2.label") }
+    .accesskey = { COPY("toolkit/chrome/global/charsetMenu.dtd", "charsetMenu2.accesskey") }
+menu-view-enter-full-screen =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "enterFullScreenCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "enterFullScreenCmd.accesskey") }
+menu-view-exit-full-screen =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "exitFullScreenCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "exitFullScreenCmd.accesskey") }
+menu-view-full-screen =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "fullScreenCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "fullScreenCmd.accesskey") }
+menu-view-show-all-tabs =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "showAllTabsCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "showAllTabsCmd.accesskey") }
+menu-view-bidi-switch-page-direction =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "bidiSwitchPageDirectionItem.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "bidiSwitchPageDirectionItem.accesskey") }
+menu-history =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "historyMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "historyMenu.accesskey") }
+menu-history-show-all-history =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "showAllHistoryCmd2.label") }
+menu-history-clear-recent-history =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "clearRecentHistory.label") }
+menu-history-synced-tabs =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "syncTabsMenu3.label") }
+menu-history-restore-last-session =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "historyRestoreLastSession.label") }
+menu-history-hidden-tabs =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "hiddenTabs.label") }
+menu-history-undo-menu =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "historyUndoMenu.label") }
+menu-history-undo-window-menu =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "historyUndoWindowMenu.label") }
+menu-bookmarks-menu =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "bookmarksMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "bookmarksMenu.accesskey") }
+menu-bookmarks-show-all =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "showAllBookmarks2.label") }
+menu-bookmarks-all-tabs =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "addCurPagesCmd.label") }
+menu-bookmarks-toolbar =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "personalbarCmd.label") }
+menu-bookmarks-other =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "otherBookmarksCmd.label") }
+menu-bookmarks-mobile =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "mobileBookmarksCmd.label") }
+menu-tools =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "toolsMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "toolsMenu.accesskey") }
+menu-tools-downloads =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "downloads.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "downloads.accesskey") }
+menu-tools-addons =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "addons.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "addons.accesskey") }
+menu-tools-sync-now =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "syncSyncNowItem.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "syncSyncNowItem.accesskey") }
+menu-tools-web-developer =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "webDeveloperMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "webDeveloperMenu.accesskey") }
+menu-tools-page-source =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "pageSourceCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "pageSourceCmd.accesskey") }
+menu-tools-page-info =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "pageInfoCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "pageInfoCmd.accesskey") }
+menu-preferences =
+    .label =
+        { PLATFORM() ->
+            [windows] { COPY("browser/chrome/browser/browser.dtd", "preferencesCmd2.label") }
+           *[other] { COPY("browser/chrome/browser/browser.dtd", "preferencesCmdUnix.label") }
+        }
+    .accesskey =
+        { PLATFORM() ->
+            [windows] { COPY("browser/chrome/browser/browser.dtd", "preferencesCmd2.accesskey") }
+           *[other] { COPY("browser/chrome/browser/browser.dtd", "preferencesCmdUnix.accesskey") }
+        }
+menu-tools-layout-debugger =
+    .label = { COPY("browser/chrome/browser/browser.dtd", "ldbCmd.label") }
+    .accesskey = { COPY("browser/chrome/browser/browser.dtd", "ldbCmd.accesskey") }
+menu-window-menu =
+    .label = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "windowMenu.label") }
+menu-window-bring-all-to-front =
+    .label = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "bringAllToFront.label") }
+menu-help =
+    .label = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpMenu.label") }
+    .accesskey = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpMenu.accesskey") }
+menu-help-keyboard-shortcuts =
+    .label = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpKeyboardShortcuts.label") }
+    .accesskey = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpKeyboardShortcuts.accesskey") }
+menu-help-troubleshooting-info =
+    .label = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpTroubleshootingInfo.label") }
+    .accesskey = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpTroubleshootingInfo.accesskey") }
+menu-help-feedback-page =
+    .label = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpFeedbackPage.label") }
+    .accesskey = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpFeedbackPage.accesskey") }
+menu-help-safe-mode-without-addons =
+    .label = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpSafeMode.label") }
+    .accesskey = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpSafeMode.accesskey") }
+menu-help-safe-mode-with-addons =
+    .label = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpSafeMode.stop.label") }
+    .accesskey = { COPY("browser/chrome/browser/baseMenuOverlay.dtd", "helpSafeMode.stop.accesskey") }
+menu-help-report-deceptive-site =
+    .label = { COPY("browser/chrome/browser/safebrowsing/report-phishing.dtd", "reportDeceptiveSiteMenu.title") }
+    .accesskey = { COPY("browser/chrome/browser/safebrowsing/report-phishing.dtd", "reportDeceptiveSiteMenu.accesskey") }
+"""
+        )
+    )
+
+    ctx.add_transforms(
+        'browser/browser/menubar.ftl',
+        'browser/browser/menubar.ftl',
+        [
+            FTL.Message(
+                id=FTL.Identifier('menu-tools-sync-sign-in'),
+                attributes=[
+                    FTL.Attribute(
+                        id=FTL.Identifier("label"),
+                        value=REPLACE(
+                            "browser/chrome/browser/browser.dtd",
+                            "syncSignIn.label",
+                            {
+                                "&syncBrand.shortName.label;": TERM_REFERENCE("sync-brand-short-name"),
+                            }
+                        ),
+                    ),
+                    FTL.Attribute(
+                        id=FTL.Identifier("accesskey"),
+                        value=COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "syncSignIn.accesskey",
+                        ),
+                    ),
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('menu-tools-sync-re-auth'),
+                attributes=[
+                    FTL.Attribute(
+                        id=FTL.Identifier("label"),
+                        value=REPLACE(
+                            "browser/chrome/browser/browser.dtd",
+                            "syncReAuthItem.label",
+                            {
+                                "&syncBrand.shortName.label;": TERM_REFERENCE("sync-brand-short-name"),
+                            }
+                        ),
+                    ),
+                    FTL.Attribute(
+                        id=FTL.Identifier("accesskey"),
+                        value=COPY(
+                            "browser/chrome/browser/browser.dtd",
+                            "syncReAuthItem.accesskey",
+                        ),
+                    ),
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('menu-help-product'),
+                attributes=[
+                    FTL.Attribute(
+                        id=FTL.Identifier("label"),
+                        value=REPLACE(
+                            "browser/chrome/browser/baseMenuOverlay.dtd",
+                            "productHelp2.label",
+                            {
+                                "&brandShorterName;": TERM_REFERENCE("brand-shorter-name"),
+                            }
+                        ),
+                    ),
+                    FTL.Attribute(
+                        id=FTL.Identifier("accesskey"),
+                        value=COPY(
+                            "browser/chrome/browser/baseMenuOverlay.dtd",
+                            "productHelp2.accesskey",
+                        ),
+                    ),
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('menu-help-show-tour'),
+                attributes=[
+                    FTL.Attribute(
+                        id=FTL.Identifier("label"),
+                        value=REPLACE(
+                            "browser/chrome/browser/baseMenuOverlay.dtd",
+                            "helpShowTour2.label",
+                            {
+                                "&brandShorterName;": TERM_REFERENCE("brand-shorter-name"),
+                            }
+                        ),
+                    ),
+                    FTL.Attribute(
+                        id=FTL.Identifier("accesskey"),
+                        value=COPY(
+                            "browser/chrome/browser/baseMenuOverlay.dtd",
+                            "helpShowTour2.accesskey",
+                        ),
+                    ),
+                ]
+            ),
+        ]
+    )
\ No newline at end of file
--- a/toolkit/locales/en-US/chrome/global/charsetMenu.dtd
+++ b/toolkit/locales/en-US/chrome/global/charsetMenu.dtd
@@ -1,6 +1,5 @@
 <!-- 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/. -->
 
 <!ENTITY charsetMenu2.label            "Text Encoding">
-<!ENTITY charsetMenu2.accesskey        "c">