Skip to content

Conversation

@PastaPastaPasta
Copy link
Member

@PastaPastaPasta PastaPastaPasta commented Apr 5, 2022

based on #4735

Added a few additional commits from @kittywhiskers after reviewing them

@PastaPastaPasta PastaPastaPasta requested review from UdjinM6 and kwvg April 5, 2022 20:23
Copy link
Collaborator

@kwvg kwvg left a comment

Choose a reason for hiding this comment

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

See changes, rebase PR after #4735 gets merged

@github-actions
Copy link

github-actions bot commented Apr 7, 2022

This pull request has conflicts, please rebase.

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):

  ![Screenshot from 2020-04-24 17-08-37](https://user-images.githubusercontent.com/32963518/80222043-e2458780-864e-11ea-83fc-197b7121dba5.png)

  ![Screenshot from 2020-04-24 17-12-17](https://user-images.githubusercontent.com/32963518/80222051-e5407800-864e-11ea-92f7-dfef1144becd.png)

  * `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
@PastaPastaPasta PastaPastaPasta force-pushed the backport-16224-18922-18907 branch from 8f46218 to 54a5232 Compare April 7, 2022 15:41
@PastaPastaPasta PastaPastaPasta marked this pull request as ready for review April 7, 2022 16:04
@PastaPastaPasta PastaPastaPasta force-pushed the backport-16224-18922-18907 branch from 438c818 to d3b0cbc Compare April 7, 2022 16:13
jonasschnelli and others added 6 commits April 7, 2022 11:28
…bug.log

78be8d9 util: Drop OpOriginal() and OpTranslated() (Hennadii Stepanov)
da16f95 gui: Do not translate InitWarning messages in debug.log (Hennadii Stepanov)
4c9b9a4 util: Enhance Join() (Hennadii Stepanov)
fe05dd0 util: Enhance bilingual_str (Hennadii Stepanov)

Pull request description:

  This PR forces the `bitcoin-qt` to write `InitWarning()` messages to the `debug.log` file in untranslated form, i.e., in English.

  On master (376294c):
  ```
  $ ./src/qt/bitcoin-qt -lang=nl -debug=vladidation -printtoconsole | grep 'vladi'
  Warning: Niet-ondersteunde logcategorie -debug=vladidation.
  2020-05-09T12:39:59Z Warning: Niet-ondersteunde logcategorie -debug=vladidation.
  2020-05-09T12:40:02Z Command-line arg: debug="vladidation"
  ```

  With this PR:
  ```
  $ ./src/qt/bitcoin-qt -lang=nl -debug=vladidation -printtoconsole | grep 'vladi'
  Warning: Unsupported logging category -debug=vladidation.
  2020-05-09T12:42:04Z Warning: Unsupported logging category -debug=vladidation.
  2020-05-09T12:42:35Z Command-line arg: debug="vladidation"
  ```

  ![Screenshot from 2020-05-09 15-42-31](https://user-images.githubusercontent.com/32963518/81474073-c7a50e00-920b-11ea-8775-c41122dacafe.png)

  Related to bitcoin#16218.

ACKs for top commit:
  laanwj:
    ACK 78be8d9
  jonasschnelli:
    utACK 78be8d9
  MarcoFalke:
    ACK 78be8d9 📢

Tree-SHA512: 48e9ecd23c4dd8ec262e3eb94f8e30944bcc9c6c163245fb837b2e0c484d4d0b4f47f7abc638c14edc27d635d340ba3ee4ba4506b062399e9cf59a1564c98755

# Conflicts:
#	src/wallet/load.cpp
… and instead error

d0ea9ba walletdb: Don't remove database transaction logs and instead error (Andrew Chow)

Pull request description:

  Instead of removing the database transaction logs and retrying the
  wallet loading, just return an error message to the user. Additionally,
  speciically for DB_RUNRECOVERY, notify the user that this could be due
  to different BDB versions.

  Kind of implements the suggestion from bitcoin#18870 (comment)

ACKs for top commit:
  Sjors:
    re-utACK d0ea9ba
  ryanofsky:
    Code review ACK d0ea9ba. Only changes since last review are rebase and expanding error and commit messages.

Tree-SHA512: f6e67dc70f58188742a5c8af7cdc63a2b58779aa0d26ae7f1e75805a239f1a342433860e5a238d6577fae5ab04b9d15e7f11c55b867065dfd13781a6a62e4958
@PastaPastaPasta PastaPastaPasta force-pushed the backport-16224-18922-18907 branch from d3b0cbc to 7adf0c4 Compare April 7, 2022 16:29
@PastaPastaPasta PastaPastaPasta changed the title Backport 16224 18922 18907 Backport 16224 18922 18907 and more Apr 7, 2022
kwvg
kwvg previously approved these changes Apr 8, 2022
Copy link
Collaborator

@kwvg kwvg left a comment

Choose a reason for hiding this comment

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

utACK

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

UdjinM6 and others added 4 commits April 8, 2022 14:12
…FromFile

fa61365 wallet: Translate all initErrors in CreateWalletFromFile (MarcoFalke)
fa70d19 util: Make util/error bilingual_str (refactor) (MarcoFalke)

Pull request description:

  The translations are going to close in three days (bitcoin#15940), so I am submitting this as a standalone pull request.

  Those changes are part of a bugfix bitcoin#16661, which includes a test. The first change (the refactor) is required, the second commit is not. I am happy to drop it, if needed.

ACKs for top commit:
  laanwj:
    utACK fa61365
  hebasto:
    ACK fa61365, I have tested the code on Linux Mint 19.2.

Tree-SHA512: a7616cc38b9ffd301c6b915ea808a65815c3d97e9f57ec091772eb260e5cf0d75a13a6e4dfa3913e236833677c7929b9a748cb7d7a0e406d51749944b614e11b
should avoiid changing translated strings when possible
should NOT translate debug.log messsages
@PastaPastaPasta
Copy link
Member Author

IMO UdjinM6@2a5a1db should be it's own PR. Applied the other commits

Copy link
Collaborator

@kwvg kwvg left a comment

Choose a reason for hiding this comment

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

re-utACK

@UdjinM6 UdjinM6 added this to the 18 milestone Apr 11, 2022
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@UdjinM6 UdjinM6 merged commit f9381f1 into dashpay:develop Apr 11, 2022
@PastaPastaPasta PastaPastaPasta deleted the backport-16224-18922-18907 branch April 17, 2023 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants