Normalize receipt labeling.

This commit is contained in:
Alex Hart 2024-11-14 10:41:53 -04:00 committed by Greyson Parrelli
parent 61f91d6b83
commit 6de7e0cb50
3 changed files with 3 additions and 4 deletions

View file

@ -48,9 +48,10 @@ object ReceiptImageRenderer {
val today: String = DateUtils.formatDateWithDayOfWeek(Locale.getDefault(), System.currentTimeMillis()) val today: String = DateUtils.formatDateWithDayOfWeek(Locale.getDefault(), System.currentTimeMillis())
val amount: String = FiatMoneyUtil.format(context.resources, record.amount) val amount: String = FiatMoneyUtil.format(context.resources, record.amount)
val type: String = when (record.type) { val type: String = when (record.type) {
InAppPaymentReceiptRecord.Type.RECURRING_DONATION, InAppPaymentReceiptRecord.Type.RECURRING_BACKUP -> context.getString(R.string.DonationReceiptDetailsFragment__s_dash_s, subscriptionName, context.getString(R.string.DonationReceiptListFragment__recurring)) InAppPaymentReceiptRecord.Type.RECURRING_DONATION -> context.getString(R.string.DonationReceiptListFragment__recurring)
InAppPaymentReceiptRecord.Type.ONE_TIME_DONATION -> context.getString(R.string.DonationReceiptListFragment__one_time) InAppPaymentReceiptRecord.Type.ONE_TIME_DONATION -> context.getString(R.string.DonationReceiptListFragment__one_time)
InAppPaymentReceiptRecord.Type.ONE_TIME_GIFT -> context.getString(R.string.DonationReceiptListFragment__donation_for_a_friend) InAppPaymentReceiptRecord.Type.ONE_TIME_GIFT -> context.getString(R.string.DonationReceiptListFragment__donation_for_a_friend)
InAppPaymentReceiptRecord.Type.RECURRING_BACKUP -> error("Not supported.")
} }
val datePaid: String = DateUtils.formatDate(Locale.getDefault(), record.timestamp) val datePaid: String = DateUtils.formatDate(Locale.getDefault(), record.timestamp)

View file

@ -87,7 +87,7 @@ class DonationReceiptDetailFragment : DSLSettingsFragment(layoutId = R.layout.do
title = DSLSettingsText.from(R.string.DonationReceiptDetailsFragment__donation_type), title = DSLSettingsText.from(R.string.DonationReceiptDetailsFragment__donation_type),
summary = DSLSettingsText.from( summary = DSLSettingsText.from(
when (record.type) { when (record.type) {
InAppPaymentReceiptRecord.Type.RECURRING_DONATION -> getString(R.string.DonationReceiptDetailsFragment__s_dash_s, subscriptionName, getString(R.string.DonationReceiptListFragment__recurring)) InAppPaymentReceiptRecord.Type.RECURRING_DONATION -> getString(R.string.DonationReceiptListFragment__recurring)
InAppPaymentReceiptRecord.Type.ONE_TIME_DONATION -> getString(R.string.DonationReceiptListFragment__one_time) InAppPaymentReceiptRecord.Type.ONE_TIME_DONATION -> getString(R.string.DonationReceiptListFragment__one_time)
InAppPaymentReceiptRecord.Type.ONE_TIME_GIFT -> getString(R.string.DonationReceiptListFragment__donation_for_a_friend) InAppPaymentReceiptRecord.Type.ONE_TIME_GIFT -> getString(R.string.DonationReceiptListFragment__donation_for_a_friend)
InAppPaymentReceiptRecord.Type.RECURRING_BACKUP -> error("Not supported in this fragment.") InAppPaymentReceiptRecord.Type.RECURRING_BACKUP -> error("Not supported in this fragment.")

View file

@ -6095,8 +6095,6 @@
<string name="DonationReceiptDetailsFragment__amount">Amount</string> <string name="DonationReceiptDetailsFragment__amount">Amount</string>
<!-- Donation receipts thanks --> <!-- Donation receipts thanks -->
<string name="DonationReceiptDetailsFragment__thank_you_for_supporting">Thank you for supporting Signal. Your contribution helps fuel the mission of developing open source privacy technology that protects free expression and enables secure global communication for millions around the world. If youre a resident of the United States, please retain this receipt for your tax records. Signal Technology Foundation is a taxexempt nonprofit organization in the United States under section 501c3 of the Internal Revenue Code. Our Federal Tax ID is 824506840.</string> <string name="DonationReceiptDetailsFragment__thank_you_for_supporting">Thank you for supporting Signal. Your contribution helps fuel the mission of developing open source privacy technology that protects free expression and enables secure global communication for millions around the world. If youre a resident of the United States, please retain this receipt for your tax records. Signal Technology Foundation is a taxexempt nonprofit organization in the United States under section 501c3 of the Internal Revenue Code. Our Federal Tax ID is 824506840.</string>
<!-- Donation receipt type -->
<string name="DonationReceiptDetailsFragment__s_dash_s">%1$s - %2$s</string>
<!-- Donation reciepts screen empty state title --> <!-- Donation reciepts screen empty state title -->
<string name="DonationReceiptListFragment__no_receipts">No receipts</string> <string name="DonationReceiptListFragment__no_receipts">No receipts</string>