37
37
#include < QDateTime>
38
38
#include < QFont>
39
39
#include < QKeyEvent>
40
+ #include < QLatin1String>
40
41
#include < QMenu>
41
42
#include < QMessageBox>
42
43
#include < QScreen>
43
44
#include < QScrollBar>
44
45
#include < QSettings>
45
46
#include < QString>
47
+ #include < QStringBuilder>
46
48
#include < QStringList>
47
49
#include < QTime>
48
50
#include < QTimer>
@@ -53,6 +55,9 @@ const int INITIAL_TRAFFIC_GRAPH_MINS = 30;
53
55
const QSize FONT_RANGE (4 , 40 );
54
56
const char fontSizeSettingsKey[] = " consoleFontSize" ;
55
57
58
+ const QLatin1String COLON_SPACE{" : " };
59
+ const QLatin1String SPACE{" " };
60
+
56
61
const struct {
57
62
const char *url;
58
63
const char *source;
@@ -463,16 +468,18 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
463
468
464
469
constexpr QChar nonbreaking_hyphen (8209 );
465
470
const std::vector<QString> CONNECTION_TYPE_DOC{
466
- tr (" Inbound: initiated by peer" ),
467
- tr (" Outbound Full Relay: default" ),
468
- tr (" Outbound Block Relay: does not relay transactions or addresses" ),
469
- tr (" Outbound Manual: added using RPC %1 or %2/%3 configuration options" )
471
+ // : The connection direction (Inbound/Outbound) is also used in ConnectionTypeToQString() and PeerTableModel::data().
472
+ // : The connection types (Full Relay, Block Relay, Manual, Feeler, Address Fetch) are also used in ConnectionTypeToQString().
473
+ tr (" Inbound" ) % COLON_SPACE % tr (" initiated by peer" ),
474
+ tr (" Outbound" ) % SPACE % tr (" Full Relay" ) % COLON_SPACE % tr (" default" ),
475
+ tr (" Outbound" ) % SPACE % tr (" Block Relay" ) % COLON_SPACE % tr (" does not relay transactions or addresses" ),
476
+ tr (" Outbound" ) % SPACE % tr (" Manual" ) % COLON_SPACE % tr (" added using RPC %1 or %2/%3 configuration options" )
470
477
.arg (" addnode" )
471
- .arg (QString (nonbreaking_hyphen) + " addnode" )
472
- .arg (QString (nonbreaking_hyphen) + " connect" ),
473
- tr (" Outbound Feeler: short-lived, for testing addresses" ),
474
- tr (" Outbound Address Fetch: short-lived, for soliciting addresses" )};
475
- const QString list{" <ul><li>" + Join (CONNECTION_TYPE_DOC, QString (" </li><li>" )) + " </li></ul>" };
478
+ .arg (QString (nonbreaking_hyphen) % " addnode" )
479
+ .arg (QString (nonbreaking_hyphen) % " connect" ),
480
+ tr (" Outbound" ) % SPACE % tr ( " Feeler" ) % COLON_SPACE % tr ( " short-lived, for testing addresses" ),
481
+ tr (" Outbound" ) % SPACE % tr ( " Address Fetch" ) % COLON_SPACE % tr ( " short-lived, for soliciting addresses" )};
482
+ const QString list{" <ul><li>" % Join (CONNECTION_TYPE_DOC, QString (" </li><li>" )) % " </li></ul>" };
476
483
ui->peerConnectionTypeLabel ->setToolTip (ui->peerConnectionTypeLabel ->toolTip ().arg (list));
477
484
const QString hb_list{" <ul><li>\" "
478
485
+ ts.to + " \" – " + tr (" we selected the peer for high bandwidth relay" ) + " </li><li>\" "
0 commit comments