Source code
Revision control
Copy as Markdown
Other Tools
# Any copyright is dedicated to the Public Domain.
import fluent.syntax.ast as FTL
from fluent.migrate.helpers import VARIABLE_REFERENCE
from fluent.migrate.transforms import COPY, REPLACE
def migrate(ctx):
ctx.add_transforms(
"devtools/client/toolbox-options.ftl",
"devtools/client/toolbox-options.ftl",
[
FTL.Message(
id=FTL.Identifier("options-tool-not-supported-marker"),
value=REPLACE(
"devtools/client/toolbox.properties",
"options.toolNotSupportedMarker",
{
"%1$S": VARIABLE_REFERENCE("toolLabel"),
},
),
),
FTL.Message(
id=FTL.Identifier("options-auto-theme-label"),
value=COPY(
"devtools/client/toolbox.properties",
"options.autoTheme.label",
),
),
FTL.Message(
id=FTL.Identifier("options-deprecation-notice"),
value=COPY(
"devtools/client/toolbox.properties",
"options.deprecationNotice",
),
),
],
)