mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
Merge bitcoin-core/gui#583: Add translator comments to TransactionDesc::FormatTxStatus
8cfb5627d5
qt, refactor: add translator comments in `TransactionDesc::FormatTxStatus()` (w0xlt) Pull request description: This PR adds translator comments to `TransactionDesc::FormatTxStatus` as suggested in https://github.com/bitcoin-core/gui/pull/552#discussion_r812602741 and https://github.com/bitcoin-core/gui/pull/552#issuecomment-1097294710. ACKs for top commit: hebasto: ACK8cfb5627d5
Tree-SHA512: 2c44b915e6309508f34fc22bb90e3d88ad32ed82fdb3a395f7c6716941edc1b311991140d28e838ad622a7484ed86aedd25e55674857fec8716d9575aed25fa0
This commit is contained in:
commit
b11ab25afb
1 changed files with 30 additions and 2 deletions
|
@ -36,13 +36,41 @@ QString TransactionDesc::FormatTxStatus(const interfaces::WalletTxStatus& status
|
|||
{
|
||||
int depth = status.depth_in_main_chain;
|
||||
if (depth < 0) {
|
||||
/*: Text explaining the current status of a transaction, shown in the
|
||||
status field of the details window for this transaction. This status
|
||||
represents an unconfirmed transaction that conflicts with a confirmed
|
||||
transaction. */
|
||||
return tr("conflicted with a transaction with %1 confirmations").arg(-depth);
|
||||
} else if (depth == 0) {
|
||||
const QString abandoned{status.is_abandoned ? QLatin1String(", ") + tr("abandoned") : QString()};
|
||||
return tr("0/unconfirmed, %1").arg(inMempool ? tr("in memory pool") : tr("not in memory pool")) + abandoned;
|
||||
QString s;
|
||||
if (inMempool) {
|
||||
/*: Text explaining the current status of a transaction, shown in the
|
||||
status field of the details window for this transaction. This status
|
||||
represents an unconfirmed transaction that is in the memory pool. */
|
||||
s = tr("0/unconfirmed, in memory pool");
|
||||
} else {
|
||||
/*: Text explaining the current status of a transaction, shown in the
|
||||
status field of the details window for this transaction. This status
|
||||
represents an unconfirmed transaction that is not in the memory pool. */
|
||||
s = tr("0/unconfirmed, not in memory pool");
|
||||
}
|
||||
if (status.is_abandoned) {
|
||||
/*: Text explaining the current status of a transaction, shown in the
|
||||
status field of the details window for this transaction. This
|
||||
status represents an abandoned transaction. */
|
||||
s += QLatin1String(", ") + tr("abandoned");
|
||||
}
|
||||
return s;
|
||||
} else if (depth < 6) {
|
||||
/*: Text explaining the current status of a transaction, shown in the
|
||||
status field of the details window for this transaction. This
|
||||
status represents a transaction confirmed in at least one block,
|
||||
but less than 6 blocks. */
|
||||
return tr("%1/unconfirmed").arg(depth);
|
||||
} else {
|
||||
/*: Text explaining the current status of a transaction, shown in the
|
||||
status field of the details window for this transaction. This status
|
||||
represents a transaction confirmed in 6 or more blocks. */
|
||||
return tr("%1 confirmations").arg(depth);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue