For #27691 - Replace 'Pocket' word in all strings with placeholder

This commit is contained in:
Alexandru2909 2022-11-03 19:26:15 +02:00 committed by mergify[bot]
parent 90d0d9a7c5
commit 62b65d3a57
4 changed files with 15 additions and 4 deletions

View File

@ -457,7 +457,10 @@ fun PoweredByPocketHeader(
Column {
Text(
text = stringResource(R.string.pocket_stories_feature_title),
text = stringResource(
R.string.pocket_stories_feature_title_2,
LocalContext.current.getString(R.string.pocket_product_name),
),
color = textColor,
style = FirefoxTheme.typography.caption,
)

View File

@ -104,6 +104,10 @@ class HomeSettingsFragment : PreferenceFragmentCompat() {
requirePreference<SwitchPreference>(R.string.pref_key_pocket_homescreen_recommendations).apply {
isVisible = FeatureFlags.isPocketRecommendationsFeatureEnabled(context)
isChecked = context.settings().showPocketRecommendationsFeature
summary = context.getString(
R.string.customize_toggle_pocket_summary,
context.getString(R.string.pocket_product_name),
)
onPreferenceChangeListener = object : SharedPreferenceUpdater() {
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
CustomizeHome.preferenceToggled.record(

View File

@ -26,6 +26,8 @@
<string name="components_abbreviation" translatable="false">AC</string>
<!-- Application Services abbreviation used in AboutFragment -->
<string name="app_services_abbreviation" translatable="false">AS</string>
<!-- Name for the Pocket product -->
<string name="pocket_product_name" translatable="false">Pocket</string>
<!-- Secret Settings Strings -->
<!-- Label for the secret settings preference -->

View File

@ -447,8 +447,8 @@
<string name="customize_toggle_pocket" moz:RemovedIn="108" tools:ignore="UnusedResources">Pocket</string>
<!-- Title for the customize home screen section with Pocket. -->
<string name="customize_toggle_pocket_2">Thought-provoking stories</string>
<!-- Summary for the customize home screen section with Pocket. -->
<string name="customize_toggle_pocket_summary">Articles powered by Pocket</string>
<!-- Summary for the customize home screen section with Pocket. The first parameter is product name Pocket -->
<string name="customize_toggle_pocket_summary">Articles powered by %s</string>
<!-- Title for the customize home screen section with sponsored Pocket stories. -->
<string name="customize_toggle_pocket_sponsored">Sponsored stories</string>
<!-- Title for the opening wallpaper settings screen -->
@ -1867,7 +1867,9 @@
<!-- Text of a button allowing users to access an external url for more Pocket recommendations. -->
<string name="pocket_stories_placeholder_text">Discover more</string>
<!-- Title of an app feature. Smaller than a heading.-->
<string name="pocket_stories_feature_title">Powered by Pocket.</string>
<string name="pocket_stories_feature_title" moz:removedIn="108" tools:ignore="UnusedResources">Powered by Pocket.</string>
<!-- Title of an app feature. Smaller than a heading. The first parameter is product name Pocket -->
<string name="pocket_stories_feature_title_2">Powered by %s.</string>
<!-- Caption for describing a certain feature. The placeholder is for a clickable text (eg: Learn more) which will load an url in a new tab when clicked. -->
<string name="pocket_stories_feature_caption">Part of the Firefox family. %s</string>
<!-- Clickable text for opening an external link for more information about Pocket. -->