Bug 1451992 - Migrate Preferences::Subdialogs::Permissions to Fluent. r?gijs,gandalf draft
authorZibi Braniecki <zbraniecki@mozilla.com>
Thu, 05 Apr 2018 22:09:13 +0200
changeset 779880 ff0013fcf30d45bb9c69fa92210d0b3e2eb7240a
parent 779879 566f04135b563446a21c1fc8d520b1899929fc9c
child 779881 32d0d6ea48e88bea261941eeb6eea1a0cc5d0eb7
push id105900
push userbmo:gandalf@aviary.pl
push dateTue, 10 Apr 2018 19:01:04 +0000
reviewersgijs, gandalf
bugs1451992
milestone61.0a1
Bug 1451992 - Migrate Preferences::Subdialogs::Permissions to Fluent. r?gijs,gandalf MozReview-Commit-ID: 12JINAX1Ttd
browser/components/preferences/in-content/preferences.xul
browser/components/preferences/in-content/privacy.xul
browser/components/preferences/permissions.xul
browser/components/preferences/sitePermissions.xul
browser/locales/en-US/browser/preferences/permissions.ftl
browser/locales/en-US/chrome/browser/preferences/permissions.dtd
browser/locales/jar.mn
python/l10n/fluent_migrations/bug_1451992_preferences_permissions.py
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -15,34 +15,32 @@
 <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/search.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/containers.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/in-content/privacy.css"?>
 
 <!DOCTYPE page [
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
 <!ENTITY % selectBookmarkDTD SYSTEM
   "chrome://browser/locale/preferences/selectBookmark.dtd">
-<!ENTITY % permissionsDTD SYSTEM "chrome://browser/locale/preferences/permissions.dtd">
 <!ENTITY % passwordManagerDTD SYSTEM "chrome://passwordmgr/locale/passwordManager.dtd">
 <!ENTITY % historyDTD SYSTEM "chrome://mozapps/locale/update/history.dtd">
 <!ENTITY % certManagerDTD SYSTEM "chrome://pippki/locale/certManager.dtd">
 <!ENTITY % deviceManangerDTD SYSTEM "chrome://pippki/locale/deviceManager.dtd">
 <!ENTITY % siteDataSettingsDTD SYSTEM
   "chrome://browser/locale/preferences/siteDataSettings.dtd" >
 <!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
 <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
 <!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd">
 <!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
 <!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
 <!ENTITY % contentDTD SYSTEM "chrome://browser/locale/preferences/content.dtd">
 <!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" >
 %aboutDialogDTD;
 %brandDTD;
 %selectBookmarkDTD;
-%permissionsDTD;
 %passwordManagerDTD;
 %historyDTD;
 %certManagerDTD;
 %deviceManangerDTD;
 %siteDataSettingsDTD;
 %privacyDTD;
 %syncBrandDTD;
 %syncDTD;
@@ -67,16 +65,17 @@
 
   <!-- Links below are only used for search-l10n-ids into subdialogs -->
   <link rel="localization" href="browser/preferences/blocklists.ftl"/>
   <link rel="localization" href="browser/preferences/clearSiteData.ftl"/>
   <link rel="localization" href="browser/preferences/colors.ftl"/>
   <link rel="localization" href="browser/preferences/connection.ftl"/>
   <link rel="localization" href="browser/preferences/fonts.ftl"/>
   <link rel="localization" href="browser/preferences/languages.ftl"/>
+  <link rel="localization" href="browser/preferences/permissions.ftl"/>
 
   <script type="text/javascript" src="chrome://global/content/l10n.js"></script>
 
   <html:link rel="shortcut icon"
               href="chrome://browser/skin/settings.svg"/>
 
   <script type="application/javascript"
           src="chrome://browser/content/utilityOverlay.js"/>
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -28,17 +28,17 @@
                 onsyncfrompreference="return gPrivacyPane.readSavePasswords();"
                 flex="1" />
       <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
       <hbox>
         <button id="passwordExceptions"
                 class="accessory-button"
                 data-l10n-id="forms-exceptions"
                 preference="pref.privacy.disable_button.view_passwords_exceptions"
-                searchkeywords="&address2.label;"/>
+                search-l10n-ids="permissions-address"/>
       </hbox>
     </hbox>
     <hbox id="showPasswordBox" pack="end">
       <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
       <hbox>
         <button id="showPasswords"
                 class="accessory-button"
                 data-l10n-id="forms-saved-logins"
@@ -238,24 +238,25 @@
                                 &cookiesCol.label;
                                 &usageCol.label;"/>
       </hbox>
       <hbox>
         <button id="cookieExceptions"
                 class="accessory-button"
                 data-l10n-id="sitedata-cookies-exceptions"
                 preference="pref.privacy.disable_button.cookie_exceptions"
-                searchkeywords="&address2.label;
-                                &block.label;
-                                &session.label;
-                                &allow.label;
-                                &removepermission2.label;
-                                &removeallpermissions2.label;
-                                &button.cancel.label;
-                                &button.ok.label;"/>
+                search-l10n-ids="
+                  permissions-address,
+                  permissions-block.label,
+                  permissions-allow.label,
+                  permissions-remove.label,
+                  permissions-remove-all.label,
+                  permissions-button-cancel.label,
+                  permissions-button-ok.label
+                " />
       </hbox>
     </vbox>
   </hbox>
 </groupbox>
 
 <!-- Address Bar -->
 <groupbox id="locationBarGroup"
           data-category="panePrivacy"
@@ -329,20 +330,22 @@
         <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
         <hbox>
           <button id="trackingProtectionExceptions"
                   class="accessory-button"
                   flex="1"
                   hidden="true"
                   data-l10n-id="tracking-exceptions"
                   preference="pref.privacy.disable_button.tracking_protection_exceptions"
-                  searchkeywords="&removepermission2.label;
-                                  &removeallpermissions2.label;
-                                  &button.cancel.label;
-                                  &button.ok.label;"/>
+                  search-l10n-ids="
+                    permissions-remove.label,
+                    permissions-remove-all.label,
+                    permissions-button-cancel.label,
+                    permissions-button-ok.label
+                  "/>
         </hbox>
         <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
         <hbox>
           <button id="changeBlockList"
                   class="accessory-button"
                   flex="1"
                   data-l10n-id="tracking-change-block-list"
                   preference="pref.privacy.disable_button.change_blocklist"
@@ -384,54 +387,60 @@
           <image class="geo-icon permission-icon" />
           <separator orient="vertical" class="thin"/>
           <label id="locationPermissionsLabel" data-l10n-id="permissions-location"/>
         </description>
         <hbox pack="end">
           <button id="locationSettingsButton"
                   class="accessory-button"
                   data-l10n-id="permissions-location-settings"
-                  searchkeywords="&removepermission2.label;
-                                  &removeallpermissions2.label;
-                                  &button.cancel.label;
-                                  &button.ok.label;"/>
+                  search-l10n-ids="
+                    permissions-remove.label,
+                    permissions-remove-all.label,
+                    permissions-button-cancel.label,
+                    permissions-button-ok.label,
+                  " />
         </hbox>
       </row>
 
       <row id="cameraSettingsRow" align="center">
         <description flex="1">
           <image class="camera-icon permission-icon" />
           <separator orient="vertical" class="thin"/>
           <label id="cameraPermissionsLabel" data-l10n-id="permissions-camera"/>
         </description>
         <hbox pack="end">
           <button id="cameraSettingsButton"
                   class="accessory-button"
                   data-l10n-id="permissions-camera-settings"
-                  searchkeywords="&removepermission2.label;
-                                  &removeallpermissions2.label;
-                                  &button.cancel.label;
-                                  &button.ok.label;"/>
+                  search-l10n-ids="
+                    permissions-remove.label,
+                    permissions-remove-all.label,
+                    permissions-button-cancel.label,
+                    permissions-button-ok.label,
+                  " />
         </hbox>
       </row>
 
       <row id="microphoneSettingsRow" align="center">
         <description flex="1">
           <image class="microphone-icon permission-icon" />
           <separator orient="vertical" class="thin"/>
           <label id="microphonePermissionsLabel" data-l10n-id="permissions-microphone"/>
         </description>
         <hbox pack="end">
           <button id="microphoneSettingsButton"
                   class="accessory-button"
                   data-l10n-id="permissions-microphone-settings"
-                  searchkeywords="&removepermission2.label;
-                                  &removeallpermissions2.label;
-                                  &button.cancel.label;
-                                  &button.ok.label;"/>
+                  search-l10n-ids="
+                    permissions-remove.label,
+                    permissions-remove-all.label,
+                    permissions-button-cancel.label,
+                    permissions-button-ok.label,
+                  " />
         </hbox>
       </row>
 
       <row id="notificationSettingsRow" align="center">
         <description flex="1">
           <image class="desktop-notification-icon permission-icon" />
           <separator orient="vertical" class="thin"/>
           <label id="notificationPermissionsLabel"
@@ -440,20 +449,22 @@
           <label id="notificationPermissionsLearnMore"
                  class="learnMore text-link"
                  data-l10n-id="permissions-notification-link"/>
         </description>
         <hbox pack="end">
           <button id="notificationSettingsButton"
                   class="accessory-button"
                   data-l10n-id="permissions-notification-settings"
-                  searchkeywords="&removepermission2.label;
-                                  &removeallpermissions2.label;
-                                  &button.cancel.label;
-                                  &button.ok.label;"/>
+                  search-l10n-ids="
+                    permissions-remove.label,
+                    permissions-remove-all.label,
+                    permissions-button-cancel.label,
+                    permissions-button-ok.label,
+                  " />
         </hbox>
       </row>
     </rows>
   </grid>
 
   <vbox id="notificationsDoNotDisturbBox" hidden="true">
     <checkbox id="notificationsDoNotDisturb" class="indent"/>
   </vbox>
@@ -466,37 +477,43 @@
               onsyncfrompreference="return gPrivacyPane.updateButtons('popupPolicyButton',
                                          'dom.disable_open_during_load');"
               flex="1" />
     <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
     <hbox>
       <button id="popupPolicyButton"
               class="accessory-button"
               data-l10n-id="permissions-block-popups-exceptions"
-              searchkeywords="&address2.label; &button.cancel.label; &button.ok.label;"/>
+              search-l10n-ids="
+                permissions-address,
+                permissions-button-cancel.label,
+                permissions-button-ok.label
+              " />
     </hbox>
   </hbox>
 
   <hbox id="addonInstallBox">
     <checkbox id="warnAddonInstall"
               data-l10n-id="permissions-addon-install-warning"
               preference="xpinstall.whitelist.required"
               onsyncfrompreference="return gPrivacyPane.readWarnAddonInstall();"
               flex="1" />
     <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
     <hbox>
       <button id="addonExceptions"
               class="accessory-button"
               data-l10n-id="permissions-addon-exceptions"
-              searchkeywords="&address2.label;
-                              &allow.label;
-                              &removepermission2.label;
-                              &removeallpermissions2.label;
-                              &button.cancel.label;
-                              &button.ok.label;"/>
+              search-l10n-ids="
+                permissions-address,
+                permissions-allow.label,
+                permissions-remove.label,
+                permissions-remove-all.label,
+                permissions-button-cancel.label,
+                permissions-button-ok.label,
+              " />
     </hbox>
   </hbox>
 
   <vbox id="a11yPermissionsBox">
     <hbox flex="1" align="center">
       <checkbox id="a11yPrivacyCheckbox" class="tail-with-learn-more"
                 data-l10n-id="permissions-a11y-privacy-checkbox"
                 oncommand="return gPrivacyPane.updateA11yPrefs(this.checked)"/>
--- a/browser/components/preferences/permissions.xul
+++ b/browser/components/preferences/permissions.xul
@@ -2,82 +2,83 @@
 
 <!-- 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/. -->
 
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/permissions.dtd" >
-
 <window id="PermissionsDialog" class="windowDialog"
         windowtype="Browser:Permissions"
-        title="&window.title;"
+        data-l10n-id="permissions-window"
+        data-l10n-attrs="title, style"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        style="width: &window.width;;"
         onload="gPermissionManager.onLoad();"
         onunload="gPermissionManager.uninit();"
         persist="screenX screenY width height"
         onkeypress="gPermissionManager.onWindowKeyPress(event);">
 
+  <link rel="localization" href="browser/preferences/permissions.ftl"/>
+  <script type="application/javascript" src="chrome://global/content/l10n.js"></script>
+
   <script src="chrome://global/content/treeUtils.js"/>
   <script src="chrome://browser/content/preferences/permissions.js"/>
 
   <stringbundle id="bundlePreferences"
                 src="chrome://browser/locale/preferences/preferences.properties"/>
 
   <keyset>
-    <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
+    <key data-l10n-id="permissions-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
   <vbox class="contentPane largeDialogContainer" flex="1">
     <description id="permissionsText" control="url"/>
     <separator class="thin"/>
-    <label id="urlLabel" control="url" accesskey="&address2.accesskey;">&address2.label;</label>
+    <label id="urlLabel" control="url" data-l10n-id="permissions-address"/>
     <hbox align="start">
       <textbox id="url" flex="1"
                oninput="gPermissionManager.onHostInput(event.target);"
                onkeypress="gPermissionManager.onHostKeyPress(event);"/>
     </hbox>
     <hbox pack="end">
-      <button id="btnBlock" disabled="true" label="&block.label;" accesskey="&block.accesskey;"
+      <button id="btnBlock" disabled="true" data-l10n-id="permissions-block"
               oncommand="gPermissionManager.addPermission(nsIPermissionManager.DENY_ACTION);"/>
-      <button id="btnSession" disabled="true" label="&session.label;" accesskey="&session.accesskey;"
+      <button id="btnSession" disabled="true" data-l10n-id="permissions-session"
               oncommand="gPermissionManager.addPermission(nsICookiePermission.ACCESS_SESSION);"/>
-      <button id="btnAllow" disabled="true" label="&allow.label;" default="true" accesskey="&allow.accesskey;"
+      <button id="btnAllow" disabled="true" data-l10n-id="permissions-allow" default="true"
               oncommand="gPermissionManager.addPermission(nsIPermissionManager.ALLOW_ACTION);"/>
     </hbox>
     <separator class="thin"/>
     <tree id="permissionsTree" flex="1" style="height: 18em;"
           hidecolumnpicker="true"
           onkeypress="gPermissionManager.onPermissionKeyPress(event)"
           onselect="gPermissionManager.onPermissionSelected();">
       <treecols>
-        <treecol id="siteCol" label="&treehead.sitename2.label;" flex="3"
+        <treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3"
                  data-field-name="origin" persist="width"/>
         <splitter class="tree-splitter"/>
-        <treecol id="statusCol" label="&treehead.status.label;" flex="1"
+        <treecol id="statusCol" data-l10n-id="permissions-status" flex="1"
                  data-field-name="capability" persist="width"/>
       </treecols>
       <treechildren/>
     </tree>
   </vbox>
   <vbox>
     <hbox class="actionButtons" align="left" flex="1">
       <button id="removePermission" disabled="true"
-              accesskey="&removepermission2.accesskey;"
-              icon="remove" label="&removepermission2.label;"
+              data-l10n-id="permissions-remove"
+              icon="remove"
               oncommand="gPermissionManager.onPermissionDeleted();"/>
       <button id="removeAllPermissions"
-              icon="clear" label="&removeallpermissions2.label;"
-              accesskey="&removeallpermissions2.accesskey;"
+              data-l10n-id="permissions-remove-all"
+              icon="clear"
               oncommand="gPermissionManager.onAllPermissionsDeleted();"/>
     </hbox>
     <spacer flex="1"/>
     <hbox class="actionButtons" align="right" flex="1">
       <button oncommand="close();" icon="close"
-              label="&button.cancel.label;" accesskey="&button.cancel.accesskey;" />
+              data-l10n-id="permissions-button-cancel" />
       <button id="btnApplyChanges" oncommand="gPermissionManager.onApplyChanges();" icon="save"
-              label="&button.ok.label;" accesskey="&button.ok.accesskey;"/>
+              data-l10n-id="permissions-button-ok" />
     </hbox>
   </vbox>
 </window>
--- a/browser/components/preferences/sitePermissions.xul
+++ b/browser/components/preferences/sitePermissions.xul
@@ -3,73 +3,75 @@
 <!-- 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/. -->
 
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/preferences/sitePermissions.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/permissions.dtd" >
-
 <window id="SitePermissionsDialog" class="windowDialog"
         windowtype="Browser:SitePermissions"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        style="width: &window.width;;"
+        data-l10n-id="permissions-window"
+        data-l10n-attrs="style"
         onload="gSitePermissionsManager.onLoad();"
         onunload="gSitePermissionsManager.uninit();"
         persist="screenX screenY width height"
         onkeypress="gSitePermissionsManager.onWindowKeyPress(event);">
 
+  <link rel="localization" href="browser/preferences/permissions.ftl"/>
+  <script type="application/javascript" src="chrome://global/content/l10n.js"></script>
+
   <script src="chrome://browser/content/preferences/sitePermissions.js"/>
 
   <stringbundle id="bundlePreferences"
                 src="chrome://browser/locale/preferences/preferences.properties"/>
 
   <keyset>
-    <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
+    <key data-l10n-id="permissions-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
   <vbox class="contentPane largeDialogContainer" flex="1">
     <description id="permissionsText" control="url"/>
     <separator class="thin"/>
     <hbox align="start">
-      <textbox id="searchBox" flex="1" placeholder="&searchbox.placeholder;"
+      <textbox id="searchBox" flex="1" data-l10n-id="permissions-searchbox"
                type="search" oncommand="gSitePermissionsManager.buildPermissionsList();"/>
     </hbox>
     <separator class="thin"/>
     <richlistbox id="permissionsBox" selected="false"
                  hidecolumnpicker="true" flex="1"
                  onkeypress="gSitePermissionsManager.onPermissionKeyPress(event);"
                  onselect="gSitePermissionsManager.onPermissionSelect();">
       <listheader>
-        <treecol id="siteCol" label="&treehead.sitename2.label;" flex="3"
+        <treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3"
                  persist="width" width="50"
                  onclick="gSitePermissionsManager.buildPermissionsList(event.target)"/>
-        <treecol id="statusCol" label="&treehead.status.label;" flex="1"
+        <treecol id="statusCol" data-l10n-id="permissions-status" flex="1"
                  persist="width" width="50" data-isCurrentSortCol="true"
                  onclick="gSitePermissionsManager.buildPermissionsList(event.target);"/>
       </listheader>
     </richlistbox>
   </vbox>
   <vbox>
     <hbox class="actionButtons" align="left" flex="1">
       <button id="removePermission" disabled="true"
-              accesskey="&removepermission2.accesskey;"
-              icon="remove" label="&removepermission2.label;"
+              data-l10n-id="permissions-remove"
+              icon="remove"
               oncommand="gSitePermissionsManager.onPermissionDelete();"/>
       <button id="removeAllPermissions"
-              icon="clear" label="&removeallpermissions2.label;"
-              accesskey="&removeallpermissions2.accesskey;"
+              data-l10n-id="permissions-remove-all"
+              icon="clear"
               oncommand="gSitePermissionsManager.onAllPermissionsDelete();"/>
     </hbox>
     <spacer flex="1"/>
     <checkbox id="permissionsDisableCheckbox"/>
     <description id="permissionsDisableDescription"/>
     <spacer flex="1"/>
     <hbox class="actionButtons" align="right" flex="1">
       <button oncommand="close();" icon="close" id="cancel"
-              label="&button.cancel.label;" accesskey="&button.cancel.accesskey;" />
+              data-l10n-id="permissions-button-cancel" />
       <button id="btnApplyChanges" oncommand="gSitePermissionsManager.onApplyChanges();" icon="save"
-              label="&button.ok.label;" accesskey="&button.ok.accesskey;"/>
+              data-l10n-id="permissions-button-ok" />
     </hbox>
   </vbox>
 </window>
new file mode 100644
--- /dev/null
+++ b/browser/locales/en-US/browser/preferences/permissions.ftl
@@ -0,0 +1,50 @@
+# 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/.
+
+permissions-window =
+    .title = Exceptions
+    .style = width: 45em
+
+permissions-close-key =
+    .key = w
+
+permissions-address = Address of website
+    .accesskey = d
+
+permissions-block =
+    .label = Block
+    .accesskey = B
+
+permissions-session =
+    .label = Allow for Session
+    .accesskey = S
+
+permissions-allow =
+    .label = Allow
+    .accesskey = A
+
+permissions-site-name =
+    .label = Website
+
+permissions-status =
+    .label = Status
+
+permissions-remove =
+    .label = Remove Website
+    .accesskey = R
+
+permissions-remove-all =
+    .label = Remove All Websites
+    .accesskey = e
+
+permissions-button-cancel =
+    .label = Cancel
+    .accesskey = C
+
+permissions-button-ok =
+    .label = Save Changes
+    .accesskey = S
+
+permissions-searchbox =
+    .placeholder = Search Website
deleted file mode 100644
--- a/browser/locales/en-US/chrome/browser/preferences/permissions.dtd
+++ /dev/null
@@ -1,29 +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/. -->
-
-<!ENTITY window.title                 "Exceptions">
-<!ENTITY window.width                 "45em">
-
-<!ENTITY treehead.sitename2.label     "Website">
-<!ENTITY treehead.status.label        "Status">
-<!ENTITY removepermission2.label      "Remove Website">
-<!ENTITY removepermission2.accesskey  "R">
-<!ENTITY removeallpermissions2.label  "Remove All Websites">
-<!ENTITY removeallpermissions2.accesskey "e">
-<!ENTITY address2.label               "Address of website">
-<!ENTITY address2.accesskey           "d">
-<!ENTITY block.label                  "Block">
-<!ENTITY block.accesskey              "B">
-<!ENTITY session.label                "Allow for Session">
-<!ENTITY session.accesskey            "S">
-<!ENTITY allow.label                  "Allow">
-<!ENTITY allow.accesskey              "A">
-<!ENTITY windowClose.key              "w">
-
-<!ENTITY button.cancel.label          "Cancel">
-<!ENTITY button.cancel.accesskey      "C">
-<!ENTITY button.ok.label              "Save Changes">
-<!ENTITY button.ok.accesskey          "S">
-
-<!ENTITY searchbox.placeholder        "Search Website">
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -52,17 +52,16 @@
     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.dtd              (%chrome/browser/feeds/subscribe.dtd)
     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/clearSiteData.properties     (%chrome/browser/preferences/clearSiteData.properties)
     locale/browser/preferences/content.dtd            (%chrome/browser/preferences/content.dtd)
-    locale/browser/preferences/permissions.dtd        (%chrome/browser/preferences/permissions.dtd)
     locale/browser/preferences/preferences.properties     (%chrome/browser/preferences/preferences.properties)
     locale/browser/preferences/privacy.dtd            (%chrome/browser/preferences/privacy.dtd)
     locale/browser/preferences/security.dtd           (%chrome/browser/preferences/security.dtd)
     locale/browser/preferences/selectBookmark.dtd     (%chrome/browser/preferences/selectBookmark.dtd)
     locale/browser/preferences/siteDataSettings.dtd     (%chrome/browser/preferences/siteDataSettings.dtd)
     locale/browser/preferences/sync.dtd               (%chrome/browser/preferences/sync.dtd)
     locale/browser/preferences/translation.dtd        (%chrome/browser/preferences/translation.dtd)
     locale/browser/syncBrand.dtd                (%chrome/browser/syncBrand.dtd)
new file mode 100644
--- /dev/null
+++ b/python/l10n/fluent_migrations/bug_1451992_preferences_permissions.py
@@ -0,0 +1,238 @@
+# coding=utf8
+
+# Any copyright is dedicated to the Public Domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+
+from __future__ import absolute_import
+import fluent.syntax.ast as FTL
+from fluent.migrate.helpers import MESSAGE_REFERENCE
+from fluent.migrate import COPY, CONCAT, REPLACE
+
+def migrate(ctx):
+    """Bug 1451992 - Migrate Preferences::Subdialogs::Permissions to Fluent, part {index}."""
+
+    ctx.add_transforms(
+        'browser/browser/preferences/permissions.ftl',
+        'browser/browser/preferences/permissions.ftl',
+        [
+            FTL.Message(
+                id=FTL.Identifier('permissions-window'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('title'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'window.title'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('style'),
+                        CONCAT(
+                            FTL.TextElement('width: '),
+                            COPY(
+                                'browser/chrome/browser/preferences/permissions.dtd',
+                                'window.width'
+                            )
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-close-key'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('key'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'windowClose.key'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-address'),
+                value=COPY(
+                    'browser/chrome/browser/preferences/permissions.dtd',
+                    'address2.label'
+                ),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'address2.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-block'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'block.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'block.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-session'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'session.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'session.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-allow'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'allow.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'allow.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-site-name'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'treehead.sitename2.label'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-status'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'treehead.status.label'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-remove'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'removepermission2.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'removepermission2.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-remove-all'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'removeallpermissions2.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'removeallpermissions2.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-button-cancel'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'button.cancel.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'button.cancel.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-button-ok'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('label'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'button.ok.label'
+                        )
+                    ),
+                    FTL.Attribute(
+                        FTL.Identifier('accesskey'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'button.ok.accesskey'
+                        )
+                    )
+                ]
+            ),
+            FTL.Message(
+                id=FTL.Identifier('permissions-searchbox'),
+                attributes=[
+                    FTL.Attribute(
+                        FTL.Identifier('placeholder'),
+                        COPY(
+                            'browser/chrome/browser/preferences/permissions.dtd',
+                            'searchbox.placeholder'
+                        )
+                    )
+                ]
+            )
+        ]
+    )