|
30 | 30 | QString TransactionDesc::FormatTxStatus(const interfaces::WalletTxStatus& status, bool inMempool) |
31 | 31 | { |
32 | 32 | int depth = status.depth_in_main_chain; |
33 | | - if (depth < 0) return tr("conflicted"); |
| 33 | + if (depth < 0) { |
| 34 | + /*: Text explaining the current status of a transaction, shown in the |
| 35 | + status field of the details window for this transaction. This status |
| 36 | + represents an unconfirmed transaction that conflicts with a confirmed |
| 37 | + transaction. */ |
| 38 | + return tr("conflicted with a transaction with %1 confirmations").arg(-depth); |
| 39 | + } |
34 | 40 |
|
35 | 41 | QString strTxStatus; |
36 | 42 | bool fChainLocked = status.is_chainlocked; |
37 | 43 |
|
38 | 44 | if (depth == 0) { |
39 | | - const QString abandoned{status.is_abandoned ? QLatin1String(", ") + tr("abandoned") : QString()}; |
40 | | - strTxStatus = tr("0/unconfirmed, %1").arg((inMempool ? tr("in memory pool") : tr("not in memory pool"))) + abandoned; |
| 45 | + QString s; |
| 46 | + if (inMempool) { |
| 47 | + /*: Text explaining the current status of a transaction, shown in the |
| 48 | + status field of the details window for this transaction. This status |
| 49 | + represents an unconfirmed transaction that is in the memory pool. */ |
| 50 | + s = tr("0/unconfirmed, in memory pool"); |
| 51 | + } else { |
| 52 | + /*: Text explaining the current status of a transaction, shown in the |
| 53 | + status field of the details window for this transaction. This status |
| 54 | + represents an unconfirmed transaction that is not in the memory pool. */ |
| 55 | + s = tr("0/unconfirmed, not in memory pool"); |
| 56 | + } |
| 57 | + if (status.is_abandoned) { |
| 58 | + /*: Text explaining the current status of a transaction, shown in the |
| 59 | + status field of the details window for this transaction. This |
| 60 | + status represents an abandoned transaction. */ |
| 61 | + s += QLatin1String(", ") + tr("abandoned"); |
| 62 | + } |
| 63 | + strTxStatus = s; |
41 | 64 | } else if (!fChainLocked && depth < 6) { |
| 65 | + /*: Text explaining the current status of a transaction, shown in the |
| 66 | + status field of the details window for this transaction. This |
| 67 | + status represents a transaction confirmed in at least one block, |
| 68 | + but less than 6 blocks. */ |
42 | 69 | strTxStatus = tr("%1/unconfirmed").arg(depth); |
43 | 70 | } else { |
| 71 | + /*: Text explaining the current status of a transaction, shown in the |
| 72 | + status field of the details window for this transaction. This status |
| 73 | + represents a transaction confirmed in 6 or more blocks. */ |
44 | 74 | strTxStatus = tr("%1 confirmations").arg(depth); |
45 | 75 | if (fChainLocked) { |
46 | 76 | strTxStatus += QLatin1String(", ") + tr("locked via ChainLocks"); |
|
0 commit comments