Add translator comments to TransactionDesc::FormatTxStatus#583
Merged
hebasto merged 1 commit intobitcoin-core:masterfrom Jun 2, 2022
Merged
Conversation
Member
|
|
Member
Member
Huh. Yes, it is. Sorry. |
Member
ea83098 to
767304e
Compare
Contributor
Author
|
Rebased. Thanks. |
Member
|
To avoid unnecessary string split, which makes translation much harder, I'd suggest before applying translation comments to refactor a bit: --- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -38,8 +38,16 @@ QString TransactionDesc::FormatTxStatus(const interfaces::WalletTxStatus& status
if (depth < 0) {
return tr("conflicted with a transaction with %1 confirmations").arg(-depth);
} else if (depth == 0) {
- const QString abandoned{status.is_abandoned ? QLatin1String(", ") + tr("abandoned") : QString()};
- return tr("0/unconfirmed, %1").arg(inMempool ? tr("in memory pool") : tr("not in memory pool")) + abandoned;
+ QString s;
+ if (inMempool) {
+ s = tr("0/unconfirmed, in memory pool");
+ } else {
+ s = tr("0/unconfirmed, not in memory pool");
+ }
+ if (status.is_abandoned) {
+ s += QLatin1String(", ") + tr("abandoned");
+ }
+ return s;
} else if (depth < 6) {
return tr("%1/unconfirmed").arg(depth);
} else { |
767304e to
b0ecfd9
Compare
Contributor
Author
|
@hebasto thanks for suggestion. Done. |
katesalazar
reviewed
Apr 26, 2022
|
Concept ACK |
b0ecfd9 to
dde7e9a
Compare
jonatack
reviewed
Jun 1, 2022
jonatack
reviewed
Jun 1, 2022
Member
|
@w0xlt This looks ready to be merged with or without addressing #583 (comment) What is your opinion? |
dde7e9a to
8cfb562
Compare
Contributor
Author
|
@hebasto I addressed #583 (comment) . Thanks. |
hebasto
approved these changes
Jun 2, 2022
Member
|
ACK, thanks for updating. |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Jun 3, 2022
…sc::FormatTxStatus` 8cfb562 qt, refactor: add translator comments in `TransactionDesc::FormatTxStatus()` (w0xlt) Pull request description: This PR adds translator comments to `TransactionDesc::FormatTxStatus` as suggested in bitcoin-core/gui#552 (comment) and bitcoin-core/gui#552 (comment). ACKs for top commit: hebasto: ACK 8cfb562 Tree-SHA512: 2c44b915e6309508f34fc22bb90e3d88ad32ed82fdb3a395f7c6716941edc1b311991140d28e838ad622a7484ed86aedd25e55674857fec8716d9575aed25fa0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds translator comments to
TransactionDesc::FormatTxStatusas suggested in #552 (comment) and #552 (comment).