python/l10n/fluent_migrations/bug_1517519_aboutTabCrashed.py
author Byron Campen [:bwc] <docfaraday@gmail.com>
Mon, 29 Apr 2019 15:51:30 +0000
changeset 471964 f8a6a019f873aaebc47740ea1423c0985aaedf69
parent 456066 dd9435f9df3f728f2ec5efeb572b40c985745a7f
permissions -rw-r--r--
Bug 1531803 - Part 3: Only set track id on JsepTrack if we're configured to emit track ids in SDP, and simplify some code. r=mjf Differential Revision: https://phabricator.services.mozilla.com/D25796

# -*- coding: utf-8 -*-

from __future__ import absolute_import
import fluent.syntax.ast as FTL
from fluent.migrate import REPLACE
from fluent.migrate import COPY
from fluent.migrate import CONCAT
from fluent.migrate.helpers import transforms_from
from fluent.migrate.helpers import TERM_REFERENCE
from fluent.migrate.helpers import MESSAGE_REFERENCE


def migrate(ctx):
    """Bug 1517519 - Migrate aboutTabCrashed to Fluent, part {index}."""
    
	
    
    ctx.add_transforms(
        "browser/browser/aboutTabCrashed.ftl",
        "browser/browser/aboutTabCrashed.ftl",
        transforms_from(
                
"""
crashed-title = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.title")}
crashed-close-tab-button = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.closeTab2")}
crashed-restore-tab-button = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.restoreTab")}
crashed-restore-all-button = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.restoreAll")}
crashed-header ={ COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.header2")}
crashed-offer-help = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.offerHelp2")}
crashed-request-help = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.requestHelp")}
crashed-request-report-title = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.requestReport")}
crashed-send-report = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.sendReport3")}
crashed-email-placeholder = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.emailPlaceholder")}
crashed-email-me = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.emailMe")}
crashed-request-auto-submit-title = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.requestAutoSubmit2")}
crashed-comment = 
    .placeholder = { COPY("browser/chrome/browser/aboutTabCrashed.dtd", "tabCrashed.commentPlaceholder2")}

"""
        )
    )
	
    ctx.add_transforms(
        "browser/browser/aboutTabCrashed.ftl",
        "browser/browser/aboutTabCrashed.ftl",
        [
			FTL.Message(
				id=FTL.Identifier("crashed-single-offer-help-message"),
				value=REPLACE(
					"browser/chrome/browser/aboutTabCrashed.dtd",
					"tabCrashed.single.offerHelpMessage2",
					{
						"&tabCrashed.restoreTab;" : MESSAGE_REFERENCE("crashed-restore-tab-button")
					}
				)
			),
			
			FTL.Message(
				id=FTL.Identifier("crashed-multiple-offer-help-message"),
				value=REPLACE(
					"browser/chrome/browser/aboutTabCrashed.dtd",
					"tabCrashed.multiple.offerHelpMessage2",
					{
						"&tabCrashed.restoreTab;" : MESSAGE_REFERENCE("crashed-restore-tab-button"),
						"&tabCrashed.restoreAll;" : MESSAGE_REFERENCE("crashed-restore-all-button")
					}
				)
			),
			
			FTL.Message(
				id=FTL.Identifier("crashed-request-help-message"),
				value=REPLACE(
					"browser/chrome/browser/aboutTabCrashed.dtd",
					"tabCrashed.requestHelpMessage",
					{
						"&brandShortName;" : TERM_REFERENCE("brand-short-name")
					}
				)
			),
			
			FTL.Message(
				id=FTL.Identifier("crashed-include-URL"),
				value=REPLACE(
					"browser/chrome/browser/aboutTabCrashed.dtd",
					"tabCrashed.includeURL3",
					{
						"&brandShortName;" : TERM_REFERENCE("brand-short-name")
					}
				)
			),
			
			FTL.Message(
				id=FTL.Identifier("crashed-report-sent"),
				value=REPLACE(
					"browser/chrome/browser/aboutTabCrashed.dtd",
					"tabCrashed.reportSent",
					{
						"&brandShortName;" : TERM_REFERENCE("brand-short-name")
					}
				)
			),
			
			FTL.Message(
				id=FTL.Identifier("crashed-auto-submit-checkbox"),
				value=REPLACE(
					"browser/chrome/browser/aboutTabCrashed.dtd",
					"tabCrashed.autoSubmit3",
					{
						"&brandShortName;" : TERM_REFERENCE("brand-short-name")
					}
				)
			)
		]
    )