-
-
Save stasm/74da56129b54b2d39cc887acef351acb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 import COPY | |
from fluent.migrate.helpers import transforms_from | |
def migrate(ctx): | |
"""Bug 1457948 - Migrate in-content/privacy.js to Fluent, part {index}.""" | |
class COPY_FROM_PREFERENCES(COPY): | |
def __init__(self, key): | |
super(COPY_FROM_PREFERENCES, self).__init__( | |
"browser/chrome/browser/preferences/preferences.properties", key) | |
ctx.add_transforms( | |
'browser/browser/preferences/permissions.ftl', | |
'browser/browser/preferences/permissions.ftl', | |
transforms_from( | |
""" | |
permissions-invalid-uri-title = { COPY_FROM_PREFERENCES("invalidURITitle") } | |
permissions-invalid-uri-label = { COPY_FROM_PREFERENCES("invalidURI") } | |
""", COPY_FROM_PREFERENCES=COPY_FROM_PREFERENCES | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment