mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
qt: Avoid error prone leading spaces in translatable strings
This commit is contained in:
@@ -174,12 +174,13 @@ void PSBTOperationsDialog::updateTransactionDisplay() {
|
||||
QString PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction &psbtx)
|
||||
{
|
||||
QString tx_description;
|
||||
QLatin1String bullet_point(" * ");
|
||||
CAmount totalAmount = 0;
|
||||
for (const CTxOut& out : psbtx.tx->vout) {
|
||||
CTxDestination address;
|
||||
ExtractDestination(out.scriptPubKey, address);
|
||||
totalAmount += out.nValue;
|
||||
tx_description.append(tr(" * Sends %1 to %2")
|
||||
tx_description.append(bullet_point).append(tr("Sends %1 to %2")
|
||||
.arg(BitcoinUnits::formatWithUnit(BitcoinUnit::BTC, out.nValue))
|
||||
.arg(QString::fromStdString(EncodeDestination(address))));
|
||||
// Check if the address is one of ours
|
||||
@@ -188,7 +189,7 @@ QString PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction
|
||||
}
|
||||
|
||||
PSBTAnalysis analysis = AnalyzePSBT(psbtx);
|
||||
tx_description.append(" * ");
|
||||
tx_description.append(bullet_point);
|
||||
if (!*analysis.fee) {
|
||||
// This happens if the transaction is missing input UTXO information.
|
||||
tx_description.append(tr("Unable to calculate transaction fee or total transaction amount."));
|
||||
|
||||
Reference in New Issue
Block a user