bug_1972072_address_bar_firefox_suggest.py (1504B)
1 # Any copyright is dedicated to the Public Domain. 2 # http://creativecommons.org/publicdomain/zero/1.0/ 3 4 from fluent.migrate.helpers import transforms_from 5 6 7 def migrate(ctx): 8 """Bug 1972072 - Convert Address Bar - Firefox Suggest to config-based prefs, part {index}.""" 9 10 target = "browser/browser/preferences/preferences.ftl" 11 12 ctx.add_transforms( 13 target, 14 target, 15 transforms_from( 16 """ 17 addressbar-header-1 = 18 .label = {COPY_PATTERN(from_path, "addressbar-header")} 19 .description = {COPY_PATTERN(from_path, "addressbar-suggest-1")} 20 addressbar-header-firefox-suggest-2 = 21 .label = {COPY_PATTERN(from_path, "addressbar-header-firefox-suggest-1")} 22 .description = {COPY_PATTERN(from_path, "addressbar-suggest-firefox-suggest-1")} 23 addressbar-locbar-suggest-all-option-2 = 24 .label = {COPY_PATTERN(from_path, "addressbar-locbar-suggest-all-option.label")} 25 .description = {COPY_PATTERN(from_path, "addressbar-locbar-suggest-all-option-desc")} 26 addressbar-locbar-suggest-sponsored-option-2 = 27 .label = {COPY_PATTERN(from_path, "addressbar-locbar-suggest-sponsored-option.label")} 28 .description = {COPY_PATTERN(from_path, "addressbar-locbar-suggest-sponsored-desc")} 29 addressbar-dismissed-suggestions-label-2 = 30 .label = {COPY_PATTERN(from_path, "addressbar-dismissed-suggestions-label")} 31 .description = {COPY_PATTERN(from_path, "addressbar-restore-dismissed-suggestions-description")} 32 """, 33 from_path=target, 34 ), 35 )