tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

bug_1969953_settings_redesign_homepage_labels.py (894B)


      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 1969953 - Move Homepage settings strings to .label attributes, part {index}."""
      9 
     10    source = "browser/browser/preferences/preferences.ftl"
     11    target = source
     12 
     13    ctx.add_transforms(
     14        target,
     15        target,
     16        transforms_from(
     17            """
     18 home-homepage-title =
     19    .label = { COPY_PATTERN(from_path, "home-homepage-header") }
     20 
     21 home-homepage-new-windows =
     22    .label = { COPY_PATTERN(from_path, "home-homepage-mode-label2") }
     23 
     24 home-homepage-new-tabs =
     25    .label = { COPY_PATTERN(from_path, "home-newtabs-mode-label") }
     26 
     27 home-homepage-custom-homepage-button =
     28    .label = { COPY_PATTERN(from_path, "home-homepage-custom-homepage-url") }
     29 """,
     30            from_path=source,
     31        ),
     32    )