What changed, and why it matters
This commit changes two user-facing text strings in the Bitcoin Core wallet's PSBT (Partially Signed Bitcoin Transaction) dialog so they correctly use singular/plural forms in different languages. It is a localization/translation fix with no security relevance.
No security action needed; this is a routine UI localization improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch replaces two Qt tr() calls using %1 placeholder string formatting with Qt’s plural-aware %n form: ‘Signed %n input(s)…’ and ‘Transaction has %n unsigned input(s)…’. This enables proper pluralization for languages with complex plural rules. The code logic, transaction handling, and signing behavior are unchanged.
Changed components
src/qt/psbtoperationsdialog.cppInspect captured patch +2 / −2
diff --git a/src/qt/psbtoperationsdialog.cpp b/src/qt/psbtoperationsdialog.cpp
index 7661e59f..f5cb0773 100644
--- a/src/qt/psbtoperationsdialog.cpp
+++ b/src/qt/psbtoperationsdialog.cpp
@@ -98,7 +98,7 @@ void PSBTOperationsDialog::signTransaction()
} else if (!complete && n_signed < 1) {
showStatus(tr("Could not sign any more inputs."), StatusLevel::WARN);
} else if (!complete) {
- showStatus(tr("Signed %1 inputs, but more signatures are still required.").arg(n_signed),
+ showStatus(tr("Signed %n input(s), but more signatures are still required.", "", n_signed),
StatusLevel::INFO);
} else {
showStatus(tr("Signed transaction successfully. Transaction is ready to broadcast."),
@@ -219,7 +219,7 @@ QString PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction
size_t num_unsigned = CountPSBTUnsignedInputs(psbtx);
if (num_unsigned > 0) {
tx_description.append("<br><br>");
- tx_description.append(tr("Transaction has %1 unsigned inputs.").arg(QString::number(num_unsigned)));
+ tx_description.append(tr("Transaction has %n unsigned input(s).", "", num_unsigned));
}
return tx_description;
Why this scored 20/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.