Bug 1561184 - Show tooltip text for protection report in app menu r=fluent-reviewers,johannh,flod

Differential Revision: https://phabricator.services.mozilla.com/D45583

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Erica Wright 2019-09-17 12:56:43 +00:00
Родитель 4bf7c15876
Коммит 8b7d823b40
6 изменённых файлов: 35 добавлений и 28 удалений

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

@ -1110,12 +1110,6 @@ var gProtectionsHandler = {
"tracking-protection-icon-animatable-image"
));
},
get appMenuLabel() {
delete this.appMenuLabel;
return (this.appMenuLabel = document.getElementById(
"appMenu-protection-report-text"
));
},
get _protectionsIconBox() {
delete this._protectionsIconBox;
return (this._protectionsIconBox = document.getElementById(
@ -1244,20 +1238,6 @@ var gProtectionsHandler = {
},
strings: {
get appMenuTitle() {
delete this.appMenuTitle;
return (this.appMenuTitle = gNavigatorBundle.getString(
"protectionReport.title"
));
},
get appMenuTooltip() {
delete this.appMenuTooltip;
return (this.appMenuTooltip = gNavigatorBundle.getString(
"protectionReport.tooltip"
));
},
get activeTooltipText() {
delete this.activeTooltipText;
return (this.activeTooltipText = gNavigatorBundle.getString(
@ -1328,9 +1308,6 @@ var gProtectionsHandler = {
gProtectionsHandler._protectionsPopupSendReportLearnMore.href =
baseURL + "blocking-breakage";
this.appMenuLabel.setAttribute("value", this.strings.appMenuTitle);
this.appMenuLabel.setAttribute("tooltiptext", this.strings.appMenuTooltip);
// Add an observer to observe that the history has been cleared.
Services.obs.addObserver(this, "browser:purge-session-history");
},

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

@ -77,6 +77,7 @@
<html:link rel="localization" href="browser/branding/sync-brand.ftl"/>
<html:link rel="localization" href="browser/browser.ftl"/>
<html:link rel="localization" href="browser/menubar.ftl"/>
<html:link rel="localization" href="browser/appmenu.ftl"/>
</linkset>
# All JS files which are needed by browser.xhtml and other top level windows to

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

@ -251,9 +251,13 @@
<toolbaritem>
<toolbarbutton id="appMenu-protection-report-button"
class="subviewbutton subviewbutton-iconic"
oncommand="gProtectionsHandler.openProtections();">
oncommand="gProtectionsHandler.openProtections();"
data-l10n-id="appmenuitem-protection-report-tooltip">
<image id="appMenu-protection-report-icon" class="toolbarbutton-icon"/>
<label id="appMenu-protection-report-text" class="toolbarbutton-text">Privacy Protections</label>
<label id="appMenu-protection-report-text"
class="toolbarbutton-text"
data-l10n-id="appmenuitem-protection-report-title">
</label>
</toolbarbutton>
</toolbaritem>
<toolbarseparator id="appMenu-tp-separator"/>

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

@ -0,0 +1,9 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## App Menu
appmenuitem-protection-report-title = Protection Report
appmenuitem-protection-report-tooltip =
.tooltiptext = Go to your privacy report

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

@ -490,9 +490,6 @@ identity.extension.label=Extension (%S)
identity.extension.tooltip=Loaded by extension: %S
identity.showDetails.tooltip=Show connection details
protectionReport.title=Privacy Protections
protectionReport.tooltip=Go to your privacy report
# LOCALIZATION NOTE (contentBlocking.trackersView.blocked.label):
# This label is shown next to a tracker in the trackers subview.
# It forms the end of the (imaginary) sentence "www.example.com [was] Blocked"

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

@ -0,0 +1,19 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from __future__ import absolute_import
import fluent.syntax.ast as FTL
from fluent.migrate.helpers import transforms_from
def migrate(ctx):
"""Bug 1561184 - Show tooltip text for protection report in app menu, part {index}"""
ctx.add_transforms(
'browser/browser/appmenu.ftl',
'browser/browser/appmenu.ftl',
transforms_from(
"""
appmenuitem-protection-report-title = { COPY(from_path, "protectionReport.title") }
appmenuitem-protection-report-tooltip =
.tooltiptext = { COPY(from_path, "protectionReport.tooltip") }
""", from_path="browser/chrome/browser/browser.properties"))