# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/

from fluent.migrate.helpers import transforms_from


def migrate(ctx):
    """Bug 1867385 - Migrate preferences category nav heading and managed notice strings, part {index}."""

    source = "browser/browser/preferences/preferences.ftl"
    target = source

    ctx.add_transforms(
        target,
        target,
        transforms_from(
            """
category-nav-heading =
    .heading = {COPY_PATTERN(from_path, "settings-page-title")}
managed-notice-nav =
    .label = {COPY_PATTERN(from_path, "managed-notice")}
""",
            from_path=source,
        ),
    )
