-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace disambiguation strings with translator comments #332
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
Translator comments is the right way to pass context to translators.
@@ -281,7 +281,9 @@ void AddressBookPage::on_exportButton_clicked() | |||
// CSV is currently the only supported format | |||
QString filename = GUIUtil::getSaveFileName(this, | |||
tr("Export Address List"), QString(), | |||
tr("Comma separated file", "Name of CSV file format") + QLatin1String(" (*.csv)"), nullptr); | |||
/*: Expanded name of the CSV file format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we avoid having to translate this twice, same with PSBT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could avoid code duplication by making constants. But not sure if it worth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 8b77133
From the top of the repo, I grepped with:
grep -rn "tr(\".*\", \".*\".*)" *
manually filtering out the shortlist of results, I end up with the same occurrences being addressed here:
src/qt/addressbookpage.cpp:284: tr("Comma separated file", "Name of CSV file format") + QLatin1String(" (*.csv)"), nullptr);
src/qt/addressbookpage.cpp:299: tr("There was an error trying to save the address list to %1. Please try again.", "An error message.").arg(filename));
src/qt/walletview.cpp:276: tr("Wallet Data", "Name of wallet data file format") + QLatin1String(" (*.dat)"), nullptr);
src/qt/sendcoinsdialog.cpp:435: tr("Partially Signed Transaction (Binary)", "Name of binary PSBT file format") + QLatin1String(" (*.psbt)"), &selectedFilter);
src/qt/transactionview.cpp:339: tr("Comma separated file", "Name of CSV file format") + QLatin1String(" (*.csv)"), nullptr);
src/qt/psbtoperationsdialog.cpp:144: tr("Partially Signed Transaction (Binary)", "Name of binary PSBT file format") + QLatin1String(" (*.psbt)"), &selected_filter);
src/qt/intro.cpp:388: ui->lblPruneSuffix->setText(tr("(sufficient to restore backups %n day(s) old)", "block chain pruning", expected_backup_days));
src/qt/qrimagewidget.cpp:121: tr("PNG Image", "Name of PNG file format") + QLatin1String(" (*.png)"), nullptr);
df4c81f English translations update (Hennadii Stepanov) bfb53dd scripted-diff: Fix ellipsis after pr20773 (Hennadii Stepanov) Pull request description: Update for Transifex. After changing translator comments in #332 this update will show if Transifex triggers strings to be re-translated. ACKs for top commit: laanwj: ACK df4c81f jarolrod: ACK df4c81f Tree-SHA512: 1e54812bc04db6ae39e0b4d735b220ed8730a9941b17a0a2d09e21bcdd08e829adba86c35cf43c9be5e492ccb13e53a90149fcd7d6c0f5fdd022b978a1ff785c
…lator comments 8b77133 qt: Replace disambiguation strings with translator comments (Hennadii Stepanov) Pull request description: Since 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#21694 - in bitcoin#21694 on testing purpose - in #125 Closes #288. ACKs for top commit: jarolrod: ACK 8b77133 Tree-SHA512: 466ade35f4969a41fbf3196780b1ae9fa810bab5d2f09077f8631604636cc63b24a901c719f6b5797366d2aa307993d0aa419ce35200c8d0a741a3d81cad3e6b
Since bitcoin/bitcoin#21694 is merged, translator comments is the right way to pass context to translators.
This PR fixes changes were made:
Closes #288.