Exemplo n.º 1
0
def migrate(ctx):
    """Bug 1608199 - Port devtools/client/styleeditor.dtd to Fluent, part {index}."""

    ctx.add_transforms(
        "devtools/client/styleeditor.ftl",
        "devtools/client/styleeditor.ftl",
    transforms_from(
"""
styleeditor-new-button =
    .tooltiptext = { COPY(from_path, "newButton.tooltip", trim:"True") }
    .accesskey = { COPY(from_path, "newButton.accesskey", trim:"True") }
styleeditor-import-button =
    .tooltiptext = { COPY(from_path, "importButton.tooltip", trim:"True") }
    .accesskey = { COPY(from_path, "importButton.accesskey", trim:"True") }
styleeditor-visibility-toggle =
    .tooltiptext = { COPY(from_path, "visibilityToggle.tooltip")}
    .accesskey = { COPY(from_path, "saveButton.accesskey", trim:"True") }
styleeditor-save-button = { COPY(from_path, "saveButton.label", trim:"True") }
    .tooltiptext = { COPY(from_path, "saveButton.tooltip", trim:"True") }
    .accesskey = { COPY(from_path, "saveButton.accesskey", trim:"True") }
styleeditor-options-button =
    .tooltiptext = { COPY(from_path, "optionsButton.tooltip", trim:"True") }
styleeditor-media-rules = { COPY(from_path, "mediaRules.label", trim:"True") }
styleeditor-editor-textbox =
    .data-placeholder = { COPY(from_path, "editorTextbox.placeholder", trim:"True") }
styleeditor-no-stylesheet = { COPY(from_path, "noStyleSheet.label", trim:"True") }
styleeditor-open-link-new-tab =
    .label = { COPY(from_path, "openLinkNewTab.label", trim:"True") }
styleeditor-copy-url =
    .label = { COPY(from_path, "copyUrl.label", trim:"True") }
""", from_path="devtools/client/styleeditor.dtd"))

    ctx.add_transforms(
        "devtools/client/styleeditor.ftl",
        "devtools/client/styleeditor.ftl",
        [
            FTL.Message(
                        id=FTL.Identifier("styleeditor-no-stylesheet-tip"),
                        value=CONCAT(
                                    COPY(
                                        "devtools/client/styleeditor.dtd",
                                         "noStyleSheet-tip-start.label",
                                         ),
                                    FTL.TextElement('<a data-l10n-name="append-new-stylesheet">'),
                                    COPY(
                                        "devtools/client/styleeditor.dtd",
                                        "noStyleSheet-tip-action.label",
                                        ),
                                    FTL.TextElement("</a>"),
                                    COPY("devtools/client/styleeditor.dtd",
                                         "noStyleSheet-tip-end.label",
                                         ),
                                    ),
            )
        ]
    )
Exemplo n.º 2
0
def migrate(ctx):
    """Bug 1608188 - Migrate blocklist.dtd to Fluent, part {index}."""
    ctx.add_transforms(
        "toolkit/toolkit/extensions/blocklist.ftl",
        "toolkit/toolkit/extensions/blocklist.ftl",
        transforms_from(
            """
blocklist-window =
    .title = { COPY(from_path, "blocklist.title", trim:"True") }
    .style = { COPY(from_path, "blocklist.style", trim:"True") }

blocklist-soft-and-hard = { COPY(from_path, "blocklist.softandhard", trim:"True") }
blocklist-hard-blocked = { COPY(from_path, "blocklist.hardblocked", trim:"True") }
blocklist-soft-blocked = { COPY(from_path, "blocklist.softblocked", trim:"True") }
blocklist-more-information =
    .value = { COPY(from_path, "blocklist.moreinfo", trim:"True") }
blocklist-blocked =
    .label = { COPY(from_path, "blocklist.blocked.label", trim:"True") }
blocklist-checkbox =
    .label = { COPY(from_path, "blocklist.checkbox.label", trim:"True") }
""",
            from_path="toolkit/chrome/mozapps/extensions/blocklist.dtd"))

    ctx.add_transforms(
        "toolkit/toolkit/extensions/blocklist.ftl",
        "toolkit/toolkit/extensions/blocklist.ftl", [
            FTL.Message(
                id=FTL.Identifier("blocklist-accept"),
                attributes=[
                    FTL.Attribute(
                        id=FTL.Identifier("label"),
                        value=REPLACE(
                            "toolkit/chrome/mozapps/extensions/blocklist.dtd",
                            "blocklist.accept.label",
                            {
                                "&brandShortName;":
                                TERM_REFERENCE("brand-short-name")
                            },
                            trim=True,
                        )),
                    FTL.Attribute(
                        id=FTL.Identifier("accesskey"),
                        value=COPY(
                            "toolkit/chrome/mozapps/extensions/blocklist.dtd",
                            "blocklist.accept.accesskey",
                            trim=True,
                        )),
                ]),
            FTL.Message(
                id=FTL.Identifier("blocklist-label-summary"),
                value=REPLACE(
                    "toolkit/chrome/mozapps/extensions/blocklist.dtd",
                    "blocklist.summary",
                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},
                    trim=True,
                )),
        ])
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 =
    .label = { COPY(from_path, "requestReceipt.label") }
    .acceskey = { COPY(from_path, "requestReceipt.accesskey") }

receipt-arrive-label = { COPY(from_path, "receiptArrive.label") }

receipt-leave-radio =
    .label = { COPY(from_path, "leaveIt.label") }
    .acceskey = { COPY(from_path, "leaveIt.accesskey") }

receipt-move-radio =
    .label = { COPY(from_path, "moveToSent.label") }
    .acceskey = { COPY(from_path, "moveToSent.accesskey") }

receipt-request-label = { COPY(from_path, "requestMDN.label") }

receipt-return-never-radio =
    .label = { COPY(from_path, "never.label") }
    .acceskey = { COPY(from_path, "never.accesskey") }

receipt-return-some-radio =
    .label = { COPY(from_path, "returnSome.label") }
    .acceskey = { COPY(from_path, "returnSome.accesskey") }

receipt-not-to-cc =
    .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 =
    .value = { COPY(from_path, "outsideDomain.label") }
    .acceskey = { COPY(from_path, "outsideDomain.accesskey") }

other-cases-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"
        ))
Exemplo n.º 4
0
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",
                        ),
                    ),
                ],
            ),
        ],
    )
def migrate(ctx):
    """Bug 1605217 - Migrate Identity Panel to Fluent., part {index}"""

    ctx.add_transforms(
        "browser/browser/browser.ftl", "browser/browser/browser.ftl",
        transforms_from("""

identity-connection-not-secure = { COPY(path1, "identity.connectionNotSecure2") }

identity-connection-secure = { COPY(path1, "identity.connectionSecure3") }

identity-connection-file = { COPY(path1, "identity.connectionFile") }

identity-extension-page = { COPY(path1, "identity.extensionPage") }

identity-custom-root = { COPY(path1, "identity.customRoot") }

identity-passive-loaded = { COPY(path1, "identity.passiveLoaded") }

identity-active-loaded = { COPY(path1, "identity.activeLoaded") }

identity-weak-encryption = { COPY(path1, "identity.weakEncryption") }

identity-insecure-login-forms = { COPY(path1, "identity.insecureLoginForms2") }

identity-permissions =
    .value = { COPY(path1, "identity.permissions3") }
identity-permissions-reload-hint = { COPY(path1, "identity.permissionsReloadHint") }

identity-permissions-empty = { COPY(path1, "identity.permissionsEmpty") }

identity-clear-site-data =
    .label = { COPY(path1, "identity.clearSiteData") }
identity-connection-not-secure-security-view = { COPY(path1, "identity.connectionNotSecureSecurityView") }

identity-connection-verified = { COPY(path1, "identity.connectionVerified3") }

identity-ev-owner-label = { COPY(path1, "identity.evOwnerLabel2") }

identity-remove-cert-exception =
    .label = { COPY(path1, "identity.removeCertException.label") }
    .accesskey = { COPY(path1, "identity.removeCertException.accesskey") }
identity-description-insecure = { COPY(path1, "identity.description.insecure") }

identity-description-insecure-login-forms = { COPY(path1, "identity.description.insecureLoginForms") }

identity-description-weak-cipher-intro = { COPY(path1, "identity.description.weakCipher") }

identity-description-weak-cipher-risk = { COPY(path1, "identity.description.weakCipher2") }

identity-description-passive-loaded = { COPY(path1, "identity.description.passiveLoaded") }

identity-description-passive-loaded-insecure = { COPY(path1, "identity.description.passiveLoaded2") } <label data-l10n-name="link">{ COPY(path1, "identity.learnMore") }</label>

identity-description-active-loaded = { COPY(path1, "identity.description.activeLoaded") }

identity-description-active-loaded-insecure = { COPY(path1, "identity.description.activeLoaded2") }

identity-learn-more =
    .value = { COPY(path1, "identity.learnMore") }

identity-disable-mixed-content-blocking =
    .label = { COPY(path1, "identity.disableMixedContentBlocking.label") }
    .accesskey = { COPY(path1, "identity.disableMixedContentBlocking.accesskey") }
identity-enable-mixed-content-blocking =
    .label = { COPY(path1, "identity.enableMixedContentBlocking.label") }
    .accesskey = { COPY(path1, "identity.enableMixedContentBlocking.accesskey") }
identity-more-info-link-text =
    .label = { COPY(path1, "identity.moreInfoLinkText2") }
""",
                        path1="browser/chrome/browser/browser.dtd"))

    ctx.add_transforms(
        "browser/browser/browser.ftl", "browser/browser/browser.ftl", [
            FTL.Message(
                id=FTL.Identifier("identity-connection-internal"),
                value=REPLACE(
                    "browser/chrome/browser/browser.dtd",
                    "identity.connectionInternal",
                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},
                )),
            FTL.Message(
                id=FTL.Identifier("identity-active-blocked"),
                value=REPLACE(
                    "browser/chrome/browser/browser.dtd",
                    "identity.activeBlocked",
                    {"&brandShortName;": TERM_REFERENCE("brand-short-name")},
                )),
            FTL.Message(
                id=FTL.Identifier("identity-description-active-blocked"),
                value=CONCAT(
                    REPLACE(
                        "browser/chrome/browser/browser.dtd",
                        "identity.description.activeBlocked",
                        {
                            "&brandShortName;":
                            TERM_REFERENCE("brand-short-name")
                        },
                    ),
                    FTL.TextElement(' <label data-l10n-name="link">'),
                    COPY(
                        "browser/chrome/browser/browser.dtd",
                        "identity.learnMore",
                    ),
                    FTL.TextElement('</label>'),
                )),
            FTL.Message(id=FTL.Identifier("identity-description-custom-root"),
                        value=CONCAT(
                            REPLACE(
                                "browser/chrome/browser/browser.dtd",
                                "identity.description.customRoot",
                                {
                                    "&brandShortName;":
                                    TERM_REFERENCE("brand-short-name")
                                },
                            ),
                            FTL.TextElement(' <label data-l10n-name="link">'),
                            COPY(
                                "browser/chrome/browser/browser.dtd",
                                "identity.learnMore",
                            ),
                            FTL.TextElement('</label>'),
                        )),
            FTL.Message(
                id=FTL.Identifier("identity-description-passive-loaded-mixed"),
                value=CONCAT(
                    REPLACE(
                        "browser/chrome/browser/browser.dtd",
                        "identity.description.passiveLoaded3",
                        {
                            "&brandShortName;":
                            TERM_REFERENCE("brand-short-name")
                        },
                    ),
                    FTL.TextElement(' <label data-l10n-name="link">'),
                    COPY(
                        "browser/chrome/browser/browser.dtd",
                        "identity.learnMore",
                    ),
                    FTL.TextElement('</label>'),
                )),
        ])
Exemplo n.º 6
0
def migrate(ctx):
    """Bug 1608191 - Port profileDowngrade.dtd to Fluent, part {index}."""

    ctx.add_transforms(
        "toolkit/toolkit/global/profileDowngrade.ftl",
        "toolkit/toolkit/global/profileDowngrade.ftl",
        transforms_from(
            """
profiledowngrade-window-create =
    .label = { COPY(from_path, "window.create") }
profiledowngrade-quit =
    .label = { PLATFORM() ->
                 [windows] { COPY(from_path, "window.quit-win") }
                *[other] { COPY(from_path, "window.quit-nonwin") }
             }
""",
            from_path="toolkit/chrome/mozapps/profile/profileDowngrade.dtd"))

    ctx.add_transforms(
        "toolkit/toolkit/global/profileDowngrade.ftl",
        "toolkit/toolkit/global/profileDowngrade.ftl", [
            FTL.Message(
                id=FTL.Identifier("profiledowngrade-window"),
                attributes=[
                    FTL.Attribute(
                        id=FTL.Identifier("title"),
                        value=REPLACE(
                            "toolkit/chrome/mozapps/profile/profileDowngrade.dtd",
                            "window.title", {
                                "Firefox":
                                TERM_REFERENCE("brand-product-name"),
                            })),
                    FTL.Attribute(
                        id=FTL.Identifier("style"),
                        value=COPY(
                            "toolkit/chrome/mozapps/profile/profileDowngrade.dtd",
                            "window.style"))
                ]),
            FTL.Message(
                id=FTL.Identifier("profiledowngrade-sync"),
                value=REPLACE(
                    "toolkit/chrome/mozapps/profile/profileDowngrade.dtd",
                    "window.sync",
                    {
                        "&brandShortName;":
                        TERM_REFERENCE("brand-short-name"),
                        "Firefox":
                        TERM_REFERENCE("brand-product-name"),
                        "&syncBrand.fxAccount.label;":
                        TERM_REFERENCE("fxaccount-brand-name"),
                    },
                ),
            ),
            FTL.Message(
                id=FTL.Identifier("profiledowngrade-nosync"),
                value=REPLACE(
                    "toolkit/chrome/mozapps/profile/profileDowngrade.dtd",
                    "window.nosync", {
                        "&brandShortName;": TERM_REFERENCE("brand-short-name"),
                        "Firefox": TERM_REFERENCE("brand-product-name"),
                    }),
            ),
        ])