-
Notifications
You must be signed in to change notification settings - Fork 281
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
qt, refactor: rpcconsole translatable string fixes and improvements #221
qt, refactor: rpcconsole translatable string fixes and improvements #221
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.
e1a10ff
to
17edc9a
Compare
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 17edc9a, tested on Linux Mint 20.1 (Qt 5.12.8).
17edc9a
to
52d10ee
Compare
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.
re-ACK 52d10ee
52d10ee
to
2e2fe50
Compare
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.
re-ACK 2e2fe50
Rebased following merge of #226, dropped "Never" from the struct as it is now only used once. |
2e2fe50
to
3d85e92
Compare
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.
re-ACK 3d85e92
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
@@ -136,6 +136,11 @@ public Q_SLOTS: | |||
void cmdRequest(const QString &command, const WalletModel* wallet_model); | |||
|
|||
private: | |||
struct TranslatedStrings { |
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.
Interesting technique. I guess translators will see TranslatedStrings
as location, not rpcconsole.h
? But I guess that doesn't matter, not much context needed?
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.
I've tried with some small test project, and lupdate
/linguist
uses parent class as context, so no issues here.
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.
@Talkless thank you for checking!
and in the touched lines: - replace 2 occurrences of `== ""` with `isEmpty()` - replace an unneeded `+=` with `=`
and add missing braces to the touched conditionals. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
3d85e92
to
6242bee
Compare
Updated with suggestion from @Talkless (thanks!) to replace |
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.
re-ACK 6242bee
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.
tACK 6242bee, tested on Debian Sid with Qt 5.15.2. I see "Ban for.." translated to my native language as before, "To/From/Yes/No" are not but that's expected, as .ts
files are not updated.
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 6242bee
Good idea! These strings are/will be super common. This allows them to be used in other places when appropriate.
RPCConsole
class for reuse