def migrate(ctx): """Bug 1727484 - Convert the 'Send Tab to Device' string in the tab context menu to title case, part {index}""" ctx.add_transforms( "browser/browser/tabContextMenu.ftl", "browser/browser/tabContextMenu.ftl", [ FTL.Message( id=FTL.Identifier("tab-context-send-tabs-to-device"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=PLURALS( "browser/chrome/browser/browser.properties", "sendTabsToDevice.label", VARIABLE_REFERENCE("tabCount"), lambda text: REPLACE_IN_TEXT( text, {"#1": VARIABLE_REFERENCE("tabCount")}), ), ), FTL.Attribute( id=FTL.Identifier("accesskey"), value=COPY( "browser/chrome/browser/browser.properties", "sendTabsToDevice.accesskey", ), ), ], ) ], )
def migrate(ctx): """Bug 1411012 - Migrate Do Not Track preferences to Fluent, part {index}.""" ctx.add_transforms( 'browser/browser/preferences/preferences.ftl', 'browser/browser/preferences/preferences.ftl', [ FTL.Message(id=FTL.Identifier('do-not-track-description'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'doNotTrack.description')), FTL.Message(id=FTL.Identifier('do-not-track-learn-more'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'doNotTrack.learnMore.label')), FTL.Message( id=FTL.Identifier('do-not-track-option-default'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY('browser/chrome/browser/preferences/privacy.dtd', 'doNotTrack.default.label')) ]), FTL.Message( id=FTL.Identifier('do-not-track-option-always'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY('browser/chrome/browser/preferences/privacy.dtd', 'doNotTrack.always.label')) ]), ])
def migrate(ctx): """Bug 1608188 - Migrate blocklist.dtd to Fluent, part {index}.""" ctx.add_transforms( "toolkit/toolkit/extensions/blocklist.ftl", "toolkit/toolkit/extensions/blocklist.ftl", transforms_from( """ blocklist-window = .title = { COPY(from_path, "blocklist.title", trim:"True") } .style = { COPY(from_path, "blocklist.style", trim:"True") } blocklist-soft-and-hard = { COPY(from_path, "blocklist.softandhard", trim:"True") } blocklist-hard-blocked = { COPY(from_path, "blocklist.hardblocked", trim:"True") } blocklist-soft-blocked = { COPY(from_path, "blocklist.softblocked", trim:"True") } blocklist-more-information = .value = { COPY(from_path, "blocklist.moreinfo", trim:"True") } blocklist-blocked = .label = { COPY(from_path, "blocklist.blocked.label", trim:"True") } blocklist-checkbox = .label = { COPY(from_path, "blocklist.checkbox.label", trim:"True") } """, from_path="toolkit/chrome/mozapps/extensions/blocklist.dtd")) ctx.add_transforms( "toolkit/toolkit/extensions/blocklist.ftl", "toolkit/toolkit/extensions/blocklist.ftl", [ FTL.Message( id=FTL.Identifier("blocklist-accept"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=REPLACE( "toolkit/chrome/mozapps/extensions/blocklist.dtd", "blocklist.accept.label", { "&brandShortName;": TERM_REFERENCE("brand-short-name") }, trim=True, )), FTL.Attribute( id=FTL.Identifier("accesskey"), value=COPY( "toolkit/chrome/mozapps/extensions/blocklist.dtd", "blocklist.accept.accesskey", trim=True, )), ]), FTL.Message( id=FTL.Identifier("blocklist-label-summary"), value=REPLACE( "toolkit/chrome/mozapps/extensions/blocklist.dtd", "blocklist.summary", {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, trim=True, )), ])
def migrate(ctx): """Bug 1517307 - Convert resetProfile.dtd to Fluent, part {index}.""" ctx.add_transforms( "toolkit/toolkit/global/resetProfile.ftl", "toolkit/toolkit/global/resetProfile.ftl", transforms_from(""" refresh-profile-description = { COPY("toolkit/chrome/global/resetProfile.dtd","refreshProfile.dialog.description1") } refresh-profile-description-details = { COPY("toolkit/chrome/global/resetProfile.dtd","refreshProfile.dialog.description2") } refresh-profile-remove = { COPY("toolkit/chrome/global/resetProfile.dtd","refreshProfile.dialog.items.label1") } refresh-profile-restore = { COPY("toolkit/chrome/global/resetProfile.dtd","refreshProfile.dialog.items.label2") } """)) ctx.add_transforms( "toolkit/toolkit/global/resetProfile.ftl", "toolkit/toolkit/global/resetProfile.ftl", [ FTL.Message(id=FTL.Identifier("refresh-profile-dialog"), attributes=[ FTL.Attribute( FTL.Identifier("title"), value=REPLACE( "toolkit/chrome/global/resetProfile.dtd", "refreshProfile.dialog.title", { "&brandShortName;": TERM_REFERENCE("brand-short-name") })) ]), FTL.Message(id=FTL.Identifier("refresh-profile-dialog-button"), attributes=[ FTL.Attribute( FTL.Identifier("label"), value=REPLACE( "toolkit/chrome/global/resetProfile.dtd", "refreshProfile.dialog.button.label", { "&brandShortName;": TERM_REFERENCE("brand-short-name") })) ]), FTL.Message( id=FTL.Identifier("refresh-profile"), value=REPLACE( "toolkit/chrome/global/resetProfile.dtd", "refreshProfile.title", {"&brandShortName;": TERM_REFERENCE("brand-short-name")})), FTL.Message( id=FTL.Identifier("refresh-profile-button"), value=REPLACE( "toolkit/chrome/global/resetProfile.dtd", "refreshProfile.button.label", {"&brandShortName;": TERM_REFERENCE("brand-short-name")})), ])
def to_entry(self): fp = FluentParser(False) # Handle standalone comments separately; they don't have any values or # attributes, just comment text. if self._type in [ast.ResourceComment, ast.GroupComment, ast.Comment]: return (self._type)(self.getnotes()) assert self.source is not None value = fp.maybe_get_pattern(FluentParserStream(self.source)) attributes = [ ast.Attribute( ast.Identifier(id), fp.maybe_get_pattern(FluentParserStream(value)), ) for (id, value) in self._attributes.items() ] comment = None if self.getnotes(): comment = ast.Comment(self.getnotes()) return (self._type if self._type is not None else ast.Message)( ast.Identifier(self.getid()), value=value, attributes=attributes, comment=comment, )
def migrate(ctx): """Bug 1703012: fix control center and identity panel proton styling - part {index}""" ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", [ FTL.Message( id=FTL.Identifier("identity-site-information"), value=REPLACE( "browser/chrome/browser/browser.properties", "identity.headerMainWithHost", { "%1$S": VARIABLE_REFERENCE("host"), }, ), ), FTL.Message( id=FTL.Identifier("identity-header-security-with-host"), attributes=[ FTL.Attribute( id=FTL.Identifier("title"), value=REPLACE( "browser/chrome/browser/browser.properties", "identity.headerSecurityWithHost", { "%1$S": VARIABLE_REFERENCE("host"), }, ), ), ], ), ], )
def migrate(ctx): """Bug 1445084 - Migrate search results pane of Preferences to Fluent, part {index}.""" ctx.add_transforms( 'browser/browser/preferences/preferences.ftl', 'browser/browser/preferences/preferences.ftl', [ FTL.Message( id=FTL.Identifier('search-input-box'), attributes=[ FTL.Attribute( FTL.Identifier('style'), CONCAT( FTL.TextElement('width: '), COPY( 'browser/chrome/browser/preferences/preferences.dtd', 'searchField.width')), ), FTL.Attribute( FTL.Identifier('placeholder'), FTL.Pattern([ FTL.Placeable( FTL.SelectExpression( expression=FTL.CallExpression( callee=FTL.Function('PLATFORM')), variants=[ FTL.Variant( key=FTL.VariantName('windows'), default=False, value=COPY( 'browser/chrome/browser/preferences/preferences.properties', 'searchInput.labelWin')), FTL.Variant( key=FTL.VariantName('other'), default=True, value=COPY( 'browser/chrome/browser/preferences/preferences.properties', 'searchInput.labelUnix')) ])) ])), ]), FTL.Message( id=FTL.Identifier('search-results-header'), value=COPY( 'browser/chrome/browser/preferences/preferences.dtd', 'paneSearchResults.title')), ])
def migrate(ctx): """Bug 1703003 - Migrate remove/cancel button in Bookmark panel to Fluent - part {index}""" ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", transforms_from( """ bookmark-panel-cancel = .label = { COPY(from_path, "editBookmarkPanel.cancel.label") } .accesskey = { COPY(from_path, "editBookmarkPanel.cancel.accesskey") } """, from_path="browser/chrome/browser/browser.properties", ), ) ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", [ FTL.Message( id=FTL.Identifier("bookmark-panel-remove"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=PLURALS( "browser/chrome/browser/browser.properties", "editBookmark.removeBookmarks.label", VARIABLE_REFERENCE("count"), lambda text: REPLACE_IN_TEXT( text, {"#1": VARIABLE_REFERENCE("count")}), ), ), FTL.Attribute( id=FTL.Identifier("accesskey"), value=COPY( "browser/chrome/browser/browser.properties", "editBookmark.removeBookmarks.accesskey", ), ), ], ) ], )
def migrate(ctx): """Bug 1668284 - Unknown content type change settings label is no longer accurate, part {index}.""" ctx.add_transforms( "toolkit/toolkit/global/unknownContentType.ftl", "toolkit/toolkit/global/unknownContentType.ftl", [ FTL.Message( id=FTL.Identifier("unknowncontenttype-settingschange"), attributes=[ FTL.Attribute( id=FTL.Identifier("value"), value=FTL.Pattern( elements=[ FTL.Placeable( expression=FTL.SelectExpression( selector=MESSAGE_REFERENCE("PLATFORM()"), variants=[ FTL.Variant( key=FTL.Identifier("windows"), default=False, value=REPLACE( "toolkit/chrome/mozapps/downloads/settingsChange.dtd", "settingsChangeOptions.label", { "&brandShortName;": TERM_REFERENCE( "brand-short-name" ), }, ), ), FTL.Variant( key=FTL.Identifier("other"), default=True, value=REPLACE( "toolkit/chrome/mozapps/downloads/settingsChange.dtd", "settingsChangePreferences.label", { "&brandShortName;": TERM_REFERENCE( "brand-short-name" ), }, ), ), ], ) ) ] ), ) ], ) ], )
def migrate(ctx): """Bug 1732151 - Convert dataReportingNotification to Fluent, part {index}.""" source = "browser/chrome/browser/browser.properties" target = "browser/browser/browser.ftl" ctx.add_transforms( target, target, [ FTL.Message( id=FTL.Identifier("data-reporting-notification-message"), value=REPLACE( source, "dataReportingNotification.message", { "%1$S": TERM_REFERENCE("brand-short-name"), "%2$S": TERM_REFERENCE("vendor-short-name"), }, ), ), FTL.Message( id=FTL.Identifier("data-reporting-notification-button"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=COPY(source, "dataReportingNotification.button.label"), ), FTL.Attribute( id=FTL.Identifier("accesskey"), value=COPY( source, "dataReportingNotification.button.accessKey"), ), ], ), ], )
def migrate(ctx): """Bug 1451992 - Migrate Preferences::Subdialogs::Select Bookmark to Fluent, part {index}.""" ctx.add_transforms( 'browser/browser/preferences/selectBookmark.ftl', 'browser/browser/preferences/selectBookmark.ftl', [ FTL.Message( id=FTL.Identifier('select-bookmark-window'), attributes=[ FTL.Attribute( FTL.Identifier('title'), COPY( 'browser/chrome/browser/preferences/selectBookmark.dtd', 'selectBookmark.title')), FTL.Attribute(FTL.Identifier('style'), CONCAT(FTL.TextElement('width: 32em;'))) ]), FTL.Message( id=FTL.Identifier('select-bookmark-desc'), value=COPY( 'browser/chrome/browser/preferences/selectBookmark.dtd', 'selectBookmark.label')) ])
def migrate(ctx): """Bug 1645619 - Migrate address bar placeholder to Fluent, part {index}.""" ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", [ FTL.Message( id=FTL.Identifier("urlbar-placeholder-with-name"), attributes=[ FTL.Attribute( id=FTL.Identifier("placeholder"), value=REPLACE( "browser/chrome/browser/browser.properties", "urlbar.placeholder", { "%1$S": VARIABLE_REFERENCE("name"), }, normalize_printf=True)), ]) ])
def build_ftl(messages, dtd, data): res = ast.Resource() for id_str in messages: msg = messages[id_str] l10n_id = ast.Identifier(id_str) val = None attrs = [] if msg['value']: dtd_val = get_value_from_dtd(msg['value'], dtd) val = ast.Pattern([ast.TextElement(dtd_val)]) for attr_name in msg['attrs']: dtd_val = get_value_from_dtd(msg['attrs'][attr_name], dtd) attr_val = ast.Pattern([ast.TextElement(dtd_val)]) attrs.append(ast.Attribute(ast.Identifier(attr_name), attr_val)) m = ast.Message(l10n_id, val, attrs) res.body.append(m) serializer = FluentSerializer() return serializer.serialize(res)
def migrate(ctx): """Bug 1631122 - Convert URL bar dtd strings in browser.xhtml to Fluent, part {index}.""" ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", transforms_from(""" urlbar-default-placeholder = .defaultPlaceholder = { COPY(from_path, "urlbar.placeholder2") } urlbar-placeholder = .placeholder = { COPY(from_path, "urlbar.placeholder2") } urlbar-remote-control-notification-anchor = .tooltiptext = { COPY(from_path, "urlbar.remoteControlNotificationAnchor.tooltip") } urlbar-permissions-granted = .tooltiptext = { COPY(from_path, "urlbar.permissionsGranted.tooltip") } urlbar-switch-to-tab = .value = { COPY(from_path, "urlbar.switchToTab.label") } urlbar-extension = .value = { COPY(from_path, "urlbar.extension.label") } urlbar-go-end-cap = .tooltiptext = { COPY(from_path, "goEndCap.tooltip") } urlbar-page-action-button = .tooltiptext = { COPY(from_path, "pageActionButton.tooltip") } """, from_path="browser/chrome/browser/browser.dtd")) ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", [ FTL.Message( id=FTL.Identifier("urlbar-pocket-button"), attributes=[ FTL.Attribute( id=FTL.Identifier("tooltiptext"), value=REPLACE( "browser/chrome/browser/browser.dtd", "pocketButton.tooltiptext", { "Pocket": TERM_REFERENCE("pocket-brand-name"), })), ]), ])
def migrate(ctx): """Bug 1497694 - Migrate Update History in Update section of Preferences to use Fluent for localization, part {index}.""" ctx.add_transforms( "toolkit/toolkit/updates/history.ftl", "toolkit/toolkit/updates/history.ftl", transforms_from(""" history-title = { COPY("toolkit/chrome/mozapps/update/history.dtd", "history.title") } history-intro = { COPY("toolkit/chrome/mozapps/update/history.dtd", "history2.intro") } close-button-label = .buttonlabelcancel = { COPY("toolkit/chrome/mozapps/update/history.dtd", "closebutton.label") } .title = { COPY("toolkit/chrome/mozapps/update/history.dtd", "history.title") } no-updates-label = { COPY("toolkit/chrome/mozapps/update/history.dtd", "noupdates.label") } name-header = { COPY("toolkit/chrome/mozapps/update/history.dtd", "name.header") } date-header = { COPY("toolkit/chrome/mozapps/update/history.dtd", "date.header") } type-header = { COPY("toolkit/chrome/mozapps/update/history.dtd", "type.header") } state-header = { COPY("toolkit/chrome/mozapps/update/history.dtd", "state.header") } """)) ctx.add_transforms( "toolkit/toolkit/updates/history.ftl", "toolkit/toolkit/updates/history.ftl", [ FTL.Message( id=FTL.Identifier("update-full-name"), attributes=[ FTL.Attribute( id=FTL.Identifier("name"), value=REPLACE( "toolkit/chrome/mozapps/update/updates.properties", "updateFullName", { "%1$S": VARIABLE_REFERENCE("name"), "%2$S": VARIABLE_REFERENCE("buildID"), }, normalize_printf=True)) ]) ])
def migrate(ctx): """Bug 1523741 - Migrate aboutTelemetry to Fluent, part {index}.""" ctx.add_transforms( "toolkit/toolkit/about/aboutTelemetry.ftl", "toolkit/toolkit/about/aboutTelemetry.ftl", transforms_from(""" about-telemetry-ping-data-source = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.pingDataSource", trim:"True") } about-telemetry-show-current-ping-data = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.showCurrentPingData", trim:"True") } about-telemetry-show-archived-ping-data = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.showArchivedPingData", trim:"True") } about-telemetry-show-subsession-data = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.showSubsessionData", trim:"True") } about-telemetry-choose-ping = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.choosePing", trim:"True") } about-telemetry-archive-ping-type = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.archivePingType", trim:"True") } about-telemetry-archive-ping-header = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.archivePingHeader", trim:"True") } about-telemetry-option-group-today = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.optionGroupToday", trim:"True") } about-telemetry-option-group-yesterday = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.optionGroupYesterday", trim:"True") } about-telemetry-option-group-older = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.optionGroupOlder", trim:"True") } about-telemetry-previous-ping = { COPY("toolkit/chrome/global/aboutTelemetry.dtd", "aboutTelemetry.previousPing", trim:"True") } about-telemetry-next-ping = { COPY("toolkit/chrome/global/aboutTelemetry.dtd", "aboutTelemetry.nextPing", trim:"True") } about-telemetry-page-title = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.pageTitle", trim:"True") } about-telemetry-more-information = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.moreInformations", trim:"True") } about-telemetry-show-in-Firefox-json-viewer = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.showInFirefoxJsonViewer", trim:"True") } about-telemetry-home-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.homeSection", trim:"True") } about-telemetry-general-data-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.generalDataSection", trim:"True") } about-telemetry-environment-data-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.environmentDataSection", trim:"True") } about-telemetry-session-info-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.sessionInfoSection", trim:"True") } about-telemetry-scalar-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.scalarsSection", trim:"True") } about-telemetry-keyed-scalar-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.keyedScalarsSection", trim:"True") } about-telemetry-histograms-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.histogramsSection", trim:"True") } about-telemetry-keyed-histogram-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.keyedHistogramsSection", trim:"True") } about-telemetry-events-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.eventsSection", trim:"True") } about-telemetry-simple-measurements-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.simpleMeasurementsSection", trim:"True") } about-telemetry-slow-sql-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.slowSqlSection", trim:"True") } about-telemetry-addon-details-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.addonDetailsSection", trim:"True") } about-telemetry-captured-stacks-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.capturedStacksSection", trim:"True") } about-telemetry-late-writes-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.lateWritesSection", trim:"True") } about-telemetry-raw-payload-section = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.rawPayloadSection", trim:"True") } about-telemetry-raw = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.raw", trim:"True") } about-telemetry-full-sql-warning = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.fullSqlWarning", trim:"True") } about-telemetry-fetch-stack-symbols = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.fetchStackSymbols", trim:"True") } about-telemetry-hide-stack-symbols = { COPY("toolkit/chrome/global/aboutTelemetry.dtd","aboutTelemetry.hideStackSymbols", trim:"True") } about-telemetry-data-type = { $channel -> [release] { COPY("toolkit/chrome/global/aboutTelemetry.properties","releaseData") } *[prerelease] { COPY("toolkit/chrome/global/aboutTelemetry.properties","prereleaseData") } } about-telemetry-upload-type = { $uploadcase -> [enabled] { COPY("toolkit/chrome/global/aboutTelemetry.properties","telemetryUploadEnabled") } *[disabled] { COPY("toolkit/chrome/global/aboutTelemetry.properties","telemetryUploadDisabled") } } about-telemetry-filter-all-placeholder = .placeholder = { COPY("toolkit/chrome/global/aboutTelemetry.properties","filterAllPlaceholder") } about-telemetry-current-ping-sidebar = { COPY("toolkit/chrome/global/aboutTelemetry.properties","currentPingSidebar") } about-telemetry-telemetry-ping-type-all = { COPY("toolkit/chrome/global/aboutTelemetry.properties","telemetryPingTypeAll") } about-telemetry-histogram-copy = { COPY("toolkit/chrome/global/aboutTelemetry.properties","histogramCopy") } about-telemetry-slow-sql-main = { COPY("toolkit/chrome/global/aboutTelemetry.properties","slowSqlMain") } about-telemetry-slow-sql-other = { COPY("toolkit/chrome/global/aboutTelemetry.properties","slowSqlOther") } about-telemetry-slow-sql-hits = { COPY("toolkit/chrome/global/aboutTelemetry.properties","slowSqlHits") } about-telemetry-slow-sql-average = { COPY("toolkit/chrome/global/aboutTelemetry.properties","slowSqlAverage") } about-telemetry-slow-sql-statement = { COPY("toolkit/chrome/global/aboutTelemetry.properties","slowSqlStatement") } about-telemetry-addon-table-id = { COPY("toolkit/chrome/global/aboutTelemetry.properties","addonTableID") } about-telemetry-addon-table-details = { COPY("toolkit/chrome/global/aboutTelemetry.properties","addonTableDetails") } about-telemetry-keys-header = { COPY("toolkit/chrome/global/aboutTelemetry.properties","keysHeader") } about-telemetry-names-header = { COPY("toolkit/chrome/global/aboutTelemetry.properties","namesHeader") } about-telemetry-values-header = { COPY("toolkit/chrome/global/aboutTelemetry.properties","valuesHeader") } about-telemetry-stack-title = { COPY("toolkit/chrome/global/aboutTelemetry.properties","stackTitle") } about-telemetry-memory-map-title = { COPY("toolkit/chrome/global/aboutTelemetry.properties","memoryMapTitle") } about-telemetry-error-fetching-symbols = { COPY("toolkit/chrome/global/aboutTelemetry.properties","errorFetchingSymbols") } about-telemetry-time-stamp-header = { COPY("toolkit/chrome/global/aboutTelemetry.properties","timestampHeader") } about-telemetry-category-header = { COPY("toolkit/chrome/global/aboutTelemetry.properties","categoryHeader") } about-telemetry-method-header = { COPY("toolkit/chrome/global/aboutTelemetry.properties","methodHeader") } about-telemetry-object-header = { COPY("toolkit/chrome/global/aboutTelemetry.properties","objectHeader") } about-telemetry-extra-header = { COPY("toolkit/chrome/global/aboutTelemetry.properties","extraHeader") } """)) ctx.add_transforms( "toolkit/toolkit/about/aboutTelemetry.ftl", "toolkit/toolkit/about/aboutTelemetry.ftl", [ FTL.Message( id=FTL.Identifier("about-telemetry-firefox-data-doc"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.dtd", "aboutTelemetry.firefoxDataDoc", { "<a>": FTL.TextElement('<a data-l10n-name="data-doc-link">'), }, trim=True)), FTL.Message( id=FTL.Identifier("about-telemetry-telemetry-client-doc"), value=REPLACE("toolkit/chrome/global/aboutTelemetry.dtd", "aboutTelemetry.telemetryClientDoc", { "<a>": FTL.TextElement( '<a data-l10n-name="client-doc-link">'), }, trim=True)), FTL.Message( id=FTL.Identifier("about-telemetry-telemetry-dashboard"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.dtd", "aboutTelemetry.telemetryDashboard", { "<a>": FTL.TextElement('<a data-l10n-name="dashboard-link">'), }, trim=True)), FTL.Message( id=FTL.Identifier( "about-telemetry-telemetry-probe-dictionary"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.dtd", "aboutTelemetry.telemetryProbeDictionary", { "<a>": FTL.TextElement( '<a data-l10n-name="probe-dictionary-link">'), }, trim=True)), FTL.Message( id=FTL.Identifier("about-telemetry-page-subtitle"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "pageSubtitle", { "%1$S": VARIABLE_REFERENCE("telemetryServerOwner"), "%2$S": TERM_REFERENCE("brand-full-name"), }, normalize_printf=True)), FTL.Message( id=FTL.Identifier("about-telemetry-settings-explanation"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "settingsExplanation", { "%1$S": MESSAGE_REFERENCE("about-telemetry-data-type"), "%2$S": CONCAT( FTL.TextElement( '<a data-l10n-name="upload-link">'), MESSAGE_REFERENCE("about-telemetry-upload-type"), FTL.TextElement("</a>")), }, normalize_printf=True)), FTL.Message( id=FTL.Identifier("about-telemetry-ping-details"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "pingDetails", { "%1$S": CONCAT( FTL.TextElement('<a data-l10n-name="ping-link">'), COPY( "toolkit/chrome/global/aboutTelemetry.properties", "pingExplanationLink"), FTL.TextElement("</a>")), "%2$S": REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "namedPing", { "%1$S": VARIABLE_REFERENCE("name"), "%2$S": VARIABLE_REFERENCE("timestamp"), }, normalize_printf=True) }, normalize_printf=True)), FTL.Message( id=FTL.Identifier("about-telemetry-ping-details-current"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "pingDetailsCurrent", { "%1$S": CONCAT( FTL.TextElement('<a data-l10n-name="ping-link">'), COPY( "toolkit/chrome/global/aboutTelemetry.properties", "pingExplanationLink"), FTL.TextElement("</a>")), "%2$S": COPY("toolkit/chrome/global/aboutTelemetry.properties", "currentPing") }, normalize_printf=True)), FTL.Message( id=FTL.Identifier("about-telemetry-filter-placeholder"), attributes=[ FTL.Attribute( id=FTL.Identifier("placeholder"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "filterPlaceholder", { "%1$S": VARIABLE_REFERENCE("selectedTitle"), }, normalize_printf=True)) ]), FTL.Message( id=FTL.Identifier("about-telemetry-results-for-search"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "resultsForSearch", { "%1$S": VARIABLE_REFERENCE("searchTerms"), }, normalize_printf=True)), FTL.Message( id=FTL.Identifier("about-telemetry-no-search-results"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "noSearchResults", { "%1$S": VARIABLE_REFERENCE("sectionName"), "%2$S": VARIABLE_REFERENCE("currentSearchText"), }, normalize_printf=True)), FTL.Message( id=FTL.Identifier("about-telemetry-no-search-results-all"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "noSearchResultsAll", { "%1$S": VARIABLE_REFERENCE("searchTerms"), }, normalize_printf=True)), FTL.Message( id=FTL.Identifier("about-telemetry-no-data-to-display"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "noDataToDisplay", { "%1$S": VARIABLE_REFERENCE("sectionName"), }, normalize_printf=True)), FTL.Message(id=FTL.Identifier("about-telemetry-addon-provider"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "addonProvider", { "%1$S": VARIABLE_REFERENCE("addonProvider"), }, normalize_printf=True)), FTL.Message( id=FTL.Identifier("about-telemetry-captured-stacks-title"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "captured-stacks-title", { "%1$S": VARIABLE_REFERENCE("stackKey"), "%2$S": VARIABLE_REFERENCE("capturedStacksCount"), }, normalize_printf=True)), FTL.Message(id=FTL.Identifier("about-telemetry-late-writes-title"), value=REPLACE( "toolkit/chrome/global/aboutTelemetry.properties", "late-writes-title", { "%1$S": VARIABLE_REFERENCE("lateWriteCount"), }, normalize_printf=True)), ])
def migrate(ctx): """Bug 1635548 - Migrate browser-context.inc to Fluent, part {index}""" target = "toolkit/toolkit/global/textActions.ftl" reference = "toolkit/toolkit/global/textActions.ftl" ctx.add_transforms( target, reference, transforms_from( """ text-action-spell-add-to-dictionary = .label = { COPY(from_path, "spellAddToDictionary.label") } .accesskey = { COPY(from_path, "spellAddToDictionary.accesskey") } text-action-spell-undo-add-to-dictionary = .label = { COPY(from_path, "spellUndoAddToDictionary.label") } .accesskey = { COPY(from_path, "spellUndoAddToDictionary.accesskey") } text-action-spell-check-toggle = .label = { COPY(from_path, "spellCheckToggle.label") } .accesskey = { COPY(from_path, "spellCheckToggle.accesskey") } text-action-spell-dictionaries = .label = { COPY(from_path, "spellDictionaries.label") } .accesskey = { COPY(from_path, "spellDictionaries.accesskey") } """, from_path="toolkit/chrome/global/textcontext.dtd", ), ) target = "toolkit/toolkit/global/textActions.ftl" reference = "toolkit/toolkit/global/textActions.ftl" ctx.add_transforms( target, reference, transforms_from( """ text-action-spell-add-dictionaries = .label = { COPY(from_path, "spellAddDictionaries.label") } .accesskey = { COPY(from_path, "spellAddDictionaries.accesskey") } """, from_path="browser/chrome/browser/browser.dtd", ), ) target = "browser/browser/browserContext.ftl" reference = "browser/browser/browserContext.ftl" ctx.add_transforms( target, reference, [ FTL.Message( id=FTL.Identifier( "main-context-menu-open-link-in-container-tab"), attributes=[ FTL.Attribute( FTL.Identifier("label"), REPLACE( "browser/chrome/browser/browser.properties", "userContextOpenLink.label", {"%1$S": VARIABLE_REFERENCE("containerName")}, ), ), FTL.Attribute( FTL.Identifier("accesskey"), COPY( "browser/chrome/browser/browser.dtd", "openLinkCmdInTab.accesskey", ), ), ], ) ], )
def migrate(ctx): """Bug 1451992 - Migrate Preferences::Subdialogs::Languages to Fluent, part {index}.""" ctx.add_transforms( 'browser/browser/preferences/languages.ftl', 'browser/browser/preferences/languages.ftl', [ FTL.Message( id=FTL.Identifier('languages-window'), attributes=[ FTL.Attribute( FTL.Identifier('title'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.Header')), FTL.Attribute( FTL.Identifier('style'), CONCAT( FTL.TextElement('width: '), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'window.width'))) ]), FTL.Message(id=FTL.Identifier('languages-close-key'), attributes=[ FTL.Attribute( FTL.Identifier('key'), COPY('toolkit/chrome/global/preferences.dtd', 'windowClose.key')) ]), FTL.Message(id=FTL.Identifier('languages-description'), value=COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize2.description')), FTL.Message( id=FTL.Identifier('languages-customize-spoof-english'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.spoofEnglish')) ]), FTL.Message( id=FTL.Identifier('languages-customize-moveup'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.moveUp.label')), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.moveUp.accesskey')) ]), FTL.Message( id=FTL.Identifier('languages-customize-movedown'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.moveDown.label')), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.moveDown.accesskey')) ]), FTL.Message( id=FTL.Identifier('languages-customize-remove'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.deleteButton.label')), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.deleteButton.accesskey')) ]), FTL.Message( id=FTL.Identifier('languages-customize-select-language'), attributes=[ FTL.Attribute( FTL.Identifier('placeholder'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.selectLanguage.label')), ]), FTL.Message( id=FTL.Identifier('languages-customize-add'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.addButton.label')), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/languages.dtd', 'languages.customize.addButton.accesskey')) ]) ])
def migrate(ctx): """Bug 1451992 - Migrate Preferences::Subdialogs::Colors to Fluent, part {index}.""" ctx.add_transforms( 'browser/browser/preferences/colors.ftl', 'browser/browser/preferences/colors.ftl', [ FTL.Message( id=FTL.Identifier('colors-window'), attributes=[ FTL.Attribute( FTL.Identifier('title'), COPY('browser/chrome/browser/preferences/colors.dtd', 'colorsDialog.title')), FTL.Attribute( FTL.Identifier('style'), FTL.Pattern(elements=[ FTL.Placeable(expression=FTL.SelectExpression( expression=FTL.CallExpression( callee=FTL.Function('PLATFORM')), variants=[ FTL.Variant( key=FTL.VariantName('macos'), default=False, value=CONCAT( FTL.TextElement('width: '), COPY( 'browser/chrome/browser/preferences/colors.dtd', 'window.macWidth'))), FTL.Variant( key=FTL.VariantName('other'), default=True, value=CONCAT( FTL.TextElement('width: '), COPY( 'browser/chrome/browser/preferences/colors.dtd', 'window.width'))) ])) ])) ]), FTL.Message(id=FTL.Identifier('colors-close-key'), attributes=[ FTL.Attribute( FTL.Identifier('key'), COPY('toolkit/chrome/global/preferences.dtd', 'windowClose.key')) ]), FTL.Message( id=FTL.Identifier('colors-page-override'), value=COPY('browser/chrome/browser/preferences/colors.dtd', 'overrideDefaultPageColors2.label'), attributes=[ FTL.Attribute( FTL.Identifier('accesskey'), COPY('browser/chrome/browser/preferences/colors.dtd', 'overrideDefaultPageColors2.accesskey')) ]), FTL.Message( id=FTL.Identifier('colors-page-override-option-always'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY('browser/chrome/browser/preferences/colors.dtd', 'overrideDefaultPageColors.always.label')) ]), FTL.Message( id=FTL.Identifier('colors-page-override-option-auto'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY('browser/chrome/browser/preferences/colors.dtd', 'overrideDefaultPageColors.auto.label')) ]), FTL.Message( id=FTL.Identifier('colors-page-override-option-never'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY('browser/chrome/browser/preferences/colors.dtd', 'overrideDefaultPageColors.never.label'), ), ], ), FTL.Message(id=FTL.Identifier('colors-text-and-background'), value=COPY( 'browser/chrome/browser/preferences/colors.dtd', 'color')), FTL.Message( id=FTL.Identifier('colors-text-header'), value=COPY('browser/chrome/browser/preferences/colors.dtd', 'textColor2.label'), attributes=[ FTL.Attribute( FTL.Identifier('accesskey'), COPY('browser/chrome/browser/preferences/colors.dtd', 'textColor2.accesskey')) ]), FTL.Message( id=FTL.Identifier('colors-background'), value=COPY('browser/chrome/browser/preferences/colors.dtd', 'backgroundColor2.label'), attributes=[ FTL.Attribute( FTL.Identifier('accesskey'), COPY('browser/chrome/browser/preferences/colors.dtd', 'backgroundColor2.accesskey')) ]), FTL.Message( id=FTL.Identifier('colors-use-system'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY('browser/chrome/browser/preferences/colors.dtd', 'useSystemColors.label')), FTL.Attribute( FTL.Identifier('accesskey'), COPY('browser/chrome/browser/preferences/colors.dtd', 'useSystemColors.accesskey')) ]), FTL.Message( id=FTL.Identifier('colors-underline-links'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY('browser/chrome/browser/preferences/colors.dtd', 'underlineLinks.label')), FTL.Attribute( FTL.Identifier('accesskey'), COPY('browser/chrome/browser/preferences/colors.dtd', 'underlineLinks.accesskey')) ]), FTL.Message(id=FTL.Identifier('colors-links-header'), value=COPY( 'browser/chrome/browser/preferences/colors.dtd', 'links')), FTL.Message( id=FTL.Identifier('colors-unvisited-links'), value=COPY('browser/chrome/browser/preferences/colors.dtd', 'linkColor2.label'), attributes=[ FTL.Attribute( FTL.Identifier('accesskey'), COPY('browser/chrome/browser/preferences/colors.dtd', 'linkColor2.accesskey')) ]), FTL.Message( id=FTL.Identifier('colors-visited-links'), value=COPY('browser/chrome/browser/preferences/colors.dtd', 'visitedLinkColor2.label'), attributes=[ FTL.Attribute( FTL.Identifier('accesskey'), COPY('browser/chrome/browser/preferences/colors.dtd', 'visitedLinkColor2.accesskey')) ]) ])
def migrate(ctx): """Bug 1505846 Migrate about:searchreset to Fluent, part {index} """ ctx.add_transforms( "browser/browser/aboutSearchReset.ftl", "browser/browser/aboutSearchReset.ftl", transforms_from(""" tab-title = { COPY("browser/chrome/browser/aboutSearchReset.dtd", "searchreset.tabtitle") } page-title = { COPY("browser/chrome/browser/aboutSearchReset.dtd", "searchreset.pageTitle") } """)) ctx.add_transforms( "browser/browser/aboutSearchReset.ftl", "browser/browser/aboutSearchReset.ftl", [ FTL.Message(id=FTL.Identifier("page-info-outofdate"), value=REPLACE( "browser/chrome/browser/aboutSearchReset.dtd", "searchreset.pageInfo1", { "&brandShortName;": TERM_REFERENCE("-brand-short-name"), })), FTL.Message(id=FTL.Identifier("page-info-how-to-change"), value=CONCAT( COPY( "browser/chrome/browser/aboutSearchReset.dtd", "searchreset.beforelink.pageInfo2", ), FTL.TextElement('<a data-l10n-name="link">'), COPY( "browser/chrome/browser/aboutSearchReset.dtd", "searchreset.link.pageInfo2", ), FTL.TextElement("</a>"), COPY( "browser/chrome/browser/aboutSearchReset.dtd", "searchreset.afterlink.pageInfo2", ))), FTL.Message( id=FTL.Identifier("no-change-button"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=COPY( "browser/chrome/browser/aboutSearchReset.dtd", "searchreset.noChangeButton", )), FTL.Attribute( id=FTL.Identifier("accesskey"), value=COPY( "browser/chrome/browser/aboutSearchReset.dtd", "searchreset.noChangeButton.access", )), ]), FTL.Message( id=FTL.Identifier("change-engine-button"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=COPY( "browser/chrome/browser/aboutSearchReset.dtd", "searchreset.changeEngineButton", )), FTL.Attribute( id=FTL.Identifier("accesskey"), value=COPY( "browser/chrome/browser/aboutSearchReset.dtd", "searchreset.changeEngineButton.access", )), ]), FTL.Message( id=FTL.Identifier("page-info-new-search-engine"), value=CONCAT( COPY( "browser/chrome/browser/aboutSearchReset.dtd", "searchreset.selector.label", ), FTL.TextElement( ' <span data-l10n-name="default-engine">{ $searchEngine }</span>' ), )) ])
def migrate(ctx): """Bug 1634042 - Adding page action labels to fluent, part {index}.""" ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", transforms_from( """ page-action-pin-tab-panel = .label = { COPY(from_path, "pinTab.label") } page-action-pin-tab-urlbar = .tooltiptext = { COPY(from_path, "pinTab.label") } page-action-unpin-tab-panel = .label = { COPY(from_path, "unpinTab.label") } page-action-unpin-tab-urlbar = .tooltiptext = { COPY(from_path, "unpinTab.label") } page-action-copy-url-panel = .label = { COPY(from_path, "pageAction.copyLink.label") } page-action-copy-url-urlbar = .tooltiptext = { COPY(from_path, "pageAction.copyLink.label") } page-action-email-link-panel = .label = { COPY(from_path, "emailPageCmd.label") } page-action-email-link-urlbar = .tooltiptext = { COPY(from_path, "emailPageCmd.label") } page-action-share-url-panel = .label = { COPY(from_path, "pageAction.shareUrl.label") } page-action-share-url-urlbar = .tooltiptext = { COPY(from_path, "pageAction.shareUrl.label") } page-action-share-more-panel = .label = { COPY(from_path, "pageAction.shareMore.label") } page-action-send-tab-not-ready = .label = { COPY(from_path, "sendToDevice.syncNotReady.label") } """, from_path="browser/chrome/browser/browser.dtd", ), ) ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", [ FTL.Message( id=FTL.Identifier("page-action-pocket-panel"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=REPLACE( "browser/chrome/browser/browser.dtd", "saveToPocketCmd.label", { "Pocket": TERM_REFERENCE("pocket-brand-name"), }, ), ) ], ) ], ) ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", [ FTL.Message( id=FTL.Identifier("page-action-send-tabs-panel"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=PLURALS( "browser/chrome/browser/browser.properties", "pageAction.sendTabsToDevice.label", VARIABLE_REFERENCE("tabCount"), lambda text: REPLACE_IN_TEXT( text, {"#1": VARIABLE_REFERENCE("tabCount")} ), ), ) ], ) ], ) ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", [ FTL.Message( id=FTL.Identifier("page-action-send-tabs-urlbar"), attributes=[ FTL.Attribute( id=FTL.Identifier("tooltiptext"), value=PLURALS( "browser/chrome/browser/browser.properties", "pageAction.sendTabsToDevice.label", VARIABLE_REFERENCE("tabCount"), lambda text: REPLACE_IN_TEXT( text, {"#1": VARIABLE_REFERENCE("tabCount")} ), ), ) ], ) ], )
def migrate(ctx): """Bug 1419547 - Migrate Preferences::Containers to Fluent, part {index}.""" ctx.add_transforms( 'browser/browser/preferences/preferences.ftl', 'browser/browser/preferences/preferences.ftl', [ FTL.Message( id=FTL.Identifier('containers-back-link'), value=COPY('browser/chrome/browser/preferences/containers.dtd', 'backLink2.label')), FTL.Message( id=FTL.Identifier('containers-header'), value=COPY( 'browser/chrome/browser/preferences/preferences.dtd', 'paneContainers.title', )), FTL.Message( id=FTL.Identifier('containers-add-button'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'addButton.label')), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'addButton.accesskey')), ]), FTL.Message( id=FTL.Identifier('containers-preferences-button'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'preferencesButton.label')), ]), FTL.Message( id=FTL.Identifier('containers-remove-button'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'removeButton.label')), ]), ]) ctx.add_transforms('browser/browser/preferences/containers.ftl', 'browser/browser/preferences/containers.ftl', [ FTL. Message( id=FTL.Identifier('containers-window-new'), attributes=[ FTL. Attribute( FTL. Identifier('title'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'window.title', ), ), FTL. Attribute( FTL. Identifier('style'), CONCAT( FTL. TextElement('width: '), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'window.width', ), ), ), ], ), FTL. Message( id=FTL.Identifier('containers-window-update'), attributes=[ FTL. Attribute( FTL. Identifier('title'), REPLACE( 'browser/chrome/browser/preferences/containers.properties', 'containers.updateContainerTitle', {'%S': EXTERNAL_ARGUMENT('name')}, ), ), FTL. Attribute( FTL. Identifier('style'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'window.width', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-window-close'), attributes=[ FTL. Attribute( FTL .Identifier('key'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'windowClose.key', ), ), ], ), FTL. Term( id=FTL.Identifier('-containers-labels-style'), value=CONCAT( FTL. TextElement('min-width: '), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.labelMinWidth', ), ), ), FTL. Message( id=FTL.Identifier('containers-name-label'), value=COPY( 'browser/chrome/browser/preferences/containers.dtd', 'name2.label', ), attributes=[ FTL. Attribute( FTL. Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'name2.accesskey', ), ), FTL. Attribute( FTL. Identifier('style'), CONCAT(MESSAGE_REFERENCE('-containers-labels-style'), )), ], ), FTL. Message( id=FTL.Identifier('containers-name-text'), attributes=[ FTL. Attribute( FTL. Identifier('placeholder'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'name.placeholder', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-icon-label'), value=COPY( 'browser/chrome/browser/preferences/containers.dtd', 'icon2.label', ), attributes=[ FTL. Attribute( FTL. Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'icon2.accesskey', ), ), FTL. Attribute( FTL. Identifier('style'), CONCAT(MESSAGE_REFERENCE('-containers-labels-style'), )), ], ), FTL. Message( id=FTL.Identifier('containers-color-label'), value=COPY( 'browser/chrome/browser/preferences/containers.dtd', 'color2.label', ), attributes=[ FTL. Attribute( FTL. Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'color2.accesskey', ), ), FTL. Attribute( FTL. Identifier('style'), CONCAT(MESSAGE_REFERENCE('-containers-labels-style'), )), ], ), FTL. Message( id=FTL.Identifier('containers-button-done'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'button.ok.label', ), ), FTL. Attribute( FTL. Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/containers.dtd', 'button.ok.accesskey', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-remove-alert-title'), value=COPY( 'browser/chrome/browser/preferences/preferences.properties', 'removeContainerAlertTitle', ), ), FTL. Message( id=FTL.Identifier('containers-remove-alert-msg'), value=PLURALS( 'browser/chrome/browser/preferences/preferences.properties', 'removeContainerMsg', EXTERNAL_ARGUMENT('count'), lambda text: REPLACE_IN_TEXT(text, {'#S': EXTERNAL_ARGUMENT('count')})) ), FTL. Message( id=FTL.Identifier('containers-remove-ok-button'), value=COPY( 'browser/chrome/browser/preferences/preferences.properties', 'removeContainerOkButton', ), ), FTL. Message( id=FTL.Identifier('containers-remove-cancel-button'), value=COPY( 'browser/chrome/browser/preferences/preferences.properties', 'removeContainerButton2', ), ), FTL. Message( id=FTL.Identifier('containers-color-blue'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.blue.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-color-turquoise'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.turquoise.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-color-green'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.green.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-color-yellow'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.yellow.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-color-orange'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.orange.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-color-red'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.red.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-color-pink'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.pink.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-color-purple'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.purple.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-icon-fingerprint'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.fingerprint.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-icon-briefcase'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.briefcase.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-icon-dollar'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.dollar.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-icon-cart'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.cart.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-icon-circle'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.circle.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-icon-vacation'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.vacation.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-icon-gift'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.gift.label', ), ), ], ), FTL. Message( id=FTL.Identifier('containers-icon-food'), attributes=[ FTL. Attribute( FTL. Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.food.label', ), ), ], ), FTL.Message( id=FTL.Identifier('containers-icon-fruit'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.fruit.label', ), ), ], ), FTL.Message( id=FTL.Identifier('containers-icon-pet'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.pet.label', ), ), ], ), FTL.Message( id=FTL.Identifier('containers-icon-tree'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.tree.label', ), ), ], ), FTL.Message( id=FTL.Identifier('containers-icon-chill'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/containers.properties', 'containers.chill.label', ), ), ], ), ])
def migrate(ctx): """Bug 1615501 - Fluent migration recipe for Preferences subdialogs, part {index}.""" ctx.add_transforms( "mail/messenger/preferences/system-integration.ftl", "mail/messenger/preferences/system-integration.ftl", transforms_from( """ system-integration-title = .title = { COPY(from_path, "systemIntegration.title") } system-integration-dialog = .buttonlabelaccept = { COPY(from_path, "acceptIntegration.label") } .buttonlabelcancel = { COPY(from_path, "cancelIntegration.label") } .buttonlabelcancel2 = { COPY(from_path, "cancelIntegration2.label") } checkbox-email-label = .label = { COPY(from_path, "email.label") } .tooltiptext = { unset-default-tooltip } checkbox-newsgroups-label = .label = { COPY(from_path, "newsgroups.label") } .tooltiptext = { unset-default-tooltip } checkbox-feeds-label = .label = { COPY(from_path, "feeds.label") } .tooltiptext = { unset-default-tooltip } system-search-engine-name = { PLATFORM() -> [macos] { COPY("mail/chrome/messenger/searchIntegrationMac.dtd", "searchIntegration.engineName") } [windows] { COPY("mail/chrome/messenger/searchIntegrationWin.dtd", "searchIntegration.engineName") } *[other] { COPY("mail/chrome/messenger/searchIntegrationDefault.dtd", "searchIntegration.engineName") } } """, from_path="mail/chrome/messenger/systemIntegrationDialog.dtd")) ctx.add_transforms( "mail/messenger/preferences/system-integration.ftl", "mail/messenger/preferences/system-integration.ftl", [ FTL.Message( id=FTL.Identifier("default-client-intro"), value=REPLACE( "mail/chrome/messenger/systemIntegrationDialog.dtd", "defaultClient.intro", {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, )), FTL.Message( id=FTL.Identifier("unset-default-tooltip"), value=REPLACE( "mail/chrome/messenger/systemIntegrationDialog.dtd", "unsetDefault.tooltip", {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, )), FTL.Message( id=FTL.Identifier("system-search-integration-label"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=REPLACE( "mail/chrome/messenger/systemIntegrationDialog.dtd", "searchIntegration.label", { "&searchIntegration.engineName;": MESSAGE_REFERENCE("system-search-engine-name") }, )), FTL.Attribute( id=FTL.Identifier("accesskey"), value=COPY( "mail/chrome/messenger/systemIntegrationDialog.dtd", "searchIntegration.accesskey")) ]), FTL.Message( id=FTL.Identifier("check-on-startup-label"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=REPLACE( "mail/chrome/messenger/systemIntegrationDialog.dtd", "checkOnStartup.label", { "&brandShortName;": TERM_REFERENCE("brand-short-name") }, )), FTL.Attribute( id=FTL.Identifier("accesskey"), value=COPY( "mail/chrome/messenger/systemIntegrationDialog.dtd", "checkOnStartup.accesskey")) ]), ]) ctx.add_transforms( "mail/messenger/preferences/fonts.ftl", "mail/messenger/preferences/fonts.ftl", transforms_from( """ fonts-encoding-dialog-title = .title = { COPY(from_path, "fontsAndEncodingsDialog.title") } fonts-language-legend = .value = { COPY(from_path, "language.label") } .accesskey = { COPY(from_path, "language.accesskey") } fonts-proportional-label = .value = { COPY(from_path, "proportional.label") } .accesskey = { COPY(from_path, "proportional.accesskey") } font-language-group-latin = .label = { COPY(from_path, "font.langGroup.latin") } font-language-group-japanese = .label = { COPY(from_path, "font.langGroup.japanese") } font-language-group-trad-chinese = .label = { COPY(from_path, "font.langGroup.trad-chinese") } font-language-group-simpl-chinese = .label = { COPY(from_path, "font.langGroup.simpl-chinese") } font-language-group-trad-chinese-hk = .label = { COPY(from_path, "font.langGroup.trad-chinese-hk") } font-language-group-korean = .label = { COPY(from_path, "font.langGroup.korean") } font-language-group-cyrillic = .label = { COPY(from_path, "font.langGroup.cyrillic") } font-language-group-el = .label = { COPY(from_path, "font.langGroup.el") } font-language-group-other = .label = { COPY(from_path, "font.langGroup.other") } font-language-group-thai = .label = { COPY(from_path, "font.langGroup.thai") } font-language-group-hebrew = .label = { COPY(from_path, "font.langGroup.hebrew") } font-language-group-arabic = .label = { COPY(from_path, "font.langGroup.arabic") } font-language-group-devanagari = .label = { COPY(from_path, "font.langGroup.devanagari") } font-language-group-tamil = .label = { COPY(from_path, "font.langGroup.tamil") } font-language-group-armenian = .label = { COPY(from_path, "font.langGroup.armenian") } font-language-group-bengali = .label = { COPY(from_path, "font.langGroup.bengali") } font-language-group-canadian = .label = { COPY(from_path, "font.langGroup.canadian") } font-language-group-ethiopic = .label = { COPY(from_path, "font.langGroup.ethiopic") } font-language-group-georgian = .label = { COPY(from_path, "font.langGroup.georgian") } font-language-group-gujarati = .label = { COPY(from_path, "font.langGroup.gujarati") } font-language-group-gurmukhi = .label = { COPY(from_path, "font.langGroup.gurmukhi") } font-language-group-khmer = .label = { COPY(from_path, "font.langGroup.khmer") } font-language-group-malayalam = .label = { COPY(from_path, "font.langGroup.malayalam") } font-language-group-math = .label = { COPY(from_path, "font.langGroup.math") } font-language-group-odia = .label = { COPY(from_path, "font.langGroup.odia") } font-language-group-telugu = .label = { COPY(from_path, "font.langGroup.telugu") } font-language-group-kannada = .label = { COPY(from_path, "font.langGroup.kannada") } font-language-group-sinhala = .label = { COPY(from_path, "font.langGroup.sinhala") } font-language-group-tibetan = .label = { COPY(from_path, "font.langGroup.tibetan") } default-font-serif = .label = { COPY(from_path, "useDefaultFontSerif.label") } default-font-sans-serif = .label = { COPY(from_path, "useDefaultFontSansSerif.label") } font-size-label = .value = { COPY(from_path, "size.label") } .accesskey = { COPY(from_path, "sizeProportional.accesskey") } font-size-monospace-label = .value = { COPY(from_path, "size.label") } .accesskey = { COPY(from_path, "sizeMonospace.accesskey") } font-serif-label = .value = { COPY(from_path, "serif.label") } .accesskey = { COPY(from_path, "serif.accesskey") } font-sans-serif-label = .value = { COPY(from_path, "sans-serif.label") } .accesskey = { COPY(from_path, "sans-serif.accesskey") } font-monospace-label = .value = { COPY(from_path, "monospace.label") } .accesskey = { COPY(from_path, "monospace.accesskey") } font-min-size-label = .value = { COPY(from_path, "minSize.label") } .accesskey = { COPY(from_path, "minSize.accesskey") } min-size-none = .label = { COPY(from_path, "minSize.none") } font-control-legend = { COPY(from_path, "fontControl.label") } use-document-fonts-checkbox = .label = { COPY(from_path, "useDocumentFonts.label") } .accesskey = { COPY(from_path, "useDocumentFonts.accesskey") } use-fixed-width-plain-checkbox = .label = { COPY(from_path, "useFixedWidthForPlainText.label") } .accesskey = { COPY(from_path, "fixedWidth.accesskey") } text-encoding-legend = { COPY(from_path, "languagesTitle2.label") } text-encoding-description = { COPY(from_path, "composingDescription2.label") } font-outgoing-email-label = .value = { COPY(from_path, "sendDefaultCharset.label") } .accesskey = { COPY(from_path, "sendDefaultCharset.accesskey") } font-incoming-email-label = .value = { COPY(from_path, "viewDefaultCharsetList.label") } .accesskey = { COPY(from_path, "viewDefaultCharsetList.accesskey") } default-font-reply-checkbox = .label = { COPY(from_path, "replyInDefaultCharset3.label") } .accesskey = { COPY(from_path, "replyInDefaultCharset3.accesskey") } """, from_path="mail/chrome/messenger/preferences/fonts.dtd")) ctx.add_transforms( "mail/messenger/preferences/colors.ftl", "mail/messenger/preferences/colors.ftl", transforms_from( """ colors-dialog-window = .title = { COPY(from_path, "colorsDialog.title") } .style = { PLATFORM() -> [macos] width: { COPY(from_path, "window.macWidth") } !important *[other] width: { COPY(from_path, "window.width") } !important } colors-dialog-legend = { COPY(from_path, "color") } text-color-label = .value = { COPY(from_path, "textColor.label") } .accesskey = { COPY(from_path, "textColor.accesskey") } background-color-label = .value = { COPY(from_path, "backgroundColor.label") } .accesskey = { COPY(from_path, "backgroundColor.accesskey") } use-system-colors = .label = { COPY(from_path, "useSystemColors.label") } .accesskey = { COPY(from_path, "useSystemColors.accesskey") } colors-link-legend = { COPY(from_path, "links") } link-color-label = .value = { COPY(from_path, "linkColor.label") } .accesskey = { COPY(from_path, "linkColor.accesskey") } visited-link-color-label = .value = { COPY(from_path, "visitedLinkColor.label") } .accesskey = { COPY(from_path, "visitedLinkColor.accesskey") } underline-link-checkbox = .label = { COPY(from_path, "underlineLinks.label") } .accesskey = { COPY(from_path, "underlineLinks.accesskey") } override-color-label = .value = { COPY(from_path, "overridePageColors.label") } .accesskey = { COPY(from_path, "overridePageColors.accesskey") } override-color-always = .label = { COPY(from_path, "overridePageColors.always.label") } override-color-auto = .label = { COPY(from_path, "overridePageColors.auto.label") } override-color-never = .label = { COPY(from_path, "overridePageColors.never.label") } """, from_path="mail/chrome/messenger/preferences/colors.dtd")) ctx.add_transforms( "mail/messenger/preferences/notifications.ftl", "mail/messenger/preferences/notifications.ftl", transforms_from( """ notifications-dialog-window = .title = { COPY(from_path, "notificationsDialog2.title") } customize-alert-description = { COPY(from_path, "alertCustomization.intro") } preview-text-checkbox = .label = { COPY(from_path, "previewText.label") } .accesskey = { COPY(from_path, "previewText.accesskey") } subject-checkbox = .label = { COPY(from_path, "subject.label") } .accesskey = { COPY(from_path, "subject.accesskey") } sender-checkbox = .label = { COPY(from_path, "sender.label") } .accesskey = { COPY(from_path, "sender.accesskey") } open-time-label-before = .value = { COPY(from_path, "totalOpenTimeBefore.label") } .accesskey = { COPY(from_path, "totalOpenTimeBefore.accesskey") } open-time-label-after = .value = { COPY(from_path, "totalOpenTimeEnd.label") } """, from_path="mail/chrome/messenger/preferences/notifications.dtd")) ctx.add_transforms( "mail/messenger/preferences/new-tag.ftl", "mail/messenger/preferences/new-tag.ftl", transforms_from(""" tag-dialog-window = .title = { COPY(from_path, "newTagDialog1.title") } tag-name-label = .value = { COPY(from_path, "name.label") } .accesskey = { COPY(from_path, "name.accesskey") } """, from_path="mail/chrome/messenger/newTagDialog.dtd")) ctx.add_transforms( "mail/messenger/preferences/receipts.ftl", "mail/messenger/preferences/receipts.ftl", transforms_from( """ receipts-dialog-window = .title = { COPY(from_path, "dialog.title") } return-receipt-checkbox = .label = { COPY(from_path, "requestReceipt.label") } .acceskey = { COPY(from_path, "requestReceipt.accesskey") } receipt-arrive-label = { COPY(from_path, "receiptArrive.label") } receipt-leave-radio = .label = { COPY(from_path, "leaveIt.label") } .acceskey = { COPY(from_path, "leaveIt.accesskey") } receipt-move-radio = .label = { COPY(from_path, "moveToSent.label") } .acceskey = { COPY(from_path, "moveToSent.accesskey") } receipt-request-label = { COPY(from_path, "requestMDN.label") } receipt-return-never-radio = .label = { COPY(from_path, "never.label") } .acceskey = { COPY(from_path, "never.accesskey") } receipt-return-some-radio = .label = { COPY(from_path, "returnSome.label") } .acceskey = { COPY(from_path, "returnSome.accesskey") } receipt-not-to-cc = .value = { COPY(from_path, "notInToCc.label") } .acceskey = { COPY(from_path, "notInToCc.accesskey") } receipt-send-never-label = .label = { COPY(from_path, "neverSend.label") } receipt-send-always-label = .label = { COPY(from_path, "alwaysSend.label") } receipt-send-ask-label = .label = { COPY(from_path, "askMe.label") } sender-outside-domain = .value = { COPY(from_path, "outsideDomain.label") } .acceskey = { COPY(from_path, "outsideDomain.accesskey") } other-cases-label = .value = { COPY(from_path, "otherCases.label") } .acceskey = { COPY(from_path, "otherCases.accesskey") } """, from_path="mail/chrome/messenger/preferences/receipts.dtd")) ctx.add_transforms( "mail/messenger/preferences/connection.ftl", "mail/messenger/preferences/connection.ftl", transforms_from( """ connection-dialog-window = .title = { COPY(from_path, "connectionsDialog.title") } .style = { PLATFORM() -> [macos] width: { COPY(from_path, "window.macWidth") } !important *[other] width: { COPY(from_path, "window.width") } !important } connection-proxy-legend = { COPY(from_path, "proxyTitle.label") } proxy-type-no = .label = { COPY(from_path, "noProxyTypeRadio.label") } .accesskey = { COPY(from_path, "noProxyTypeRadio.accesskey") } proxy-type-wpad = .label = { COPY(from_path, "WPADTypeRadio.label") } .accesskey = { COPY(from_path, "WPADTypeRadio.accesskey") } proxy-type-system = .label = { COPY(from_path, "systemTypeRadio.label") } .accesskey = { COPY(from_path, "systemTypeRadio.accesskey") } proxy-type-manual = .label = { COPY(from_path, "manualTypeRadio.label") } .accesskey = { COPY(from_path, "manualTypeRadio.accesskey") } proxy-http-label = .value = { COPY(from_path, "http.label") } .accesskey = { COPY(from_path, "http.accesskey") } http-port-label = .value = { COPY(from_path, "HTTPport.label") } .accesskey = { COPY(from_path, "HTTPport.accesskey") } proxy-http-sharing = .label = { COPY(from_path, "proxyHttpSharing.label") } .accesskey = { COPY(from_path, "proxyHttpSharing.accesskey") } proxy-https-label = .value = { COPY(from_path, "https.label") } .accesskey = { COPY(from_path, "https.accesskey") } ssl-port-label = .value = { COPY(from_path, "SSLport.label") } .accesskey = { COPY(from_path, "SSLport.accesskey") } proxy-socks-label = .value = { COPY(from_path, "socks.label") } .accesskey = { COPY(from_path, "socks.accesskey") } socks-port-label = .value = { COPY(from_path, "SOCKSport.label") } .accesskey = { COPY(from_path, "SOCKSport.accesskey") } proxy-socks4-label = .label = { COPY(from_path, "socks4.label") } .accesskey = { COPY(from_path, "socks4.accesskey") } proxy-socks5-label = .label = { COPY(from_path, "socks5.label") } .accesskey = { COPY(from_path, "socks5.accesskey") } proxy-type-auto = .label = { COPY(from_path, "autoTypeRadio.label") } .accesskey = { COPY(from_path, "autoTypeRadio.accesskey") } proxy-reload-label = .label = { COPY(from_path, "reload.label") } .accesskey = { COPY(from_path, "reload.accesskey") } no-proxy-label = .value = { COPY(from_path, "noproxy.label") } .accesskey = { COPY(from_path, "noproxy.accesskey") } no-proxy-example = { COPY(from_path, "noproxyExplain.label") } no-proxy-localhost-label = { COPY(from_path, "noproxyLocalhostDesc.label") } proxy-password-prompt = .label = { COPY(from_path, "autologinproxy.label") } .accesskey = { COPY(from_path, "autologinproxy.accesskey") } .tooltiptext = { COPY(from_path, "autologinproxy.tooltip") } proxy-remote-dns = .label = { COPY(from_path, "socksRemoteDNS.label") } .accesskey = { COPY(from_path, "socksRemoteDNS.accesskey") } proxy-enable-doh = .label = { COPY(from_path, "dnsOverHttps.label") } .accesskey = { COPY(from_path, "dnsOverHttps.accesskey") } """, from_path="mail/chrome/messenger/preferences/connection.dtd")) ctx.add_transforms( "mail/messenger/preferences/offline.ftl", "mail/messenger/preferences/offline.ftl", transforms_from( """ offline-dialog-window = .title = { COPY(from_path, "offlineDialog.title") } autodetect-online-label = .label = { COPY(from_path, "checkAutoDetect.label") } .accesskey = { COPY(from_path, "checkAutoDetect.accesskey") } startup-label = { COPY(from_path, "titleStartUp") } status-radio-remember = .label = { COPY(from_path, "radioRememberPrevState.label") } .accesskey = { COPY(from_path, "radioRememberPrevState.accesskey") } status-radio-ask = .label = { COPY(from_path, "radioAskState.label") } .accesskey = { COPY(from_path, "radioAskState.accesskey") } status-radio-always-online = .label = { COPY(from_path, "radioAlwaysOnlineState.label") } .accesskey = { COPY(from_path, "radioAlwaysOnlineState.accesskey") } status-radio-always-offline = .label = { COPY(from_path, "radioAlwaysOffline.label") } .accesskey = { COPY(from_path, "radioAlwaysOffline.accesskey") } going-online-label = { COPY(from_path, "textGoingOnline") } going-online-auto = .label = { COPY(from_path, "radioAutoSend.label") } .accesskey = { COPY(from_path, "radioAutoSend.accesskey") } going-online-not = .label = { COPY(from_path, "radioNotSend.label") } .accesskey = { COPY(from_path, "radioNotSend.accesskey") } going-online-ask = .label = { COPY(from_path, "radioAskUnsent.label") } .accesskey = { COPY(from_path, "radioAskUnsent.accesskey") } going-offline-label = { COPY(from_path, "textGoingOffline") } going-offline-auto = .label = { COPY(from_path, "radioAutoDownload.label") } .accesskey = { COPY(from_path, "radioAutoDownload.accesskey") } going-offline-not = .label = { COPY(from_path, "radioNotDownload.label") } .accesskey = { COPY(from_path, "radioNotDownload.accesskey") } going-offline-ask = .label = { COPY(from_path, "radioAskDownload.label") } .accesskey = { COPY(from_path, "radioAskDownload.accesskey") } """, from_path="mail/chrome/messenger/preferences/offline.dtd")) ctx.add_transforms( "mail/messenger/preferences/sendoptions.ftl", "mail/messenger/preferences/sendoptions.ftl", transforms_from( """ sendoptions-dialog-window = .title = { COPY(from_path, "dialog.title") } send-mail-title = { COPY(from_path, "sendMail.title") } auto-downgrade-label = .label = { COPY(from_path, "autoDowngrade.label") } .accesskey = { COPY(from_path, "autoDowngrade.accesskey") } default-html-format-label = { COPY(from_path, "sendMaildesc.label") } html-format-ask = .label = { COPY(from_path, "askMe.label") } .accesskey = { COPY(from_path, "askMe.accesskey") } html-format-convert = .label = { COPY(from_path, "convertPlain.label") } .accesskey = { COPY(from_path, "convertPlain.accesskey") } html-format-send-html = .label = { COPY(from_path, "sendHTML.label") } .accesskey = { COPY(from_path, "sendHTML.accesskey") } html-format-send-both = .label = { COPY(from_path, "sendBoth.label") } .accesskey = { COPY(from_path, "sendBoth.accesskey") } default-html-format-info = { COPY(from_path, "override.label") } html-tab-label = .label = { COPY(from_path, "HTMLTab.label") } .accesskey = { COPY(from_path, "HTMLTab.accesskey") } plain-tab-label = .label = { COPY(from_path, "PlainTextTab.label") } .accesskey = { COPY(from_path, "PlainTextTab.accesskey") } add-domain-button = .label = { COPY(from_path, "AddHtmlDomain.label") } .accesskey = { COPY(from_path, "AddHtmlDomain.accesskey") } delete-domain-button = .label = { COPY(from_path, "DeleteHtmlDomain.label") } .accesskey = { COPY(from_path, "DeleteHtmlDomain.accesskey") } """, from_path="mail/chrome/messenger/preferences/sendoptions.dtd")) ctx.add_transforms( "mail/messenger/preferences/sendoptions.ftl", "mail/messenger/preferences/sendoptions.ftl", [ FTL.Message( id=FTL.Identifier("send-message-domain-label"), value=REPLACE( "mail/chrome/messenger/preferences/sendoptions.dtd", "domaindesc.label", {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, )), ]) ctx.add_transforms( "mail/messenger/preferences/attachment-reminder.ftl", "mail/messenger/preferences/attachment-reminder.ftl", transforms_from( """ attachment-reminder-window = .title = { COPY(from_path, "attachmentReminderDialog.title") } keyword-new-button = .label = { COPY(from_path, "newKeywordButton.label") } .accesskey = { COPY(from_path, "newKeywordButton.accesskey") } keyword-edit-button = .label = { COPY(from_path, "editKeywordButton1.label") } .accesskey = { COPY(from_path, "editKeywordButton1.accesskey") } keyword-remove-button = .label = { COPY(from_path, "removeKeywordButton.label") } .accesskey = { COPY(from_path, "removeKeywordButton.accesskey") } """, from_path="mail/chrome/messenger/preferences/attachmentReminder.dtd" )) ctx.add_transforms( "mail/messenger/preferences/attachment-reminder.ftl", "mail/messenger/preferences/attachment-reminder.ftl", [ FTL.Message( id=FTL.Identifier("attachment-reminder-label"), value=REPLACE( "mail/chrome/messenger/preferences/attachmentReminder.dtd", "attachKeywordText.label", {"&brandShortName;": TERM_REFERENCE("brand-short-name")}, )), ]) ctx.add_transforms( "mail/messenger/preferences/attachment-reminder.ftl", "mail/messenger/preferences/attachment-reminder.ftl", transforms_from( """ new-keyword-title = { COPY(from_path, "attachmentReminderNewDialogTitle") } new-keyword-label = { COPY(from_path, "attachmentReminderNewText") } edit-keyword-title = { COPY(from_path, "attachmentReminderEditDialogTitle") } edit-keyword-label = { COPY(from_path, "attachmentReminderEditText") } """, from_path="mail/chrome/messenger/preferences/preferences.properties" )) ctx.add_transforms( "mail/messenger/preferences/permissions.ftl", "mail/messenger/preferences/permissions.ftl", transforms_from( """ permissions-reminder-window = .title = { COPY(from_path, "window.title") } .style = width: { COPY(from_path, "window.width") }; window-close-key = .key = { COPY(from_path, "windowClose.key") } website-address-label = .value = { COPY(from_path, "address.label") } .accesskey = { COPY(from_path, "address.accesskey") } block-button = .label = { COPY(from_path, "block.label") } .accesskey = { COPY(from_path, "block.accesskey") } allow-session-button = .label = { COPY(from_path, "session.label") } .accesskey = { COPY(from_path, "session.accesskey") } allow-button = .label = { COPY(from_path, "allow.label") } .accesskey = { COPY(from_path, "allow.accesskey") } treehead-sitename-label = .label = { COPY(from_path, "treehead.sitename.label") } treehead-status-label = .label = { COPY(from_path, "treehead.status.label") } remove-site-button = .label = { COPY(from_path, "removepermission.label") } .accesskey = { COPY(from_path, "removepermission.accesskey") } remove-all-site-button = .label = { COPY(from_path, "removeallpermissions.label") } .accesskey = { COPY(from_path, "removeallpermissions.accesskey") } cancel-button = .label = { COPY(from_path, "button.cancel.label") } .accesskey = { COPY(from_path, "button.cancel.accesskey") } save-button = .label = { COPY(from_path, "button.ok.label") } .accesskey = { COPY(from_path, "button.ok.accesskey") } """, from_path="mail/chrome/messenger/preferences/permissions.dtd")) ctx.add_transforms( "mail/messenger/preferences/permissions.ftl", "mail/messenger/preferences/permissions.ftl", transforms_from( """ permission-can-label = { COPY(from_path, "can") } permission-can-access-first-party-label = { COPY(from_path, "canAccessFirstParty") } permission-can-session-label = { COPY(from_path, "canSession") } permission-cannot-label = { COPY(from_path, "cannot") } invalid-uri-message = { COPY(from_path, "invalidURI") } invalid-uri-title = { COPY(from_path, "invalidURITitle") } """, from_path="mail/chrome/messenger/preferences/preferences.properties" )) ctx.add_transforms( "mail/messenger/preferences/cookies.ftl", "mail/messenger/preferences/cookies.ftl", transforms_from( """ cookies-window-dialog = .title = { COPY(from_path, "window.title") } .style = width: { COPY(from_path, "window.width") }; window-close-key = .key = { COPY(from_path, "windowClose.key") } window-focus-search-key = .key = { COPY(from_path, "focusSearch1.key") } window-focus-search-alt-key = .key = { COPY(from_path, "focusSearch2.key") } filter-search-label = .value = { COPY(from_path, "filter.label") } .accesskey = { COPY(from_path, "filter.accesskey") } cookies-on-system-label = { COPY(from_path, "cookiesonsystem.label") } treecol-site-header = .label = { COPY(from_path, "cookiedomain.label") } treecol-name-header = .label = { COPY(from_path, "cookiename.label") } props-name-label = .value = { COPY(from_path, "props.name.label") } props-value-label = .value = { COPY(from_path, "props.value.label") } props-domain-label = .value = { COPY(from_path, "props.domain.label") } props-path-label = .value = { COPY(from_path, "props.path.label") } props-secure-label = .value = { COPY(from_path, "props.secure.label") } props-expires-label = .value = { COPY(from_path, "props.expires.label") } props-container-label = .value = { COPY(from_path, "props.container.label") } remove-cookie-button = .label = { COPY(from_path, "button.removecookie.label") } .accesskey = { COPY(from_path, "button.removecookie.accesskey") } remove-all-cookies-button = .label = { COPY(from_path, "button.removeallcookies.label") } .accesskey = { COPY(from_path, "button.removeallcookies.accesskey") } cookie-close-button = .label = { COPY(from_path, "button.close.label") } .accesskey = { COPY(from_path, "button.close.accesskey") } """, from_path="mail/chrome/messenger/preferences/cookies.dtd")) ctx.add_transforms( "mail/messenger/preferences/dock-options.ftl", "mail/messenger/preferences/dock-options.ftl", transforms_from( """ dock-options-window-dialog = .title = { COPY(from_path, "dockOptionsDialog.title") } .style = width: { COPY(from_path, "window.macWidth") }; bounce-system-dock-icon = .label = { COPY(from_path, "bounceSystemDockIcon.label") } .accesskey = { COPY(from_path, "bounceSystemDockIcon.accesskey") } dock-icon-legend = { COPY(from_path, "dockIconBadge.label") } dock-icon-show-label = .value = { COPY(from_path, "dockIconShow.label") } count-unread-messages-radio = .label = { COPY(from_path, "showAllUnreadMessagesCount.label") } .accesskey = { COPY(from_path, "showAllUnreadMessagesCount.accesskey") } count-new-messages-radio = .label = { COPY(from_path, "newMessagesCountDock.label") } .accesskey = { COPY(from_path, "newMessagesCountDock.accesskey") } notification-settings-info = { COPY(from_path, "directNotificationSettings.label") } """, from_path="mail/chrome/messenger/preferences/dockoptions.dtd")) ctx.add_transforms( "mail/messenger/preferences/application-manager.ftl", "mail/messenger/preferences/application-manager.ftl", transforms_from( """ app-manager-window-dialog = .title = { COPY(from_path, "appManager.title") } .style = { COPY(from_path, "appManager.style") } remove-app-button = .label = { COPY(from_path, "remove.label") } .accesskey = { COPY(from_path, "remove.accesskey") } """, from_path="mail/chrome/messenger/preferences/applicationManager.dtd" ))
def migrate(ctx): """Bug 1763313 - Move storage.dtd to fluent, part {index}.""" ctx.add_transforms( "devtools/client/storage.ftl", "devtools/client/storage.ftl", transforms_from( """ storage-search-box = .placeholder = { COPY(from_path, "searchBox.placeholder") } storage-context-menu-delete-all = .label = { COPY(from_path, "storage.popupMenu.deleteAllLabel") } storage-context-menu-delete-all-session-cookies = .label = { COPY(from_path, "storage.popupMenu.deleteAllSessionCookiesLabel") } storage-context-menu-copy = .label = { COPY(from_path, "storage.popupMenu.copyLabel") } """, from_path="devtools/client/storage.dtd", ), ) ctx.add_transforms( "devtools/client/storage.ftl", "devtools/client/storage.ftl", [ FTL.Message( id=FTL.Identifier("storage-context-menu-delete"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=REPLACE( "devtools/client/storage.properties", "storage.popupMenu.deleteLabel", { "%1$S": VARIABLE_REFERENCE("itemName"), }, ), ) ], ), FTL.Message( id=FTL.Identifier("storage-context-menu-delete-all-from"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=REPLACE( "devtools/client/storage.properties", "storage.popupMenu.deleteAllFromLabel", { "%1$S": VARIABLE_REFERENCE("host"), }, ), ) ], ), FTL.Message( id=FTL.Identifier("storage-idb-delete-blocked"), value=REPLACE( "devtools/client/storage.properties", "storage.idb.deleteBlocked", {"%1$S": VARIABLE_REFERENCE("dbName")}, ), ), FTL.Message( id=FTL.Identifier("storage-idb-delete-error"), value=REPLACE( "devtools/client/storage.properties", "storage.idb.deleteError", {"%1$S": VARIABLE_REFERENCE("dbName")}, ), ), ], ) ctx.add_transforms( "devtools/client/storage.ftl", "devtools/client/storage.ftl", transforms_from( """ storage-filter-key = { COPY(from_path, "storage.filter.key") } storage-add-button = .title = { COPY(from_path, "storage.popupMenu.addItemLabel") } storage-refresh-button = .title = { COPY(from_path, "storage.popupMenu.refreshItemLabel") } storage-variable-view-search-box = .placeholder = { COPY(from_path, "storage.search.placeholder") } storage-context-menu-add-item = .label = { COPY(from_path, "storage.popupMenu.addItemLabel") } storage-expand-pane = .title = { COPY(from_path, "storage.expandPane") } storage-collapse-pane = .title = { COPY(from_path, "storage.collapsePane") } storage-expires-session = { COPY(from_path, "label.expires.session") } storage-tree-labels-cookies = { COPY(from_path, "tree.labels.cookies") } storage-tree-labels-local-storage = { COPY(from_path, "tree.labels.localStorage") } storage-tree-labels-session-storage = { COPY(from_path, "tree.labels.sessionStorage") } storage-tree-labels-indexed-db = { COPY(from_path, "tree.labels.indexedDB") } storage-tree-labels-cache = { COPY(from_path, "tree.labels.Cache") } storage-tree-labels-extension-storage = { COPY(from_path, "tree.labels.extensionStorage") } storage-table-headers-cookies-name = { COPY(from_path, "table.headers.cookies.name") } storage-table-headers-cookies-value = { COPY(from_path, "table.headers.cookies.value") } storage-table-headers-cookies-expires = { COPY(from_path, "table.headers.cookies.expires2") } storage-table-headers-cookies-size = { COPY(from_path, "table.headers.cookies.size") } storage-table-headers-cookies-last-accessed = { COPY(from_path, "table.headers.cookies.lastAccessed2") } storage-table-headers-cookies-creation-time = { COPY(from_path, "table.headers.cookies.creationTime2") } storage-table-headers-cache-status = { COPY(from_path, "table.headers.Cache.status") } storage-table-headers-extension-storage-area = { COPY(from_path, "table.headers.extensionStorage.area") } storage-data = { COPY(from_path, "storage.data.label") } storage-parsed-value = { COPY(from_path, "storage.parsedValue.label") } """, from_path="devtools/client/storage.properties", ), )
def migrate(ctx): """Bug 1517529 - Migrate safeMode from DTD to Fluent, part {index}.""" ctx.add_transforms( 'browser/browser/safeMode.ftl', 'browser/browser/safeMode.ftl', [ FTL.Message( id=FTL.Identifier('safe-mode-window'), attributes=[ FTL.Attribute(FTL.Identifier('title'), value=REPLACE( 'browser/chrome/browser/safeMode.dtd', 'safeModeDialog.title', { "&brandShortName;": TERM_REFERENCE("brand-short-name") })), FTL.Attribute( FTL.Identifier('style'), value=CONCAT( FTL.TextElement('max-width: '), COPY('browser/chrome/browser/safeMode.dtd', 'window.maxWidth'), FTL.TextElement('px'))) ]), ]), ctx.add_transforms( 'browser/browser/safeMode.ftl', 'browser/browser/safeMode.ftl', transforms_from(""" start-safe-mode = .label = { COPY("browser/chrome/browser/safeMode.dtd", "startSafeMode.label") } """)), ctx.add_transforms( 'browser/browser/safeMode.ftl', 'browser/browser/safeMode.ftl', [ FTL.Message(id=FTL.Identifier('refresh-profile'), attributes=[ FTL.Attribute( FTL.Identifier('label'), value=REPLACE( 'browser/chrome/browser/safeMode.dtd', 'refreshProfile.label', { "&brandShortName;": TERM_REFERENCE("brand-short-name") })) ]), FTL.Message( id=FTL.Identifier('safe-mode-description'), value=REPLACE( 'browser/chrome/browser/safeMode.dtd', 'safeModeDescription3.label', {"&brandShortName;": TERM_REFERENCE("brand-short-name")})), FTL.Message( id=FTL.Identifier('safe-mode-description-details'), value=REPLACE( 'browser/chrome/browser/safeMode.dtd', 'safeModeDescription5.label', {"&brandShortName;": TERM_REFERENCE("brand-short-name")})), FTL.Message( id=FTL.Identifier('refresh-profile-instead'), value=REPLACE( 'browser/chrome/browser/safeMode.dtd', 'refreshProfileInstead.label', {"&brandShortName;": TERM_REFERENCE("brand-short-name")})), FTL.Message( id=FTL.Identifier('auto-safe-mode-description'), value=REPLACE( 'browser/chrome/browser/safeMode.dtd', 'autoSafeModeDescription3.label', {"&brandShortName;": TERM_REFERENCE("brand-short-name")})) ])
def migrate(ctx): """Bug 1568133 - Migrate remaining menubar from dtd to ftl, part {index}""" ctx.add_transforms( "browser/browser/menubar.ftl", "browser/browser/menubar.ftl", transforms_from( """ menu-application-services = .label = { COPY(base_path, "servicesMenuMac.label") } menu-application-hide-other = .label = { COPY(base_path, "hideOtherAppsCmdMac.label") } menu-application-show-all = .label = { COPY(base_path, "showAllAppsCmdMac.label") } menu-application-touch-bar = .label = { COPY(base_path, "touchBarCmdMac.label") } menu-quit = .label = { PLATFORM() -> [windows] { COPY(browser_path, "quitApplicationCmdWin2.label") } *[other] { COPY(browser_path, "quitApplicationCmd.label") } } .accesskey = { PLATFORM() -> [windows] { COPY(browser_path, "quitApplicationCmdWin2.accesskey") } *[other] { COPY(browser_path, "quitApplicationCmd.accesskey") } } menu-quit-button = .label = { menu-quit.label } """, base_path="browser/chrome/browser/baseMenuOverlay.dtd", browser_path="browser/chrome/browser/browser.dtd", ), ) ctx.add_transforms( "browser/browser/menubar.ftl", "browser/browser/menubar.ftl", [ FTL.Message( id=FTL.Identifier("menu-application-hide-this"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=REPLACE( "browser/chrome/browser/baseMenuOverlay.dtd", "hideThisAppCmdMac2.label", { "&brandShorterName;": TERM_REFERENCE( "brand-shorter-name" ), }, ), ) ], ), FTL.Message( id=FTL.Identifier("menu-quit-mac"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=REPLACE( "browser/chrome/browser/browser.dtd", "quitApplicationCmdMac2.label", { "&brandShorterName;": TERM_REFERENCE( "brand-shorter-name" ), }, ), ) ], ), FTL.Message( id=FTL.Identifier("menu-quit-button-win"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=FTL.Pattern( elements=[ FTL.Placeable( expression=FTL.MessageReference( id=FTL.Identifier("menu-quit"), attribute=FTL.Identifier("label"), ) ) ] ), ), FTL.Attribute( id=FTL.Identifier("tooltip"), value=REPLACE( "browser/chrome/browser/browser.dtd", "quitApplicationCmdWin2.tooltip", { "&brandShorterName;": TERM_REFERENCE( "brand-shorter-name" ), }, ), ), ], ), FTL.Message( id=FTL.Identifier("menu-about"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=REPLACE( "browser/chrome/browser/baseMenuOverlay.dtd", "aboutProduct2.label", { "&brandShorterName;": TERM_REFERENCE( "brand-shorter-name" ), }, ), ), FTL.Attribute( id=FTL.Identifier("accesskey"), value=COPY( "browser/chrome/browser/baseMenuOverlay.dtd", "aboutProduct2.accesskey", ), ), ], ), ], )
def migrate(ctx): """Bug 1491672 - Migrate About Dialog to use Fluent for localization, part {index}.""" ctx.add_transforms( "browser/browser/aboutDialog.ftl", "browser/browser/aboutDialog.ftl", transforms_from(""" releaseNotes-link = { COPY("browser/chrome/browser/aboutDialog.dtd", "releaseNotes.link") } update-checkForUpdatesButton = .label = { COPY("browser/chrome/browser/aboutDialog.dtd", "update.checkForUpdatesButton.label") } .accesskey = { COPY("browser/chrome/browser/aboutDialog.dtd", "update.checkForUpdatesButton.accesskey") } update-checkingForUpdates = { COPY("browser/chrome/browser/aboutDialog.dtd", "update.checkingForUpdates")} update-applying = { COPY("browser/chrome/browser/aboutDialog.dtd", "update.applying")} update-adminDisabled = { COPY("browser/chrome/browser/aboutDialog.dtd", "update.adminDisabled") } update-restarting = { COPY("browser/chrome/browser/aboutDialog.dtd", "update.restarting") } bottomLinks-license = { COPY("browser/chrome/browser/aboutDialog.dtd", "bottomLinks.license") } bottomLinks-rights = { COPY("browser/chrome/browser/aboutDialog.dtd", "bottomLinks.rights") } bottomLinks-privacy = { COPY("browser/chrome/browser/aboutDialog.dtd", "bottomLinks.privacy") } aboutDialog-architecture-sixtyFourBit = { COPY("browser/chrome/browser/browser.properties", "aboutDialog.architecture.sixtyFourBit") } aboutDialog-architecture-thirtyTwoBit = { COPY("browser/chrome/browser/browser.properties", "aboutDialog.architecture.thirtyTwoBit") } """)) ctx.add_transforms( "browser/browser/aboutDialog.ftl", "browser/browser/aboutDialog.ftl", [ FTL.Message(id=FTL.Identifier("aboutDialog-title"), attributes=[ FTL.Attribute( id=FTL.Identifier("title"), value=REPLACE( "browser/chrome/browser/aboutDialog.dtd", "aboutDialog.title", { "&brandFullName;": TERM_REFERENCE("-brand-full-name") })) ]), FTL.Message( id=FTL.Identifier("update-updateButton"), attributes=[ FTL.Attribute(id=FTL.Identifier("label"), value=REPLACE( "browser/chrome/browser/aboutDialog.dtd", "update.updateButton.label3", { "&brandShorterName;": TERM_REFERENCE("-brand-shorter-name") })), FTL.Attribute(id=FTL.Identifier("accesskey"), value=COPY( "browser/chrome/browser/aboutDialog.dtd", "update.updateButton.accesskey")) ]), FTL.Message(id=FTL.Identifier("update-downloading"), value=CONCAT( FTL.TextElement('<img data-l10n-name="icon"/>'), COPY("browser/chrome/browser/aboutDialog.dtd", "update.downloading.start"), FTL.TextElement( '<label data-l10n-name="download-status"/>'))), FTL.Message( id=FTL.Identifier("update-failed"), value=CONCAT( COPY("browser/chrome/browser/aboutDialog.dtd", "update.failed.start"), FTL.TextElement('<label data-l10n-name="failed-link">'), COPY("browser/chrome/browser/aboutDialog.dtd", "update.failed.linkText"), FTL.TextElement('</label>'))), FTL.Message( id=FTL.Identifier("update-failed-main"), value=CONCAT( COPY("browser/chrome/browser/aboutDialog.dtd", "update.failed.start"), FTL.TextElement('<a data-l10n-name="failed-link-main">'), COPY("browser/chrome/browser/aboutDialog.dtd", "update.failed.linkText"), FTL.TextElement('</a>'))), FTL.Message( id=FTL.Identifier("update-noUpdatesFound"), value=REPLACE( "browser/chrome/browser/aboutDialog.dtd", "update.noUpdatesFound", {"&brandShortName;": TERM_REFERENCE("-brand-short-name") })), FTL.Message( id=FTL.Identifier("update-otherInstanceHandlingUpdates"), value=REPLACE( "browser/chrome/browser/aboutDialog.dtd", "update.otherInstanceHandlingUpdates", {"&brandShortName;": TERM_REFERENCE("-brand-short-name") })), FTL.Message( id=FTL.Identifier("update-manual"), value=CONCAT( COPY("browser/chrome/browser/aboutDialog.dtd", "update.manual.start"), FTL.TextElement('<label data-l10n-name="manual-link"/>'))), FTL.Message(id=FTL.Identifier("update-unsupported"), value=CONCAT( COPY("browser/chrome/browser/aboutDialog.dtd", "update.unsupported.start"), FTL.TextElement( '<label data-l10n-name="unsupported-link">'), COPY("browser/chrome/browser/aboutDialog.dtd", "update.unsupported.linkText"), FTL.TextElement('</label>'))), FTL.Message( id=FTL.Identifier("channel-description"), value=CONCAT( COPY("browser/chrome/browser/aboutDialog.dtd", "channel.description.start"), FTL.TextElement( '<label data-l10n-name="current-channel"></label>'), COPY("browser/chrome/browser/aboutDialog.dtd", "channel.description.end"))), FTL.Message( id=FTL.Identifier("warningDesc-version"), value=REPLACE( "browser/chrome/browser/aboutDialog.dtd", "warningDesc.version", {"&brandShortName;": TERM_REFERENCE("-brand-short-name") })), FTL.Message( id=FTL.Identifier("community-exp"), value=CONCAT( FTL.TextElement( '<label data-l10n-name="community-exp-mozillaLink">'), REPLACE("browser/chrome/browser/aboutDialog.dtd", "community.exp.mozillaLink", { "&vendorShortName;": TERM_REFERENCE("-vendor-short-name") }), FTL.TextElement('</label>'), COPY("browser/chrome/browser/aboutDialog.dtd", "community.exp.middle"), FTL.TextElement( '<label data-l10n-name="community-exp-creditsLink">'), COPY("browser/chrome/browser/aboutDialog.dtd", "community.exp.creditsLink"), FTL.TextElement('</label>'), COPY("browser/chrome/browser/aboutDialog.dtd", "community.exp.end"))), FTL.Message( id=FTL.Identifier("community-2"), value=CONCAT( REPLACE("browser/chrome/browser/aboutDialog.dtd", "community.start2", { "&brandShortName;": TERM_REFERENCE("-brand-short-name") }), FTL.TextElement( '<label data-l10n-name="community-mozillaLink">'), REPLACE("browser/chrome/browser/aboutDialog.dtd", "community.mozillaLink", { "&vendorShortName;": TERM_REFERENCE("-vendor-short-name") }), FTL.TextElement('</label>'), COPY("browser/chrome/browser/aboutDialog.dtd", "community.middle2"), FTL.TextElement( '<label data-l10n-name="community-creditsLink">'), COPY("browser/chrome/browser/aboutDialog.dtd", "community.creditsLink"), FTL.TextElement('</label>'), COPY("browser/chrome/browser/aboutDialog.dtd", "community.end3"))), FTL.Message( id=FTL.Identifier("helpus"), value=CONCAT( COPY("browser/chrome/browser/aboutDialog.dtd", "helpus.start"), FTL.TextElement( '<label data-l10n-name="helpus-donateLink">'), COPY("browser/chrome/browser/aboutDialog.dtd", "helpus.donateLink"), FTL.TextElement('</label>'), COPY("browser/chrome/browser/aboutDialog.dtd", "helpus.middle"), FTL.TextElement( '<label data-l10n-name="helpus-getInvolvedLink">'), COPY("browser/chrome/browser/aboutDialog.dtd", "helpus.getInvolvedLink"), FTL.TextElement('</label>'))), ]) ctx.add_transforms( "browser/branding/official/brand.ftl", "browser/branding/official/brand.ftl", transforms_from(""" -brand-short-name = { COPY("browser/branding/official/brand.dtd", "brandShortName") } -vendor-short-name = { COPY("browser/branding/official/brand.dtd", "vendorShortName") } -brand-full-name = { COPY("browser/branding/official/brand.dtd", "brandFullName") } -brand-shorter-name = { COPY("browser/branding/official/brand.dtd", "brandShorterName") } trademarkInfo = { COPY("browser/branding/official/brand.dtd", "trademarkInfo.part1") } """))
def migrate(ctx): """Bug 1446180 - Migrate Preferences::Privacy to Fluent, part {index}.""" ctx.add_transforms( 'browser/branding/official/brand.ftl', 'browser/branding/official/brand.ftl', [ FTL.Term(id=FTL.Identifier('-vendor-short-name'), value=COPY('browser/branding/official/brand.dtd', 'vendorShortName')), ]) ctx.add_transforms( 'browser/browser/preferences/preferences.ftl', 'browser/browser/preferences/preferences.ftl', [ FTL.Message( id=FTL.Identifier('privacy-header'), value=COPY( 'browser/chrome/browser/preferences/preferences.dtd', 'browserPrivacy.label', ), ), FTL.Message( id=FTL.Identifier('forms-header'), value=COPY( 'browser/chrome/browser/preferences/security.dtd', 'formsAndPasswords.label', ), ), FTL.Message( id=FTL.Identifier('forms-remember-logins'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'rememberLogins2.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'rememberLogins2.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('forms-exceptions'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'passwordExceptions.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'passwordExceptions.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('forms-saved-logins'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'savedLogins.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'savedLogins.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('forms-master-pw-use'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'useMasterPassword.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'useMasterPassword.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('forms-master-pw-change'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'changeMasterPassword.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'changeMasterPassword.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('history-header'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'history.label', ), ), FTL.Message( id=FTL.Identifier('history-remember-description'), value=REPLACE( 'browser/chrome/browser/preferences/privacy.dtd', 'rememberDescription1.label', { '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name') }, ), ), FTL.Message( id=FTL.Identifier('history-dontremember-description'), value=REPLACE( 'browser/chrome/browser/preferences/privacy.dtd', 'dontrememberDescription.label', { '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name') }, ), ), FTL.Message( id=FTL.Identifier('history-private-browsing-permanent'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'privateBrowsingPermanent2.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'privateBrowsingPermanent2.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('history-remember-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'rememberHistory2.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'rememberHistory2.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('history-remember-search-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'rememberSearchForm.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'rememberSearchForm.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('history-clear-on-close-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), REPLACE( 'browser/chrome/browser/preferences/privacy.dtd', 'clearOnClose.label', { '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name') }, ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'clearOnClose.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('history-clear-on-close-settings'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'clearOnCloseSettings.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'clearOnCloseSettings.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('history-clear-button'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'clearHistoryButton.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'clearHistoryButton.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('sitedata-header'), value=COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'siteData1.label', ), ), FTL.Message( id=FTL.Identifier('sitedata-learn-more'), value=COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'siteDataLearnMoreLink.label', ), ), FTL.Message( id=FTL.Identifier('sitedata-accept-cookies-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'acceptCookies4.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'acceptCookies4.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('sitedata-block-cookies-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'blockCookies.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'blockCookies.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('sitedata-keep-until'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'keepUntil2.label', ), attributes=[ FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'keepUntil2.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('sitedata-accept-third-party-desc'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'acceptThirdParty3.pre.label', ), attributes=[ FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'acceptThirdParty3.pre.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('sitedata-accept-third-party-always-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'acceptThirdParty.always.label', ), ), ], ), FTL.Message( id=FTL.Identifier( 'sitedata-accept-third-party-visited-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'acceptThirdParty.visited.label', ), ), ], ), FTL.Message( id=FTL.Identifier('sitedata-accept-third-party-never-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'acceptThirdParty.never.label', ), ), ], ), FTL.Message( id=FTL.Identifier('sitedata-clear'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'clearSiteData1.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'clearSiteData1.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('sitedata-settings'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'siteDataSettings1.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'siteDataSettings1.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('sitedata-cookies-exceptions'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'cookieExceptions.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'cookieExceptions.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('addressbar-header'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'addressBar.label', ), ), FTL.Message( id=FTL.Identifier('addressbar-suggest'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'addressBar.suggest.label', ), ), FTL.Message( id=FTL.Identifier('addressbar-locbar-history-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'locbar.history2.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'locbar.history2.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('addressbar-locbar-bookmarks-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'locbar.bookmarks.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'locbar.bookmarks.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('addressbar-locbar-openpage-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'locbar.openpage.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'locbar.openpage.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('addressbar-suggestions-settings'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'suggestionSettings2.label', ), ), FTL.Message( id=FTL.Identifier('tracking-header'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionHeader2.label', ), ), FTL.Message( id=FTL.Identifier('tracking-description'), value=CONCAT( COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtection3.description', ), FTL.TextElement(' <a>'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionLearnMore2.label', ), FTL.TextElement('</a>'), ), ), FTL.Message( id=FTL.Identifier('tracking-mode-label'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtection3.radioGroupLabel', ), ), FTL.Message( id=FTL.Identifier('tracking-mode-always'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionAlways.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionAlways.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('tracking-mode-private'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionPrivate.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionPrivate.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('tracking-mode-never'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionNever.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionNever.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('tracking-pbm-label'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionPBM6.label', ), attributes=[ FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionPBM6.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('tracking-exceptions'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionExceptions.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'trackingProtectionExceptions.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('tracking-change-block-list'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'changeBlockList2.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'changeBlockList2.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-header'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'permissions.label', ), ), FTL.Message( id=FTL.Identifier('permissions-location'), value=COPY( 'browser/chrome/browser/preferences/content.dtd', 'locationPermissions.label', ), ), FTL.Message( id=FTL.Identifier('permissions-location-settings'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'locationSettingsButton.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'locationSettingsButton.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-camera'), value=COPY( 'browser/chrome/browser/preferences/content.dtd', 'cameraPermissions.label', ), ), FTL.Message( id=FTL.Identifier('permissions-camera-settings'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'cameraSettingsButton.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'cameraSettingsButton.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-microphone'), value=COPY( 'browser/chrome/browser/preferences/content.dtd', 'microphonePermissions.label', ), ), FTL.Message( id=FTL.Identifier('permissions-microphone-settings'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'microphoneSettingsButton.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'microphoneSettingsButton.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-notification'), value=COPY( 'browser/chrome/browser/preferences/content.dtd', 'notificationPermissions.label', ), ), FTL.Message( id=FTL.Identifier('permissions-notification-settings'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'notificationSettingsButton.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'notificationSettingsButton.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-notification-link'), value=COPY( 'browser/chrome/browser/preferences/content.dtd', 'notificationPermissionsLearnMore.label', ), ), FTL.Message( id=FTL.Identifier('permissions-notification-pause'), attributes=[ FTL.Attribute( FTL.Identifier('label'), REPLACE( 'browser/chrome/browser/preferences/preferences.properties', 'pauseNotifications.label', {'%S': MESSAGE_REFERENCE('-brand-short-name')}, ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/preferences.properties', 'pauseNotifications.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-block-popups'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'blockPopups.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'blockPopups.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-block-popups-exceptions'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'popupExceptions.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/content.dtd', 'popupExceptions.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-addon-install-warning'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'warnOnAddonInstall2.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'warnOnAddonInstall2.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-addon-exceptions'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'addonExceptions.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'addonExceptions.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-a11y-privacy-checkbox'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'a11yPrivacy.checkbox.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'a11yPrivacy.checkbox.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('permissions-a11y-privacy-link'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'a11yPrivacy.learnmore.label', ), ), FTL.Message( id=FTL.Identifier('collection-header'), value=REPLACE( 'browser/chrome/browser/preferences/advanced.dtd', 'dataCollection.label', { '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name') }, ), ), FTL.Message( id=FTL.Identifier('collection-description'), value=REPLACE( 'browser/chrome/browser/preferences/advanced.dtd', 'dataCollectionDesc.label', { '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name') }, ), ), FTL.Message( id=FTL.Identifier('collection-privacy-notice'), value=COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'dataCollectionPrivacyNotice.label', ), ), FTL.Message( id=FTL.Identifier('collection-health-report'), attributes=[ FTL.Attribute( FTL.Identifier('label'), REPLACE( 'browser/chrome/browser/preferences/advanced.dtd', 'enableHealthReport2.label', { '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name'), 'Mozilla': MESSAGE_REFERENCE('-vendor-short-name'), }, ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'enableHealthReport2.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('collection-health-report-link'), value=COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'healthReportLearnMore.label', ), ), FTL.Message( id=FTL.Identifier('collection-health-report-disabled'), value=COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'healthReportingDisabled.label', ), ), FTL.Message( id=FTL.Identifier('collection-browser-errors'), attributes=[ FTL.Attribute( FTL.Identifier('label'), REPLACE( 'browser/chrome/browser/preferences/advanced.dtd', 'collectBrowserErrors.label', { '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name'), 'Mozilla': MESSAGE_REFERENCE('-vendor-short-name'), }, ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'collectBrowserErrors.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('collection-browser-errors-link'), value=COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'collectBrowserErrorsLearnMore.label', ), ), FTL.Message( id=FTL.Identifier('collection-backlogged-crash-reports'), attributes=[ FTL.Attribute( FTL.Identifier('label'), REPLACE( 'browser/chrome/browser/preferences/advanced.dtd', 'sendBackloggedCrashReports.label', { '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name') }, ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'sendBackloggedCrashReports.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('collection-backlogged-crash-reports-link'), value=COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'crashReporterLearnMore.label', ), ), FTL.Message( id=FTL.Identifier('security-header'), value=COPY( 'browser/chrome/browser/preferences/security.dtd', 'security.label', ), ), FTL.Message( id=FTL.Identifier('security-browsing-protection'), value=COPY( 'browser/chrome/browser/preferences/security.dtd', 'browsingProtection.label', ), ), FTL.Message( id=FTL.Identifier('security-enable-safe-browsing'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'enableSafeBrowsing.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'enableSafeBrowsing.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('security-enable-safe-browsing-link'), value=COPY( 'browser/chrome/browser/preferences/privacy.dtd', 'enableSafeBrowsingLearnMore.label', ), ), FTL.Message( id=FTL.Identifier('security-block-downloads'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'blockDownloads.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'blockDownloads.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('security-block-uncommon-software'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'blockUncommonAndUnwanted.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/security.dtd', 'blockUncommonAndUnwanted.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('certs-header'), value=COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'certificateTab.label', ), ), FTL.Message( id=FTL.Identifier('certs-personal-label'), value=COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'certPersonal2.description', ), ), FTL.Message( id=FTL.Identifier('certs-select-auto-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'selectCerts.auto', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'selectCerts.auto.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('certs-select-ask-option'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'selectCerts.ask', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'selectCerts.ask.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('certs-enable-ocsp'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'enableOCSP.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'enableOCSP.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('certs-view'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'viewCerts2.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'viewCerts2.accesskey', ), ), ], ), FTL.Message( id=FTL.Identifier('certs-devices'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'viewSecurityDevices2.label', ), ), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/advanced.dtd', 'viewSecurityDevices2.accesskey', ), ), ], ), ])
def migrate(ctx): """Bug 1451992 - Migrate Preferences::Subdialogs::ClearSiteData to Fluent, part {index}.""" ctx.add_transforms( 'browser/browser/preferences/clearSiteData.ftl', 'browser/browser/preferences/clearSiteData.ftl', [ FTL.Message( id=FTL.Identifier('clear-site-data-window'), attributes=[ FTL.Attribute( FTL.Identifier('title'), COPY( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'window.title')), FTL.Attribute( FTL.Identifier('style'), CONCAT( FTL.TextElement('width: '), COPY( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'window.width'))) ]), FTL.Message( id=FTL.Identifier('clear-site-data-description'), value=REPLACE( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'window.description', { '&brandShortName;': MESSAGE_REFERENCE('-brand-short-name') })), FTL.Message( id=FTL.Identifier('clear-site-data-close-key'), attributes=[ FTL.Attribute( FTL.Identifier('key'), COPY( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'windowClose.key')) ]), FTL.Message( id=FTL.Identifier('clear-site-data-cookies-info'), value=COPY( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'clearSiteData.description')), FTL.Message( id=FTL.Identifier('clear-site-data-cache-info'), value=COPY( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'clearCache.description')), FTL.Message( id=FTL.Identifier('clear-site-data-cancel'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'button.cancel.label')), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'button.cancel.accesskey')) ]), FTL.Message( id=FTL.Identifier('clear-site-data-clear'), attributes=[ FTL.Attribute( FTL.Identifier('label'), COPY( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'button.clear.label')), FTL.Attribute( FTL.Identifier('accesskey'), COPY( 'browser/chrome/browser/preferences/clearSiteData.dtd', 'button.clear.accesskey')) ]) ])
def migrate(ctx): """Bug 1727916 - Switch several customizable toolbar item names to sentence case, part {index}""" ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", transforms_from( """ toolbar-button-email-link = .label = { COPY(from_path, "email-link-button.label") } .tooltiptext = { COPY(from_path, "email-link-button.tooltiptext3") } toolbar-button-synced-tabs = .label = { COPY(from_path, "remotetabs-panelmenu.label") } .tooltiptext = { COPY(from_path, "remotetabs-panelmenu.tooltiptext2") } """, from_path= "browser/chrome/browser/customizableui/customizableWidgets.properties", ), ) ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", [ FTL.Message( id=FTL.Identifier("toolbar-button-save-page"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=COPY( "browser/chrome/browser/customizableui/customizableWidgets.properties", "save-page-button.label", ), ), FTL.Attribute( id=FTL.Identifier("tooltiptext"), value=REPLACE( "browser/chrome/browser/customizableui/customizableWidgets.properties", "save-page-button.tooltiptext3", {"%1$S": VARIABLE_REFERENCE("shortcut")}, ), ), ], ), FTL.Message( id=FTL.Identifier("toolbar-button-open-file"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=COPY( "browser/chrome/browser/customizableui/customizableWidgets.properties", "open-file-button.label", ), ), FTL.Attribute( id=FTL.Identifier("tooltiptext"), value=REPLACE( "browser/chrome/browser/customizableui/customizableWidgets.properties", "open-file-button.tooltiptext3", {"%1$S": VARIABLE_REFERENCE("shortcut")}, ), ), ], ), ], ) ctx.add_transforms( "browser/browser/browser.ftl", "browser/browser/browser.ftl", [ FTL.Message( id=FTL.Identifier("toolbar-button-new-private-window"), attributes=[ FTL.Attribute( id=FTL.Identifier("label"), value=COPY_PATTERN( "browser/browser/appmenu.ftl", "appmenuitem-new-private-window.label", ), ), FTL.Attribute( id=FTL.Identifier("tooltiptext"), value=REPLACE( "browser/chrome/browser/customizableui/customizableWidgets.properties", "privatebrowsing-button.tooltiptext", {"%1$S": VARIABLE_REFERENCE("shortcut")}, ), ), ], ), ], )