Bug 1591003 - Migrate urlbar notification tooltips to Fluent. r=fluent-reviewers,Gijs

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Zibi Braniecki 2019-10-24 18:50:26 +00:00
parent 767f95076e
commit 1697722146
4 changed files with 76 additions and 22 deletions

View file

@ -902,27 +902,27 @@
</box>
<box id="blocked-permissions-container" align="center">
<image data-permission-id="geo" class="blocked-permission-icon geo-icon" role="button"
tooltiptext="&urlbar.geolocationBlocked.tooltip;"/>
data-l10n-id="urlbar-geolocation-blocked"/>
<image data-permission-id="desktop-notification" class="blocked-permission-icon desktop-notification-icon" role="button"
tooltiptext="&urlbar.webNotificationsBlocked.tooltip;"/>
data-l10n-id="urlbar-web-notifications-blocked"/>
<image data-permission-id="camera" class="blocked-permission-icon camera-icon" role="button"
tooltiptext="&urlbar.cameraBlocked.tooltip;"/>
data-l10n-id="urlbar-camera-blocked"/>
<image data-permission-id="microphone" class="blocked-permission-icon microphone-icon" role="button"
tooltiptext="&urlbar.microphoneBlocked.tooltip;"/>
data-l10n-id="urlbar-microphone-blocked"/>
<image data-permission-id="screen" class="blocked-permission-icon screen-icon" role="button"
tooltiptext="&urlbar.screenBlocked.tooltip;"/>
data-l10n-id="urlbar-screen-blocked"/>
<image data-permission-id="persistent-storage" class="blocked-permission-icon persistent-storage-icon" role="button"
tooltiptext="&urlbar.persistentStorageBlocked.tooltip;"/>
data-l10n-id="urlbar-persistent-storage-blocked"/>
<image data-permission-id="popup" class="blocked-permission-icon popup-icon" role="button"
tooltiptext="&urlbar.popupBlocked.tooltip;"/>
data-l10n-id="urlbar-popup-blocked"/>
<image data-permission-id="autoplay-media" class="blocked-permission-icon autoplay-media-icon" role="button"
tooltiptext="&urlbar.autoplayMediaBlocked.tooltip;"/>
data-l10n-id="urlbar-autoplay-media-blocked"/>
<image data-permission-id="canvas" class="blocked-permission-icon canvas-icon" role="button"
tooltiptext="&urlbar.canvasBlocked.tooltip;"/>
data-l10n-id="urlbar-canvas-blocked"/>
<image data-permission-id="midi" class="blocked-permission-icon midi-icon" role="button"
tooltiptext="&urlbar.midiBlocked.tooltip;"/>
data-l10n-id="urlbar-midi-blocked"/>
<image data-permission-id="install" class="blocked-permission-icon install-icon" role="button"
tooltiptext="&urlbar.installBlocked.tooltip;"/>
data-l10n-id="urlbar-install-blocked"/>
</box>
<box id="notification-popup-box"
hidden="true"

View file

@ -50,6 +50,29 @@ urlbar-addons-notification-anchor =
urlbar-tip-help-icon =
.title = Get help
urlbar-geolocation-blocked =
.tooltiptext = You have blocked location information for this website.
urlbar-web-notifications-blocked =
.tooltiptext = You have blocked notifications for this website.
urlbar-camera-blocked =
.tooltiptext = You have blocked your camera for this website.
urlbar-microphone-blocked =
.tooltiptext = You have blocked your microphone for this website.
urlbar-screen-blocked =
.tooltiptext = You have blocked this website from sharing your screen.
urlbar-persistent-storage-blocked =
.tooltiptext = You have blocked persistent storage for this website.
urlbar-popup-blocked =
.tooltiptext = You have blocked pop-ups for this website.
urlbar-autoplay-media-blocked =
.tooltiptext = You have blocked autoplay media with sound for this website.
urlbar-canvas-blocked =
.tooltiptext = You have blocked canvas data extraction for this website.
urlbar-midi-blocked =
.tooltiptext = You have blocked MIDI access for this website.
urlbar-install-blocked =
.tooltiptext = You have blocked add-on installation for this website.
## Page Action Context Menu
page-action-add-to-urlbar =

View file

@ -167,17 +167,6 @@ convenience of Safari and Chrome users on macOS. See bug 1398988. -->
<!ENTITY urlbar.permissionsGranted.tooltip "You have granted this website additional permissions.">
<!ENTITY urlbar.cameraBlocked.tooltip "You have blocked your camera for this website.">
<!ENTITY urlbar.microphoneBlocked.tooltip "You have blocked your microphone for this website.">
<!ENTITY urlbar.screenBlocked.tooltip "You have blocked this website from sharing your screen.">
<!ENTITY urlbar.geolocationBlocked.tooltip "You have blocked location information for this website.">
<!ENTITY urlbar.webNotificationsBlocked.tooltip "You have blocked notifications for this website.">
<!ENTITY urlbar.persistentStorageBlocked.tooltip "You have blocked persistent storage for this website.">
<!ENTITY urlbar.popupBlocked.tooltip "You have blocked pop-ups for this website.">
<!ENTITY urlbar.autoplayMediaBlocked.tooltip "You have blocked autoplay media with sound for this website.">
<!ENTITY urlbar.canvasBlocked.tooltip "You have blocked canvas data extraction for this website.">
<!ENTITY urlbar.midiBlocked.tooltip "You have blocked MIDI access for this website.">
<!ENTITY urlbar.installBlocked.tooltip "You have blocked add-on installation for this website.">
<!ENTITY urlbar.openHistoryPopup.tooltip "Show history">

View file

@ -0,0 +1,42 @@
# coding=utf8
# 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
from fluent.migrate.helpers import COPY
def migrate(ctx):
"""Bug 1591003 - Migrate urlbar notification tooltips to Fluent, part {index}"""
ctx.add_transforms(
"browser/browser/browser.ftl",
"browser/browser/browser.ftl",
transforms_from(
"""
urlbar-geolocation-blocked =
.tooltiptext = { COPY(path1, "urlbar.geolocationBlocked.tooltip") }
urlbar-web-notifications-blocked =
.tooltiptext = { COPY(path1, "urlbar.webNotificationsBlocked.tooltip") }
urlbar-camera-blocked =
.tooltiptext = { COPY(path1, "urlbar.cameraBlocked.tooltip") }
urlbar-microphone-blocked =
.tooltiptext = { COPY(path1, "urlbar.microphoneBlocked.tooltip") }
urlbar-screen-blocked =
.tooltiptext = { COPY(path1, "urlbar.screenBlocked.tooltip") }
urlbar-persistent-storage-blocked =
.tooltiptext = { COPY(path1, "urlbar.persistentStorageBlocked.tooltip") }
urlbar-popup-blocked =
.tooltiptext = { COPY(path1, "urlbar.popupBlocked.tooltip") }
urlbar-autoplay-media-blocked =
.tooltiptext = { COPY(path1, "urlbar.autoplayMediaBlocked.tooltip") }
urlbar-canvas-blocked =
.tooltiptext = { COPY(path1, "urlbar.canvasBlocked.tooltip") }
urlbar-midi-blocked =
.tooltiptext = { COPY(path1, "urlbar.midiBlocked.tooltip") }
urlbar-install-blocked =
.tooltiptext = { COPY(path1, "urlbar.installBlocked.tooltip") }
""", path1="/browser/chrome/browser/browser.dtd"))