python/l10n/fluent_migrations/bug_1488788_aboutrestartrequired.py
author Ehsan Akhgari <ehsan@mozilla.com>
Wed, 10 Oct 2018 14:51:25 +0000
changeset 496273 f89516a277dcd86555f8334cce9bb1ea9bc47e24
parent 493730 eade7b3002168c6d346aae3ce561aff9d2857968
permissions -rw-r--r--
Bug 1494476 - Part 3: Require having had first-party interaction before being granted a first-party storage exception r=baku Depends on D8156 Differential Revision: https://phabricator.services.mozilla.com/D8157

# 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
from fluent.migrate.helpers import TERM_REFERENCE
from fluent.migrate import REPLACE

def migrate(ctx):
    """Bug 1488788- Migrate about:restartrequired from DTD to Fluent, part {index}."""

    ctx.add_transforms(
        "browser/browser/aboutRestartRequired.ftl",
        "browser/browser/aboutRestartRequired.ftl",
        transforms_from(
"""
restart-required-title = { COPY("browser/chrome/browser/aboutRestartRequired.dtd", "restartRequired.title") }

restart-required-header = { COPY("browser/chrome/browser/aboutRestartRequired.dtd", "restartRequired.header") }
""")
        )