mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1808431 — Reword first WebMIDI prompt. r=rpl,flod
Differential Revision: https://phabricator.services.mozilla.com/D174813
This commit is contained in:
parent
8b9141cc8e
commit
bf3806720a
@ -643,8 +643,12 @@ var gXPInstallObserver = {
|
||||
let hasHost = !!options.displayURI;
|
||||
|
||||
if (isSitePermissionAddon) {
|
||||
// At present, WebMIDI is the only consumer of the site permission
|
||||
// add-on infrastructure, and so we can hard-code a midi string here.
|
||||
// If and when we use it for other things, we'll need to plumb that
|
||||
// information through. See bug 1826747.
|
||||
messageString = gNavigatorBundle.getString(
|
||||
"sitePermissionInstallFirstPrompt.header"
|
||||
"sitePermissionInstallFirstPrompt.midi.header"
|
||||
);
|
||||
} else if (hasHost) {
|
||||
messageString = gNavigatorBundle.getFormattedString(
|
||||
@ -675,7 +679,7 @@ var gXPInstallObserver = {
|
||||
|
||||
if (isSitePermissionAddon) {
|
||||
message.textContent = gNavigatorBundle.getString(
|
||||
"sitePermissionInstallFirstPrompt.message"
|
||||
"sitePermissionInstallFirstPrompt.midi.message"
|
||||
);
|
||||
} else if (hasHost) {
|
||||
let text = gNavigatorBundle.getString(
|
||||
|
@ -43,14 +43,12 @@ xpinstallPromptMessage.neverAllow.accesskey=N
|
||||
# a localization that's significantly longer than the English version.
|
||||
xpinstallPromptMessage.neverAllowAndReport=Report Suspicious Site
|
||||
xpinstallPromptMessage.neverAllowAndReport.accesskey=R
|
||||
# LOCALIZATION NOTE (sitePermissionInstallFirstPrompt.header)
|
||||
# This message is shown when a SitePermissionsAddon install is triggered, i.e. when the
|
||||
# website calls sensitive APIs (e.g. navigator.requestMIDIAccess).
|
||||
sitePermissionInstallFirstPrompt.header=This site is requesting access to your devices. Device access can be enabled by installing an add-on.
|
||||
# LOCALIZATION NOTE (sitePermissionInstallFirstPrompt.message)
|
||||
# This message is shown when a SitePermissionsAddon install is triggered, i.e. when the
|
||||
# website calls sensitive APIs (e.g. navigator.requestMIDIAccess).
|
||||
sitePermissionInstallFirstPrompt.message=This add-on could be used to steal your data or attack your computer. Only continue if you trust this site.
|
||||
# LOCALIZATION NOTE (sitePermissionInstallFirstPrompt.midi.header)
|
||||
# This message is shown when a website invokes navigator.requestMIDIAccess.
|
||||
sitePermissionInstallFirstPrompt.midi.header=This site is requesting access to your MIDI (Musical Instrument Digital Interface) devices. Device access can be enabled by installing an add-on.
|
||||
# LOCALIZATION NOTE (sitePermissionInstallFirstPrompt.midi.message)
|
||||
# This message is shown when a website invokes navigator.requestMIDIAccess.
|
||||
sitePermissionInstallFirstPrompt.midi.message=This access is not guaranteed to be safe. Only continue if you trust this site.
|
||||
|
||||
# Accessibility Note:
|
||||
# Be sure you do not choose an accesskey that is used elsewhere in the active context (e.g. main menu bar, submenu of the warning popup button)
|
||||
|
@ -92,12 +92,12 @@ add_task(async function testRequestMIDIAccess() {
|
||||
);
|
||||
is(
|
||||
installPopupHeader.textContent,
|
||||
gNavigatorBundle.getString("sitePermissionInstallFirstPrompt.header"),
|
||||
gNavigatorBundle.getString("sitePermissionInstallFirstPrompt.midi.header"),
|
||||
"First popup has expected header text"
|
||||
);
|
||||
is(
|
||||
installPopupMessage.textContent,
|
||||
gNavigatorBundle.getString("sitePermissionInstallFirstPrompt.message"),
|
||||
gNavigatorBundle.getString("sitePermissionInstallFirstPrompt.midi.message"),
|
||||
"First popup has expected message"
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user