fune/python/l10n/fluent_migrations/bug_1868154_RFPHelper.py
Eemeli Aro d63b2a2057 Bug 1868154 - Convert RFPHelper to Fluent. r=timhuang,fluent-reviewers,bolsson
As this code is uncovered by automated tests, I verified the changes manually:

1. In `about:preferences`, set a non-English preferred language.
2. Visit some public page (Perhaps not necessary? Not sure.)
3. In `about:config`, toggle the `privacy.resistFingerprinting` pref to true

This should present you with a confirmation prompt with the migrated message.

Differential Revision: https://phabricator.services.mozilla.com/D195446
2023-12-11 14:30:20 +00:00

22 lines
639 B
Python

# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
import fluent.syntax.ast as FTL
from fluent.migrate.transforms import COPY
def migrate(ctx):
"""Bug 1868154 - Convert RFPHelper strings to Fluent, part {index}."""
source = "browser/chrome/browser/browser.properties"
target = "toolkit/toolkit/global/resistFingerPrinting.ftl"
ctx.add_transforms(
target,
target,
[
FTL.Message(
id=FTL.Identifier("privacy-spoof-english"),
value=COPY(source, "privacy.spoof_english"),
),
],
)