From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- python/l10n/fluent_migrations/__init__.py | 0 .../bug_1552333_aboutCertError.py | 40 + .../bug_1635548_browser_context.py | 82 ++ .../bug_1738056_aboutDialog_channel.py | 33 + .../bug_1786186_mobile_aboutConfig.py | 65 ++ .../fluent_migrations/bug_1793557_extensions.py | 912 +++++++++++++++++++++ .../l10n/fluent_migrations/bug_1793572_webrtc.py | 771 +++++++++++++++++ .../bug_1813077_popup_notification_learn_more.py | 22 + .../bug_1814261_mixed_content_identity_panel.py | 49 ++ .../bug_1814266_identity_custom_root.py | 34 + .../fluent_migrations/bug_1818322_mozTabList.py | 26 + .../fluent_migrations/bug_1820654_update_manual.py | 30 + ...migrationWizard_password_file_import_strings.py | 27 + .../bug_1821779_migrationWizard_browser_names.py | 38 + .../fluent_migrations/bug_1828443_pocket_policy.py | 30 + .../bug_1828767_sanitize_dialog_native_size.py | 77 ++ .../l10n/fluent_migrations/bug_1830042_places.py | 127 +++ .../l10n/fluent_migrations/bug_1831851_accounts.py | 195 +++++ python/l10n/fluent_migrations/bug_1831872_sync.py | 31 + .../l10n/fluent_migrations/bug_1832138_ctrlTab.py | 37 + .../bug_1832141_recently_closed.py | 76 ++ .../bug_1832179_sendTabToDevice.py | 37 + .../fluent_migrations/bug_1832186_popupwarning.py | 139 ++++ .../bug_1832668_firefoxView_navigation.py | 27 + .../fluent_migrations/bug_1833228_fxviewTabList.py | 44 + ...bug_1835559_aboutDialog_explicit_textContent.py | 67 ++ .../bug_1866295_new_device_migration_strings.py | 22 + ...7346_new_device_migration_string_replacement.py | 22 + python/l10n/mozxchannel/__init__.py | 150 ++++ python/l10n/mozxchannel/projectconfig.py | 77 ++ python/l10n/mozxchannel/source.py | 88 ++ python/l10n/test_fluent_migrations/__init__.py | 0 python/l10n/test_fluent_migrations/fmt.py | 188 +++++ 33 files changed, 3563 insertions(+) create mode 100644 python/l10n/fluent_migrations/__init__.py create mode 100644 python/l10n/fluent_migrations/bug_1552333_aboutCertError.py create mode 100644 python/l10n/fluent_migrations/bug_1635548_browser_context.py create mode 100644 python/l10n/fluent_migrations/bug_1738056_aboutDialog_channel.py create mode 100644 python/l10n/fluent_migrations/bug_1786186_mobile_aboutConfig.py create mode 100644 python/l10n/fluent_migrations/bug_1793557_extensions.py create mode 100644 python/l10n/fluent_migrations/bug_1793572_webrtc.py create mode 100644 python/l10n/fluent_migrations/bug_1813077_popup_notification_learn_more.py create mode 100644 python/l10n/fluent_migrations/bug_1814261_mixed_content_identity_panel.py create mode 100644 python/l10n/fluent_migrations/bug_1814266_identity_custom_root.py create mode 100644 python/l10n/fluent_migrations/bug_1818322_mozTabList.py create mode 100644 python/l10n/fluent_migrations/bug_1820654_update_manual.py create mode 100644 python/l10n/fluent_migrations/bug_1821187_migrationWizard_password_file_import_strings.py create mode 100644 python/l10n/fluent_migrations/bug_1821779_migrationWizard_browser_names.py create mode 100644 python/l10n/fluent_migrations/bug_1828443_pocket_policy.py create mode 100644 python/l10n/fluent_migrations/bug_1828767_sanitize_dialog_native_size.py create mode 100644 python/l10n/fluent_migrations/bug_1830042_places.py create mode 100644 python/l10n/fluent_migrations/bug_1831851_accounts.py create mode 100644 python/l10n/fluent_migrations/bug_1831872_sync.py create mode 100644 python/l10n/fluent_migrations/bug_1832138_ctrlTab.py create mode 100644 python/l10n/fluent_migrations/bug_1832141_recently_closed.py create mode 100644 python/l10n/fluent_migrations/bug_1832179_sendTabToDevice.py create mode 100644 python/l10n/fluent_migrations/bug_1832186_popupwarning.py create mode 100644 python/l10n/fluent_migrations/bug_1832668_firefoxView_navigation.py create mode 100644 python/l10n/fluent_migrations/bug_1833228_fxviewTabList.py create mode 100644 python/l10n/fluent_migrations/bug_1835559_aboutDialog_explicit_textContent.py create mode 100644 python/l10n/fluent_migrations/bug_1866295_new_device_migration_strings.py create mode 100644 python/l10n/fluent_migrations/bug_1867346_new_device_migration_string_replacement.py create mode 100644 python/l10n/mozxchannel/__init__.py create mode 100644 python/l10n/mozxchannel/projectconfig.py create mode 100644 python/l10n/mozxchannel/source.py create mode 100644 python/l10n/test_fluent_migrations/__init__.py create mode 100644 python/l10n/test_fluent_migrations/fmt.py (limited to 'python/l10n') diff --git a/python/l10n/fluent_migrations/__init__.py b/python/l10n/fluent_migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python/l10n/fluent_migrations/bug_1552333_aboutCertError.py b/python/l10n/fluent_migrations/bug_1552333_aboutCertError.py new file mode 100644 index 0000000000..5c8300e01f --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1552333_aboutCertError.py @@ -0,0 +1,40 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import transforms_from +from fluent.migrate.helpers import VARIABLE_REFERENCE +from fluent.migrate import COPY, REPLACE + + +def migrate(ctx): + """Bug 1552333 - Migrate strings from pipnss.properties to aboutCertError.ftl""" + ctx.add_transforms( + "browser/browser/aboutCertError.ftl", + "browser/browser/aboutCertError.ftl", + transforms_from( + """ +cert-error-symantec-distrust-admin = { COPY(from_path, "certErrorSymantecDistrustAdministrator") } +""", + from_path="security/manager/chrome/pipnss/pipnss.properties", + ), + ) + ctx.add_transforms( + "browser/browser/aboutCertError.ftl", + "browser/browser/aboutCertError.ftl", + [ + FTL.Message( + id=FTL.Identifier("cert-error-symantec-distrust-description"), + value=REPLACE( + "security/manager/chrome/pipnss/pipnss.properties", + "certErrorSymantecDistrustDescription1", + { + "%1$S": VARIABLE_REFERENCE("hostname"), + }, + normalize_printf=True, + ), + ), + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1635548_browser_context.py b/python/l10n/fluent_migrations/bug_1635548_browser_context.py new file mode 100644 index 0000000000..33bd0efc95 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1635548_browser_context.py @@ -0,0 +1,82 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import transforms_from, VARIABLE_REFERENCE +from fluent.migrate import REPLACE, COPY + + +def migrate(ctx): + """Bug 1635548 - Migrate browser-context.inc to Fluent, part {index}""" + target = "toolkit/toolkit/global/textActions.ftl" + reference = "toolkit/toolkit/global/textActions.ftl" + ctx.add_transforms( + target, + reference, + transforms_from( + """ +text-action-spell-add-to-dictionary = + .label = { COPY(from_path, "spellAddToDictionary.label") } + .accesskey = { COPY(from_path, "spellAddToDictionary.accesskey") } + +text-action-spell-undo-add-to-dictionary = + .label = { COPY(from_path, "spellUndoAddToDictionary.label") } + .accesskey = { COPY(from_path, "spellUndoAddToDictionary.accesskey") } + +text-action-spell-check-toggle = + .label = { COPY(from_path, "spellCheckToggle.label") } + .accesskey = { COPY(from_path, "spellCheckToggle.accesskey") } + +text-action-spell-dictionaries = + .label = { COPY(from_path, "spellDictionaries.label") } + .accesskey = { COPY(from_path, "spellDictionaries.accesskey") } +""", + from_path="toolkit/chrome/global/textcontext.dtd", + ), + ) + + target = "toolkit/toolkit/global/textActions.ftl" + reference = "toolkit/toolkit/global/textActions.ftl" + ctx.add_transforms( + target, + reference, + transforms_from( + """ +text-action-spell-add-dictionaries = + .label = { COPY(from_path, "spellAddDictionaries.label") } + .accesskey = { COPY(from_path, "spellAddDictionaries.accesskey") } +""", + from_path="browser/chrome/browser/browser.dtd", + ), + ) + + target = "browser/browser/browserContext.ftl" + reference = "browser/browser/browserContext.ftl" + ctx.add_transforms( + target, + reference, + [ + FTL.Message( + id=FTL.Identifier("main-context-menu-open-link-in-container-tab"), + attributes=[ + FTL.Attribute( + FTL.Identifier("label"), + REPLACE( + "browser/chrome/browser/browser.properties", + "userContextOpenLink.label", + {"%1$S": VARIABLE_REFERENCE("containerName")}, + ), + ), + FTL.Attribute( + FTL.Identifier("accesskey"), + COPY( + "browser/chrome/browser/browser.dtd", + "openLinkCmdInTab.accesskey", + ), + ), + ], + ) + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1738056_aboutDialog_channel.py b/python/l10n/fluent_migrations/bug_1738056_aboutDialog_channel.py new file mode 100644 index 0000000000..b867155ebf --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1738056_aboutDialog_channel.py @@ -0,0 +1,33 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +import re + +from fluent.migrate.transforms import TransformPattern + + +class INSERT_VARIABLE(TransformPattern): + def visit_TextElement(self, node): + node.value = re.sub( + 'current-channel">{ $channel }SOME TEXT` from a string + def visit_TextElement(self, node): + link_start = node.value.find('