Skip to content

Commit 068f557

Browse files
hebastoClaude Code
authored andcommitted
gui: Add translator comments to TransactionDesc::FormatTxStatus
Backport of bitcoin-core/gui#583 This adds translator comments to help translators understand the context of transaction status messages, while preserving Dash-specific features like ChainLocks and InstantSend.
1 parent 7325e06 commit 068f557

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

src/qt/transactiondesc.cpp

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,47 @@
3030
QString TransactionDesc::FormatTxStatus(const interfaces::WalletTxStatus& status, bool inMempool)
3131
{
3232
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+
}
3440

3541
QString strTxStatus;
3642
bool fChainLocked = status.is_chainlocked;
3743

3844
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;
4164
} 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. */
4269
strTxStatus = tr("%1/unconfirmed").arg(depth);
4370
} 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. */
4474
strTxStatus = tr("%1 confirmations").arg(depth);
4575
if (fChainLocked) {
4676
strTxStatus += QLatin1String(", ") + tr("locked via ChainLocks");

0 commit comments

Comments
 (0)