diff --git a/Habitica/res/values-de/strings.xml b/Habitica/res/values-de/strings.xml index 53a083d07..1801429ab 100644 --- a/Habitica/res/values-de/strings.xml +++ b/Habitica/res/values-de/strings.xml @@ -1042,9 +1042,9 @@ Die Quest-Schriftrolle wird an den Quest-Besitzer zurückgegeben. Üblicherweise %d Edelsteine Einschränkungen So funktioniert es - Zwischen 22. und 30. September kannst Du wie gewohnt ein Edelstein-Paket kaufen, Deinem Konto wird aber der Aktions-Betrag Edelsteine hinzugefügt. Mehr Edelsteine zum ausgeben, teilen oder aufsparen für spätere Neuerungen! + Zwischen %s und %s kannst Du wie gewohnt ein Edelstein-Paket kaufen, Deinem Konto wird aber der Aktions-Betrag Edelsteine hinzugefügt. Mehr Edelsteine zum ausgeben, teilen oder aufsparen für spätere Neuerungen! Der Edelstein-Sonderverkauf ist zurück! Das ist die letzte Chance, mehr Edelsteine als je zuvor zu bekommen, also füll\' Deine Lager solange Du noch kannst! - Zwischen 29. Oktober und 2. November kannst Du wie gewohnt ein Edelstein-Paket kaufen, Deinem Konto wird aber der Aktions-Betrag Edelsteine hinzugefügt. Mehr Edelsteine zum ausgeben, teilen oder aufsparen für spätere Neuerungen! + Zwischen %s und %s kannst Du wie gewohnt ein Edelstein-Paket kaufen, Deinem Konto wird aber der Aktions-Betrag Edelsteine hinzugefügt. Mehr Edelsteine zum ausgeben, teilen oder aufsparen für spätere Neuerungen! Edelstein-Pakete anzeigen Die Herbstgala ist in vollem Gange. Deshalb haben wir gedacht, dass dies der perfekte Zeitpunkt für den allerersten Edelstein-Sonderverkauf ist! Jetzt bekommst Du mit jedem Einkauf mehr Edelsteine als je zuvor. Du hast %d Questgegenstände gefunden diff --git a/Habitica/res/values-en-rGB/strings.xml b/Habitica/res/values-en-rGB/strings.xml index 16b99080c..f513f5362 100644 --- a/Habitica/res/values-en-rGB/strings.xml +++ b/Habitica/res/values-en-rGB/strings.xml @@ -1032,7 +1032,7 @@ Block %s\? Unblock User Block User - Between September 22nd and 30th, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases! + Between September %s and %s, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases! Limitations How it works %s to %s @@ -1043,7 +1043,7 @@ Block A blocked user cannot send you Private Messages but you will still see their posts. This will have no effect if the person is a moderator now or in the future. The Gem Sale is back to haunt the very end of this year’s Fall Gala! This is one last chance to get more Gems than ever, so stock up while it lasts! - Between October 29th and November 2nd, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases! + Between %s and %s, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases! View Gem Bundles The Fall Gala is in full swing so we thought it was the perfect time for a Gem Sale! Now you will get more Gems with each purchase than ever before. diff --git a/Habitica/res/values-tr/strings.xml b/Habitica/res/values-tr/strings.xml index f5710c2d4..249e31059 100644 --- a/Habitica/res/values-tr/strings.xml +++ b/Habitica/res/values-tr/strings.xml @@ -941,9 +941,9 @@ Atanan İstatistik Aşağıdaki kullanıcı adını bir arkadaşınıza verin veya potansiyel yoldaşlarla tanışmak için %s gidin! Değerli Taş Satışı, bu yılki Sonbahar Galasının en sonunda tekrar gündeme geldi! Bu, her zamankinden daha fazla Mücevher almak için son bir şans, bu yüzden bu süre boyunca stok yapın! - 29 Ekim ile 2 Kasım arasında, her zamanki gibi herhangi bir Mücevher paketi satın alın ve hesabınıza promosyon miktarda Mücevher yatırılacaktır. Gelecek sürümler için harcayabileceğiniz, paylaşabileceğiniz veya saklayabileceğiniz daha fazla Mücevher! + %s ile %s arasında, her zamanki gibi herhangi bir Mücevher paketi satın alın ve hesabınıza promosyon miktarda Mücevher yatırılacaktır. Gelecek sürümler için harcayabileceğiniz, paylaşabileceğiniz veya saklayabileceğiniz daha fazla Mücevher! Sonbahar Galası tüm hızıyla devam ediyor, bu yüzden ilk Mücevher Satışımızı sunmak için mükemmel bir zaman olduğunu düşündük! Artık her satın alma işleminde her zamankinden daha fazla Mücevher kazanacaksınız. - 22 ve 30 Eylül arasında, her zamanki gibi herhangi bir Gem paketi satın alın ve hesabınıza promosyon miktarda Mücevher kredisi aktarılacaktır. Gelecek sürümler için harcayabileceğiniz, paylaşabileceğiniz veya saklayabileceğiniz daha fazla Mücevher! + %s ve %s arasında, her zamanki gibi herhangi bir Gem paketi satın alın ve hesabınıza promosyon miktarda Mücevher kredisi aktarılacaktır. Gelecek sürümler için harcayabileceğiniz, paylaşabileceğiniz veya saklayabileceğiniz daha fazla Mücevher! Nasıl çalışır %s - %s Genellikle %d Mücevher diff --git a/Habitica/res/values/strings.xml b/Habitica/res/values/strings.xml index 66ce8ca01..61185c294 100644 --- a/Habitica/res/values/strings.xml +++ b/Habitica/res/values/strings.xml @@ -1113,7 +1113,7 @@ The Fall Gala is in full swing so we thought it was the perfect time for a Gem Sale! Now you will get more Gems with each purchase than ever before. View Gem Bundles Between %s and %s, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases! - This promotion only applies during the limited time event. This event starts on %s (12:00 UTC) and will end %s (00:00 UTC). The promo offer is only available when buying Gems for yourself. + This promotion only applies during the limited time event. This event starts on %1$s (%2$s) and will end %3$s (%4$s). The promo offer is only available when buying Gems for yourself. The Gem Sale is back to haunt the very end of this year’s Fall Gala! This is one last chance to get more Gems than ever, so stock up while it lasts! Dark Mode Theme Mode @@ -1141,7 +1141,7 @@ Claim %d Gems In honor of the season of giving we\'re bringing back a very special promotion. Now when you gift somebody a subscription, you get the same sub for yourself for free! Tap ‘Gift a Subscription’ and type in the username of the account you’d like to gift to. From there, pick the sub length you’d like to gift and check out. Your account will automatically be rewarded with the same level of subscription you just gifted. - This is a limited time event that starts on %s (13:00 UTC) and will end %s (01:00 UTC). This promotion only applies when you gift to another Habitican. If you or your gift recipient already have a subscription, the gifted subscription will add months of credit that will only be used after the current subscription is cancelled or expires. + This is a limited time event that starts on %1$s (%2$s) and will end %3$s (%4$s). This promotion only applies when you gift to another Habitican. If you or your gift recipient already have a subscription, the gifted subscription will add months of credit that will only be used after the current subscription is cancelled or expires. Gift a sub and get a sub for free until %s 1 month one-time subscription 3 month one-time subscription diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/FallExtraGemsHabiticaPromotion.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/FallExtraGemsHabiticaPromotion.kt index 70e3d8797..afefb281f 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/FallExtraGemsHabiticaPromotion.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/FallExtraGemsHabiticaPromotion.kt @@ -12,12 +12,13 @@ import com.habitrpg.android.habitica.databinding.FragmentGemPurchaseBinding import com.habitrpg.android.habitica.databinding.FragmentSubscriptionBinding import com.habitrpg.android.habitica.databinding.PurchaseGemViewBinding import com.habitrpg.android.habitica.extensions.DateUtils -import com.habitrpg.common.habitica.helpers.MainNavigationController import com.habitrpg.android.habitica.ui.fragments.PromoInfoFragment import com.habitrpg.android.habitica.ui.views.promo.PromoMenuView +import com.habitrpg.common.habitica.helpers.MainNavigationController import java.text.SimpleDateFormat import java.util.Date import java.util.Locale +import java.util.TimeZone class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : HabiticaPromotion() { override val identifier: String @@ -50,7 +51,12 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic view.setBackgroundColor(backgroundColor(context)) view.setTitleImage(ContextCompat.getDrawable(context, R.drawable.fall_promo_title)) view.setTitleText(null) - view.setSubtitleImage(ContextCompat.getDrawable(context, R.drawable.fall_promo_menu_description)) + view.setSubtitleImage( + ContextCompat.getDrawable( + context, + R.drawable.fall_promo_menu_description + ) + ) view.setSubtitleText(null) view.setDecoration( @@ -58,7 +64,8 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic ContextCompat.getDrawable(context, R.drawable.fall_promo_menu_right) ) - view.binding.button.backgroundTintList = ContextCompat.getColorStateList(context, R.color.gray_1) + view.binding.button.backgroundTintList = + ContextCompat.getColorStateList(context, R.color.gray_1) view.binding.button.setText(R.string.learn_more) view.binding.button.setTextColor(ContextCompat.getColor(context, R.color.white)) view.binding.button.setOnClickListener { @@ -74,9 +81,24 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic val context = binding.root.context binding.promoBanner.visibility = View.VISIBLE binding.promoBanner.background = promoBackgroundDrawable(context) - binding.promoBannerLeftImage.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.fall_promo_banner_left)) - binding.promoBannerRightImage.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.fall_promo_banner_right)) - binding.promoBannerTitleImage.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.fall_promo_title)) + binding.promoBannerLeftImage.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.fall_promo_banner_left + ) + ) + binding.promoBannerRightImage.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.fall_promo_banner_right + ) + ) + binding.promoBannerTitleImage.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.fall_promo_title + ) + ) val formatter = SimpleDateFormat("MMM d", Locale.getDefault()) binding.promoBannerDurationView.text = context.getString( R.string.x_to_y, @@ -104,18 +126,22 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic binding.gemAmount.text = "5" binding.gemImage.setImageResource(R.drawable.fall_gems_4) } + 21 -> { binding.gemAmount.text = "30" binding.gemImage.setImageResource(R.drawable.fall_gems_21) } + 42 -> { binding.gemAmount.text = "60" binding.gemImage.setImageResource(R.drawable.fall_gems_42) } + 84 -> { binding.gemAmount.text = "125" binding.gemImage.setImageResource(R.drawable.fall_gems_84) } + else -> regularAmount.toString() } } @@ -123,9 +149,24 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic override fun configureInfoFragment(fragment: PromoInfoFragment) { val context = fragment.context ?: return fragment.binding?.promoBanner?.background = promoBackgroundDrawable(context) - fragment.binding?.promoBannerLeftImage?.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.fall_promo_info_left)) - fragment.binding?.promoBannerRightImage?.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.fall_promo_info_right)) - fragment.binding?.promoBannerTitleImage?.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.fall_promo_title)) + fragment.binding?.promoBannerLeftImage?.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.fall_promo_info_left + ) + ) + fragment.binding?.promoBannerRightImage?.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.fall_promo_info_right + ) + ) + fragment.binding?.promoBannerTitleImage?.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.fall_promo_title + ) + ) fragment.binding?.promoBannerSubtitleView?.setText(R.string.limited_event) fragment.binding?.promoBannerDurationView?.setTextColor(Color.parseColor("#FEE2B6")) val formatter = SimpleDateFormat("MMM d", Locale.getDefault()) @@ -134,7 +175,12 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic formatter.format(startDate), formatter.format(endDate) ) - fragment.binding?.promoBannerDurationView?.setTextColor(ContextCompat.getColor(context, R.color.white)) + fragment.binding?.promoBannerDurationView?.setTextColor( + ContextCompat.getColor( + context, + R.color.white + ) + ) fragment.binding?.promptText?.setText(R.string.fall_promo_info_prompt) fragment.binding?.promptText?.setTextColor(Color.parseColor("#F78E2F")) fragment.binding?.promptButton?.background = buttonDrawable(context) @@ -142,8 +188,21 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic fragment.binding?.promptButton?.setTextColor(ContextCompat.getColor(context, R.color.white)) fragment.binding?.promptButton?.setOnClickListener { MainNavigationController.navigate(R.id.gemPurchaseActivity) } - fragment.binding?.instructionDescriptionView?.text = context.getString(R.string.fall_promo_info_instructions, formatter.format(startDate), formatter.format(endDate)) - val limitationsFormatter = SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.LONG, SimpleDateFormat.LONG) - fragment.binding?.limitationsDescriptionView?.text = context.getString(R.string.gems_promo_info_limitations, limitationsFormatter.format(startDate), limitationsFormatter.format(endDate)) + fragment.binding?.instructionDescriptionView?.text = context.getString( + R.string.fall_promo_info_instructions, + formatter.format(startDate), + formatter.format(endDate) + ) + val limitationsFormatter = + SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.LONG, SimpleDateFormat.LONG) + val utcTimeFormatter = SimpleDateFormat.getTimeInstance(SimpleDateFormat.LONG) + utcTimeFormatter.timeZone = TimeZone.getTimeZone("UTC") + fragment.binding?.limitationsDescriptionView?.text = context.getString( + R.string.gems_promo_info_limitations_fixed, + limitationsFormatter.format(startDate), + utcTimeFormatter.format(startDate), + limitationsFormatter.format(endDate), + utcTimeFormatter.format(endDate) + ) } } diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/GiftOneGetOneHabiticaPromotion.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/GiftOneGetOneHabiticaPromotion.kt index a72b53199..c1513dbd3 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/GiftOneGetOneHabiticaPromotion.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/GiftOneGetOneHabiticaPromotion.kt @@ -10,14 +10,15 @@ import com.habitrpg.android.habitica.databinding.FragmentGemPurchaseBinding import com.habitrpg.android.habitica.databinding.FragmentSubscriptionBinding import com.habitrpg.android.habitica.databinding.PurchaseGemViewBinding import com.habitrpg.android.habitica.extensions.DateUtils -import com.habitrpg.common.habitica.helpers.MainNavigationController import com.habitrpg.android.habitica.ui.fragments.PromoInfoFragment import com.habitrpg.android.habitica.ui.fragments.purchases.SubscriptionFragment import com.habitrpg.android.habitica.ui.views.promo.PromoMenuView import com.habitrpg.common.habitica.extensions.isUsingNightModeResources +import com.habitrpg.common.habitica.helpers.MainNavigationController import java.text.SimpleDateFormat import java.util.Date import java.util.Locale +import java.util.TimeZone class GiftOneGetOneHabiticaPromotion(startDate: Date?, endDate: Date?) : HabiticaPromotion() { override val identifier: String @@ -56,7 +57,8 @@ class GiftOneGetOneHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic ContextCompat.getDrawable(context, R.drawable.g1g1_promo_menu_right) ) - view.binding.button.backgroundTintList = ContextCompat.getColorStateList(context, R.color.content_background) + view.binding.button.backgroundTintList = + ContextCompat.getColorStateList(context, R.color.content_background) view.binding.button.setText(R.string.learn_more) if (context.isUsingNightModeResources()) { view.binding.button.setTextColor(ContextCompat.getColor(context, R.color.teal_100)) @@ -76,26 +78,48 @@ class GiftOneGetOneHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic val context = binding.root.context binding.promoBanner.visibility = View.VISIBLE binding.promoBanner.background = promoBackgroundDrawable(context) - binding.promoBannerLeftImage.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.g1g1_promo_left_small)) - binding.promoBannerRightImage.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.g1g1_promo_right_small)) + binding.promoBannerLeftImage.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.g1g1_promo_left_small + ) + ) + binding.promoBannerRightImage.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.g1g1_promo_right_small + ) + ) binding.promoBannerTitleImage.visibility = View.GONE binding.promoBannerDurationView.visibility = View.GONE binding.promoBannerTitleText.visibility = View.VISIBLE val formatter = SimpleDateFormat("MMM d", Locale.getDefault()) - binding.promoBannerTitleText.text = context.getString(R.string.gift_one_get_one_purchase_banner, formatter.format(endDate)) + binding.promoBannerTitleText.text = + context.getString(R.string.gift_one_get_one_purchase_banner, formatter.format(endDate)) } override fun configurePurchaseBanner(binding: FragmentSubscriptionBinding) { val context = binding.root.context binding.promoBanner.visibility = View.VISIBLE binding.promoBanner.background = promoBackgroundDrawable(context) - binding.promoBannerLeftImage.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.g1g1_promo_left_small)) - binding.promoBannerRightImage.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.g1g1_promo_right_small)) + binding.promoBannerLeftImage.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.g1g1_promo_left_small + ) + ) + binding.promoBannerRightImage.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.g1g1_promo_right_small + ) + ) binding.promoBannerTitleImage.visibility = View.GONE binding.promoBannerDurationView.visibility = View.GONE binding.promoBannerTitleText.visibility = View.VISIBLE val formatter = SimpleDateFormat("MMM d", Locale.getDefault()) - binding.promoBannerTitleText.text = context.getString(R.string.gift_one_get_one_purchase_banner, formatter.format(endDate)) + binding.promoBannerTitleText.text = + context.getString(R.string.gift_one_get_one_purchase_banner, formatter.format(endDate)) } override fun configureGemView(binding: PurchaseGemViewBinding, regularAmount: Int) { @@ -104,8 +128,18 @@ class GiftOneGetOneHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic override fun configureInfoFragment(fragment: PromoInfoFragment) { val context = fragment.context ?: return fragment.binding?.promoBanner?.background = promoBackgroundDrawable(context) - fragment.binding?.promoBannerLeftImage?.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.g1g1_promo_left)) - fragment.binding?.promoBannerRightImage?.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.g1g1_promo_right)) + fragment.binding?.promoBannerLeftImage?.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.g1g1_promo_left + ) + ) + fragment.binding?.promoBannerRightImage?.setImageDrawable( + ContextCompat.getDrawable( + context, + R.drawable.g1g1_promo_right + ) + ) fragment.binding?.promoBannerTitleImage?.visibility = View.GONE fragment.binding?.promoBannerTitleText?.visibility = View.VISIBLE fragment.binding?.promoBannerTitleText?.text = context.getString(R.string.gift_one_get_one) @@ -116,18 +150,44 @@ class GiftOneGetOneHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic formatter.format(startDate), formatter.format(endDate) ) - fragment.binding?.promoBannerDurationView?.setTextColor(ContextCompat.getColor(context, R.color.white)) + fragment.binding?.promoBannerDurationView?.setTextColor( + ContextCompat.getColor( + context, + R.color.white + ) + ) fragment.binding?.promptText?.setText(R.string.g1g1_promo_info_prompt) - fragment.binding?.promptText?.setTextColor(ContextCompat.getColor(context, R.color.text_teal)) - fragment.binding?.promptButton?.background = ContextCompat.getDrawable(context, R.drawable.layout_rounded_bg_brand_400) + fragment.binding?.promptText?.setTextColor( + ContextCompat.getColor( + context, + R.color.text_teal + ) + ) + fragment.binding?.promptButton?.background = + ContextCompat.getDrawable(context, R.drawable.layout_rounded_bg_brand_400) fragment.binding?.promptButton?.setText(R.string.gift_a_subscription) fragment.binding?.promptButton?.setTextColor(ContextCompat.getColor(context, R.color.white)) fragment.binding?.promptButton?.setOnClickListener { - fragment.context?.let { context -> SubscriptionFragment.showGiftSubscriptionDialog(context, true) } + fragment.context?.let { context -> + SubscriptionFragment.showGiftSubscriptionDialog( + context, + true + ) + } } - fragment.binding?.instructionDescriptionView?.text = context.getString(R.string.g1g1_promo_info_instructions) - val limitationsFormatter = SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.LONG, SimpleDateFormat.LONG) - fragment.binding?.limitationsDescriptionView?.text = context.getString(R.string.g1g1_promo_info_limitations, limitationsFormatter.format(startDate), limitationsFormatter.format(endDate)) + fragment.binding?.instructionDescriptionView?.text = + context.getString(R.string.g1g1_promo_info_instructions) + val limitationsFormatter = + SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.LONG, SimpleDateFormat.LONG) + val utcTimeFormatter = SimpleDateFormat.getTimeInstance(SimpleDateFormat.LONG) + utcTimeFormatter.timeZone = TimeZone.getTimeZone("UTC") + fragment.binding?.limitationsDescriptionView?.text = context.getString( + R.string.g1g1_promo_info_limitations_fixed, + limitationsFormatter.format(startDate), + utcTimeFormatter.format(startDate), + limitationsFormatter.format(endDate), + utcTimeFormatter.format(startDate) + ) } } diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/SpookyExtraGemsHabiticaPromotion.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/SpookyExtraGemsHabiticaPromotion.kt index c36b342b4..0c4425435 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/SpookyExtraGemsHabiticaPromotion.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/models/promotions/SpookyExtraGemsHabiticaPromotion.kt @@ -18,6 +18,7 @@ import com.habitrpg.android.habitica.ui.views.promo.PromoMenuView import java.text.SimpleDateFormat import java.util.Date import java.util.Locale +import java.util.TimeZone class SpookyExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : HabiticaPromotion() { override val identifier: String @@ -144,6 +145,14 @@ class SpookyExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habit fragment.binding?.instructionDescriptionView?.text = context.getString(R.string.spooky_promo_info_instructions, formatter.format(startDate), formatter.format(endDate)) val limitationsFormatter = SimpleDateFormat.getDateTimeInstance() - fragment.binding?.limitationsDescriptionView?.text = context.getString(R.string.gems_promo_info_limitations, limitationsFormatter.format(startDate), limitationsFormatter.format(endDate)) + val utcTimeFormatter = SimpleDateFormat.getTimeInstance(SimpleDateFormat.LONG) + utcTimeFormatter.timeZone = TimeZone.getTimeZone("UTC") + fragment.binding?.limitationsDescriptionView?.text = context.getString( + R.string.gems_promo_info_limitations_fixed, + limitationsFormatter.format(startDate), + utcTimeFormatter.format(startDate), + limitationsFormatter.format(endDate), + utcTimeFormatter.format(endDate) + ) } }