Skip to content

Commit b789914

Browse files
committed
Merge #332: Replace disambiguation strings with translator comments
8b77133 qt: Replace disambiguation strings with translator comments (Hennadii Stepanov) Pull request description: Since bitcoin/bitcoin#21694 is merged, translator comments is the right way to pass context to translators. This PR fixes changes were made: - in #220 before bitcoin/bitcoin#21694 - in bitcoin/bitcoin#21694 on testing purpose - in #125 Closes #288. ACKs for top commit: jarolrod: ACK 8b77133 Tree-SHA512: 466ade35f4969a41fbf3196780b1ae9fa810bab5d2f09077f8631604636cc63b24a901c719f6b5797366d2aa307993d0aa419ce35200c8d0a741a3d81cad3e6b
2 parents 811aa24 + 8b77133 commit b789914

File tree

7 files changed

+21
-9
lines changed

7 files changed

+21
-9
lines changed

src/qt/addressbookpage.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ void AddressBookPage::on_exportButton_clicked()
281281
// CSV is currently the only supported format
282282
QString filename = GUIUtil::getSaveFileName(this,
283283
tr("Export Address List"), QString(),
284-
tr("Comma separated file", "Name of CSV file format") + QLatin1String(" (*.csv)"), nullptr);
284+
/*: Expanded name of the CSV file format.
285+
See https://en.wikipedia.org/wiki/Comma-separated_values */
286+
tr("Comma separated file") + QLatin1String(" (*.csv)"), nullptr);
285287

286288
if (filename.isNull())
287289
return;
@@ -295,8 +297,9 @@ void AddressBookPage::on_exportButton_clicked()
295297

296298
if(!writer.write()) {
297299
QMessageBox::critical(this, tr("Exporting Failed"),
298-
//: %1 is a name of the file (e.g., "addrbook.csv") that the bitcoin addresses were exported to.
299-
tr("There was an error trying to save the address list to %1. Please try again.", "An error message.").arg(filename));
300+
/*: An error message. %1 is a stand-in argument for the name
301+
of the file we attempted to save to. */
302+
tr("There was an error trying to save the address list to %1. Please try again.").arg(filename));
300303
}
301304
}
302305

src/qt/intro.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ void Intro::UpdatePruneLabels(bool prune_checked)
385385
static constexpr uint64_t nPowTargetSpacing = 10 * 60; // from chainparams, which we don't have at this stage
386386
static constexpr uint32_t expected_block_data_size = 2250000; // includes undo data
387387
const uint64_t expected_backup_days = m_prune_target_gb * 1e9 / (uint64_t(expected_block_data_size) * 86400 / nPowTargetSpacing);
388-
ui->lblPruneSuffix->setText(tr("(sufficient to restore backups %n day(s) old)", "block chain pruning", expected_backup_days));
388+
ui->lblPruneSuffix->setText(
389+
//: Explanatory text on the capability of the current prune target.
390+
tr("(sufficient to restore backups %n day(s) old)", "", expected_backup_days));
389391
ui->sizeWarningLabel->setText(
390392
tr("%1 will download and store a copy of the Bitcoin block chain.").arg(PACKAGE_NAME) + " " +
391393
storageRequiresMsg.arg(m_required_space_gb) + " " +

src/qt/psbtoperationsdialog.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ void PSBTOperationsDialog::saveTransaction() {
141141
filename_suggestion.append(".psbt");
142142
QString filename = GUIUtil::getSaveFileName(this,
143143
tr("Save Transaction Data"), filename_suggestion,
144-
tr("Partially Signed Transaction (Binary)", "Name of binary PSBT file format") + QLatin1String(" (*.psbt)"), &selected_filter);
144+
//: Expanded name of the binary PSBT file format. See: BIP 174.
145+
tr("Partially Signed Transaction (Binary)") + QLatin1String(" (*.psbt)"), &selected_filter);
145146
if (filename.isEmpty()) {
146147
return;
147148
}

src/qt/qrimagewidget.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ void QRImageWidget::saveImage()
118118
return;
119119
QString fn = GUIUtil::getSaveFileName(
120120
this, tr("Save QR Code"), QString(),
121-
tr("PNG Image", "Name of PNG file format") + QLatin1String(" (*.png)"), nullptr);
121+
/*: Expanded name of the PNG file format.
122+
See https://en.wikipedia.org/wiki/Portable_Network_Graphics */
123+
tr("PNG Image") + QLatin1String(" (*.png)"), nullptr);
122124
if (!fn.isEmpty())
123125
{
124126
exportImage().save(fn);

src/qt/sendcoinsdialog.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ void SendCoinsDialog::sendButtonClicked([[maybe_unused]] bool checked)
432432
fileNameSuggestion.append(".psbt");
433433
QString filename = GUIUtil::getSaveFileName(this,
434434
tr("Save Transaction Data"), fileNameSuggestion,
435-
tr("Partially Signed Transaction (Binary)", "Name of binary PSBT file format") + QLatin1String(" (*.psbt)"), &selectedFilter);
435+
//: Expanded name of the binary PSBT file format. See: BIP 174.
436+
tr("Partially Signed Transaction (Binary)") + QLatin1String(" (*.psbt)"), &selectedFilter);
436437
if (filename.isEmpty()) {
437438
return;
438439
}

src/qt/transactionview.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ void TransactionView::exportClicked()
336336
// CSV is currently the only supported format
337337
QString filename = GUIUtil::getSaveFileName(this,
338338
tr("Export Transaction History"), QString(),
339-
tr("Comma separated file", "Name of CSV file format") + QLatin1String(" (*.csv)"), nullptr);
339+
/*: Expanded name of the CSV file format.
340+
See https://en.wikipedia.org/wiki/Comma-separated_values */
341+
tr("Comma separated file") + QLatin1String(" (*.csv)"), nullptr);
340342

341343
if (filename.isNull())
342344
return;

src/qt/walletview.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ void WalletView::backupWallet()
273273
{
274274
QString filename = GUIUtil::getSaveFileName(this,
275275
tr("Backup Wallet"), QString(),
276-
tr("Wallet Data", "Name of wallet data file format") + QLatin1String(" (*.dat)"), nullptr);
276+
//: Name of the wallet data file format.
277+
tr("Wallet Data") + QLatin1String(" (*.dat)"), nullptr);
277278

278279
if (filename.isEmpty())
279280
return;

0 commit comments

Comments
 (0)