tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 45bc4b894b2c355818313dc1defd821c54f368e0
parent db975f3de897466285a9584d1c630a7a3dc88e78
Author: Luca Greco <lgreco@mozilla.com>
Date:   Wed,  5 Nov 2025 16:26:39 +0000

Bug 1997594 - Update Firefox for Android localized strings related to soft-blocked add-ons. r=willdurand,android-l10n-reviewers,android-addons-reviewers,delphine

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

Diffstat:
Mmobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/ui/AddonsManagerAdapter.kt | 4++--
Mmobile/android/android-components/components/feature/addons/src/main/res/layout/mozac_feature_addons_message_bars.xml | 2+-
Mmobile/android/android-components/components/feature/addons/src/main/res/values/strings.xml | 12+++++++++---
Mmobile/android/android-components/components/feature/addons/src/test/java/mozilla/components/feature/addons/ui/AddonsManagerAdapterTest.kt | 4++--
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/extension/WebExtensionPromptFeature.kt | 2+-
Mmobile/android/fenix/app/src/test/java/org/mozilla/fenix/extension/WebExtensionPromptFeatureTest.kt | 2+-
6 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/ui/AddonsManagerAdapter.kt b/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/ui/AddonsManagerAdapter.kt @@ -571,9 +571,9 @@ class AddonsManagerAdapter( // Soft-blocked add-ons can be re-enabled. That's why we check whether the add-on is enabled // first. if (addon.isEnabled()) { - R.string.mozac_feature_addons_status_softblocked_re_enabled + R.string.mozac_feature_addons_status_softblocked_re_enabled_2 } else { - R.string.mozac_feature_addons_status_softblocked_1 + R.string.mozac_feature_addons_status_softblocked_2 }, ) // This learn more link should be underlined. diff --git a/mobile/android/android-components/components/feature/addons/src/main/res/layout/mozac_feature_addons_message_bars.xml b/mobile/android/android-components/components/feature/addons/src/main/res/layout/mozac_feature_addons_message_bars.xml @@ -55,7 +55,7 @@ android:layout_height="wrap_content" android:textColor="?attr/mozac_primary_text_color" android:textSize="14sp" - tools:text="@string/mozac_feature_addons_status_softblocked_1" + tools:text="@string/mozac_feature_addons_status_softblocked_2" tools:textColor="@color/photonDarkGrey90" /> <TextView diff --git a/mobile/android/android-components/components/feature/addons/src/main/res/values/strings.xml b/mobile/android/android-components/components/feature/addons/src/main/res/values/strings.xml @@ -361,7 +361,9 @@ <!-- Text shown when attempting to install an add-on that can only be install via Enterprise Policies, which is not supported on Android. %1$s is the add-on name. --> <string name="mozac_feature_addons_admin_install_only">%1$s could not be installed because it can only be installed by an organization using enterprise policies, which isn‘t supported on this platform.</string> <!-- Text shown when attempting to install an add-on that is soft-blocked. %1$s is the add-on name. %2$s is the app name. --> - <string name="mozac_feature_addons_soft_blocked_1">%1$s violates Mozilla’s policies and can’t be installed on %2$s.</string> + <string name="mozac_feature_addons_soft_blocked_1" moz:removedIn="147" tools:ignore="UnusedResources">%1$s violates Mozilla’s policies and can’t be installed on %2$s.</string> + <!-- Text shown when attempting to install an add-on that is soft-blocked. %1$s is the add-on name. %2$s is the app name. --> + <string name="mozac_feature_addons_soft_blocked_2">%1$s is restricted and can’t be installed on %2$s.</string> <!-- Text shown after failed to enable an add-on. %1$s is the add-on name. --> <string name="mozac_feature_addons_failed_to_enable">Failed to enable %1$s</string> <!-- Text shown after failed to disable an add-on. %1$s is the add-on name. --> @@ -407,9 +409,13 @@ <!-- Status message below an add-on in the add-ons manager when this add-on has been blocklisted. %1$s is the add-on name. --> <string name="mozac_feature_addons_status_blocklisted_1">This extension is blocked for violating Mozilla’s policies and has been disabled.</string> <!-- Status message below an add-on in the add-ons manager when this add-on has been soft-blocked. --> - <string name="mozac_feature_addons_status_softblocked_1">This extension is restricted for violating Mozilla’s policies and has been disabled. You can enable it, but this may be risky.</string> + <string name="mozac_feature_addons_status_softblocked_1" moz:removedIn="147" tools:ignore="UnusedResources">This extension is restricted for violating Mozilla’s policies and has been disabled. You can enable it, but this may be risky.</string> + <!-- Status message below an add-on in the add-ons manager when this add-on has been soft-blocked. --> + <string name="mozac_feature_addons_status_softblocked_2">This extension is restricted and has been disabled. You can enable it, but this may be risky.</string> + <!-- Status message below an add-on in the add-ons manager when this add-on has been soft-blocked but the user re-enabled it. --> + <string name="mozac_feature_addons_status_softblocked_re_enabled" moz:removedIn="147" tools:ignore="UnusedResources">This extension violates Mozilla’s policies. Using it may be risky.</string> <!-- Status message below an add-on in the add-ons manager when this add-on has been soft-blocked but the user re-enabled it. --> - <string name="mozac_feature_addons_status_softblocked_re_enabled">This extension violates Mozilla’s policies. Using it may be risky.</string> + <string name="mozac_feature_addons_status_softblocked_re_enabled_2">This extension is restricted. Using it may be risky.</string> <!-- Status message below an add-on in the add-ons manager when this add-on hasn't been signed correctly. %1$s is the add-on name. --> <string name="mozac_feature_addons_status_unsigned">%1$s could not be verified as secure and has been disabled.</string> <!-- Status message below an add-on in the add-ons manager when this add-on isn't compatible with the application version. %1$s is the add-on name, %2$s is the app name and %3$s is the app version. --> diff --git a/mobile/android/android-components/components/feature/addons/src/test/java/mozilla/components/feature/addons/ui/AddonsManagerAdapterTest.kt b/mobile/android/android-components/components/feature/addons/src/test/java/mozilla/components/feature/addons/ui/AddonsManagerAdapterTest.kt @@ -834,7 +834,7 @@ class AddonsManagerAdapterTest { val addon = makeDisabledAddon(Addon.DisabledReason.SOFT_BLOCKED) whenever(addon.isEnabled()).thenReturn(false) val expectedMessage = - "This extension is restricted for violating Mozilla’s policies and has been disabled. You can enable it, but this may be risky." + "This extension is restricted and has been disabled. You can enable it, but this may be risky." bindSoftBlockedAddon(addon, expectedMessage) } @@ -843,7 +843,7 @@ class AddonsManagerAdapterTest { fun `bind soft-blocked add-on that has been re-enabled by user`() { val addon = makeDisabledAddon(Addon.DisabledReason.SOFT_BLOCKED) whenever(addon.isEnabled()).thenReturn(true) - val expectedMessage = "This extension violates Mozilla’s policies. Using it may be risky." + val expectedMessage = "This extension is restricted. Using it may be risky." bindSoftBlockedAddon(addon, expectedMessage) } diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/extension/WebExtensionPromptFeature.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/extension/WebExtensionPromptFeature.kt @@ -184,7 +184,7 @@ class WebExtensionPromptFeature( is WebExtensionInstallException.SoftBlocked -> { url = formatBlocklistURL(exception) - context.getString(addonsR.string.mozac_feature_addons_soft_blocked_1, addonName, appName) + context.getString(addonsR.string.mozac_feature_addons_soft_blocked_2, addonName, appName) } is WebExtensionInstallException.UserCancelled -> { diff --git a/mobile/android/fenix/app/src/test/java/org/mozilla/fenix/extension/WebExtensionPromptFeatureTest.kt b/mobile/android/fenix/app/src/test/java/org/mozilla/fenix/extension/WebExtensionPromptFeatureTest.kt @@ -423,7 +423,7 @@ class WebExtensionPromptFeatureTest { ) val appName = testContext.getString(R.string.app_name) val expectedMessage = - testContext.getString(addonsR.string.mozac_feature_addons_soft_blocked_1, extensionName, appName) + testContext.getString(addonsR.string.mozac_feature_addons_soft_blocked_2, extensionName, appName) val expectedUrl = "${BuildConfig.AMO_BASE_URL}/android/blocked-addon/$extensionId/$extensionVersion/" val dialog = webExtensionPromptFeature.handleInstallationFailedRequest(exception = exception)