Dan Ballard pushed to branch tor-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser
Commits:
-
a97a4df4
by Pier Angelo Vendrame at 2025-04-14T14:59:47+02:00
2 changed files:
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/CampaignStrings.kt
Changes:
... | ... | @@ -557,9 +557,6 @@ class HomeFragment : Fragment(), UserInteractionHandler { |
557 | 557 | }
|
558 | 558 | |
559 | 559 | private fun tryShowUX2025Survey() {
|
560 | - val allowedLocales = arrayListOf("en", "es", "ru", "fr", "pt")
|
|
561 | - val locale = CampaignStrings.getLocale()
|
|
562 | - |
|
563 | 560 | val dateFormat = SimpleDateFormat("yyyy-MM-dd-hh-zzz")
|
564 | 561 | val startDate = dateFormat.parse("2025-04-14-12-UTC")
|
565 | 562 | |
... | ... | @@ -570,7 +567,7 @@ class HomeFragment : Fragment(), UserInteractionHandler { |
570 | 567 | return // comment out to test
|
571 | 568 | }
|
572 | 569 | |
573 | - if (allowedLocales.contains(locale) && !requireContext().settings().hideCampaign) {
|
|
570 | + if (BuildConfig.BUILD_TYPE == "release" && !requireContext().settings().hideCampaign) {
|
|
574 | 571 | binding.onionPatternImage.visibility = View.GONE
|
575 | 572 | binding.campaignBox.apply {
|
576 | 573 | setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
|
... | ... | @@ -49,8 +49,11 @@ object CampaignStrings { |
49 | 49 | )
|
50 | 50 | |
51 | 51 | fun getLocale(): String {
|
52 | - // TODO: do we care about spoofEnglish setting?
|
|
53 | - return Locale.getDefault().getLanguage();
|
|
52 | + val locale = Locale.getDefault().getLanguage()
|
|
53 | + if (translations.containsKey(locale)) {
|
|
54 | + return locale
|
|
55 | + }
|
|
56 | + return "en"
|
|
54 | 57 | }
|
55 | 58 | |
56 | 59 |