From 6fefa39d455d3265a10168e23210bed0f389e44d Mon Sep 17 00:00:00 2001 From: Marcos Holgado Date: Wed, 12 Aug 2020 12:15:23 +0100 Subject: [PATCH 1/3] WIP --- app/src/main/res/values/string-untranslated.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/res/values/string-untranslated.xml b/app/src/main/res/values/string-untranslated.xml index 5c349b90cc62..82d2d2b8c217 100644 --- a/app/src/main/res/values/string-untranslated.xml +++ b/app/src/main/res/values/string-untranslated.xml @@ -54,4 +54,7 @@ Connection aborted. This website could be harmful to your device. + + !Heads up! Since %s owns %s, I can\'t stop them from seeing your activity here.<br/><br/>But browser with me, and I can reduce what %s knows about you overall by blocking their trackers on lots of other sites. + From 3c6ade8ab689f218e1ba8b85a6ec621b1fed8be0 Mon Sep 17 00:00:00 2001 From: Marcos Holgado Date: Wed, 12 Aug 2020 14:42:07 +0100 Subject: [PATCH 2/3] Update copy for dax dialog --- .../java/com/duckduckgo/app/cta/ui/Cta.kt | 28 +++++++++++++------ .../main/res/values/string-untranslated.xml | 2 +- app/src/main/res/values/strings.xml | 1 - 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt b/app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt index c48d26969995..4742a4439050 100644 --- a/app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt +++ b/app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt @@ -16,6 +16,7 @@ package com.duckduckgo.app.cta.ui +import android.annotation.SuppressLint import android.content.Context import android.net.Uri import android.view.View @@ -212,6 +213,7 @@ sealed class DaxDialogCta( appInstallStore ) { + @SuppressLint("StringFormatMatches") @ExperimentalStdlibApi override fun getDaxText(context: Context): String { val percentage = networkPropertyPercentages[network] @@ -219,14 +221,24 @@ sealed class DaxDialogCta( return if (isFromSameNetworkDomain()) { context.resources.getString(R.string.daxMainNetworkCtaText, network, percentage, network) } else { - context.resources.getString( - R.string.daxMainNetworkOwnedCtaText, - Uri.parse(siteHost).baseHost?.removePrefix("m.")?.capitalize(Locale.getDefault()), - network, - network, - percentage, - network - ) + val locale = Locale.getDefault() + if (locale != null && locale.language == "en") { + context.resources.getString( + R.string.daxMainNetworkOwnedCtaText, + network, + Uri.parse(siteHost).baseHost?.removePrefix("m."), + network + ) + } else { + context.resources.getString( + R.string.daxMainNetworkOwnedCtaText, + Uri.parse(siteHost).baseHost?.removePrefix("m.")?.capitalize(Locale.getDefault()), + network, + network, + percentage, + network + ) + } } } diff --git a/app/src/main/res/values/string-untranslated.xml b/app/src/main/res/values/string-untranslated.xml index 82d2d2b8c217..d762033f9981 100644 --- a/app/src/main/res/values/string-untranslated.xml +++ b/app/src/main/res/values/string-untranslated.xml @@ -55,6 +55,6 @@ Connection aborted. This website could be harmful to your device. - !Heads up! Since %s owns %s, I can\'t stop them from seeing your activity here.<br/><br/>But browser with me, and I can reduce what %s knows about you overall by blocking their trackers on lots of other sites. + Heads up! Since %s owns %s, I can\'t stop them from seeing your activity here.<br/><br/>But browse with me, and I can reduce what %s knows about you overall by blocking their trackers on lots of other sites. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d0f7f23b1474..65edf9dc1665 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -404,7 +404,6 @@
I blocked it!

☝️You can check the URL bar to see who is trying to track you when you visit a new site.️]]>

Go ahead — keep browsing!]]>
-
%s\'s trackers lurk on about %s of top websites 😱 but don\'t worry!

I\'ll block %s from seeing your activity on those sites.]]>

Their trackers lurk on about %s of top sites 😱 but don\'t worry!

I\'ll block %s from seeing your activity on those sites.]]>
From 7d4ea806ab2c6ddcf3635979bc0c79f7c7a679b9 Mon Sep 17 00:00:00 2001 From: Marcos Holgado Date: Wed, 12 Aug 2020 14:47:57 +0100 Subject: [PATCH 3/3] Add comment --- app/src/main/res/values/string-untranslated.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/string-untranslated.xml b/app/src/main/res/values/string-untranslated.xml index d762033f9981..ebece079eb98 100644 --- a/app/src/main/res/values/string-untranslated.xml +++ b/app/src/main/res/values/string-untranslated.xml @@ -54,7 +54,7 @@ Connection aborted. This website could be harmful to your device. - + Heads up! Since %s owns %s, I can\'t stop them from seeing your activity here.<br/><br/>But browse with me, and I can reduce what %s knows about you overall by blocking their trackers on lots of other sites.