taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit af6ba2ec3effd3db77d6e26f5b9eb8c8e6439906
parent 7d7c273cc6b56c566b03156c17c3a159b66352aa
Author: Iván Ávalos <avalos@disroot.org>
Date:   Fri, 15 Nov 2024 16:56:37 +0100

[android] QC: improve p2p QR code titles

Diffstat:
Mwallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt | 1+
Mwallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt | 6+++---
Mwallet/src/main/res/values/strings.xml | 3++-
3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt b/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt @@ -56,6 +56,7 @@ fun ColumnScope.TransactionPeerPullCreditComposable( state = t.txState, amount = t.amountRaw.withSpec(spec), talerUri = t.talerUri, + instructionResId = R.string.receive_peer_payment_instruction, ) TransactionAmountComposable( diff --git a/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt b/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt @@ -60,6 +60,7 @@ fun ColumnScope.TransactionPeerPushDebitComposable(t: TransactionPeerPushDebit, state = t.txState, amount = t.amountRaw.withSpec(spec), talerUri = t.talerUri, + instructionResId = R.string.send_peer_payment_instruction, ) TransactionAmountComposable( @@ -94,14 +95,13 @@ fun ColumnScope.PeerQrCode( state: TransactionState, amount: Amount, talerUri: String?, + instructionResId: Int, ) { if (state == TransactionState(Pending)) { Text( modifier = Modifier.padding(top = 16.dp, start = 16.dp, end = 16.dp), style = MaterialTheme.typography.titleLarge, - text = stringResource(id = R.string.send_peer_payment_instruction, - amount.spec?.name - ?: amount.currency), + text = stringResource(id = instructionResId, amount.toString()), textAlign = TextAlign.Center, ) diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml @@ -204,6 +204,7 @@ GNU Taler is immune against many types of fraud, such as phishing of credit card <string name="receive_peer">Request money from another wallet</string> <string name="receive_peer_create_button">Create request</string> <string name="receive_peer_invoice_uri">Alternatively, copy and send this URI:</string> + <string name="receive_peer_payment_instruction">Receiving %1$s, let the payer scan this QR code to send it</string> <string name="receive_peer_payment_intro">Do you want to receive this payment?</string> <string name="receive_peer_payment_title">Receive payment</string> <string name="receive_peer_title">Request money</string> @@ -235,7 +236,7 @@ GNU Taler is immune against many types of fraud, such as phishing of credit card <string name="send_peer_expiration_hours">Hours</string> <string name="send_peer_expiration_period">Expires in</string> <string name="send_peer_max_amount">Available to send: %1$s</string> - <string name="send_peer_payment_instruction">To send %1$s, let the payee scan this QR code:</string> + <string name="send_peer_payment_instruction">Sending %1$s, let the payee scan this QR code to receive it</string> <string name="send_peer_purpose">Purpose</string> <string name="send_peer_title">Send money to another wallet</string>