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 import REPLACE
from fluent.migrate.helpers import VARIABLE_REFERENCE
def migrate(ctx):
source = "toolkit/chrome/global/autocomplete.properties"
target = "browser/browser/browser.ftl"
ctx.add_transforms(
target,
target,
[
FTL.Message(
id=FTL.Identifier("urlbar-result-bookmark-keyword-search"),
value=REPLACE(
source,
"bookmarkKeywordSearch",
{
"%1$S": VARIABLE_REFERENCE("domain"),
"%2$S": VARIABLE_REFERENCE("searchTerms"),
},
),
),
],
)