Bug 1730893 - [devtools profiler] Add a migration script for the localization changes r=flod

Differential Revision: https://phabricator.services.mozilla.com/D127828
This commit is contained in:
Julien Wajsberg 2021-10-08 11:47:34 +00:00
Родитель cc3ace47ca
Коммит e57d0bc384
1 изменённых файлов: 29 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,29 @@
# coding=utf8
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from __future__ import absolute_import
from fluent.migrate.helpers import transforms_from
from fluent.migrate import COPY, COPY_PATTERN
def migrate(ctx):
"""Bug 1730893 - Localize the popup's button tooltip when changing state, part {index}"""
ctx.add_transforms(
"browser/browser/appmenu.ftl",
"browser/browser/appmenu.ftl",
transforms_from(
"""
profiler-popup-learn-more-button =
.label = { COPY_PATTERN(ftl_path, "profiler-popup-learn-more") }
profiler-popup-edit-settings-button =
.label = { COPY_PATTERN(ftl_path, "profiler-popup-edit-settings") }
profiler-popup-button-idle =
.label = { COPY(prop_path, "profiler-button.label") }
.tooltiptext = { COPY(prop_path, "profiler-button.tooltiptext") }
""",
prop_path="browser/chrome/browser/customizableui/customizableWidgets.properties",
ftl_path="browser/browser/appmenu.ftl",
),
)