Skip to content

Commit 9315ecd

Browse files
committed
Bug 1856014 - Fix fluent schema for strings in protections panel. r=Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D191997
1 parent 350fc35 commit 9315ecd

File tree

3 files changed

+48
-8
lines changed

3 files changed

+48
-8
lines changed

browser/components/controlcenter/content/protectionsPanel.inc.xhtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
<toolbarseparator></toolbarseparator>
8383
<vbox id="tracking-protection-container" class="protections-popup-section">
8484
<description id="protections-popup-no-trackers-found-description" data-l10n-id="protections-panel-no-trackers-found"></description>
85-
<tooltip id="protections-popup-not-blocking-why-etp-on-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-on-tooltip"></tooltip>
86-
<tooltip id="protections-popup-not-blocking-why-etp-off-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-off-tooltip"></tooltip>
85+
<tooltip id="protections-popup-not-blocking-why-etp-on-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-on-tooltip-label"></tooltip>
86+
<tooltip id="protections-popup-not-blocking-why-etp-off-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-off-tooltip-label"></tooltip>
8787
<vbox id="protections-popup-content" flex="1">
8888
<vbox id="protections-popup-category-list">
8989
<toolbarbutton id="protections-popup-category-trackers"
@@ -401,12 +401,12 @@
401401
oncommand="gProtectionsHandler._protectionsPopupMultiView.goBack();"
402402
class="footer-button" />
403403
<button id="protections-popup-cookieBannerView-enable-button"
404-
data-l10n-id="protections-panel-cookie-banner-view-turn-on"
404+
data-l10n-id="protections-panel-cookie-banner-view-turn-on-label"
405405
oncommand="gProtectionsHandler.onCookieBannerToggleCommand()"
406406
default="true"
407407
class="footer-button" />
408408
<button id="protections-popup-cookieBannerView-disable-button"
409-
data-l10n-id="protections-panel-cookie-banner-view-turn-off"
409+
data-l10n-id="protections-panel-cookie-banner-view-turn-off-label"
410410
oncommand="gProtectionsHandler.onCookieBannerToggleCommand()"
411411
default="true"
412412
class="footer-button" />

browser/locales/en-US/browser/protectionsPanel.ftl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ protections-panel-site-not-working-view =
5151
## a tooltip explaining why these items were not blocked in the page.
5252

5353
protections-panel-not-blocking-why-label = Why?
54-
protections-panel-not-blocking-why-etp-on-tooltip = Blocking these could break elements of some websites. Without trackers, some buttons, forms, and login fields might not work.
55-
protections-panel-not-blocking-why-etp-off-tooltip = All trackers on this site have been loaded because protections are turned off.
54+
protections-panel-not-blocking-why-etp-on-tooltip-label =
55+
.label = Blocking these could break elements of some websites. Without trackers, some buttons, forms, and login fields might not work.
56+
protections-panel-not-blocking-why-etp-off-tooltip-label =
57+
.label = All trackers on this site have been loaded because protections are turned off.
5658
5759
##
5860

@@ -142,5 +144,7 @@ protections-panel-cookie-banner-blocker-view-turn-on-for-site = Turn on Cookie B
142144
protections-panel-cookie-banner-view-cookie-clear-warning = { -brand-short-name } will clear this site’s cookies and refresh the page. Clearing all cookies may sign you out or empty shopping carts.
143145
protections-panel-cookie-banner-blocker-view-turn-on-description = Turn on and { -brand-short-name } will try to automatically refuse cookie banners on this site.
144146
protections-panel-cookie-banner-view-cancel = Cancel
145-
protections-panel-cookie-banner-view-turn-off = Turn Off
146-
protections-panel-cookie-banner-view-turn-on = Turn On
147+
protections-panel-cookie-banner-view-turn-off-label =
148+
.label = Turn Off
149+
protections-panel-cookie-banner-view-turn-on-label =
150+
.label = Turn On
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 1856014 - Fix fluent schema for strings in protections panel, part {index}."""
9+
10+
file = "browser/browser/protectionsPanel.ftl"
11+
ctx.add_transforms(
12+
file,
13+
file,
14+
transforms_from(
15+
"""
16+
protections-panel-not-blocking-why-etp-on-tooltip-label =
17+
.label = {COPY_PATTERN(from_path, "protections-panel-not-blocking-why-etp-on-tooltip")}
18+
protections-panel-not-blocking-why-etp-off-tooltip-label =
19+
.label = {COPY_PATTERN(from_path, "protections-panel-not-blocking-why-etp-off-tooltip")}
20+
""",
21+
from_path=file,
22+
),
23+
)
24+
ctx.add_transforms(
25+
file,
26+
file,
27+
transforms_from(
28+
"""
29+
protections-panel-cookie-banner-view-turn-off-label =
30+
.label = {COPY_PATTERN(from_path, "protections-panel-cookie-banner-view-turn-off")}
31+
protections-panel-cookie-banner-view-turn-on-label =
32+
.label = {COPY_PATTERN(from_path, "protections-panel-cookie-banner-view-turn-on")}
33+
""",
34+
from_path=file,
35+
),
36+
)

0 commit comments

Comments
 (0)