Bug 1703164 - convert mail/components/preferences/permissions.xhtml to top level <html>. r=aleca

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

--HG--
extra : rebase_source : 4f4f5f5fbec57d471605a592db2673400690306e
extra : amend_source : de7136e184e9ebfe216d8f63eb2dc2b819ac3209
This commit is contained in:
Magnus Melin 2023-11-24 08:02:14 +02:00
Родитель 89d267f005
Коммит 714b50c47f
5 изменённых файлов: 154 добавлений и 124 удалений

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

@ -11,6 +11,16 @@ var { AppConstants } = ChromeUtils.importESModule(
var NOTIFICATION_FLUSH_PERMISSIONS = "flush-pending-permissions";
window.addEventListener("load", event => {
gPermissionManager.onLoad();
});
window.addEventListener("unload", event => {
gPermissionManager.uninit();
});
window.addEventListener("keypress", event => {
gPermissionManager.onWindowKeyPress(event);
});
/**
* Magic URI base used so the permission manager can store
* remote content permissions for a given email address.

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

@ -1,40 +1,39 @@
<?xml version="1.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/. -->
<!DOCTYPE dialog>
<window
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
id="PermissionsDialog"
class="windowDialog"
data-l10n-id="permissions-reminder-window2"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
onload="gPermissionManager.onLoad();"
onunload="gPermissionManager.uninit();"
persist="width height"
onkeypress="gPermissionManager.onWindowKeyPress(event);"
scrolling="false"
>
<script src="chrome://messenger/content/globalOverlay.js" />
<script src="chrome://global/content/editMenuOverlay.js" />
<script src="chrome://global/content/treeUtils.js" />
<script src="chrome://messenger/content/preferences/permissions.js" />
<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link
rel="stylesheet"
href="chrome://messenger/skin/input-fields.css"
/>
<html:link
rel="localization"
href="messenger/preferences/permissions.ftl"
/>
</linkset>
<head>
<title data-l10n-id="permissions-dialog-title"></title>
<link rel="stylesheet" href="chrome://global/skin/global.css" />
<link rel="stylesheet" href="chrome://messenger/skin/input-fields.css" />
<link rel="localization" href="messenger/preferences/permissions.ftl" />
<script
defer="defer"
src="chrome://messenger/content/globalOverlay.js"
></script>
<script
defer="defer"
src="chrome://global/content/editMenuOverlay.js"
></script>
<script defer="defer" src="chrome://global/content/treeUtils.js"></script>
<script
defer="defer"
src="chrome://messenger/content/preferences/permissions.js"
></script>
</head>
<html:body
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<keyset>
<key
data-l10n-id="permission-preferences-close-window"
@ -128,4 +127,5 @@
/>
</hbox>
</vbox>
</window>
</html:body>
</html>

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

@ -25,7 +25,7 @@
oncommand="gPrivacyPane.showRemoteContentExceptions();"
data-l10n-id="exceptions-button"
search-l10n-ids="
permissions-reminder-window2.title,
permissions-dialog-title,
website-address-label.value,
block-button.label,
allow-session-button.label,
@ -70,7 +70,7 @@
data-l10n-id="exceptions-button"
preference="pref.privacy.disable_button.cookie_exceptions"
search-l10n-ids="
permissions-reminder-window2.title,
permissions-dialog-title,
website-address-label.value,
block-button.label,
allow-session-button.label,

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

@ -2,8 +2,7 @@
# 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-reminder-window2 =
.title = Exceptions
permissions-dialog-title = Exceptions
permission-preferences-close-window =
.key = w

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

@ -0,0 +1,21 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from fluent.migratetb import COPY_PATTERN
from fluent.migratetb.helpers import transforms_from
def migrate(ctx):
"""Bug 1703164 - mail/components/preferences/permissions.xhtml to top level html part {index}"""
target = reference = "mail/messenger/preferences/permissions.ftl"
ctx.add_transforms(
target,
reference,
transforms_from(
"""
permissions-dialog-title = {{COPY_PATTERN(from_path, "permissions-reminder-window2.title")}}
""",
from_path="mail/messenger/preferences/permissions.ftl",
),
)