diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-06-02 19:34:14 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-06-02 19:36:40 +0200 |
commit | b11ab25afb4440d70f3ebcb683fe326747372e16 (patch) | |
tree | 65152ee9b8dfd0d565236ad5a5afc600d9c8c850 /src | |
parent | da6792b2eb6a74ee782232afe0ebc0e64154d7b2 (diff) | |
parent | 8cfb5627d51ecaa1d1e92ec21e2ac56a380c77e6 (diff) | |
download | bitcoin-b11ab25afb4440d70f3ebcb683fe326747372e16.tar.xz |
Merge bitcoin-core/gui#583: Add translator comments to `TransactionDesc::FormatTxStatus`
8cfb5627d51ecaa1d1e92ec21e2ac56a380c77e6 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:
ACK 8cfb5627d51ecaa1d1e92ec21e2ac56a380c77e6
Tree-SHA512: 2c44b915e6309508f34fc22bb90e3d88ad32ed82fdb3a395f7c6716941edc1b311991140d28e838ad622a7484ed86aedd25e55674857fec8716d9575aed25fa0
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/transactiondesc.cpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index 9e92f89543..a61d5407b3 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -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); } } |