Skip to content

Instantly share code, notes, and snippets.

@stasm
Forked from flodolo/test.py
Last active May 7, 2018 13:04
Show Gist options
  • Save stasm/74da56129b54b2d39cc887acef351acb to your computer and use it in GitHub Desktop.
Save stasm/74da56129b54b2d39cc887acef351acb to your computer and use it in GitHub Desktop.
# 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