-
Notifications
You must be signed in to change notification settings - Fork 326
Add translator comments to TransactionDesc::FormatTxStatus
#583
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
Add translator comments to TransactionDesc::FormatTxStatus
#583
Conversation
|
|
Huh. Yes, it is. Sorry. |
ea83098 to
767304e
Compare
|
Rebased. Thanks. |
shaavan
left a comment
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 767304e
The added translator's comments are clean and concise and clearly represent the meaning of the sentences they intend to explain.
|
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
|
@hebasto thanks for suggestion. Done. |
|
Concept ACK |
jarolrod
left a comment
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
b0ecfd9 to
dde7e9a
Compare
|
@w0xlt This looks ready to be merged with or without addressing #583 (comment) What is your opinion? |
dde7e9a to
8cfb562
Compare
|
@hebasto I addressed #583 (comment) . Thanks. |
hebasto
left a comment
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 8cfb562
|
ACK, thanks for updating. |
…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 PR adds translator comments to
TransactionDesc::FormatTxStatusas suggested in #552 (comment) and #552 (comment).