commit 606c266edd1024500eeb7cc9b0f61e28ca58d7bd parent 1922b81c0724cc868b5a1c046e3e475d8b98d58f Author: Luca Greco <lgreco@mozilla.com> Date: Tue, 4 Nov 2025 13:31:37 +0000 Bug 1997594 - Update Firefox Desktop localized strings related to soft-blocked add-ons. r=willdurand,fluent-reviewers,bolsson Differential Revision: https://phabricator.services.mozilla.com/D271099 Diffstat:
11 files changed, 42 insertions(+), 41 deletions(-)
diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js @@ -97,7 +97,7 @@ const ERROR_L10N_IDS = new Map([ ], [ -14, - ["addon-install-error-soft-blocked", "addon-install-error-soft-blocked"], + ["addon-install-error-soft-blocked2", "addon-install-error-soft-blocked2"], ], ]); @@ -715,7 +715,7 @@ customElements.define( const { messagebar } = this; if (this.isSoftBlocked) { const SOFTBLOCK_FLUENTID = - "unified-extensions-item-messagebar-softblocked"; + "unified-extensions-item-messagebar-softblocked2"; if ( messagebar.messageL10nId === SOFTBLOCK_FLUENTID && messagebar.messageL10nArgs?.extensionName === this.extensionName @@ -3092,11 +3092,11 @@ var gUnifiedExtensions = { extensionName = addons[0].name; messageBarFluentId = hasHardBlocked ? "unified-extensions-mb-blocklist-error-single" - : "unified-extensions-mb-blocklist-warning-single"; + : "unified-extensions-mb-blocklist-warning-single2"; } else { messageBarFluentId = hasHardBlocked ? "unified-extensions-mb-blocklist-error-multiple" - : "unified-extensions-mb-blocklist-warning-multiple"; + : "unified-extensions-mb-blocklist-warning-multiple2"; } const messageBarBlocklist = this._makeMessageBar({ diff --git a/browser/components/extensions/test/browser/browser_unified_extensions_empty_panel.js b/browser/components/extensions/test/browser/browser_unified_extensions_empty_panel.js @@ -571,7 +571,7 @@ async function do_test_empty_state_with_blocklisted_addon(isSoftBlock) { window.document.l10n.getAttributes(messages[0]), { id: isSoftBlock - ? "unified-extensions-mb-blocklist-warning-single" + ? "unified-extensions-mb-blocklist-warning-single2" : "unified-extensions-mb-blocklist-error-single", args: { extensionName: "Name of the blocked ext", diff --git a/browser/components/extensions/test/browser/browser_unified_extensions_item_messagebar.js b/browser/components/extensions/test/browser/browser_unified_extensions_item_messagebar.js @@ -161,7 +161,7 @@ add_task(async function test_softblocked_item_messagebar() { addonId: addon.id, isCUIWidget: true, expectVisible: true, - expectFluentId: "unified-extensions-item-messagebar-softblocked", + expectFluentId: "unified-extensions-item-messagebar-softblocked2", expectFluentArgs: { extensionName: addon.name }, }); await closeExtensionsPanel(); @@ -192,7 +192,7 @@ add_task(async function test_softblocked_item_messagebar() { expectInArea: CustomizableUI.AREA_BOOKMARKS, expectOverflowedWidget: true, expectVisible: true, - expectFluentId: "unified-extensions-item-messagebar-softblocked", + expectFluentId: "unified-extensions-item-messagebar-softblocked2", expectFluentArgs: { extensionName: addon.name }, }); await closeExtensionsPanel(); @@ -224,7 +224,7 @@ add_task(async function test_softblocked_item_messagebar() { addonId: addon.id, isCUIWidget: false, expectVisible: true, - expectFluentId: "unified-extensions-item-messagebar-softblocked", + expectFluentId: "unified-extensions-item-messagebar-softblocked2", expectFluentArgs: { extensionName: addon.name }, }); await closeExtensionsPanel(); diff --git a/browser/components/extensions/test/browser/browser_unified_extensions_messages.js b/browser/components/extensions/test/browser/browser_unified_extensions_messages.js @@ -350,7 +350,7 @@ async function runBlockedExtensionsTestCase({ testSoftBlocks = false }) { type: testSoftBlocks ? "warning" : "error", fluentAttributes: { id: testSoftBlocks - ? "unified-extensions-mb-blocklist-warning-single" + ? "unified-extensions-mb-blocklist-warning-single2" : "unified-extensions-mb-blocklist-error-single", args: { extensionName: addon1.name, @@ -432,7 +432,7 @@ async function runBlockedExtensionsTestCase({ testSoftBlocks = false }) { type: testSoftBlocks ? "warning" : "error", fluentAttributes: { id: testSoftBlocks - ? "unified-extensions-mb-blocklist-warning-multiple" + ? "unified-extensions-mb-blocklist-warning-multiple2" : "unified-extensions-mb-blocklist-error-multiple", args: { extensionsCount: 2, diff --git a/browser/locales/en-US/browser/addonNotifications.ftl b/browser/locales/en-US/browser/addonNotifications.ftl @@ -134,6 +134,6 @@ addon-local-install-no-addon-name-error-file-access = The add-on could not be in # $appVersion (String): the application version. addon-install-error-incompatible = { $addonName } could not be installed because it is not compatible with { -brand-short-name } { $appVersion }. addon-install-error-hard-blocked = { $addonName } violates Mozilla’s policies and can’t be installed on { -brand-short-name }. -addon-install-error-soft-blocked = { $addonName } violates Mozilla’s policies and can’t be installed on { -brand-short-name }. +addon-install-error-soft-blocked2 = { $addonName } is restricted and can’t be installed on { -brand-short-name }. # Enterprise policies is a feature aimed at system administrators who want to deploy custom settings for Firefox. addon-install-error-admin-install-only = You cannot install { $addonName } as an end user, it can only be installed by an organization using enterprise policies. diff --git a/browser/locales/en-US/browser/unifiedExtensions.ftl b/browser/locales/en-US/browser/unifiedExtensions.ftl @@ -32,7 +32,7 @@ unified-extensions-item-message-manage = Manage extension # Variables: # $extensionName (String) - Name of the user-enabled soft-blocked extension. -unified-extensions-item-messagebar-softblocked = { $extensionName } violates Mozilla’s policies. Using it may be risky. +unified-extensions-item-messagebar-softblocked2 = { $extensionName } is restricted. Using it may be risky. ## Extension's context menu @@ -71,10 +71,10 @@ unified-extensions-mb-about-addons-link = Go to extension settings # Variables: # $extensionName (String) - Name of the extension disabled through a soft-block. -unified-extensions-mb-blocklist-warning-single = +unified-extensions-mb-blocklist-warning-single2 = .heading = { $extensionName } disabled .message = - This extension violates Mozilla’s policies and has been disabled. + This extension is restricted and has been disabled. You can enable it in settings, but this may be risky. # Variables: @@ -86,13 +86,13 @@ unified-extensions-mb-blocklist-error-single = # Variables: # $extensionsCount (Number) - Number of extensions disabled through both soft and hard-blocks (always going to be greater than 1) -unified-extensions-mb-blocklist-warning-multiple = +unified-extensions-mb-blocklist-warning-multiple2 = .heading = { $extensionsCount -> *[other] { $extensionsCount } extensions disabled } .message = - Some of your extensions have been disabled for violating Mozilla’s policies. + Some of your extensions are restricted and have been disabled. You can enable them in settings, but this may be risky. # Variables: diff --git a/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl b/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl @@ -574,14 +574,14 @@ details-notification-hard-blocked-other = .message = This add-on is blocked for violating Mozilla’s policies and has been disabled. details-notification-blocked-link2 = See Details -details-notification-soft-blocked-extension-disabled = - .message = This extension is restricted for violating Mozilla’s policies and has been disabled. You can enable it, but this may be risky. -details-notification-soft-blocked-extension-enabled = - .message = This extension violates Mozilla’s policies. Using it may be risky. -details-notification-soft-blocked-other-disabled = - .message = This add-on is restricted for violating Mozilla’s policies and has been disabled. You can enable it, but this may be risky. -details-notification-soft-blocked-other-enabled = - .message = This add-on violates Mozilla’s policies. Using it may be risky. +details-notification-soft-blocked-extension-disabled2 = + .message = This extension is restricted and has been disabled. You can enable it, but this may be risky. +details-notification-soft-blocked-extension-enabled2 = + .message = This extension is restricted. Using it may be risky. +details-notification-soft-blocked-other-disabled2 = + .message = This add-on is restricted and has been disabled. You can enable it, but this may be risky. +details-notification-soft-blocked-other-enabled2 = + .message = This add-on is restricted. Using it may be risky. details-notification-softblocked-link2 = See Details details-notification-gmp-pending2 = diff --git a/toolkit/mozapps/extensions/content/aboutaddons.js b/toolkit/mozapps/extensions/content/aboutaddons.js @@ -309,7 +309,16 @@ async function getAddonMessageInfo( type: "warning", }; } else if (addon.blocklistState === STATE_SOFTBLOCKED) { - const fluentBaseId = "details-notification-soft-blocked"; + const softBlockFluentIdsMap = { + extension: { + enabled: "details-notification-soft-blocked-extension-enabled2", + disabled: "details-notification-soft-blocked-extension-disabled2", + }, + other: { + enabled: "details-notification-soft-blocked-other-enabled2", + disabled: "details-notification-soft-blocked-other-disabled2", + }, + }; let typeSuffix = addon.type === "extension" ? "extension" : "other"; let stateSuffix; // If the Addon Card is not expanded, delay changing the messagebar @@ -320,7 +329,7 @@ async function getAddonMessageInfo( } else { stateSuffix = !isInDisabledSection ? "enabled" : "disabled"; } - let messageId = `${fluentBaseId}-${typeSuffix}-${stateSuffix}`; + let messageId = softBlockFluentIdsMap[typeSuffix][stateSuffix]; return { linkUrl: await addon.getBlocklistURL(), diff --git a/toolkit/mozapps/extensions/test/browser/browser_html_warning_messages.js b/toolkit/mozapps/extensions/test/browser/browser_html_warning_messages.js @@ -169,7 +169,7 @@ add_task(async function testSoftBlocked() { // Verify soft-block message on a softdisabled extension and theme. await testSoftBlockedAddon({ - expectedFluentId: "details-notification-soft-blocked-extension-disabled", + expectedFluentId: "details-notification-soft-blocked-extension-disabled2", mockAddon: { id: "softblocked-extension@mochi.test", name: "Soft-Blocked Extension", @@ -179,7 +179,7 @@ add_task(async function testSoftBlocked() { }, }); await testSoftBlockedAddon({ - expectedFluentId: "details-notification-soft-blocked-other-disabled", + expectedFluentId: "details-notification-soft-blocked-other-disabled2", mockAddon: { id: "softblocked-theme@mochi.test", name: "Soft-Blocked Theme", @@ -191,7 +191,7 @@ add_task(async function testSoftBlocked() { // Verify soft-block message on a re-enabled extension and theme. await testSoftBlockedAddon({ - expectedFluentId: "details-notification-soft-blocked-extension-enabled", + expectedFluentId: "details-notification-soft-blocked-extension-enabled2", mockAddon: { id: "softblocked-extension@mochi.test", name: "Soft-Blocked Extension", @@ -201,7 +201,7 @@ add_task(async function testSoftBlocked() { }, }); await testSoftBlockedAddon({ - expectedFluentId: "details-notification-soft-blocked-other-enabled", + expectedFluentId: "details-notification-soft-blocked-other-enabled2", mockAddon: { id: "softblocked-theme@mochi.test", name: "Soft-Blocked Theme", @@ -490,7 +490,7 @@ add_task(async function testCardRefreshedOnBlocklistStateChanges() { await checkAddonCard(doc, id, { linkUrl, text: { - id: `details-notification-soft-blocked-extension-disabled`, + id: `details-notification-soft-blocked-extension-disabled2`, linkId: "details-notification-softblocked-link2", }, type: "warning", @@ -507,7 +507,7 @@ add_task(async function testCardRefreshedOnBlocklistStateChanges() { await checkAddonCard(doc, id, { linkUrl, text: { - id: `details-notification-soft-blocked-extension-enabled`, + id: `details-notification-soft-blocked-extension-enabled2`, linkId: "details-notification-softblocked-link2", }, type: "warning", diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js b/toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js @@ -1071,7 +1071,7 @@ describe("Add-on installation doorhangers", function () { await testBlocklistedAddon({ stash: { softblocked: [`${id}:${version}`], blocked: [], unblocked: [] }, expected: { - fluentId: "addon-install-error-soft-blocked", + fluentId: "addon-install-error-soft-blocked2", blocklistURL, }, }); diff --git a/tools/lint/fluent-lint/exclusions.yml b/tools/lint/fluent-lint/exclusions.yml @@ -137,7 +137,6 @@ CO01: - trademarkInfo # browser/addonNotifications.ftl - addon-install-error-hard-blocked - - addon-install-error-soft-blocked # browser/appExtensionFields.ftl - extension-firefox-alpenglow-name # browser/browser.ftl @@ -157,11 +156,8 @@ CO01: - sync-engine-addons - sync-mobile-promo # browser/unifiedExtensions.ftl - - unified-extensions-item-messagebar-softblocked - unified-extensions-mb-blocklist-error-multiple - unified-extensions-mb-blocklist-error-single - - unified-extensions-mb-blocklist-warning-multiple - - unified-extensions-mb-blocklist-warning-single # devtools/client/locales/en-US/aboutdebugging.ftl - about-debugging-setup-usb-step-enable-debug-firefox2 - about-debugging-browser-version-too-old-fennec @@ -177,10 +173,6 @@ CO01: - addon-badge-verified4 - details-notification-hard-blocked-extension - details-notification-hard-blocked-other - - details-notification-soft-blocked-extension-disabled - - details-notification-soft-blocked-extension-enabled - - details-notification-soft-blocked-other-disabled - - details-notification-soft-blocked-other-enabled - plugins-openh264-description - recommended-theme-1 # toolkit/about/aboutSupport.ftl