From b0c54c52bd24bb7ae9144b9e82e2a6ab8065816d Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 2 Jun 2022 19:34:14 +0200 Subject: [PATCH] Merge bitcoin-core/gui#583: Add translator comments to TransactionDesc::FormatTxStatus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds translator comments to help translators understand the context of transaction status messages, while preserving Dash-specific features like ChainLocks and InstantSend. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/qt/transactiondesc.cpp | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index 1dc172af1a97..6f98e0fa26bc 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -30,17 +30,47 @@ QString TransactionDesc::FormatTxStatus(const interfaces::WalletTxStatus& status, bool inMempool) { int depth = status.depth_in_main_chain; - if (depth < 0) return tr("conflicted"); + 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); + } QString strTxStatus; bool fChainLocked = status.is_chainlocked; if (depth == 0) { - const QString abandoned{status.is_abandoned ? QLatin1String(", ") + tr("abandoned") : QString()}; - strTxStatus = 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"); + } + strTxStatus = s; } else if (!fChainLocked && 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. */ strTxStatus = 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. */ strTxStatus = tr("%1 confirmations").arg(depth); if (fChainLocked) { strTxStatus += QLatin1String(", ") + tr("locked via ChainLocks");