Skip to content

Commit b11ab25

Browse files
committed
Merge bitcoin-core#583: Add translator comments to TransactionDesc::FormatTxStatus
8cfb562 qt, refactor: add translator comments in `TransactionDesc::FormatTxStatus()` (w0xlt) Pull request description: This PR adds translator comments to `TransactionDesc::FormatTxStatus` as suggested in bitcoin-core#552 (comment) and bitcoin-core#552 (comment). ACKs for top commit: hebasto: ACK 8cfb562 Tree-SHA512: 2c44b915e6309508f34fc22bb90e3d88ad32ed82fdb3a395f7c6716941edc1b311991140d28e838ad622a7484ed86aedd25e55674857fec8716d9575aed25fa0
2 parents da6792b + 8cfb562 commit b11ab25

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

src/qt/transactiondesc.cpp

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,41 @@ QString TransactionDesc::FormatTxStatus(const interfaces::WalletTxStatus& status
3636
{
3737
int depth = status.depth_in_main_chain;
3838
if (depth < 0) {
39+
/*: Text explaining the current status of a transaction, shown in the
40+
status field of the details window for this transaction. This status
41+
represents an unconfirmed transaction that conflicts with a confirmed
42+
transaction. */
3943
return tr("conflicted with a transaction with %1 confirmations").arg(-depth);
4044
} else if (depth == 0) {
41-
const QString abandoned{status.is_abandoned ? QLatin1String(", ") + tr("abandoned") : QString()};
42-
return 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+
return s;
4364
} else if (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. */
4469
return tr("%1/unconfirmed").arg(depth);
4570
} 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. */
4674
return tr("%1 confirmations").arg(depth);
4775
}
4876
}

0 commit comments

Comments
 (0)