Skip to content
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

Merged
merged 1 commit into from
May 27, 2021

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented May 15, 2021

Copy link
Member

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

src/qt/addressbookpage.cpp Outdated Show resolved Hide resolved
src/qt/intro.cpp Outdated Show resolved Hide resolved
src/qt/psbtoperationsdialog.cpp Outdated Show resolved Hide resolved
src/qt/qrimagewidget.cpp Outdated Show resolved Hide resolved
src/qt/sendcoinsdialog.cpp Outdated Show resolved Hide resolved
src/qt/transactionview.cpp Outdated Show resolved Hide resolved
src/qt/addressbookpage.cpp Outdated Show resolved Hide resolved
src/qt/addressbookpage.cpp Outdated Show resolved Hide resolved
Translator comments is the right way to pass context to translators.
@hebasto
Copy link
Member Author

hebasto commented May 15, 2021

Updated 2b28b00 -> 8b77133 (pr332.01 -> pr332.02, diff):

@@ -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.
Copy link
Member

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?

Copy link
Member Author

@hebasto hebasto May 16, 2021

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.

Copy link
Member

@jarolrod jarolrod left a 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);

@hebasto hebasto merged commit b789914 into bitcoin-core:master May 27, 2021
@hebasto hebasto deleted the 210515-trcom branch May 27, 2021 10:23
hebasto added a commit that referenced this pull request May 27, 2021
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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 27, 2021
…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
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
@bitcoin-core bitcoin-core locked and limited conversation to collaborators Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace disambiguation strings with translator comments
2 participants