From 46be3f7b699d105faf9b427803a77ca26a4f2b00 Mon Sep 17 00:00:00 2001 From: Rob Lemley Date: Thu, 29 Dec 2022 20:48:10 +1100 Subject: [PATCH] Bug 1807089 - Remove Fluent migrations that have run. r=aleca They are archived in https://github.com/jfx2006/tb-migration-scripts - they are probably useful as examples. The copies in that repo are what actually ran, not what's in the tree since the in-tree copies have been auto-formatted and such since. Differential Revision: https://phabricator.services.mozilla.com/D165412 --HG-- extra : amend_source : 7e6008e7991db2ccb085fa4988a8d4a9134cb032 --- .../bug_1567070_aboutrights.py | 84 -- .../bug_1615501_preferences.py | 1050 ----------------- .../bug_1615501_preferences_calendar.py | 331 ------ .../bug_1615501_preferences_subdialogs.py | 878 -------------- ...ug_1733210_migrate_extension_properties.py | 25 - .../bug_1802387_langpack_defines.py | 43 - 6 files changed, 2411 deletions(-) delete mode 100644 python/l10n/tb_fluent_migrations/bug_1567070_aboutrights.py delete mode 100644 python/l10n/tb_fluent_migrations/bug_1615501_preferences.py delete mode 100644 python/l10n/tb_fluent_migrations/bug_1615501_preferences_calendar.py delete mode 100644 python/l10n/tb_fluent_migrations/bug_1615501_preferences_subdialogs.py delete mode 100644 python/l10n/tb_fluent_migrations/bug_1733210_migrate_extension_properties.py delete mode 100644 python/l10n/tb_fluent_migrations/bug_1802387_langpack_defines.py diff --git a/python/l10n/tb_fluent_migrations/bug_1567070_aboutrights.py b/python/l10n/tb_fluent_migrations/bug_1567070_aboutrights.py deleted file mode 100644 index b1757994d5..0000000000 --- a/python/l10n/tb_fluent_migrations/bug_1567070_aboutrights.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf8 - -# Any copyright is dedicated to the Public Domain. -# http://creativecommons.org/publicdomain/zero/1.0/ - -from __future__ import absolute_import -import fluent.syntax.ast as FTL -from fluent.migrate.helpers import transforms_from - - -def migrate(ctx): - """Bug 1567070 - Migrate about:rights to Fluent in Thunderbird, part {index}.""" - - ctx.add_transforms( - "mail/messenger/aboutRights.ftl", - "mail/messenger/aboutRights.ftl", - transforms_from( - """ -rights-title = {COPY_PATTERN(from_path, "rights-title")} - -rights-intro = {COPY_PATTERN(from_path, "rights-intro")} - -rights-intro-point-1 = {COPY_PATTERN(from_path, "rights-intro-point-1")} - -rights-intro-point-3 = {COPY_PATTERN(from_path, "rights-intro-point-3")} - -rights-intro-point-4 = {COPY_PATTERN(from_path, "rights-intro-point-4")} - -rights-intro-point-4-unbranded = {COPY_PATTERN(from_path, "rights-intro-point-4-unbranded ")} - -rights-intro-point-5 = {COPY_PATTERN(from_path, "rights-intro-point-5")} - -rights-intro-point-5-unbranded = {COPY_PATTERN(from_path, "rights-intro-point-5-unbranded")} - -rights-intro-point-6 = {COPY_PATTERN(from_path, "rights-intro-point-6")} - -rights-webservices-header = {COPY_PATTERN(from_path, "rights-webservices-header")} - -rights-webservices = {COPY_PATTERN(from_path, "rights-webservices")} - -rights-locationawarebrowsing = {COPY_PATTERN(from_path, "rights-locationawarebrowsing")} - -rights-locationawarebrowsing-term-1 = {COPY_PATTERN(from_path, "rights-locationawarebrowsing-term-1")} - -rights-locationawarebrowsing-term-2 = {COPY_PATTERN(from_path, "rights-locationawarebrowsing-term-2")} - -rights-locationawarebrowsing-term-3 = {COPY_PATTERN(from_path, "rights-locationawarebrowsing-term-3")} - -rights-locationawarebrowsing-term-4 = {COPY_PATTERN(from_path, "rights-locationawarebrowsing-term-4")} - -rights-webservices-unbranded = {COPY_PATTERN(from_path, "rights-webservices-unbranded")} - -rights-webservices-term-unbranded = {COPY_PATTERN(from_path, "rights-webservices-term-unbranded")} - -rights-webservices-term-1 = {COPY_PATTERN(from_path, "rights-webservices-term-1")} - -rights-webservices-term-2 = {COPY_PATTERN(from_path, "rights-webservices-term-2")} - -rights-webservices-term-3 = {COPY_PATTERN(from_path, "rights-webservices-term-3")} - -rights-webservices-term-4 = {COPY_PATTERN(from_path, "rights-webservices-term-4")} - -rights-webservices-term-5 = {COPY_PATTERN(from_path, "rights-webservices-term-5")} - -rights-webservices-term-6 = {COPY_PATTERN(from_path, "rights-webservices-term-6")} - -rights-webservices-term-7 = {COPY_PATTERN(from_path, "rights-webservices-term-7")} - -""", - from_path="toolkit/toolkit/about/aboutRights.ftl", - ), - ) - - -""" -rights-intro-point-2 = ### this needs s/Firefox/Thunderbird - -rights-safebrowsing = ### No safebrowsing in tb. -rights-safebrowsing-term-1 = ### No safebrowsing in tb. -rights-safebrowsing-term-2 = ### No safebrowsing in tb. -rights-safebrowsing-term-3 = ### No safebrowsing in tb. -enableSafeBrowsing-label = ### No safebrowsing in tb. -rights-safebrowsing-term-4 = ### No safebrowsing in tb. -""" diff --git a/python/l10n/tb_fluent_migrations/bug_1615501_preferences.py b/python/l10n/tb_fluent_migrations/bug_1615501_preferences.py deleted file mode 100644 index 56007dc884..0000000000 --- a/python/l10n/tb_fluent_migrations/bug_1615501_preferences.py +++ /dev/null @@ -1,1050 +0,0 @@ -# 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 import CONCAT, REPLACE -from fluent.migrate.helpers import COPY, TERM_REFERENCE, MESSAGE_REFERENCE - - -def migrate(ctx): - """Bug 1615501 - Fluent migration recipe for Preferences Tab, part {index}.""" - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -close-button = - .aria-label = { COPY(from_path, "preferencesCloseButton.label") } -preferences-title = - .title = { PLATFORM() -> - [windows] { COPY(from_path, "prefWindow.titleWin") } - *[other] { COPY(from_path, "prefWindow.titleMAC") } - } -pane-compose-title = { COPY(from_path, "paneComposition.title") } -category-compose = - .tooltiptext = { COPY(from_path, "paneComposition.title") } -pane-privacy-title = { COPY(from_path, "panePrivacySecurity.title") } -category-privacy = - .tooltiptext = { COPY(from_path, "panePrivacySecurity.title") } -pane-chat-title = { COPY(from_path, "paneChat.title") } -category-chat = - .tooltiptext = { COPY(from_path, "paneChat.title") } -addons-button = { COPY(from_path, "addonsButton.label") } -""", - from_path="mail/chrome/messenger/preferences/preferences.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -pane-calendar-title = { COPY(from_path, "lightning.preferencesLabel") } -category-calendar = - .tooltiptext = { COPY(from_path, "lightning.preferencesLabel") } -""", - from_path="calendar/chrome/lightning/lightning.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -location-label = - .value = { COPY(from_path, "location.label") } - .accesskey = { COPY(from_path, "location1.accesskey") } -restore-default-label = - .label = { COPY(from_path, "useDefault.label") } - .accesskey = { COPY(from_path, "useDefault.accesskey") } - -default-search-engine = { COPY(from_path, "defaultSearchEngine.label") } -add-search-engine = - .label = { COPY(from_path, "addSearchEngine.label") } - .accesskey = { COPY(from_path, "addSearchEngine.accesskey") } -remove-search-engine = - .label = { COPY(from_path, "removeSearchEngine.label") } - .accesskey = { COPY(from_path, "removeSearchEngine.accesskey") } - -new-message-arrival = { COPY(from_path, "newMessagesArrive.label") } - -change-dock-icon = { COPY(from_path, "changeDockIconOptions.label") } -app-icon-options = - .label = { COPY(from_path, "dockOptions.label") } - .accesskey = { COPY(from_path, "dockOptions.accesskey") } - -notification-settings = { COPY(from_path, "notificationAlertSettings2.label") } - -animated-alert-label = - .label = { COPY(from_path, "showAnimatedAlert.label") } - .accesskey = { COPY(from_path, "showAnimatedAlert.accesskey") } -customize-alert-label = - .label = { COPY(from_path, "customizeMailAlert.label") } - .accesskey = { COPY(from_path, "customizeMailAlert.accesskey") } - -tray-icon-label = - .label = { COPY(from_path, "showTrayIcon.label") } - .accesskey = { COPY(from_path, "showTrayIcon.accesskey") } - -mail-play-sound-label = - .label = { PLATFORM() -> - [macos] { COPY(from_path, "playSoundMac.label") } - *[other] { COPY(from_path, "playSound.label") } - } - .accesskey = { PLATFORM() -> - [macos] { COPY(from_path, "playSoundMac.accesskey") } - *[other] { COPY(from_path, "playSound1.accesskey") } - } - -mail-play-button = - .label = { COPY(from_path, "play.label") } - .accesskey = { COPY(from_path, "play.accesskey") } - -mail-system-sound-label = - .label = { COPY(from_path, "systemSound.label") } - .accesskey = { COPY(from_path, "systemSound.accesskey") } - -mail-custom-sound-label = - .label = { COPY(from_path, "customsound.label") } - .accesskey = { COPY(from_path, "customsound.accesskey") } - -mail-browse-sound-button = - .label = { COPY(from_path, "browse.label") } - .accesskey = { COPY(from_path, "browse.accesskey") } - -""", - from_path="mail/chrome/messenger/preferences/general.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - [ - FTL.Message( - id=FTL.Identifier("general-legend"), - value=REPLACE( - "mail/chrome/messenger/preferences/general.dtd", - "messengerStartPage.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("start-page-label"), - attributes=[ - FTL.Attribute( - id=FTL.Identifier("label"), - value=REPLACE( - "mail/chrome/messenger/preferences/general.dtd", - "enableStartPage.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Attribute( - id=FTL.Identifier("accesskey"), - value=COPY( - "mail/chrome/messenger/preferences/general.dtd", - "enableStartPage.accesskey", - ), - ), - ], - ), - FTL.Message( - id=FTL.Identifier("minimize-to-tray-label"), - attributes=[ - FTL.Attribute( - id=FTL.Identifier("label"), - value=REPLACE( - "mail/chrome/messenger/preferences/general.dtd", - "minimizeToTray.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Attribute( - id=FTL.Identifier("accesskey"), - value=COPY( - "mail/chrome/messenger/preferences/general.dtd", - "minimizeToTray.accesskey", - ), - ), - ], - ), - ], - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -enable-gloda-search-label = - .label = { COPY(from_path, "enableGlodaSearch.label") } - .accesskey = { COPY(from_path, "enableGlodaSearch.accesskey") } - -datetime-formatting-legend = { COPY(from_path, "dateTimeFormatting.label") } -language-selector-legend = { COPY(from_path, "languageSelector.label") } - -allow-hw-accel = - .label = { COPY(from_path, "allowHWAccel.label") } - .accesskey = { COPY(from_path, "allowHWAccel.accesskey") } - -store-type-label = - .value = { COPY(from_path, "storeType.label") } - .accesskey = { COPY(from_path, "storeType.accesskey") } - -mbox-store-label = - .label = { COPY(from_path, "mboxStore2.label") } -maildir-store-label = - .label = { COPY(from_path, "maildirStore.label") } - -scrolling-legend = { COPY(from_path, "scrolling.label") } -autoscroll-label = - .label = { COPY(from_path, "useAutoScroll.label") } - .accesskey = { COPY(from_path, "useAutoScroll.accesskey") } -smooth-scrolling-label = - .label = { COPY(from_path, "useSmoothScrolling.label") } - .accesskey = { COPY(from_path, "useSmoothScrolling.accesskey") } - -system-integration-legend = { COPY(from_path, "systemIntegration.label") } -check-default-button = - .label = { COPY(from_path, "checkDefaultsNow.label") } - .accesskey = { COPY(from_path, "checkDefaultsNow.accesskey") } - -search-engine-name = { PLATFORM() -> - [macos] { COPY("mail/chrome/messenger/searchIntegrationMac.dtd", "searchIntegration.engineName") } - [windows] { COPY("mail/chrome/messenger/searchIntegrationWin.dtd", "searchIntegration.engineName") } - *[other] { COPY("mail/chrome/messenger/searchIntegrationDefault.dtd", "searchIntegration.engineName") } -} - -config-editor-button = - .label = { COPY(from_path, "configEdit.label") } - .accesskey = { COPY(from_path, "configEdit.accesskey") } - -return-receipts-button = - .label = { COPY(from_path, "showReturnReceipts.label") } - .accesskey = { COPY(from_path, "showReturnReceipts.accesskey") } - -automatic-updates-label = - .label = { COPY(from_path, "updateAuto.label") } - .accesskey = { COPY(from_path, "updateAuto.accesskey") } - -check-updates-label = - .label = { COPY(from_path, "updateCheck.label") } - .accesskey = { COPY(from_path, "updateCheck.accesskey") } - -update-history-button = - .label = { COPY(from_path, "updateHistory.label") } - .accesskey = { COPY(from_path, "updateHistory.accesskey") } - -use-service = - .label = { COPY(from_path, "useService.label") } - .accesskey = { COPY(from_path, "useService.accesskey") } - -network-settings-button = - .label = { COPY(from_path, "showSettings.label") } - .accesskey = { COPY(from_path, "showSettings.accesskey") } - -networking-legend = { COPY(from_path, "connectionsInfo.caption") } -offline-legend = { COPY(from_path, "offlineInfo.caption") } -offline-settings = { COPY(from_path, "offlineInfo.label") } - -offline-settings-button = - .label = { COPY(from_path, "showOffline.label") } - .accesskey = { COPY(from_path, "showOffline.accesskey") } - -diskspace-legend = { COPY(from_path, "Diskspace") } - -offline-compact-folder = - .label = { COPY(from_path, "offlineCompactFolders.label") } - .accesskey = { COPY(from_path, "offlineCompactFolders.accesskey") } - -compact-folder-size = - .value = { COPY(from_path, "offlineCompactFoldersMB.label") } - -use-cache-before = - .value = { COPY(from_path, "useCacheBefore.label") } - .accesskey = { COPY(from_path, "useCacheBefore.accesskey") } - -use-cache-after = { COPY(from_path, "useCacheAfter.label") } - -smart-cache-label = - .label = { COPY(from_path, "overrideSmartCacheSize.label") } - .accesskey = { COPY(from_path, "overrideSmartCacheSize.accesskey") } - -clear-cache-button = - .label = { COPY(from_path, "clearCacheNow.label") } - .accesskey = { COPY(from_path, "clearCacheNow.accesskey") } - -update-app-version = { COPY(from_path, "updateApp.version.pre") }{ $version }{ COPY(from_path, "updateApp.version.post") } -""", - from_path="mail/chrome/messenger/preferences/advanced.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - [ - FTL.Message( - id=FTL.Identifier("return-receipts-description"), - value=REPLACE( - "mail/chrome/messenger/preferences/advanced.dtd", - "returnReceiptsInfo.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("update-app-legend"), - value=REPLACE( - "mail/chrome/messenger/preferences/advanced.dtd", - "updateApp2.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("allow-description"), - value=REPLACE( - "mail/chrome/messenger/preferences/advanced.dtd", - "updateAppAllow.description", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("cross-user-udpate-warning"), - value=REPLACE( - "mail/chrome/messenger/preferences/advanced.dtd", - "updateCrossUserSettingWarning.description", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("proxy-config-description"), - value=REPLACE( - "mail/chrome/messenger/preferences/advanced.dtd", - "proxiesConfigure.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("always-check-default"), - attributes=[ - FTL.Attribute( - id=FTL.Identifier("label"), - value=REPLACE( - "mail/chrome/messenger/preferences/advanced.dtd", - "alwaysCheckDefault.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Attribute( - id=FTL.Identifier("accesskey"), - value=COPY( - "mail/chrome/messenger/preferences/advanced.dtd", - "alwaysCheckDefault.accesskey", - ), - ), - ], - ), - FTL.Message( - id=FTL.Identifier("search-integration-label"), - attributes=[ - FTL.Attribute( - id=FTL.Identifier("label"), - value=REPLACE( - "mail/chrome/messenger/preferences/advanced.dtd", - "searchIntegration.label", - { - "&searchIntegration.engineName;": MESSAGE_REFERENCE( - "search-engine-name" - ) - }, - ), - ), - FTL.Attribute( - id=FTL.Identifier("accesskey"), - value=COPY( - "mail/chrome/messenger/preferences/advanced.dtd", - "searchIntegration.accesskey", - ), - ), - ], - ), - ], - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -focus-search-shortcut = - .key = { COPY(from_path, "focusSearch1.key") } -focus-search-shortcut-alt = - .key = { COPY(from_path, "focusSearch2.key") } - -search-input = - .placeholder = { COPY(from_path, "filter.placeholder") } - -type-column-label = - .label = { COPY(from_path, "typeColumn.label") } - .accesskey = { COPY(from_path, "typeColumn.accesskey") } - -action-column-label = - .label = { COPY(from_path, "actionColumn2.label") } - .accesskey = { COPY(from_path, "actionColumn2.accesskey") } - -save-to-label = - .label = { COPY(from_path, "saveTo.label") } - .accesskey = { COPY(from_path, "saveTo.accesskey") } - -choose-folder-label = - .label = { PLATFORM() -> - [macos] { COPY(from_path, "chooseFolderMac.label") } - *[other] { COPY(from_path, "chooseFolderWin.label") } - } - .accesskey = { PLATFORM() -> - [macos] { COPY(from_path, "chooseFolderMac.accesskey") } - *[other] { COPY(from_path, "chooseFolderWin.accesskey") } - } - -always-ask-label = - .label = { COPY(from_path, "alwaysAsk.label") } - .accesskey = { COPY(from_path, "alwaysAsk.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/applications.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -fonts-legend = { COPY(from_path, "fontsAndColors1.label") } - -default-font-label = - .value = { COPY(from_path, "defaultFont.label") } - .accesskey = { COPY(from_path, "defaultFont.accesskey") } - -default-size-label = - .value = { COPY(from_path, "defaultSize.label") } - .accesskey = { COPY(from_path, "defaultSize.accesskey") } - -font-options-button = - .label = { COPY(from_path, "fontOptions.label") } - .accesskey = { COPY(from_path, "fontOptions.accesskey") } - -color-options-button = - .label = { COPY(from_path, "colorButton.label") } - .accesskey = { COPY(from_path, "colorButton.accesskey") } - -display-width-legend = { COPY(from_path, "displayWidth.label") } - -convert-emoticons-label = - .label = { COPY(from_path, "convertEmoticons.label") } - .accesskey = { COPY(from_path, "convertEmoticons.accesskey") } - -display-text-label = { COPY(from_path, "displayText.label") } - -style-label = - .value = { COPY(from_path, "style.label") } - .accesskey = { COPY(from_path, "style.accesskey") } - -regular-style-item = - .label = { COPY(from_path, "regularStyle.label") } -bold-style-item = - .label = { COPY(from_path, "bold.label") } -italic-style-item = - .label = { COPY(from_path, "italic.label") } -bold-italic-style-item = - .label = { COPY(from_path, "boldItalic.label") } - -size-label = - .value = { COPY(from_path, "size.label") } - .accesskey = { COPY(from_path, "size.accesskey") } - -regular-size-item = - .label = { COPY(from_path, "regularSize.label") } -bigger-size-item = - .label = { COPY(from_path, "bigger.label") } -smaller-size-item = - .label = { COPY(from_path, "smaller.label") } - -quoted-text-color = - .label = { COPY(from_path, "quotedTextColor.label") } - .accesskey = { COPY(from_path, "quotedTextColor.accesskey") } - -display-tags-text = { COPY(from_path, "displayTagsText.label") } - -new-tag-button = - .label = { COPY(from_path, "newTagButton.label") } - .accesskey = { COPY(from_path, "newTagButton.accesskey") } - -edit-tag-button = - .label = { COPY(from_path, "editTagButton1.label") } - .accesskey = { COPY(from_path, "editTagButton1.accesskey") } - -delete-tag-button = - .label = { COPY(from_path, "removeTagButton.label") } - .accesskey = { COPY(from_path, "removeTagButton.accesskey") } - -auto-mark-as-read = - .label = { COPY(from_path, "autoMarkAsRead.label") } - .accesskey = { COPY(from_path, "autoMarkAsRead.accesskey") } - -mark-read-no-delay = - .label = { COPY(from_path, "markAsReadNoDelay.label") } - .accesskey = { COPY(from_path, "markAsReadNoDelay.accesskey") } - -mark-read-delay = - .label = { COPY(from_path, "markAsReadDelay.label") } - .accesskey = { COPY(from_path, "markAsReadDelay.accesskey") } - -seconds-label = { COPY(from_path, "secondsLabel.label") } - -open-msg-label = - .value = { COPY(from_path, "openMsgIn.label") } - -open-msg-tab = - .label = { COPY(from_path, "openMsgInNewTab.label") } - .accesskey = { COPY(from_path, "openMsgInNewTab.accesskey") } - -open-msg-window = - .label = { COPY(from_path, "reuseExpRadio0.label") } - .accesskey = { COPY(from_path, "reuseExpRadio0.accesskey") } - -open-msg-ex-window = - .label = { COPY(from_path, "reuseExpRadio1.label") } - .accesskey = { COPY(from_path, "reuseExpRadio1.accesskey") } - -close-move-delete = - .label = { COPY(from_path, "closeMsgOnMoveOrDelete.label") } - .accesskey = { COPY(from_path, "closeMsgOnMoveOrDelete.accesskey") } - -display-name-label = - .value = { COPY(from_path, "displayName.label") } - -condensed-addresses-label = - .label = { COPY(from_path, "showCondensedAddresses.label") } - .accesskey = { COPY(from_path, "showCondensedAddresses.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/display.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - [ - FTL.Message( - id=FTL.Identifier("return-receipts-description"), - value=REPLACE( - "mail/chrome/messenger/preferences/advanced.dtd", - "returnReceiptsInfo.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("always-check-default"), - attributes=[ - FTL.Attribute( - id=FTL.Identifier("label"), - value=REPLACE( - "mail/chrome/messenger/preferences/advanced.dtd", - "alwaysCheckDefault.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Attribute( - id=FTL.Identifier("accesskey"), - value=COPY( - "mail/chrome/messenger/preferences/advanced.dtd", - "alwaysCheckDefault.accesskey", - ), - ), - ], - ), - ], - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -forward-label = - .value = { COPY(from_path, "forwardMsg.label") } - .accesskey = { COPY(from_path, "forwardMsg.accesskey") } - -inline-label = - .label = { COPY(from_path, "inline.label") } - -as-attachment-label = - .label = { COPY(from_path, "asAttachment.label") } - -extension-label = - .label = { COPY(from_path, "addExtension.label") } - .accesskey = { COPY(from_path, "addExtension.accesskey") } - -auto-save-label = - .label = { COPY(from_path, "autoSave.label") } - .accesskey = { COPY(from_path, "autoSave.accesskey") } - -auto-save-end = { COPY(from_path, "autoSaveEnd.label") } - -warn-on-send-accel-key = - .label = { COPY(from_path, "warnOnSendAccelKey.label") } - .accesskey = { COPY(from_path, "warnOnSendAccelKey.accesskey") } - -spellcheck-label = - .label = { COPY(from_path, "spellCheck.label") } - .accesskey = { COPY(from_path, "spellCheck.accesskey") } - -spellcheck-inline-label = - .label = { COPY(from_path, "spellCheckInline.label") } - .accesskey = { COPY(from_path, "spellCheckInline1.accesskey") } - -language-popup-label = - .value = { COPY(from_path, "languagePopup.label") } - .accesskey = { COPY(from_path, "languagePopup.accessKey") } - -download-dictionaries-link = { COPY(from_path, "downloadDictionaries.label") } - -font-label = - .value = { COPY(from_path, "font.label") } - .accesskey = { COPY(from_path, "font.accesskey") } - -font-size-label = - .value = { COPY(from_path, "fontSize.label") } - .accesskey = { COPY(from_path, "fontSize.accesskey") } - -default-colors-label = - .label = { COPY(from_path, "useReaderDefaults.label") } - .accesskey = { COPY(from_path, "useReaderDefaults.accesskey") } - -font-color-label = - .value = { COPY(from_path, "fontColor.label") } - .accesskey = { COPY(from_path, "fontColor.accesskey") } - -bg-color-label = - .value = { COPY(from_path, "bgColor.label") } - .accesskey = { COPY(from_path, "bgColor.accesskey") } - -restore-html-label = - .label = { COPY(from_path, "restoreHTMLDefaults.label") } - .accesskey = { COPY(from_path, "restoreHTMLDefaults.accesskey") } - -default-format-label = - .label = { COPY(from_path, "defaultToParagraph.label") } - .accesskey = { COPY(from_path, "defaultToParagraph.accesskey") } - -format-description = { COPY(from_path, "sendOptionsDescription.label") } - -send-options-label = - .label = { COPY(from_path, "sendOptions.label") } - .accesskey = { COPY(from_path, "sendOptions.accesskey") } - -autocomplete-description = { COPY(from_path, "autocompleteText.label") } - -ab-label = - .label = { COPY(from_path, "addressingEnable.label") } - .accesskey = { COPY(from_path, "addressingEnable.accesskey") } - -directories-label = - .label = { COPY(from_path, "directories.label") } - .accesskey = { COPY(from_path, "directories.accesskey") } - -directories-none-label = - .none = { COPY(from_path, "directoriesNone.label") } - -edit-directories-label = - .label = { COPY(from_path, "editDirectories.label") } - .accesskey = { COPY(from_path, "editDirectories.accesskey") } - -email-picker-label = - .label = { COPY(from_path, "emailCollectionPicker.label") } - .accesskey = { COPY(from_path, "emailCollectionPicker.accesskey") } - -default-directory-label = - .value = { COPY(from_path, "showAsDefault.label") } - .accesskey = { COPY(from_path, "showAsDefault.accesskey") } - -default-last-label = - .none = { COPY(from_path, "showAsDefaultLast.label") } - -attachment-label = - .label = { COPY(from_path, "attachmentReminder.label") } - .accesskey = { COPY(from_path, "attachmentReminder.accesskey") } - -attachment-options-label = - .label = { COPY(from_path, "attachmentReminderOptions.label") } - .accesskey = { COPY(from_path, "attachmentReminderOptions.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/compose.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -enable-cloud-share = - .label = { COPY(from_path, "enableCloudFileAccountOffer.label") } -cloud-share-size = - .value = { COPY(from_path, "enableCloudFileAccountOffer.mb") } - -add-cloud-account = - .label = { COPY(from_path, "addCloudFileAccount1.label") } - .accesskey = { COPY(from_path, "addCloudFileAccount1.accesskey") } - .defaultlabel = { COPY(from_path, "addCloudFileAccount1.label") } - -remove-cloud-account = - .label = { COPY(from_path, "removeCloudFileAccount.label") } - .accesskey = { COPY(from_path, "removeCloudFileAccount.accesskey") } - -find-cloud-providers = - .value = { COPY(from_path, "findCloudFileProviders.label") } - -cloud-account-description = { COPY(from_path, "addCloudFileAccount.description") } -""", - from_path="mail/chrome/messenger/preferences/applications.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -mail-content = { COPY(from_path, "captionMailContent.label") } - -remote-content-label = - .label = { COPY(from_path, "acceptRemoteContent.label") } - .accesskey = { COPY(from_path, "acceptRemoteContent.accesskey") } - -exceptions-button = - .label = { COPY(from_path, "remoteContentExceptions.label") } - .accesskey = { COPY(from_path, "cookieExceptions.accesskey") } - -remote-content-info = - .value = { COPY(from_path, "acceptRemoteContentInfo.label") } - -web-content = { COPY(from_path, "captionWebContent.label") } - -history-label = - .label = { COPY(from_path, "keepHistory.label") } - .accesskey = { COPY(from_path, "keepHistory.accesskey") } - -cookies-label = - .label = { COPY(from_path, "acceptCookies.label") } - .accesskey = { COPY(from_path, "acceptCookies.accesskey") } - -third-party-label = - .value = { COPY(from_path, "acceptThirdParty.pre.label") } - .accesskey = { COPY(from_path, "acceptThirdParty.pre.accesskey") } - -third-party-always = - .label = { COPY(from_path, "acceptThirdParty.always.label") } -third-party-never = - .label = { COPY(from_path, "acceptThirdParty.never.label") } -third-party-visited = - .label = { COPY(from_path, "acceptThirdParty.visited.label") } - -keep-label = - .value = { COPY(from_path, "keepUntil.label") } - .accesskey = { COPY(from_path, "keepUntil.accesskey") } - -keep-expire = - .label = { COPY(from_path, "expire.label") } -keep-ask = - .label = { COPY(from_path, "askEachTime.label") } - -cookies-button = - .label = { COPY(from_path, "showCookies.label") } - .accesskey = { COPY(from_path, "showCookies.accesskey") } - -do-not-track-label = - .label = { COPY(from_path, "doNotTrackCheck.label") } - .accesskey = { COPY(from_path, "doNotTrackCheck.accesskey") } - -learn-button = - .label = { COPY(from_path, "doNotTrackLearnMore.label") } -""", - from_path="mail/chrome/messenger/preferences/privacy.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - [ - FTL.Message( - id=FTL.Identifier("keep-close"), - attributes=[ - FTL.Attribute( - id=FTL.Identifier("label"), - value=REPLACE( - "mail/chrome/messenger/preferences/privacy.dtd", - "close.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - ], - ), - ], - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -passwords-button = - .label = { COPY(from_path, "savedPasswords.label") } - .accesskey = { COPY(from_path, "savedPasswords.accesskey") } - -master-password-description = { COPY(from_path, "masterPassword.intro") } - -master-password-label = - .label = { COPY(from_path, "useMasterPassword.label") } - .accesskey = { COPY(from_path, "useMasterPassword.accesskey") } - -master-password-button = - .label = { COPY(from_path, "changeMasterPassword.label") } - .accesskey = { COPY(from_path, "changeMasterPassword.accesskey") } - -junk-description = { COPY(from_path, "junkMail.intro") } - -junk-label = - .label = { COPY(from_path, "manualMark.label") } - .accesskey = { COPY(from_path, "manualMark.accesskey") } - -junk-move-label = - .label = { COPY(from_path, "manualMarkModeMove.label") } - .accesskey = { COPY(from_path, "manualMarkModeMove.accesskey") } - -junk-delete-label = - .label = { COPY(from_path, "manualMarkModeDelete.label") } - .accesskey = { COPY(from_path, "manualMarkModeDelete.accesskey") } - -junk-read-label = - .label = { COPY(from_path, "markAsReadOnSpam.label") } - .accesskey = { COPY(from_path, "markAsReadOnSpam.accesskey") } - -junk-log-label = - .label = { COPY(from_path, "enableAdaptiveJunkLogging.label") } - .accesskey = { COPY(from_path, "enableAdaptiveJunkLogging.accesskey") } - -junk-log-button = - .label = { COPY(from_path, "openJunkLog.label") } - .accesskey = { COPY(from_path, "openJunkLog.accesskey") } - -reset-junk-button = - .label = { COPY(from_path, "resetTrainingData.label") } - .accesskey = { COPY(from_path, "resetTrainingData.accesskey") } - -phishing-label = - .label = { COPY(from_path, "enablePhishingDetector1.label") } - .accesskey = { COPY(from_path, "enablePhishingDetector1.accesskey") } - -antivirus-label = - .label = { COPY(from_path, "antiVirus.label") } - .accesskey = { COPY(from_path, "antiVirus.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/security.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - [ - FTL.Message( - id=FTL.Identifier("passwords-description"), - value=REPLACE( - "mail/chrome/messenger/preferences/security.dtd", - "savedPasswords.intro", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("phishing-description"), - value=REPLACE( - "mail/chrome/messenger/preferences/security.dtd", - "phishingDetector1.intro", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("antivirus-description"), - value=REPLACE( - "mail/chrome/messenger/preferences/security.dtd", - "antiVirus.intro", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - ], - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -certificate-description = { COPY(from_path, "certSelection.description") } - -certificate-auto = - .label = { COPY(from_path, "certs.auto") } - .accesskey = { COPY(from_path, "certs.auto.accesskey") } - -certificate-ask = - .label = { COPY(from_path, "certs.ask") } - .accesskey = { COPY(from_path, "certs.ask.accesskey") } - -ocsp-label = - .label = { COPY(from_path, "enableOCSP.label") } - .accesskey = { COPY(from_path, "enableOCSP.accesskey") } - -certificate-button = - .label = { COPY(from_path, "manageCertificates2.label") } - .accesskey = { COPY(from_path, "manageCertificates2.accesskey") } - -security-devices-button = - .label = { COPY(from_path, "viewSecurityDevices2.label") } - .accesskey = { COPY(from_path, "viewSecurityDevices2.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/advanced.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - transforms_from( - """ -offline-label = - .label = { COPY(from_path, "startupOffline.label") } - -auto-connect-label = - .label = { COPY(from_path, "startupConnectAuto.label") } - -idle-label = - .label = { COPY(from_path, "reportIdleAfter.label") } - .accesskey = { COPY(from_path, "reportIdleAfter.accesskey") } - -idle-time-label = { COPY(from_path, "idleTime") } - -away-message-label = - .label = { COPY(from_path, "andSetStatusToAway.label") } - .accesskey = { COPY(from_path, "andSetStatusToAway.accesskey") } - -send-typing-label = - .label = { COPY(from_path, "sendTyping.label") } - .accesskey = { COPY(from_path, "sendTyping.accesskey") } - -notification-label = { COPY(from_path, "chatNotifications.label") } - -show-notification-label = - .label = { COPY(from_path, "desktopChatNotifications.label") } - .accesskey = { COPY(from_path, "desktopChatNotifications.accesskey") } - -notification-all = - .label = { COPY(from_path, "completeNotification.label") } -notification-name = - .label = { COPY(from_path, "buddyInfoOnly.label") } -notification-empty = - .label = { COPY(from_path, "dummyNotification.label") } - -notification-type-label = - .label = { PLATFORM() -> - [macos] { COPY(from_path, "getAttentionMac.label") } - *[other] { COPY(from_path, "getAttention.label") } - } - .accesskey = { PLATFORM() -> - [macos] { COPY(from_path, "getAttentionMac.accesskey") } - *[other] { COPY(from_path, "getAttention.accesskey") } - } - -chat-play-sound-label = - .label = { COPY(from_path, "chatSound.label") } - .accesskey = { COPY(from_path, "chatSound.accesskey") } - -chat-play-button = - .label = { COPY(from_path, "play.label") } - .accesskey = { COPY(from_path, "play.accesskey") } - -chat-system-sound-label = - .label = { COPY(from_path, "systemSound.label") } - .accesskey = { COPY(from_path, "systemSound.accesskey") } - -chat-custom-sound-label = - .label = { COPY(from_path, "customsound.label") } - .accesskey = { COPY(from_path, "customsound.accesskey") } - -chat-browse-sound-button = - .label = { COPY(from_path, "browse.label") } - .accesskey = { COPY(from_path, "browse.accesskey") } - -theme-label = - .value = { COPY(from_path, "messageStyleTheme.label") } - .accesskey = { COPY(from_path, "messageStyleTheme.accesskey") } - -style-thunderbird = - .label = { COPY(from_path, "messageStyleThunderbirdTheme.label") } -style-bubbles = - .label = { COPY(from_path, "messageStyleBubblesTheme.label") } -style-dark = - .label = { COPY(from_path, "messageStyleDarkTheme.label") } -style-paper = - .label = { COPY(from_path, "messageStylePaperSheetsTheme.label") } -style-simple = - .label = { COPY(from_path, "messageStyleSimpleTheme.label") } - -preview-label = { COPY(from_path, "messageStylePreview.label") } -no-preview-label = { COPY(from_path, "messageStyleNoPreview.title") } -no-preview-description = { COPY(from_path, "messageStyleNoPreview.description") } - -chat-variant-label = - .value = { COPY(from_path, "messageStyleVariant.label") } - .accesskey = { COPY(from_path, "messageStyleVariant.accesskey") } - -chat-header-label = - .label = { COPY(from_path, "messageStyleShowHeader.label") } - .accesskey = { COPY(from_path, "messageStyleShowHeader.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/chat.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/preferences.ftl", - "mail/messenger/preferences/preferences.ftl", - [ - FTL.Message( - id=FTL.Identifier("startup-label"), - attributes=[ - FTL.Attribute( - id=FTL.Identifier("value"), - value=REPLACE( - "mail/chrome/messenger/preferences/chat.dtd", - "startupAction.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Attribute( - id=FTL.Identifier("accesskey"), - value=COPY( - "mail/chrome/messenger/preferences/chat.dtd", - "startupAction.accesskey", - ), - ), - ], - ), - ], - ) diff --git a/python/l10n/tb_fluent_migrations/bug_1615501_preferences_calendar.py b/python/l10n/tb_fluent_migrations/bug_1615501_preferences_calendar.py deleted file mode 100644 index 23ed9f4150..0000000000 --- a/python/l10n/tb_fluent_migrations/bug_1615501_preferences_calendar.py +++ /dev/null @@ -1,331 +0,0 @@ -# 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 import CONCAT, REPLACE -from fluent.migrate.helpers import COPY, TERM_REFERENCE - - -def migrate(ctx): - """Bug 1615501 - Fluent migration recipe for Preferences Calendar Tab, part {index}.""" - - ctx.add_transforms( - "calendar/calendar/preferences.ftl", - "calendar/calendar/preferences.ftl", - transforms_from( - """ -calendar-title = { COPY(from_path, "panelHeader.title") } -calendar-title-reminder = { COPY(from_path, "panelReminder.title") } -calendar-title-category = { COPY(from_path, "panelCategory.title") } -""", - from_path="calendar/chrome/calendar/preferences/preferences.dtd", - ), - ) - - ctx.add_transforms( - "calendar/calendar/preferences.ftl", - "calendar/calendar/preferences.ftl", - transforms_from( - """ -dateformat-label = - .value = { COPY(from_path, "pref.dateformat.label") } - .accesskey = { COPY(from_path, "pref.dateformat.accesskey") } - -# $date (String) - the formatted example date -dateformat-long = - .label = { COPY(from_path, "pref.dateformat.long") }: { $date } - -# $date (String) - the formatted example date -dateformat-short = - .label = { COPY(from_path, "pref.dateformat.short") }: { $date } - -timezone-label = - .value = { COPY(from_path, "pref.timezones.caption") }: - -todaypane-legend = { COPY(from_path, "pref.calendar.todaypane.agenda.caption") } - -soon-label = - .value = { COPY(from_path, "pref.soondays2.label") } - .accesskey = { COPY(from_path, "pref.soondays2.accesskey") } - -event-task-legend = { COPY(from_path, "pref.eventsandtasks.label") } - -default-length-label = - .value = { COPY(from_path, "pref.default_event_task_length.label") }: - .accesskey = { COPY(from_path, "pref.default_event_task_length.accesskey") } - -task-start-1-label = - .label = { COPY(from_path, "pref.default_task_none.label") } -task-start-2-label = - .label = { COPY(from_path, "pref.default_task_start_of_day.label") } -task-start-3-label = - .label = { COPY(from_path, "pref.default_task_end_of_day.label") } -task-start-4-label = - .label = { COPY(from_path, "pref.default_task_tomorrow.label") } -task-start-5-label = - .label = { COPY(from_path, "pref.default_task_next_week.label") } -task-start-6-label = - .label = { COPY(from_path, "pref.default_task_offset_current.label") } -task-start-7-label = - .label = { COPY(from_path, "pref.default_task_offset_start.label") } -task-start-8-label = - .label = { COPY(from_path, "pref.default_task_offset_next_hour.label") } - -edit-intab-label = - .label = { COPY(from_path, "pref.editInTab.label") } - .accesskey = { COPY(from_path, "pref.editInTab.accesskey") } - -accessibility-legend = { COPY(from_path, "pref.accessibility.label") } - -accessibility-colors-label = - .label = { COPY(from_path, "pref.systemcolors.label") } - .accesskey = { COPY(from_path, "pref.systemcolors.accesskey") } -""", - from_path="calendar/chrome/calendar/preferences/general.dtd", - ), - ) - - ctx.add_transforms( - "calendar/calendar/preferences.ftl", - "calendar/calendar/preferences.ftl", - transforms_from( - """ -weekstart-label = - .value = { COPY(from_path, "pref.weekstarts.label") } - .accesskey = { COPY(from_path, "pref.weekstarts.accesskey") } - -show-weeknumber-label = - .label = { COPY(from_path, "pref.calendar.view-minimonth.showweeknumber.label") } - .accesskey = { COPY(from_path, "pref.calendar.view-minimonth.showweeknumber.accesskey") } - -workdays-label = - .value = { COPY(from_path, "pref.workweekDays.label") } - -dayweek-legend = { COPY(from_path, "pref.calendar.view.dayandweekviews.caption") } - -visible-hours-label = - .value = { COPY(from_path, "pref.calendar.view.visiblehours.label") } - .accesskey = { COPY(from_path, "pref.calendar.view.visiblehours.accesskey") } - -visible-hours-end-label = - .value = { COPY(from_path, "pref.calendar.view.visiblehoursend.label") } - -day-start-label = - .value = { COPY(from_path, "pref.calendar.view.daystart.label") } - .accesskey = { COPY(from_path, "pref.calendar.view.daystart.accesskey") } - -day-end-label = - .value = { COPY(from_path, "pref.calendar.view.dayend.label") } - .accesskey = { COPY(from_path, "pref.calendar.view.dayend.accesskey") } - -location-checkbox = - .label = { COPY(from_path, "pref.showlocation.label") } - .accesskey = { COPY(from_path, "pref.showlocation.accesskey") } - -multiweek-legend = { COPY(from_path, "pref.calendar.view.multiweekview.caption") } - -number-of-weeks-label = - .value = { COPY(from_path, "pref.numberofweeks.label") } - .accesskey = { COPY(from_path, "pref.numberofweeks.accesskey") } - -week-0-label = - .label = { COPY(from_path, "pref.numberofweeks.0") } -week-1-label = - .label = { COPY(from_path, "pref.numberofweeks.1") } -week-2-label = - .label = { COPY(from_path, "pref.numberofweeks.2") } -week-3-label = - .label = { COPY(from_path, "pref.numberofweeks.3") } -week-4-label = - .label = { COPY(from_path, "pref.numberofweeks.4") } -week-5-label = - .label = { COPY(from_path, "pref.numberofweeks.5") } -week-6-label = - .label = { COPY(from_path, "pref.numberofweeks.6") } - -previous-weeks-label = - .value = { COPY(from_path, "pref.numberofpreviousweeks.label") } - .accesskey = { COPY(from_path, "pref.numberofpreviousweeks.accesskey") } -""", - from_path="calendar/chrome/calendar/preferences/views.dtd", - ), - ) - - ctx.add_transforms( - "calendar/calendar/preferences.ftl", - "calendar/calendar/preferences.ftl", - transforms_from( - """ -day-1-name = - .label = { COPY(from_path, "day.1.name") } -day-2-name = - .label = { COPY(from_path, "day.2.name") } -day-3-name = - .label = { COPY(from_path, "day.3.name") } -day-4-name = - .label = { COPY(from_path, "day.4.name") } -day-5-name = - .label = { COPY(from_path, "day.5.name") } -day-6-name = - .label = { COPY(from_path, "day.6.name") } -day-7-name = - .label = { COPY(from_path, "day.7.name") } - -day-1-checkbox = - .label = { COPY(from_path, "day.1.Ddd") } - .accesskey = { COPY(from_path, "day.1.Ddd.accesskey") } -day-2-checkbox = - .label = { COPY(from_path, "day.2.Ddd") } - .accesskey = { COPY(from_path, "day.2.Ddd.accesskey") } -day-3-checkbox = - .label = { COPY(from_path, "day.3.Ddd") } - .accesskey = { COPY(from_path, "day.3.Ddd.accesskey") } -day-4-checkbox = - .label = { COPY(from_path, "day.4.Ddd") } - .accesskey = { COPY(from_path, "day.4.Ddd.accesskey") } -day-5-checkbox = - .label = { COPY(from_path, "day.5.Ddd") } - .accesskey = { COPY(from_path, "day.5.Ddd.accesskey") } -day-6-checkbox = - .label = { COPY(from_path, "day.6.Ddd") } - .accesskey = { COPY(from_path, "day.6.Ddd.accesskey") } -day-7-checkbox = - .label = { COPY(from_path, "day.7.Ddd") } - .accesskey = { COPY(from_path, "day.7.Ddd.accesskey") } - -midnight-label = - .label = { COPY(from_path, "time.midnight") } -noon-label = - .label = { COPY(from_path, "time.noon") } -""", - from_path="calendar/chrome/calendar/global.dtd", - ), - ) - - ctx.add_transforms( - "calendar/calendar/preferences.ftl", - "calendar/calendar/preferences.ftl", - transforms_from( - """ -task-start-label = - .value = { COPY(from_path, "read.only.task.start.label") } - -task-due-label = - .value = { COPY(from_path, "read.only.task.due.label") } -""", - from_path="calendar/chrome/calendar/calendar-event-dialog.dtd", - ), - ) - - ctx.add_transforms( - "calendar/calendar/preferences.ftl", - "calendar/calendar/preferences.ftl", - transforms_from( - """ -reminder-legend = { COPY(from_path, "pref.alarmgoesoff.label") } - -reminder-play-checkbox = - .label = { COPY(from_path, "pref.playasound") } - .accesskey = { COPY(from_path, "pref.calendar.alarms.playsound.accessKey") } - -reminder-play-alarm-button = - .label = { COPY(from_path, "pref.calendar.alarms.sound.play.label") } - .accesskey = { COPY(from_path, "pref.calendar.alarms.sound.play.accessKey") } - -reminder-default-sound-label = - .label = { COPY(from_path, "pref.calendar.alarms.sound.useDefault.label") } - .accesskey = { COPY(from_path, "pref.calendar.alarms.sound.useDefault.accessKey") } - -reminder-custom-sound-label = - .label = { COPY(from_path, "pref.calendar.alarms.sound.useCustom.label") } - .accesskey = { COPY(from_path, "pref.calendar.alarms.sound.useCustom.accessKey") } - -reminder-browse-sound-label = - .label = { COPY(from_path, "pref.calendar.alarms.sound.browse.label") } - .accesskey = { COPY(from_path, "pref.calendar.alarms.sound.browse.accessKey") } - -reminder-dialog-label = - .label = { COPY(from_path, "pref.showalarmbox") } - .accesskey = { COPY(from_path, "pref.calendar.alarms.showAlarmBox.accessKey") } - -missed-reminder-label = - .label = { COPY(from_path, "pref.missedalarms2") } - .accesskey = { COPY(from_path, "pref.calendar.alarms.missedAlarms.accessKey") } - -reminder-default-legend = { COPY(from_path, "pref.calendar.alarms.defaults.label") } - -default-snooze-label = - .value = { COPY(from_path, "pref.defaultsnoozelength.label") } - .accesskey = { COPY(from_path, "pref.defaultsnoozelength.accesskey") } - -event-alarm-label = - .value = { COPY(from_path, "pref.defalarm4events.label") } - .accesskey = { COPY(from_path, "pref.defalarm4events.accesskey") } - -alarm-on-label = - .label = { COPY(from_path, "pref.alarm.on") } -alarm-off-label = - .label = { COPY(from_path, "pref.alarm.off") } - -task-alarm-label = - .value = { COPY(from_path, "pref.defalarm4todos.label") } - .accesskey = { COPY(from_path, "pref.defalarm4todos.accesskey") } - -event-alarm-time-label = - .value = { COPY(from_path, "pref.defalarmlen4events.label") } - .accesskey = { COPY(from_path, "pref.defalarmlen4events.accesskey") } - -task-alarm-time-label = - .value = { COPY(from_path, "pref.defalarmlen4todos.label") } - .accesskey = { COPY(from_path, "pref.defalarmlen4todos.accesskey") } -""", - from_path="calendar/chrome/calendar/preferences/alarms.dtd", - ), - ) - - ctx.add_transforms( - "calendar/calendar/preferences.ftl", - "calendar/calendar/preferences.ftl", - transforms_from( - """ -category-new-label = { COPY(from_path, "pref.categories.new.title") } - -category-edit-label = { COPY(from_path, "pref.categories.edit.title") } - -category-overwrite-title = { COPY(from_path, "pref.categories.overwrite.title") } -category-blank-warning = { COPY(from_path, "pref.categories.noBlankCategories") } -""", - from_path="calendar/chrome/calendar/preferences/categories.dtd", - ), - ) - - ctx.add_transforms( - "calendar/calendar/preferences.ftl", - "calendar/calendar/preferences.ftl", - [ - FTL.Message( - id=FTL.Identifier("category-overwrite"), - value=REPLACE( - "calendar/chrome/calendar/preferences/categories.dtd", - "pref.categories.overwrite", - {" \\n": FTL.TextElement("")}, - ), - ), - ], - ) - - ctx.add_transforms( - "calendar/calendar/category-dialog.ftl", - "calendar/calendar/category-dialog.ftl", - transforms_from( - """ -category-name-label = { COPY(from_path, "pref.categories.name.label") } - -category-color-label = - .label = { COPY(from_path, "pref.categories.usecolor.label") } -""", - from_path="calendar/chrome/calendar/preferences/categories.dtd", - ), - ) diff --git a/python/l10n/tb_fluent_migrations/bug_1615501_preferences_subdialogs.py b/python/l10n/tb_fluent_migrations/bug_1615501_preferences_subdialogs.py deleted file mode 100644 index bd5bf6a81f..0000000000 --- a/python/l10n/tb_fluent_migrations/bug_1615501_preferences_subdialogs.py +++ /dev/null @@ -1,878 +0,0 @@ -# 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 import CONCAT, REPLACE -from fluent.migrate.helpers import COPY, TERM_REFERENCE, MESSAGE_REFERENCE - - -def migrate(ctx): - """Bug 1615501 - Fluent migration recipe for Preferences subdialogs, part {index}.""" - - ctx.add_transforms( - "mail/messenger/preferences/system-integration.ftl", - "mail/messenger/preferences/system-integration.ftl", - transforms_from( - """ -system-integration-title = - .title = { COPY(from_path, "systemIntegration.title") } - -system-integration-dialog = - .buttonlabelaccept = { COPY(from_path, "acceptIntegration.label") } - .buttonlabelcancel = { COPY(from_path, "cancelIntegration.label") } - .buttonlabelcancel2 = { COPY(from_path, "cancelIntegration2.label") } - -checkbox-email-label = - .label = { COPY(from_path, "email.label") } - .tooltiptext = { unset-default-tooltip } -checkbox-newsgroups-label = - .label = { COPY(from_path, "newsgroups.label") } - .tooltiptext = { unset-default-tooltip } -checkbox-feeds-label = - .label = { COPY(from_path, "feeds.label") } - .tooltiptext = { unset-default-tooltip } - -system-search-engine-name = { PLATFORM() -> - [macos] { COPY("mail/chrome/messenger/searchIntegrationMac.dtd", "searchIntegration.engineName") } - [windows] { COPY("mail/chrome/messenger/searchIntegrationWin.dtd", "searchIntegration.engineName") } - *[other] { COPY("mail/chrome/messenger/searchIntegrationDefault.dtd", "searchIntegration.engineName") } -} -""", - from_path="mail/chrome/messenger/systemIntegrationDialog.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/system-integration.ftl", - "mail/messenger/preferences/system-integration.ftl", - [ - FTL.Message( - id=FTL.Identifier("default-client-intro"), - value=REPLACE( - "mail/chrome/messenger/systemIntegrationDialog.dtd", - "defaultClient.intro", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("unset-default-tooltip"), - value=REPLACE( - "mail/chrome/messenger/systemIntegrationDialog.dtd", - "unsetDefault.tooltip", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Message( - id=FTL.Identifier("system-search-integration-label"), - attributes=[ - FTL.Attribute( - id=FTL.Identifier("label"), - value=REPLACE( - "mail/chrome/messenger/systemIntegrationDialog.dtd", - "searchIntegration.label", - { - "&searchIntegration.engineName;": MESSAGE_REFERENCE( - "system-search-engine-name" - ) - }, - ), - ), - FTL.Attribute( - id=FTL.Identifier("accesskey"), - value=COPY( - "mail/chrome/messenger/systemIntegrationDialog.dtd", - "searchIntegration.accesskey", - ), - ), - ], - ), - FTL.Message( - id=FTL.Identifier("check-on-startup-label"), - attributes=[ - FTL.Attribute( - id=FTL.Identifier("label"), - value=REPLACE( - "mail/chrome/messenger/systemIntegrationDialog.dtd", - "checkOnStartup.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - FTL.Attribute( - id=FTL.Identifier("accesskey"), - value=COPY( - "mail/chrome/messenger/systemIntegrationDialog.dtd", - "checkOnStartup.accesskey", - ), - ), - ], - ), - ], - ) - - ctx.add_transforms( - "mail/messenger/preferences/fonts.ftl", - "mail/messenger/preferences/fonts.ftl", - transforms_from( - """ -fonts-encoding-dialog-title = - .title = { COPY(from_path, "fontsAndEncodingsDialog.title") } - -fonts-language-legend = - .value = { COPY(from_path, "language.label") } - .accesskey = { COPY(from_path, "language.accesskey") } - -fonts-proportional-label = - .value = { COPY(from_path, "proportional.label") } - .accesskey = { COPY(from_path, "proportional.accesskey") } - -font-language-group-latin = - .label = { COPY(from_path, "font.langGroup.latin") } -font-language-group-japanese = - .label = { COPY(from_path, "font.langGroup.japanese") } -font-language-group-trad-chinese = - .label = { COPY(from_path, "font.langGroup.trad-chinese") } -font-language-group-simpl-chinese = - .label = { COPY(from_path, "font.langGroup.simpl-chinese") } -font-language-group-trad-chinese-hk = - .label = { COPY(from_path, "font.langGroup.trad-chinese-hk") } -font-language-group-korean = - .label = { COPY(from_path, "font.langGroup.korean") } -font-language-group-cyrillic = - .label = { COPY(from_path, "font.langGroup.cyrillic") } -font-language-group-el = - .label = { COPY(from_path, "font.langGroup.el") } -font-language-group-other = - .label = { COPY(from_path, "font.langGroup.other") } -font-language-group-thai = - .label = { COPY(from_path, "font.langGroup.thai") } -font-language-group-hebrew = - .label = { COPY(from_path, "font.langGroup.hebrew") } -font-language-group-arabic = - .label = { COPY(from_path, "font.langGroup.arabic") } -font-language-group-devanagari = - .label = { COPY(from_path, "font.langGroup.devanagari") } -font-language-group-tamil = - .label = { COPY(from_path, "font.langGroup.tamil") } -font-language-group-armenian = - .label = { COPY(from_path, "font.langGroup.armenian") } -font-language-group-bengali = - .label = { COPY(from_path, "font.langGroup.bengali") } -font-language-group-canadian = - .label = { COPY(from_path, "font.langGroup.canadian") } -font-language-group-ethiopic = - .label = { COPY(from_path, "font.langGroup.ethiopic") } -font-language-group-georgian = - .label = { COPY(from_path, "font.langGroup.georgian") } -font-language-group-gujarati = - .label = { COPY(from_path, "font.langGroup.gujarati") } -font-language-group-gurmukhi = - .label = { COPY(from_path, "font.langGroup.gurmukhi") } -font-language-group-khmer = - .label = { COPY(from_path, "font.langGroup.khmer") } -font-language-group-malayalam = - .label = { COPY(from_path, "font.langGroup.malayalam") } -font-language-group-math = - .label = { COPY(from_path, "font.langGroup.math") } -font-language-group-odia = - .label = { COPY(from_path, "font.langGroup.odia") } -font-language-group-telugu = - .label = { COPY(from_path, "font.langGroup.telugu") } -font-language-group-kannada = - .label = { COPY(from_path, "font.langGroup.kannada") } -font-language-group-sinhala = - .label = { COPY(from_path, "font.langGroup.sinhala") } -font-language-group-tibetan = - .label = { COPY(from_path, "font.langGroup.tibetan") } - -default-font-serif = - .label = { COPY(from_path, "useDefaultFontSerif.label") } - -default-font-sans-serif = - .label = { COPY(from_path, "useDefaultFontSansSerif.label") } - -font-size-label = - .value = { COPY(from_path, "size.label") } - .accesskey = { COPY(from_path, "sizeProportional.accesskey") } - -font-size-monospace-label = - .value = { COPY(from_path, "size.label") } - .accesskey = { COPY(from_path, "sizeMonospace.accesskey") } - -font-serif-label = - .value = { COPY(from_path, "serif.label") } - .accesskey = { COPY(from_path, "serif.accesskey") } - -font-sans-serif-label = - .value = { COPY(from_path, "sans-serif.label") } - .accesskey = { COPY(from_path, "sans-serif.accesskey") } - -font-monospace-label = - .value = { COPY(from_path, "monospace.label") } - .accesskey = { COPY(from_path, "monospace.accesskey") } - -font-min-size-label = - .value = { COPY(from_path, "minSize.label") } - .accesskey = { COPY(from_path, "minSize.accesskey") } - -min-size-none = - .label = { COPY(from_path, "minSize.none") } - -font-control-legend = { COPY(from_path, "fontControl.label") } - -use-document-fonts-checkbox = - .label = { COPY(from_path, "useDocumentFonts.label") } - .accesskey = { COPY(from_path, "useDocumentFonts.accesskey") } - -use-fixed-width-plain-checkbox = - .label = { COPY(from_path, "useFixedWidthForPlainText.label") } - .accesskey = { COPY(from_path, "fixedWidth.accesskey") } - -text-encoding-legend = { COPY(from_path, "languagesTitle2.label") } - -text-encoding-description = { COPY(from_path, "composingDescription2.label") } - -font-outgoing-email-label = - .value = { COPY(from_path, "sendDefaultCharset.label") } - .accesskey = { COPY(from_path, "sendDefaultCharset.accesskey") } - -font-incoming-email-label = - .value = { COPY(from_path, "viewDefaultCharsetList.label") } - .accesskey = { COPY(from_path, "viewDefaultCharsetList.accesskey") } - -default-font-reply-checkbox = - .label = { COPY(from_path, "replyInDefaultCharset3.label") } - .accesskey = { COPY(from_path, "replyInDefaultCharset3.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/fonts.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/colors.ftl", - "mail/messenger/preferences/colors.ftl", - transforms_from( - """ -colors-dialog-window = - .title = { COPY(from_path, "colorsDialog.title") } - .style = { PLATFORM() -> - [macos] width: { COPY(from_path, "window.macWidth") } !important - *[other] width: { COPY(from_path, "window.width") } !important - } - -colors-dialog-legend = { COPY(from_path, "color") } - -text-color-label = - .value = { COPY(from_path, "textColor.label") } - .accesskey = { COPY(from_path, "textColor.accesskey") } - -background-color-label = - .value = { COPY(from_path, "backgroundColor.label") } - .accesskey = { COPY(from_path, "backgroundColor.accesskey") } - -use-system-colors = - .label = { COPY(from_path, "useSystemColors.label") } - .accesskey = { COPY(from_path, "useSystemColors.accesskey") } - -colors-link-legend = { COPY(from_path, "links") } - -link-color-label = - .value = { COPY(from_path, "linkColor.label") } - .accesskey = { COPY(from_path, "linkColor.accesskey") } - -visited-link-color-label = - .value = { COPY(from_path, "visitedLinkColor.label") } - .accesskey = { COPY(from_path, "visitedLinkColor.accesskey") } - -underline-link-checkbox = - .label = { COPY(from_path, "underlineLinks.label") } - .accesskey = { COPY(from_path, "underlineLinks.accesskey") } - -override-color-label = - .value = { COPY(from_path, "overridePageColors.label") } - .accesskey = { COPY(from_path, "overridePageColors.accesskey") } - -override-color-always = - .label = { COPY(from_path, "overridePageColors.always.label") } - -override-color-auto = - .label = { COPY(from_path, "overridePageColors.auto.label") } - -override-color-never = - .label = { COPY(from_path, "overridePageColors.never.label") } -""", - from_path="mail/chrome/messenger/preferences/colors.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/notifications.ftl", - "mail/messenger/preferences/notifications.ftl", - transforms_from( - """ -notifications-dialog-window = - .title = { COPY(from_path, "notificationsDialog2.title") } - -customize-alert-description = { COPY(from_path, "alertCustomization.intro") } - -preview-text-checkbox = - .label = { COPY(from_path, "previewText.label") } - .accesskey = { COPY(from_path, "previewText.accesskey") } - -subject-checkbox = - .label = { COPY(from_path, "subject.label") } - .accesskey = { COPY(from_path, "subject.accesskey") } - -sender-checkbox = - .label = { COPY(from_path, "sender.label") } - .accesskey = { COPY(from_path, "sender.accesskey") } - -open-time-label-before = - .value = { COPY(from_path, "totalOpenTimeBefore.label") } - .accesskey = { COPY(from_path, "totalOpenTimeBefore.accesskey") } - -open-time-label-after = - .value = { COPY(from_path, "totalOpenTimeEnd.label") } -""", - from_path="mail/chrome/messenger/preferences/notifications.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/new-tag.ftl", - "mail/messenger/preferences/new-tag.ftl", - transforms_from( - """ -tag-dialog-window = - .title = { COPY(from_path, "newTagDialog1.title") } - -tag-name-label = - .value = { COPY(from_path, "name.label") } - .accesskey = { COPY(from_path, "name.accesskey") } -""", - from_path="mail/chrome/messenger/newTagDialog.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/receipts.ftl", - "mail/messenger/preferences/receipts.ftl", - transforms_from( - """ -receipts-dialog-window = - .title = { COPY(from_path, "dialog.title") } - -return-receipt-checkbox-control = - .label = { COPY(from_path, "requestReceipt.label") } - .acceskey = { COPY(from_path, "requestReceipt.accesskey") } - -receipt-arrive-label = { COPY(from_path, "receiptArrive.label") } - -receipt-leave-radio-control = - .label = { COPY(from_path, "leaveIt.label") } - .acceskey = { COPY(from_path, "leaveIt.accesskey") } - -receipt-move-radio-control = - .label = { COPY(from_path, "moveToSent.label") } - .acceskey = { COPY(from_path, "moveToSent.accesskey") } - -receipt-request-label = { COPY(from_path, "requestMDN.label") } - -receipt-return-never-radio-control = - .label = { COPY(from_path, "never.label") } - .acceskey = { COPY(from_path, "never.accesskey") } - -receipt-return-some-radio-control = - .label = { COPY(from_path, "returnSome.label") } - .acceskey = { COPY(from_path, "returnSome.accesskey") } - -receipt-not-to-cc-label = - .value = { COPY(from_path, "notInToCc.label") } - .acceskey = { COPY(from_path, "notInToCc.accesskey") } - -receipt-send-never-label = - .label = { COPY(from_path, "neverSend.label") } - -receipt-send-always-label = - .label = { COPY(from_path, "alwaysSend.label") } - -receipt-send-ask-label = - .label = { COPY(from_path, "askMe.label") } - -sender-outside-domain-label = - .value = { COPY(from_path, "outsideDomain.label") } - .acceskey = { COPY(from_path, "outsideDomain.accesskey") } - -other-cases-text-label = - .value = { COPY(from_path, "otherCases.label") } - .acceskey = { COPY(from_path, "otherCases.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/receipts.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/connection.ftl", - "mail/messenger/preferences/connection.ftl", - transforms_from( - """ -connection-dialog-window = - .title = { COPY(from_path, "connectionsDialog.title") } - .style = { PLATFORM() -> - [macos] width: { COPY(from_path, "window.macWidth") } !important - *[other] width: { COPY(from_path, "window.width") } !important - } - -connection-proxy-legend = { COPY(from_path, "proxyTitle.label") } - -proxy-type-no = - .label = { COPY(from_path, "noProxyTypeRadio.label") } - .accesskey = { COPY(from_path, "noProxyTypeRadio.accesskey") } - -proxy-type-wpad = - .label = { COPY(from_path, "WPADTypeRadio.label") } - .accesskey = { COPY(from_path, "WPADTypeRadio.accesskey") } - -proxy-type-system = - .label = { COPY(from_path, "systemTypeRadio.label") } - .accesskey = { COPY(from_path, "systemTypeRadio.accesskey") } - -proxy-type-manual = - .label = { COPY(from_path, "manualTypeRadio.label") } - .accesskey = { COPY(from_path, "manualTypeRadio.accesskey") } - -proxy-http-label = - .value = { COPY(from_path, "http.label") } - .accesskey = { COPY(from_path, "http.accesskey") } - -http-port-label = - .value = { COPY(from_path, "HTTPport.label") } - .accesskey = { COPY(from_path, "HTTPport.accesskey") } - -proxy-http-sharing = - .label = { COPY(from_path, "proxyHttpSharing.label") } - .accesskey = { COPY(from_path, "proxyHttpSharing.accesskey") } - -proxy-https-label = - .value = { COPY(from_path, "https.label") } - .accesskey = { COPY(from_path, "https.accesskey") } - -ssl-port-label = - .value = { COPY(from_path, "SSLport.label") } - .accesskey = { COPY(from_path, "SSLport.accesskey") } - -proxy-socks-label = - .value = { COPY(from_path, "socks.label") } - .accesskey = { COPY(from_path, "socks.accesskey") } - -socks-port-label = - .value = { COPY(from_path, "SOCKSport.label") } - .accesskey = { COPY(from_path, "SOCKSport.accesskey") } - -proxy-socks4-label = - .label = { COPY(from_path, "socks4.label") } - .accesskey = { COPY(from_path, "socks4.accesskey") } - -proxy-socks5-label = - .label = { COPY(from_path, "socks5.label") } - .accesskey = { COPY(from_path, "socks5.accesskey") } - -proxy-type-auto = - .label = { COPY(from_path, "autoTypeRadio.label") } - .accesskey = { COPY(from_path, "autoTypeRadio.accesskey") } - -proxy-reload-label = - .label = { COPY(from_path, "reload.label") } - .accesskey = { COPY(from_path, "reload.accesskey") } - -no-proxy-label = - .value = { COPY(from_path, "noproxy.label") } - .accesskey = { COPY(from_path, "noproxy.accesskey") } - -no-proxy-example = { COPY(from_path, "noproxyExplain.label") } - -no-proxy-localhost-label = { COPY(from_path, "noproxyLocalhostDesc.label") } - -proxy-password-prompt = - .label = { COPY(from_path, "autologinproxy.label") } - .accesskey = { COPY(from_path, "autologinproxy.accesskey") } - .tooltiptext = { COPY(from_path, "autologinproxy.tooltip") } - -proxy-remote-dns = - .label = { COPY(from_path, "socksRemoteDNS.label") } - .accesskey = { COPY(from_path, "socksRemoteDNS.accesskey") } - -proxy-enable-doh = - .label = { COPY(from_path, "dnsOverHttps.label") } - .accesskey = { COPY(from_path, "dnsOverHttps.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/connection.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/offline.ftl", - "mail/messenger/preferences/offline.ftl", - transforms_from( - """ -offline-dialog-window = - .title = { COPY(from_path, "offlineDialog.title") } - -autodetect-online-label = - .label = { COPY(from_path, "checkAutoDetect.label") } - .accesskey = { COPY(from_path, "checkAutoDetect.accesskey") } - -startup-label = { COPY(from_path, "titleStartUp") } - -status-radio-remember = - .label = { COPY(from_path, "radioRememberPrevState.label") } - .accesskey = { COPY(from_path, "radioRememberPrevState.accesskey") } - -status-radio-ask = - .label = { COPY(from_path, "radioAskState.label") } - .accesskey = { COPY(from_path, "radioAskState.accesskey") } - -status-radio-always-online = - .label = { COPY(from_path, "radioAlwaysOnlineState.label") } - .accesskey = { COPY(from_path, "radioAlwaysOnlineState.accesskey") } - -status-radio-always-offline = - .label = { COPY(from_path, "radioAlwaysOffline.label") } - .accesskey = { COPY(from_path, "radioAlwaysOffline.accesskey") } - -going-online-label = { COPY(from_path, "textGoingOnline") } - -going-online-auto = - .label = { COPY(from_path, "radioAutoSend.label") } - .accesskey = { COPY(from_path, "radioAutoSend.accesskey") } - -going-online-not = - .label = { COPY(from_path, "radioNotSend.label") } - .accesskey = { COPY(from_path, "radioNotSend.accesskey") } - -going-online-ask = - .label = { COPY(from_path, "radioAskUnsent.label") } - .accesskey = { COPY(from_path, "radioAskUnsent.accesskey") } - -going-offline-label = { COPY(from_path, "textGoingOffline") } - -going-offline-auto = - .label = { COPY(from_path, "radioAutoDownload.label") } - .accesskey = { COPY(from_path, "radioAutoDownload.accesskey") } - -going-offline-not = - .label = { COPY(from_path, "radioNotDownload.label") } - .accesskey = { COPY(from_path, "radioNotDownload.accesskey") } - -going-offline-ask = - .label = { COPY(from_path, "radioAskDownload.label") } - .accesskey = { COPY(from_path, "radioAskDownload.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/offline.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/sendoptions.ftl", - "mail/messenger/preferences/sendoptions.ftl", - transforms_from( - """ -sendoptions-dialog-window = - .title = { COPY(from_path, "dialog.title") } - -send-mail-title = { COPY(from_path, "sendMail.title") } - -auto-downgrade-label = - .label = { COPY(from_path, "autoDowngrade.label") } - .accesskey = { COPY(from_path, "autoDowngrade.accesskey") } - -default-html-format-label = { COPY(from_path, "sendMaildesc.label") } - -html-format-ask = - .label = { COPY(from_path, "askMe.label") } - .accesskey = { COPY(from_path, "askMe.accesskey") } - -html-format-convert = - .label = { COPY(from_path, "convertPlain.label") } - .accesskey = { COPY(from_path, "convertPlain.accesskey") } - -html-format-send-html = - .label = { COPY(from_path, "sendHTML.label") } - .accesskey = { COPY(from_path, "sendHTML.accesskey") } - -html-format-send-both = - .label = { COPY(from_path, "sendBoth.label") } - .accesskey = { COPY(from_path, "sendBoth.accesskey") } - -default-html-format-info = { COPY(from_path, "override.label") } - -html-tab-label = - .label = { COPY(from_path, "HTMLTab.label") } - .accesskey = { COPY(from_path, "HTMLTab.accesskey") } - -plain-tab-label = - .label = { COPY(from_path, "PlainTextTab.label") } - .accesskey = { COPY(from_path, "PlainTextTab.accesskey") } - -add-domain-button = - .label = { COPY(from_path, "AddHtmlDomain.label") } - .accesskey = { COPY(from_path, "AddHtmlDomain.accesskey") } - -delete-domain-button = - .label = { COPY(from_path, "DeleteHtmlDomain.label") } - .accesskey = { COPY(from_path, "DeleteHtmlDomain.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/sendoptions.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/sendoptions.ftl", - "mail/messenger/preferences/sendoptions.ftl", - [ - FTL.Message( - id=FTL.Identifier("send-message-domain-label"), - value=REPLACE( - "mail/chrome/messenger/preferences/sendoptions.dtd", - "domaindesc.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - ], - ) - - ctx.add_transforms( - "mail/messenger/preferences/attachment-reminder.ftl", - "mail/messenger/preferences/attachment-reminder.ftl", - transforms_from( - """ -attachment-reminder-window = - .title = { COPY(from_path, "attachmentReminderDialog.title") } - -keyword-new-button = - .label = { COPY(from_path, "newKeywordButton.label") } - .accesskey = { COPY(from_path, "newKeywordButton.accesskey") } - -keyword-edit-button = - .label = { COPY(from_path, "editKeywordButton1.label") } - .accesskey = { COPY(from_path, "editKeywordButton1.accesskey") } - -keyword-remove-button = - .label = { COPY(from_path, "removeKeywordButton.label") } - .accesskey = { COPY(from_path, "removeKeywordButton.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/attachmentReminder.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/attachment-reminder.ftl", - "mail/messenger/preferences/attachment-reminder.ftl", - [ - FTL.Message( - id=FTL.Identifier("attachment-reminder-label"), - value=REPLACE( - "mail/chrome/messenger/preferences/attachmentReminder.dtd", - "attachKeywordText.label", - {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, - ), - ), - ], - ) - - ctx.add_transforms( - "mail/messenger/preferences/attachment-reminder.ftl", - "mail/messenger/preferences/attachment-reminder.ftl", - transforms_from( - """ -new-keyword-title = { COPY(from_path, "attachmentReminderNewDialogTitle") } -new-keyword-label = { COPY(from_path, "attachmentReminderNewText") } - -edit-keyword-title = { COPY(from_path, "attachmentReminderEditDialogTitle") } -edit-keyword-label = { COPY(from_path, "attachmentReminderEditText") } -""", - from_path="mail/chrome/messenger/preferences/preferences.properties", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/permissions.ftl", - "mail/messenger/preferences/permissions.ftl", - transforms_from( - """ -permissions-reminder-window = - .title = { COPY(from_path, "window.title") } - .style = width: { COPY(from_path, "window.width") }; - -window-close-key = - .key = { COPY(from_path, "windowClose.key") } - -website-address-label = - .value = { COPY(from_path, "address.label") } - .accesskey = { COPY(from_path, "address.accesskey") } - -block-button = - .label = { COPY(from_path, "block.label") } - .accesskey = { COPY(from_path, "block.accesskey") } - -allow-session-button = - .label = { COPY(from_path, "session.label") } - .accesskey = { COPY(from_path, "session.accesskey") } - -allow-button = - .label = { COPY(from_path, "allow.label") } - .accesskey = { COPY(from_path, "allow.accesskey") } - -treehead-sitename-label = - .label = { COPY(from_path, "treehead.sitename.label") } - -treehead-status-label = - .label = { COPY(from_path, "treehead.status.label") } - -remove-site-button = - .label = { COPY(from_path, "removepermission.label") } - .accesskey = { COPY(from_path, "removepermission.accesskey") } - -remove-all-site-button = - .label = { COPY(from_path, "removeallpermissions.label") } - .accesskey = { COPY(from_path, "removeallpermissions.accesskey") } - -cancel-button = - .label = { COPY(from_path, "button.cancel.label") } - .accesskey = { COPY(from_path, "button.cancel.accesskey") } - -save-button = - .label = { COPY(from_path, "button.ok.label") } - .accesskey = { COPY(from_path, "button.ok.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/permissions.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/permissions.ftl", - "mail/messenger/preferences/permissions.ftl", - transforms_from( - """ -permission-can-label = { COPY(from_path, "can") } -permission-can-access-first-party-label = { COPY(from_path, "canAccessFirstParty") } -permission-can-session-label = { COPY(from_path, "canSession") } -permission-cannot-label = { COPY(from_path, "cannot") } - -invalid-uri-message = { COPY(from_path, "invalidURI") } -invalid-uri-title = { COPY(from_path, "invalidURITitle") } -""", - from_path="mail/chrome/messenger/preferences/preferences.properties", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/cookies.ftl", - "mail/messenger/preferences/cookies.ftl", - transforms_from( - """ -cookies-window-dialog = - .title = { COPY(from_path, "window.title") } - .style = width: { COPY(from_path, "window.width") }; - -window-close-key = - .key = { COPY(from_path, "windowClose.key") } - -window-focus-search-key = - .key = { COPY(from_path, "focusSearch1.key") } - -window-focus-search-alt-key = - .key = { COPY(from_path, "focusSearch2.key") } - -filter-search-label = - .value = { COPY(from_path, "filter.label") } - .accesskey = { COPY(from_path, "filter.accesskey") } - -cookies-on-system-label = { COPY(from_path, "cookiesonsystem.label") } - -treecol-site-header = - .label = { COPY(from_path, "cookiedomain.label") } - -treecol-name-header = - .label = { COPY(from_path, "cookiename.label") } - -props-name-label = - .value = { COPY(from_path, "props.name.label") } -props-value-label = - .value = { COPY(from_path, "props.value.label") } -props-domain-label = - .value = { COPY(from_path, "props.domain.label") } -props-path-label = - .value = { COPY(from_path, "props.path.label") } -props-secure-label = - .value = { COPY(from_path, "props.secure.label") } -props-expires-label = - .value = { COPY(from_path, "props.expires.label") } -props-container-label = - .value = { COPY(from_path, "props.container.label") } - -remove-cookie-button = - .label = { COPY(from_path, "button.removecookie.label") } - .accesskey = { COPY(from_path, "button.removecookie.accesskey") } - -remove-all-cookies-button = - .label = { COPY(from_path, "button.removeallcookies.label") } - .accesskey = { COPY(from_path, "button.removeallcookies.accesskey") } - -cookie-close-button = - .label = { COPY(from_path, "button.close.label") } - .accesskey = { COPY(from_path, "button.close.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/cookies.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/dock-options.ftl", - "mail/messenger/preferences/dock-options.ftl", - transforms_from( - """ -dock-options-window-dialog = - .title = { COPY(from_path, "dockOptionsDialog.title") } - .style = width: { COPY(from_path, "window.macWidth") }; - -bounce-system-dock-icon = - .label = { COPY(from_path, "bounceSystemDockIcon.label") } - .accesskey = { COPY(from_path, "bounceSystemDockIcon.accesskey") } - -dock-icon-legend = { COPY(from_path, "dockIconBadge.label") } - -dock-icon-show-label = - .value = { COPY(from_path, "dockIconShow.label") } - -count-unread-messages-radio = - .label = { COPY(from_path, "showAllUnreadMessagesCount.label") } - .accesskey = { COPY(from_path, "showAllUnreadMessagesCount.accesskey") } - -count-new-messages-radio = - .label = { COPY(from_path, "newMessagesCountDock.label") } - .accesskey = { COPY(from_path, "newMessagesCountDock.accesskey") } - -notification-settings-info = { COPY(from_path, "directNotificationSettings.label") } -""", - from_path="mail/chrome/messenger/preferences/dockoptions.dtd", - ), - ) - - ctx.add_transforms( - "mail/messenger/preferences/application-manager.ftl", - "mail/messenger/preferences/application-manager.ftl", - transforms_from( - """ -app-manager-window-dialog = - .title = { COPY(from_path, "appManager.title") } - .style = { COPY(from_path, "appManager.style") } - -remove-app-button = - .label = { COPY(from_path, "remove.label") } - .accesskey = { COPY(from_path, "remove.accesskey") } -""", - from_path="mail/chrome/messenger/preferences/applicationManager.dtd", - ), - ) diff --git a/python/l10n/tb_fluent_migrations/bug_1733210_migrate_extension_properties.py b/python/l10n/tb_fluent_migrations/bug_1733210_migrate_extension_properties.py deleted file mode 100644 index f1a0e316a2..0000000000 --- a/python/l10n/tb_fluent_migrations/bug_1733210_migrate_extension_properties.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding=utf8 - -# Any copyright is dedicated to the Public Domain. -# http://creativecommons.org/publicdomain/zero/1.0/ - -from __future__ import absolute_import -from fluent.migrate.helpers import transforms_from -from fluent.migrate import COPY - - -def migrate(ctx): - """Bug 1733210 - Migrate app extension properties to Fluent, part {index}.""" - ctx.add_transforms( - "mail/browser/appExtensionFields.ftl", - "mail/browser/appExtensionFields.ftl", - transforms_from( - """ -extension-thunderbird-compact-light-name = { COPY(from_path, "extension.thunderbird-compact-light@mozilla.org.name") } -extension-thunderbird-compact-light-description = { COPY(from_path, "extension.thunderbird-compact-light@mozilla.org.description") } -extension-thunderbird-compact-dark-name = { COPY(from_path, "extension.thunderbird-compact-dark@mozilla.org.name") } -extension-thunderbird-compact-dark-description= { COPY(from_path, "extension.thunderbird-compact-dark@mozilla.org.description") } -""", - from_path="mail/chrome/messenger/app-extension-fields.properties", - ), - ) diff --git a/python/l10n/tb_fluent_migrations/bug_1802387_langpack_defines.py b/python/l10n/tb_fluent_migrations/bug_1802387_langpack_defines.py deleted file mode 100644 index 3e58aa735b..0000000000 --- a/python/l10n/tb_fluent_migrations/bug_1802387_langpack_defines.py +++ /dev/null @@ -1,43 +0,0 @@ -# Any copyright is dedicated to the Public Domain. -# http://creativecommons.org/publicdomain/zero/1.0/ - -import fluent.syntax.ast as FTL -from fluent.migrate.transforms import COPY, LegacySource, Transform - - -class CONTRIB(LegacySource): - """Custom transform converting a list of contributors from the old RDF based - list of entries into a comma delimited list. - - Based on code from python/mozbuild/mozbuild/action/langpack_manifest.py - """ - - def __call__(self, ctx): - element: FTL.TextElement = super(CONTRIB, self).__call__(ctx) - str: str = element.value.replace("", "") - tokens = str.split("") - tokens = map(lambda t: t.strip(), tokens) - tokens = filter(lambda t: t != "", tokens) - element.value = ", ".join(tokens) - return Transform.pattern_of(element) - - -def migrate(ctx): - """Bug 1802387 - Convert langpack defines.inc to Fluent, part {index}.""" - - browser = "mail/defines.inc" - target = "mail/langpack-metadata.ftl" - ctx.add_transforms( - target, - target, - [ - FTL.Message( - id=FTL.Identifier("langpack-creator"), - value=COPY(browser, "MOZ_LANGPACK_CREATOR"), - ), - FTL.Message( - id=FTL.Identifier("langpack-contributors"), - value=CONTRIB(browser, "MOZ_LANGPACK_CONTRIBUTORS"), - ), - ], - )