mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Update donations strings.
This commit is contained in:
@@ -224,7 +224,7 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver {
|
||||
}
|
||||
|
||||
private @Nullable CharSequence resolveBody(@Nullable CharSequence body, @NonNull QuoteModel.Type quoteType) {
|
||||
return quoteType == QuoteModel.Type.GIFT_BADGE ? getContext().getString(R.string.QuoteView__gift) : body;
|
||||
return quoteType == QuoteModel.Type.GIFT_BADGE ? getContext().getString(R.string.QuoteView__donation_for_a_friend) : body;
|
||||
}
|
||||
|
||||
public void setTopCornerSizes(boolean topLeftLarge, boolean topRightLarge) {
|
||||
|
||||
@@ -179,7 +179,7 @@ class GatewaySelectorBottomSheet : DSLSettingsBottomSheetFragment() {
|
||||
space(6.dp)
|
||||
noPadTextPref(
|
||||
title = DSLSettingsText.from(
|
||||
R.string.GatewaySelectorBottomSheet__send_a_gift_badge,
|
||||
R.string.GatewaySelectorBottomSheet__donate_for_a_friend,
|
||||
DSLSettingsText.CenterModifier,
|
||||
DSLSettingsText.BodyLargeModifier,
|
||||
DSLSettingsText.ColorModifier(ContextCompat.getColor(context, R.color.signal_colorOnSurfaceVariant))
|
||||
|
||||
@@ -57,8 +57,8 @@ class DonationErrorParams<V> private constructor(
|
||||
private fun <V> getGenericRedemptionError(context: Context, genericError: DonationError.BadgeRedemptionError.GenericError, callback: Callback<V>): DonationErrorParams<V> {
|
||||
return when (genericError.source) {
|
||||
DonationErrorSource.GIFT -> DonationErrorParams(
|
||||
title = R.string.DonationsErrors__failed_to_send_gift_badge,
|
||||
message = R.string.DonationsErrors__could_not_send_gift_badge,
|
||||
title = R.string.DonationsErrors__donation_failed,
|
||||
message = R.string.DonationsErrors__your_payment_was_processed_but,
|
||||
positiveAction = callback.onContactSupport(context),
|
||||
negativeAction = null
|
||||
)
|
||||
@@ -74,14 +74,14 @@ class DonationErrorParams<V> private constructor(
|
||||
private fun <V> getVerificationErrorParams(context: Context, verificationError: DonationError.GiftRecipientVerificationError, callback: Callback<V>): DonationErrorParams<V> {
|
||||
return when (verificationError) {
|
||||
is DonationError.GiftRecipientVerificationError.FailedToFetchProfile -> DonationErrorParams(
|
||||
title = R.string.DonationsErrors__couldnt_send_gift,
|
||||
message = R.string.DonationsErrors__please_check_your_network_connection,
|
||||
title = R.string.DonationsErrors__cannot_send_donation,
|
||||
message = R.string.DonationsErrors__your_donation_could_not_be_sent,
|
||||
positiveAction = callback.onOk(context),
|
||||
negativeAction = null
|
||||
)
|
||||
else -> DonationErrorParams(
|
||||
title = R.string.DonationsErrors__cant_send_gift,
|
||||
message = R.string.DonationsErrors__target_does_not_support_gifting,
|
||||
title = R.string.DonationsErrors__cannot_send_donation,
|
||||
message = R.string.DonationsErrors__this_user_cant_receive_donations_until,
|
||||
positiveAction = callback.onOk(context),
|
||||
negativeAction = null
|
||||
)
|
||||
|
||||
@@ -247,7 +247,7 @@ class ManageDonationsFragment :
|
||||
|
||||
if (FeatureFlags.giftBadgeSendSupport() && Recipient.self().giftBadgesCapability == Recipient.Capability.SUPPORTED) {
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.ManageDonationsFragment__gift_a_badge),
|
||||
title = DSLSettingsText.from(R.string.ManageDonationsFragment__donate_for_a_friend),
|
||||
icon = DSLSettingsIcon.from(R.drawable.ic_gift_24),
|
||||
onClick = {
|
||||
startActivity(Intent(requireContext(), GiftFlowActivity::class.java))
|
||||
|
||||
@@ -70,7 +70,7 @@ class DonationReceiptDetailFragment : DSLSettingsFragment(layoutId = R.layout.do
|
||||
val type: String = when (record.type) {
|
||||
DonationReceiptRecord.Type.RECURRING -> getString(R.string.DonationReceiptDetailsFragment__s_dash_s, subscriptionName, getString(R.string.DonationReceiptListFragment__recurring))
|
||||
DonationReceiptRecord.Type.BOOST -> getString(R.string.DonationReceiptListFragment__one_time)
|
||||
DonationReceiptRecord.Type.GIFT -> getString(R.string.DonationReceiptListFragment__gift)
|
||||
DonationReceiptRecord.Type.GIFT -> getString(R.string.DonationReceiptListFragment__donation_for_a_friend)
|
||||
}
|
||||
val datePaid: String = DateUtils.formatDate(Locale.getDefault(), record.timestamp)
|
||||
|
||||
@@ -142,7 +142,7 @@ class DonationReceiptDetailFragment : DSLSettingsFragment(layoutId = R.layout.do
|
||||
when (record.type) {
|
||||
DonationReceiptRecord.Type.RECURRING -> getString(R.string.DonationReceiptDetailsFragment__s_dash_s, subscriptionName, getString(R.string.DonationReceiptListFragment__recurring))
|
||||
DonationReceiptRecord.Type.BOOST -> getString(R.string.DonationReceiptListFragment__one_time)
|
||||
DonationReceiptRecord.Type.GIFT -> getString(R.string.DonationReceiptListFragment__gift)
|
||||
DonationReceiptRecord.Type.GIFT -> getString(R.string.DonationReceiptListFragment__donation_for_a_friend)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ class DonationReceiptListFragment : Fragment(R.layout.donation_receipt_list_frag
|
||||
0 -> R.string.DonationReceiptListFragment__all
|
||||
1 -> R.string.DonationReceiptListFragment__recurring
|
||||
2 -> R.string.DonationReceiptListFragment__one_time
|
||||
3 -> R.string.DonationReceiptListFragment__gift
|
||||
3 -> R.string.DonationReceiptListFragment__donation_for_a_friend
|
||||
else -> error("Unsupported index $position")
|
||||
}
|
||||
)
|
||||
|
||||
@@ -44,7 +44,7 @@ object DonationReceiptListItem {
|
||||
when (model.record.type) {
|
||||
DonationReceiptRecord.Type.RECURRING -> R.string.DonationReceiptListFragment__recurring
|
||||
DonationReceiptRecord.Type.BOOST -> R.string.DonationReceiptListFragment__one_time
|
||||
DonationReceiptRecord.Type.GIFT -> R.string.DonationReceiptListFragment__gift
|
||||
DonationReceiptRecord.Type.GIFT -> R.string.DonationReceiptListFragment__donation_for_a_friend
|
||||
}
|
||||
)
|
||||
moneyView.text = FiatMoneyUtil.format(context.resources, model.record.amount)
|
||||
|
||||
Reference in New Issue
Block a user