python/l10n/fluent_migrations/bug_1488788_aboutrestartrequired.py
author Raza Haider <haiders2@msu.edu>
Mon, 24 Sep 2018 18:59:55 +0100
changeset 439357 6ed1e83038877539749f73b32c83ec887ae36681
parent 437925 eade7b3002168c6d346aae3ce561aff9d2857968
permissions -rw-r--r--
Bug 1488788 - Migrate about:restartrequired from DTD to Fluent. r=gijs,jaws,flod Differential Revision: https://phabricator.services.mozilla.com/D5495

# 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") }
""")
        )