-
Notifications
You must be signed in to change notification settings - Fork 38.7k
gui: Bilingual GUI error messages #16224
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
Conversation
|
@MarcoFalke your #15340 (comment) has been addressed. |
7fd5179 to
c55cc2d
Compare
|
EDIT: I didn't realize when I wrote this there was lots of previous discussion already about showing untranslated messages in #15340. Concept ACK, especially for the code cleanup making error handling more consistent. Some thoughts:
PR looks good in its current form though, and it would be good to get opinions from other reviewers. |
|
Is there even a point in having two different translation functions long term? Shouldn't all non-gui code use the one that returns a |
Good point. I don't think there is. So another alternative could be to update the |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
c55cc2d to
81baf61
Compare
|
Rebased. |
81baf61 to
1855f54
Compare
|
Rebased. @practicalswift Thank you for review. |
IIUC, this will require appropriate changes for the |
afc38ac to
4933242
Compare
Implemented.
Done. Also rebased on top of #16278. |
|
ACK 72d3599e5b06fb1799c8b3689e76d7b97b067531 Not sure about the huge scripted diff, you can probably replace the body with |
aead754 to
e985a07
Compare
5ff042d to
18bd83b
Compare
|
Updated 5ff042d4955ab0f8a0dd8ed2522cf0da17f5b00d -> 18bd83b:
|
|
re-tACK 18bd83b |
|
ACK 18bd83b 🐦 Thanks for finally making the debug log of international users readable. I I checked that no new translations are added, but did not run the GUI. Show signature and timestampSignature: Timestamp of file with hash |
Updated name-specific RPC error messages for upstream bitcoin/bitcoin#16224.
2308385 [test] Add test for cfcheckpt (Jim Posen) f9e00bb [net processing] Message handling for getcfcheckpt. (Jim Posen) 9ccaaba [init] Add -peerblockfilters option (Jim Posen) Pull request description: Serve cfcheckpt messages if basic block filter index is enabled and `-peercfilters` is set. `NODE_COMPACT_FILTERS` is not signaled to peers, but functionality can be used for testing and serving pre-configured clients. ACKs for top commit: jonatack: Code review re-ACK 2308385 the only change since my review @ 967e2b1 is an update required for #16224 that was merged yesterday. fjahr: re-ACK 2308385 jkczyz: re-ACK 2308385 ariard: re-Code Review ACK 2308385 clarkmoody: Tested ACK 2308385 MarcoFalke: re-ACK 2308385 🌳 theStack: ACK 2308385 Tree-SHA512: 8c751bbd7d1c31a413096462ae025c3d2f3163c7016cbec472a5f5ec267f8dd19a2dfc4d749876d7409c1db546e6fdd16461c6863effcfa0d3e993edcfa92a08
18bd83b util: Cleanup translation.h (Hennadii Stepanov) e95e658 doc: Do not translate technical or extremely rare errors (Hennadii Stepanov) 7e923d4 Make InitError bilingual (Hennadii Stepanov) 917ca93 Make ThreadSafe{MessageBox|Question} bilingual (Hennadii Stepanov) 23b9fa2 gui: Add detailed text to BitcoinGUI::message (Hennadii Stepanov) Pull request description: This is an alternative to bitcoin#15340 (it works with the `Chain` interface; see: bitcoin#15340 (comment)). Refs: - bitcoin#16218 (partial fix) - bitcoin#15894 (comment) This PR: - makes GUI error messages bilingual: user's native language + untranslated (i.e. English) - insures that only untranslated messages are written to the debug log file and to `stderr` (that is not the case on master). If a translated string is unavailable only an English string appears to a user. Here are some **examples** (updated):   * `qt5ct: using qt5ct plugin` message is my local environment specific; please ignore it. --- Note for reviewers: `InitWarning()` is out of this PR scope. ACKs for top commit: Sjors: re-tACK 18bd83b MarcoFalke: ACK 18bd83b 🐦 Tree-SHA512: 3cc8ec44f84403e54b57d11714c86b0855ed90eb794b5472e432005073354b9e3f7b4e8e7bf347a4c21be47299dbc7170f2d0c4b80e308205ff09596e55a4f96
2308385 [test] Add test for cfcheckpt (Jim Posen) f9e00bb [net processing] Message handling for getcfcheckpt. (Jim Posen) 9ccaaba [init] Add -peerblockfilters option (Jim Posen) Pull request description: Serve cfcheckpt messages if basic block filter index is enabled and `-peercfilters` is set. `NODE_COMPACT_FILTERS` is not signaled to peers, but functionality can be used for testing and serving pre-configured clients. ACKs for top commit: jonatack: Code review re-ACK 2308385 the only change since my review @ 967e2b1 is an update required for bitcoin#16224 that was merged yesterday. fjahr: re-ACK 2308385 jkczyz: re-ACK 2308385 ariard: re-Code Review ACK 2308385 clarkmoody: Tested ACK 2308385 MarcoFalke: re-ACK 2308385 🌳 theStack: ACK bitcoin@2308385 Tree-SHA512: 8c751bbd7d1c31a413096462ae025c3d2f3163c7016cbec472a5f5ec267f8dd19a2dfc4d749876d7409c1db546e6fdd16461c6863effcfa0d3e993edcfa92a08
5527be0 refactor: Add AbortError alias (Hennadii Stepanov) d924f2a Drop MSG_NOPREFIX flag (Hennadii Stepanov) 083daf7 Pass bilingual_str argument to AbortNode() (Hennadii Stepanov) d1cca12 refactor: Use bilingual_str::empty() (Hennadii Stepanov) Pull request description: This PR is a [followup](#16218 (comment)) of #16224, and it adds `bilingual_str` type argument support to the `AbortNode()` functions. ACKs for top commit: MarcoFalke: ACK 5527be0 👟 Tree-SHA512: bf8b15b14912b1f672e6e588fffa1e6eb6f00b4b23d15d0ced7f18fbdf76919244427feb7217007fe29617049308e13def893a03a87358db819cca9692f59905
5527be0 refactor: Add AbortError alias (Hennadii Stepanov) d924f2a Drop MSG_NOPREFIX flag (Hennadii Stepanov) 083daf7 Pass bilingual_str argument to AbortNode() (Hennadii Stepanov) d1cca12 refactor: Use bilingual_str::empty() (Hennadii Stepanov) Pull request description: This PR is a [followup](bitcoin#16218 (comment)) of bitcoin#16224, and it adds `bilingual_str` type argument support to the `AbortNode()` functions. ACKs for top commit: MarcoFalke: ACK 5527be0 👟 Tree-SHA512: bf8b15b14912b1f672e6e588fffa1e6eb6f00b4b23d15d0ced7f18fbdf76919244427feb7217007fe29617049308e13def893a03a87358db819cca9692f59905
753f7cc scripted-diff: Make translation bilingual (Hennadii Stepanov) 7c45e14 Add bilingual message type (Hennadii Stepanov) 0b86e51 Refactor out translation.h (Hennadii Stepanov) Pull request description: This PR adds the `bilingual_str` struct and a `strprintf` overload: https://github.com/bitcoin/bitcoin/blob/0626b8cbdf0aa971500eb5613c7ab4096c496966/src/tinyformat.h#L1066-L1067 Both new features allow bitcoin code to easily send dual translated and non-translated messages to the GUI and the logging framework. This PR is only a refactoring (has been split off the #16224 (see: bitcoin/bitcoin#16224)) and does not change behavior. ACKs for top commit: MarcoFalke: ACK 753f7cc ryanofsky: utACK 753f7cc. Only change since last review is fixing lint error (double includes) Tree-SHA512: 52b0654421d558e4775c0484d78be26319fe3db5118af9b0a9bdfbdaad53a3704f527a5d5aba1013a64560b9b6a0c3c4cf0a6782e49aa731e18d99de95220385
Summary: Backport of Core [[bitcoin/bitcoin#16224 | PR16224]] - part 1-5 Commit bitcoin/bitcoin@23b9fa2 Test Plan: The added code is not yet used in this commit. Just make sure it still compiles. `ninja` Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7985
Summary: > This PR: > > - makes GUI error messages bilingual: user's native language + untranslated (i.e. English) > - insures that only untranslated messages are written to the debug log file and to stderr (that is not the case on master). Backport of Core [[bitcoin/bitcoin#16224 | PR16224]] - part 2 of 5 bitcoin/bitcoin@917ca93 Depends on D7985 Test Plan: `ninja && ninja check` Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7986
Summary: > This PR: > > - makes GUI error messages bilingual: user's native language + untranslated (i.e. English) > - insures that only untranslated messages are written to the debug log file and to stderr (that is not the case on master). Backport of Core [[bitcoin/bitcoin#16224 | PR16224]] - part 3 of 5 Commit: bitcoin/bitcoin@7e923d4 Depends on D7986 Test Plan: `ninja && ninja check` Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7997
…e errors Summary: Backport of Core [[bitcoin/bitcoin#16224 | PR16224]] - part 4 of 5 Commit bitcoin/bitcoin@e95e658 Depend on D7997 Test Plan: Proofreading (minor documentation change) Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7998
Summary: This concludes backport of Core [[bitcoin/bitcoin#16224 | PR16224]] - part 5 of 5 Depends on D7998 Commit bitcoin/bitcoin@18bd83b Test Plan: `ninja && ninja check` Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7999
18bd83b util: Cleanup translation.h (Hennadii Stepanov) e95e658 doc: Do not translate technical or extremely rare errors (Hennadii Stepanov) 7e923d4 Make InitError bilingual (Hennadii Stepanov) 917ca93 Make ThreadSafe{MessageBox|Question} bilingual (Hennadii Stepanov) 23b9fa2 gui: Add detailed text to BitcoinGUI::message (Hennadii Stepanov) Pull request description: This is an alternative to bitcoin#15340 (it works with the `Chain` interface; see: bitcoin#15340 (comment)). Refs: - bitcoin#16218 (partial fix) - bitcoin#15894 (comment) This PR: - makes GUI error messages bilingual: user's native language + untranslated (i.e. English) - insures that only untranslated messages are written to the debug log file and to `stderr` (that is not the case on master). If a translated string is unavailable only an English string appears to a user. Here are some **examples** (updated):   * `qt5ct: using qt5ct plugin` message is my local environment specific; please ignore it. --- Note for reviewers: `InitWarning()` is out of this PR scope. ACKs for top commit: Sjors: re-tACK 18bd83b MarcoFalke: ACK 18bd83b 🐦 Tree-SHA512: 3cc8ec44f84403e54b57d11714c86b0855ed90eb794b5472e432005073354b9e3f7b4e8e7bf347a4c21be47299dbc7170f2d0c4b80e308205ff09596e55a4f96 # Conflicts: # src/dashd.cpp # src/httpserver.cpp # src/index/base.cpp # src/init.cpp # src/interfaces/chain.cpp # src/interfaces/chain.h # src/interfaces/node.cpp # src/net.h # src/qt/bitcoingui.cpp # src/ui_interface.h # src/wallet/init.cpp # src/wallet/load.cpp
18bd83b util: Cleanup translation.h (Hennadii Stepanov) e95e658 doc: Do not translate technical or extremely rare errors (Hennadii Stepanov) 7e923d4 Make InitError bilingual (Hennadii Stepanov) 917ca93 Make ThreadSafe{MessageBox|Question} bilingual (Hennadii Stepanov) 23b9fa2 gui: Add detailed text to BitcoinGUI::message (Hennadii Stepanov) Pull request description: This is an alternative to bitcoin#15340 (it works with the `Chain` interface; see: bitcoin#15340 (comment)). Refs: - bitcoin#16218 (partial fix) - bitcoin#15894 (comment) This PR: - makes GUI error messages bilingual: user's native language + untranslated (i.e. English) - insures that only untranslated messages are written to the debug log file and to `stderr` (that is not the case on master). If a translated string is unavailable only an English string appears to a user. Here are some **examples** (updated):   * `qt5ct: using qt5ct plugin` message is my local environment specific; please ignore it. --- Note for reviewers: `InitWarning()` is out of this PR scope. ACKs for top commit: Sjors: re-tACK 18bd83b MarcoFalke: ACK 18bd83b 🐦 Tree-SHA512: 3cc8ec44f84403e54b57d11714c86b0855ed90eb794b5472e432005073354b9e3f7b4e8e7bf347a4c21be47299dbc7170f2d0c4b80e308205ff09596e55a4f96 # Conflicts: # src/dashd.cpp # src/httpserver.cpp # src/index/base.cpp # src/init.cpp # src/interfaces/chain.cpp # src/interfaces/chain.h # src/interfaces/node.cpp # src/net.h # src/qt/bitcoingui.cpp # src/ui_interface.h # src/wallet/init.cpp # src/wallet/load.cpp
This is an alternative to #15340 (it works with the
Chaininterface; see: #15340 (comment)).Refs:
This PR:
stderr(that is not the case on master).If a translated string is unavailable only an English string appears to a user.
Here are some examples (updated):
qt5ct: using qt5ct pluginmessage is my local environment specific; please ignore it.Note for reviewers:
InitWarning()is out of this PR scope.