mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
af00598c9a
18bd83b1fee2eb47ed4ad05c91f2d6cc311fc9ad util: Cleanup translation.h (Hennadii Stepanov) e95e658b8ec6e02229691a1941d688e96d4df6af doc: Do not translate technical or extremely rare errors (Hennadii Stepanov) 7e923d47ba9891856b86bc9f718cf2f1f773bdf6 Make InitError bilingual (Hennadii Stepanov) 917ca93553917251e0fd59717a347c63cdfd8a14 Make ThreadSafe{MessageBox|Question} bilingual (Hennadii Stepanov) 23b9fa2e5ec0425980301d2eebad81e660a5ea39 gui: Add detailed text to BitcoinGUI::message (Hennadii Stepanov) Pull request description: This is an alternative to #15340 (it works with the `Chain` interface; see: https://github.com/bitcoin/bitcoin/pull/15340#issuecomment-502674004). Refs: - #16218 (partial fix) - https://github.com/bitcoin/bitcoin/pull/15894#issuecomment-487947077 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 18bd83b1fee2eb47ed4ad05c91f2d6cc311fc9ad MarcoFalke: ACK 18bd83b1fee2eb47ed4ad05c91f2d6cc311fc9ad 🐦 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
29 lines
1.1 KiB
C++
29 lines
1.1 KiB
C++
// Copyright (c) 2013-2014 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_NOUI_H
|
|
#define BITCOIN_NOUI_H
|
|
|
|
#include <string>
|
|
|
|
struct bilingual_str;
|
|
|
|
/** Non-GUI handler, which logs and prints messages. */
|
|
bool noui_ThreadSafeMessageBox(const bilingual_str& message, const std::string& caption, unsigned int style);
|
|
/** Non-GUI handler, which logs and prints questions. */
|
|
bool noui_ThreadSafeQuestion(const bilingual_str& /* ignored interactive message */, const std::string& message, const std::string& caption, unsigned int style);
|
|
/** Non-GUI handler, which only logs a message. */
|
|
void noui_InitMessage(const std::string& message);
|
|
|
|
/** Connect all bitcoind signal handlers */
|
|
void noui_connect();
|
|
|
|
/** Redirect all bitcoind signal handlers to LogPrintf. Used to check or suppress output during test runs that produce expected errors */
|
|
void noui_test_redirect();
|
|
|
|
/** Reconnects the regular Non-GUI handlers after having used noui_test_redirect */
|
|
void noui_reconnect();
|
|
|
|
#endif // BITCOIN_NOUI_H
|