Skip to content

Commit 714f3e3

Browse files
nalcalagdaxmobile
andauthored
Replaced copy with static saving % with dynamic ones (#7087)
Task/Issue URL: https://app.asana.com/1/137249556945/task/1211875714938063?focus=true ### Description Replace static resources with dynamic ones ### Steps to test this PR - [ ] CI checks are green ✅ ### No UI changes --------- Co-authored-by: Dax The Translator <daxmobile@duckduckgo.com>
1 parent 9ed0ce3 commit 714f3e3

28 files changed

+79
-204
lines changed

subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/switch_plan/SwitchPlanBottomSheetDialog.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class SwitchPlanBottomSheetDialog @AssistedInject constructor(
107107
when (switchType) {
108108
SwitchPlanType.UPGRADE_TO_YEARLY -> {
109109
// Configure for upgrade (Monthly → Yearly)
110-
binding.switchBottomSheetDialogTitle.text = context.getString(R.string.switchBottomSheetTitleUpgrade)
110+
binding.switchBottomSheetDialogTitle.text = context.getString(R.string.switchBottomSheetDynamicTitleUpgrade)
111111
binding.switchBottomSheetDialogSubTitle.text = context.getString(
112112
R.string.switchBottomSheetDescriptionUpgrade,
113113
pricingInfo?.yearlyMonthlyEquivalent ?: "",
@@ -130,7 +130,7 @@ class SwitchPlanBottomSheetDialog @AssistedInject constructor(
130130

131131
SwitchPlanType.DOWNGRADE_TO_MONTHLY -> {
132132
// Configure for downgrade (Yearly → Monthly)
133-
binding.switchBottomSheetDialogTitle.text = context.getString(R.string.switchBottomSheetTitleDowngrade)
133+
binding.switchBottomSheetDialogTitle.text = context.getString(R.string.switchBottomSheetDynamicTitleDowngrade)
134134
binding.switchBottomSheetDialogSubTitle.text = context.getString(
135135
R.string.switchBottomSheetDescriptionDowngrade,
136136
pricingInfo?.yearlyMonthlyEquivalent ?: "",

subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionSettingsActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class SubscriptionSettingsActivity : DuckDuckGoActivity() {
175175
if (viewState.switchPlanAvailable && viewState.platform.lowercase() == "google") {
176176
binding.switchPlan.show()
177177
val switchText = when (viewState.duration) {
178-
Monthly -> getString(string.subscriptionSettingSwitchUpgrade)
178+
Monthly -> getString(string.subscriptionSettingSwitchUpgradeDynamic)
179179
Yearly -> getString(string.subscriptionSettingSwitchDowngrade)
180180
}
181181
binding.switchPlan.setPrimaryText(switchText)

subscriptions/subscriptions-impl/src/main/res/layout/bottom_sheet_switch_plan.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
android:paddingHorizontal="@dimen/keyline_5"
5858
app:textType="primary"
5959
app:typography="h1"
60-
tools:text="@string/switchBottomSheetTitleUpgrade" />
60+
tools:text="@string/switchBottomSheetDynamicTitleUpgrade" />
6161

6262
<com.duckduckgo.common.ui.view.text.DaxTextView
6363
android:id="@+id/switchBottomSheetDialogSubTitle"

subscriptions/subscriptions-impl/src/main/res/values-bg/strings-subscriptions.xml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<string name="subscriptionSettingSectionHelpAndSupport">Помощ и поддръжка</string>
8585
<string name="subscriptionSettingSendFeedback">Изпратете отзив</string>
8686
<string name="subscriptionSettingActivating">Активиране</string>
87-
<string name="subscriptionSettingSwitchUpgrade">Превключи на годишен план и спести 16%</string>
87+
<string name="subscriptionSettingSwitchUpgradeDynamic" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Превключи на годишен план и спести %1$s%%</string>
8888
<!-- smartling.character_limit = 10 -->
8989
<string name="subscriptionSettingSwitchUpgradePill">Най-изгодно</string>
9090
<string name="subscriptionSettingSwitchDowngrade">Смяна на плана</string>
@@ -176,11 +176,6 @@
176176
<string name="activityPir" translatable="false">Privacy Pro</string>
177177
<string name="activitySendFeedback">Изпратете отзив</string>
178178

179-
<!-- Dynamic Switch % -->
180-
<string name="switchBottomSheetDynamicTitleUpgrade" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Спести %1$s%% с\nгодишен план!</string>
181-
<string name="switchBottomSheetDynamicTitleDowngrade" instruction="%1$s is the savings percentage when using a yearly plan instead of monthly (e.g. 16)">Спестяваш %1$s%% с\nгодишен план!</string>
182-
<string name="subscriptionSettingSwitchUpgradeDynamic" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Превключи на годишен план и спести %1$s%%</string>
183-
184179
<!-- Privacy Pro Rebranding-->
185180
<string name="subscriptionSettingRebrandingMessage">Privacy Pro вече се нарича просто абонамент за DuckDuckGo</string>
186181

@@ -198,11 +193,11 @@
198193
<string name="feedbackGeneralSubscription">Абонамент</string>
199194

200195
<!-- Switch plan-->
201-
<string name="switchBottomSheetTitleUpgrade">Спести 16% с\nгодишен план!</string>
196+
<string name="switchBottomSheetDynamicTitleUpgrade" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Спести %1$s%% с\nгодишен план!</string>
202197
<string name="switchBottomSheetDescriptionUpgrade" instruction="%1$s is the yearly plan monthly equivalent price (e.g. $8.33), %2$s is the current monthly plan price (e.g. $9.99)">Годишният план е само %1$s/месец, в сравнение с текущия ти месечен план от %2$s.</string>
203198
<string name="switchBottomSheetPrimaryButtonUpgrade" instruction="%1$s is the yearly plan price (e.g. $99.99)">Превключи на годишен план (%1$s/година)</string>
204199
<string name="switchBottomSheetSecondaryButtonUpgrade">Запази месечен план</string>
205-
<string name="switchBottomSheetTitleDowngrade">Спестяваш 16% с\nгодишен план!</string>
200+
<string name="switchBottomSheetDynamicTitleDowngrade" instruction="%1$s is the savings percentage when using a yearly plan instead of monthly (e.g. 16)">Спестяваш %1$s%% с\nгодишен план!</string>
206201
<string name="switchBottomSheetDescriptionDowngrade" instruction="%1$s is the yearly plan monthly equivalent price (e.g. $8.33), %2$s is the monthly plan price (e.g. $9.99)">Превключването ще увеличи месечната ти цена от %1$s/месец на %2$s/месец.</string>
207202
<string name="switchBottomSheetPrimaryButtonDowngrade">Запази годишния план</string>
208203
<string name="switchBottomSheetSecondaryButtonDowngrade" instruction="%1$s is the monthly plan price (e.g. $9.99)">Превключи на месечен план (%1$s/месец)</string>

subscriptions/subscriptions-impl/src/main/res/values-cs/strings-subscriptions.xml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<string name="subscriptionSettingSectionHelpAndSupport">Nápověda a podpora</string>
8585
<string name="subscriptionSettingSendFeedback">Odeslat zpětnou vazbu</string>
8686
<string name="subscriptionSettingActivating">Aktivuje se</string>
87-
<string name="subscriptionSettingSwitchUpgrade">Přejdi na roční tarif a ušetři 16 %</string>
87+
<string name="subscriptionSettingSwitchUpgradeDynamic" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Přejdi na roční tarif a ušetři %1$s %%</string>
8888
<!-- smartling.character_limit = 10 -->
8989
<string name="subscriptionSettingSwitchUpgradePill">Top nabídka</string>
9090
<string name="subscriptionSettingSwitchDowngrade">Změnit tarif</string>
@@ -176,11 +176,6 @@
176176
<string name="activityPir" translatable="false">Privacy Pro</string>
177177
<string name="activitySendFeedback">Odeslat zpětnou vazbu</string>
178178

179-
<!-- Dynamic Switch % -->
180-
<string name="switchBottomSheetDynamicTitleUpgrade" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Ušetři %1$s %%\ns ročním tarifem!</string>
181-
<string name="switchBottomSheetDynamicTitleDowngrade" instruction="%1$s is the savings percentage when using a yearly plan instead of monthly (e.g. 16)">S ročním tarifem\nušetříš %1$s %%</string>
182-
<string name="subscriptionSettingSwitchUpgradeDynamic" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Přejdi na roční tarif a ušetři %1$s %%</string>
183-
184179
<!-- Privacy Pro Rebranding-->
185180
<string name="subscriptionSettingRebrandingMessage">Privacy Pro mění název na „předplatné DuckDuckGo“</string>
186181

@@ -198,11 +193,11 @@
198193
<string name="feedbackGeneralSubscription">Předplatné</string>
199194

200195
<!-- Switch plan-->
201-
<string name="switchBottomSheetTitleUpgrade">Ušetři 16 %\ns ročním tarifem!</string>
196+
<string name="switchBottomSheetDynamicTitleUpgrade" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Ušetři %1$s %%\ns ročním tarifem!</string>
202197
<string name="switchBottomSheetDescriptionUpgrade" instruction="%1$s is the yearly plan monthly equivalent price (e.g. $8.33), %2$s is the current monthly plan price (e.g. $9.99)">Roční tarif stojí jen %1$s za měsíc oproti tvému současnému měsíčnímu tarifu za %2$s.</string>
203198
<string name="switchBottomSheetPrimaryButtonUpgrade" instruction="%1$s is the yearly plan price (e.g. $99.99)">Přejít na roční tarif (%1$s za rok)</string>
204199
<string name="switchBottomSheetSecondaryButtonUpgrade">Nechat měsíční tarif</string>
205-
<string name="switchBottomSheetTitleDowngrade">S ročním tarifem\nušetříš 16 %!</string>
200+
<string name="switchBottomSheetDynamicTitleDowngrade" instruction="%1$s is the savings percentage when using a yearly plan instead of monthly (e.g. 16)">S ročním tarifem\nušetříš %1$s %%</string>
206201
<string name="switchBottomSheetDescriptionDowngrade" instruction="%1$s is the yearly plan monthly equivalent price (e.g. $8.33), %2$s is the monthly plan price (e.g. $9.99)">Přechodem se tvoje cena za měsíc zvýší z %1$s měsíčně na %2$s měsíčně.</string>
207202
<string name="switchBottomSheetPrimaryButtonDowngrade">Nechat roční tarif</string>
208203
<string name="switchBottomSheetSecondaryButtonDowngrade" instruction="%1$s is the monthly plan price (e.g. $9.99)">Přejít na měsíční tarif (%1$s za měsíc)</string>

subscriptions/subscriptions-impl/src/main/res/values-da/strings-subscriptions.xml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<string name="subscriptionSettingSectionHelpAndSupport">Hjælp og support</string>
8585
<string name="subscriptionSettingSendFeedback">Send tilbagemelding</string>
8686
<string name="subscriptionSettingActivating">Aktiverer</string>
87-
<string name="subscriptionSettingSwitchUpgrade">Skift til årligt og spar 16%</string>
87+
<string name="subscriptionSettingSwitchUpgradeDynamic" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Skift til årligt og spar %1$s %%</string>
8888
<!-- smartling.character_limit = 10 -->
8989
<string name="subscriptionSettingSwitchUpgradePill">Anbefales</string>
9090
<string name="subscriptionSettingSwitchDowngrade">Skift abonnement</string>
@@ -176,11 +176,6 @@
176176
<string name="activityPir" translatable="false">Privacy Pro</string>
177177
<string name="activitySendFeedback">Send tilbagemelding</string>
178178

179-
<!-- Dynamic Switch % -->
180-
<string name="switchBottomSheetDynamicTitleUpgrade" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Spar %1$s %% med\net årligt abonnement!</string>
181-
<string name="switchBottomSheetDynamicTitleDowngrade" instruction="%1$s is the savings percentage when using a yearly plan instead of monthly (e.g. 16)">Du sparer %1$s %% med\net årligt abonnement!</string>
182-
<string name="subscriptionSettingSwitchUpgradeDynamic" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Skift til årligt og spar %1$s %%</string>
183-
184179
<!-- Privacy Pro Rebranding-->
185180
<string name="subscriptionSettingRebrandingMessage">Privacy Pro kaldes nu bare DuckDuckGo-abonnementet</string>
186181

@@ -198,11 +193,11 @@
198193
<string name="feedbackGeneralSubscription">Abonnement</string>
199194

200195
<!-- Switch plan-->
201-
<string name="switchBottomSheetTitleUpgrade">Spar 16 % med\net årligt abonnement!</string>
196+
<string name="switchBottomSheetDynamicTitleUpgrade" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Spar %1$s %% med\net årligt abonnement!</string>
202197
<string name="switchBottomSheetDescriptionUpgrade" instruction="%1$s is the yearly plan monthly equivalent price (e.g. $8.33), %2$s is the current monthly plan price (e.g. $9.99)">En årligt abonnement koster kun %1$s/måned sammenlignet med dit nuværende abonnement til %2$s/måned.</string>
203198
<string name="switchBottomSheetPrimaryButtonUpgrade" instruction="%1$s is the yearly plan price (e.g. $99.99)">Skift til årligt (%1$s/år)</string>
204199
<string name="switchBottomSheetSecondaryButtonUpgrade">Behold månedligt abonnement</string>
205-
<string name="switchBottomSheetTitleDowngrade">Du sparer 16 % med\net årligt abonnement!</string>
200+
<string name="switchBottomSheetDynamicTitleDowngrade" instruction="%1$s is the savings percentage when using a yearly plan instead of monthly (e.g. 16)">Du sparer %1$s %% med\net årligt abonnement!</string>
206201
<string name="switchBottomSheetDescriptionDowngrade" instruction="%1$s is the yearly plan monthly equivalent price (e.g. $8.33), %2$s is the monthly plan price (e.g. $9.99)">Hvis du skifter, vil din månedlige pris stige fra %1$s/md. til %2$s/md.</string>
207202
<string name="switchBottomSheetPrimaryButtonDowngrade">Behold årligt abonnement</string>
208203
<string name="switchBottomSheetSecondaryButtonDowngrade" instruction="%1$s is the monthly plan price (e.g. $9.99)">Skift til månedligt (%1$s/måned)</string>

subscriptions/subscriptions-impl/src/main/res/values-de/strings-subscriptions.xml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<string name="subscriptionSettingSectionHelpAndSupport">Hilfe und Support</string>
8585
<string name="subscriptionSettingSendFeedback">Rückmeldung senden</string>
8686
<string name="subscriptionSettingActivating">Wird aktiviert</string>
87-
<string name="subscriptionSettingSwitchUpgrade">Wechsle zum Jahresabo und spare 16 %</string>
87+
<string name="subscriptionSettingSwitchUpgradeDynamic" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Wechsle zum Jahresabo und spare %1$s %%</string>
8888
<!-- smartling.character_limit = 10 -->
8989
<string name="subscriptionSettingSwitchUpgradePill">Top-Angebot</string>
9090
<string name="subscriptionSettingSwitchDowngrade">Tarif wechseln</string>
@@ -176,11 +176,6 @@
176176
<string name="activityPir" translatable="false">Privacy Pro</string>
177177
<string name="activitySendFeedback">Rückmeldung senden</string>
178178

179-
<!-- Dynamic Switch % -->
180-
<string name="switchBottomSheetDynamicTitleUpgrade" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Mit einem Jahresabo\nsparst du %1$s%%!</string>
181-
<string name="switchBottomSheetDynamicTitleDowngrade" instruction="%1$s is the savings percentage when using a yearly plan instead of monthly (e.g. 16)">Du sparst %1$s %% mit\neinem Jahresabo!</string>
182-
<string name="subscriptionSettingSwitchUpgradeDynamic" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Wechsle zum Jahresabo und spare %1$s %%</string>
183-
184179
<!-- Privacy Pro Rebranding-->
185180
<string name="subscriptionSettingRebrandingMessage">Privacy Pro heißt jetzt einfach DuckDuckGo-Abo</string>
186181

@@ -198,11 +193,11 @@
198193
<string name="feedbackGeneralSubscription">Abonnement</string>
199194

200195
<!-- Switch plan-->
201-
<string name="switchBottomSheetTitleUpgrade">Mit einem Jahresabo\nsparst du 16 %!</string>
196+
<string name="switchBottomSheetDynamicTitleUpgrade" instruction="%1$s is the savings percentage when switching from monthly to yearly (e.g. 16)">Mit einem Jahresabo\nsparst du %1$s%%!</string>
202197
<string name="switchBottomSheetDescriptionUpgrade" instruction="%1$s is the yearly plan monthly equivalent price (e.g. $8.33), %2$s is the current monthly plan price (e.g. $9.99)">Ein Jahresabo kostet nur %1$s/Monat, verglichen mit deinem derzeitigen Monatstarif von %2$s.</string>
203198
<string name="switchBottomSheetPrimaryButtonUpgrade" instruction="%1$s is the yearly plan price (e.g. $99.99)">Zum Jahresabo (%1$s/Jahr) wechseln</string>
204199
<string name="switchBottomSheetSecondaryButtonUpgrade">Monatlichen Tarif beibehalten</string>
205-
<string name="switchBottomSheetTitleDowngrade">Du sparst 16 % mit\neinem Jahresabo!</string>
200+
<string name="switchBottomSheetDynamicTitleDowngrade" instruction="%1$s is the savings percentage when using a yearly plan instead of monthly (e.g. 16)">Du sparst %1$s %% mit\neinem Jahresabo!</string>
206201
<string name="switchBottomSheetDescriptionDowngrade" instruction="%1$s is the yearly plan monthly equivalent price (e.g. $8.33), %2$s is the monthly plan price (e.g. $9.99)">Durch den Wechsel erhöht sich dein monatlicher Preis von %1$s/Monat auf %2$s/Monat.</string>
207202
<string name="switchBottomSheetPrimaryButtonDowngrade">Jahrestarif behalten</string>
208203
<string name="switchBottomSheetSecondaryButtonDowngrade" instruction="%1$s is the monthly plan price (e.g. $9.99)">Zum Monatsabo wechseln (%1$s/Monat)</string>

0 commit comments

Comments
 (0)