commit e0141a55650326d71c0f52c8f10a077c73ed4f54 parent 606c266edd1024500eeb7cc9b0f61e28ca58d7bd Author: Luca Greco <lgreco@mozilla.com> Date: Tue, 4 Nov 2025 13:31:37 +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:
5 files changed, 14 insertions(+), 8 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/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)