tor-browser

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

bug_1999685_preferences_history_mode_label.py (1128B)


      1 # Any copyright is dedicated to the Public Domain.
      2 # http://creativecommons.org/publicdomain/zero/1.0/
      3 
      4 from fluent.migrate import COPY_PATTERN
      5 from fluent.migrate.helpers import transforms_from
      6 
      7 
      8 def migrate(ctx):
      9    """Bug 1999685 - Migrate history descriptions to new IDs with aria-labels, part {index}."""
     10    source = "browser/browser/preferences/preferences.ftl"
     11    target = source
     12 
     13    ctx.add_transforms(
     14        target,
     15        source,
     16        transforms_from(
     17            """
     18 history-remember-label2 = {COPY_PATTERN(from_path, "history-remember-label")}
     19 
     20 history-remember-description3 =
     21    .aria-label = { history-remember-label2 }
     22    .description = {COPY_PATTERN(from_path, "history-remember-description2.description")}
     23 
     24 history-dontremember-description3 =
     25    .aria-label = { history-remember-label2 }
     26    .description = {COPY_PATTERN(from_path, "history-dontremember-description2.description")}
     27 
     28 history-custom-description3 =
     29    .aria-label = { history-remember-label2 }
     30    .description = {COPY_PATTERN(from_path, "history-custom-description.description")}
     31 """,
     32            from_path=source,
     33        ),
     34    )