[fenix] No issue: Update Cookie banner handling strings

pull/600/head
Arturo Mejia 2 years ago committed by mergify[bot]
parent d60f31f758
commit 4280864031

@ -63,7 +63,8 @@ class CookieBannerHandlingDetailsView(
} else { } else {
R.string.reduce_cookie_banner_details_panel_description_on_for_site R.string.reduce_cookie_banner_details_panel_description_on_for_site
} }
binding.details.text = context.getString(stringID, context.getString(R.string.app_name)) val appName = context.getString(R.string.app_name)
binding.details.text = context.getString(stringID, appName, appName)
} }
@VisibleForTesting @VisibleForTesting

@ -339,8 +339,8 @@
<string name="reduce_cookie_banner_details_panel_title_off_for_site">Turn off Cookie Banner Reduction for %1$s?</string> <string name="reduce_cookie_banner_details_panel_title_off_for_site">Turn off Cookie Banner Reduction for %1$s?</string>
<!-- Long text for a detail explanation indicating what will happen if cookie banner handling is off for a site, this is shown as part of the cookie banner panel in the toolbar. The first parameter is the application name --> <!-- Long text for a detail explanation indicating what will happen if cookie banner handling is off for a site, this is shown as part of the cookie banner panel in the toolbar. The first parameter is the application name -->
<string name="reduce_cookie_banner_details_panel_description_off_for_site">%1$s will clear this sites cookies and refresh the page. Clearing all cookies may sign you out or empty shopping carts.</string> <string name="reduce_cookie_banner_details_panel_description_off_for_site">%1$s will clear this sites cookies and refresh the page. Clearing all cookies may sign you out or empty shopping carts.</string>
<!-- Long text for a detail explanation indicating what will happen if cookie banner handling is on for a site, this is shown as part of the cookie banner panel in the toolbar --> <!-- Long text for a detail explanation indicating what will happen if cookie banner handling is on for a site, this is shown as part of the cookie banner panel in the toolbar. The first and second parameter are the application name -->
<string name="reduce_cookie_banner_details_panel_description_on_for_site">Firefox can try to automatically reject cookie requests. If a reject option isnt available, Firefox may accept all cookies to dismiss the banner.</string> <string name="reduce_cookie_banner_details_panel_description_on_for_site">%1$s can try to automatically reject cookie requests. If a reject option isnt available, %2$s may accept all cookies to dismiss the banner.</string>
<!-- Description of the preference to enable "HTTPS-Only" mode. --> <!-- Description of the preference to enable "HTTPS-Only" mode. -->
<string name="preferences_https_only_summary">Automatically attempts to connect to sites using HTTPS encryption protocol for increased security.</string> <string name="preferences_https_only_summary">Automatically attempts to connect to sites using HTTPS encryption protocol for increased security.</string>

@ -131,9 +131,12 @@ class CookieBannerHandlingDetailsViewTest {
fun `GIVEN cookie banner handling is disabled WHEN biding description THEN description view must have the expected string`() { fun `GIVEN cookie banner handling is disabled WHEN biding description THEN description view must have the expected string`() {
view.bindDescription(isCookieBannerHandlingEnabled = false) view.bindDescription(isCookieBannerHandlingEnabled = false)
val appName = testContext.getString(R.string.app_name)
val expectedText = val expectedText =
testContext.getString( testContext.getString(
R.string.reduce_cookie_banner_details_panel_description_on_for_site, R.string.reduce_cookie_banner_details_panel_description_on_for_site,
appName,
appName,
) )
assertEquals(expectedText, view.binding.details.text) assertEquals(expectedText, view.binding.details.text)

Loading…
Cancel
Save