Skip to content

Commit 0819d50

Browse files
committed
qt: connection type translator comments
Introduce Qt translator comments for connection types.
1 parent 5c041cb commit 0819d50

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/qt/guiutil.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,11 @@ QString ConnectionTypeToQString(ConnectionType conn_type, bool prepend_direction
671671
{
672672
QString prefix;
673673
if (prepend_direction) {
674-
prefix = (conn_type == ConnectionType::INBOUND) ? QObject::tr("Inbound") : QObject::tr("Outbound") + " ";
674+
prefix = (conn_type == ConnectionType::INBOUND) ?
675+
//: An Inbound Connection from a Peer.
676+
QObject::tr("Inbound") :
677+
//: An Outbound Connection to a Peer.
678+
QObject::tr("Outbound") + " ";
675679
}
676680
switch (conn_type) {
677681
case ConnectionType::INBOUND: return prefix;

src/qt/rpcconsole.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,14 +471,28 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
471471

472472
constexpr QChar nonbreaking_hyphen(8209);
473473
const std::vector<QString> CONNECTION_TYPE_DOC{
474+
//: Explanatory text for an Inbound peer connection.
474475
tr("Inbound: initiated by peer"),
476+
/*: Explanatory text for an Outbound peer connection which
477+
relays all network information. This is the default behavior for
478+
Outbound connections. */
475479
tr("Outbound Full Relay: default"),
480+
/*: Explanatory text for an Outbound peer connection which
481+
only relays network information about Blocks. */
476482
tr("Outbound Block Relay: does not relay transactions or addresses"),
483+
/*: Explanatory text for an Outbound peer connection which was
484+
established manually through one of several methods. The numbered
485+
arguments are stand-ins for the methods available to establish
486+
manual connections. */
477487
tr("Outbound Manual: added using RPC %1 or %2/%3 configuration options")
478488
.arg("addnode")
479489
.arg(QString(nonbreaking_hyphen) + "addnode")
480490
.arg(QString(nonbreaking_hyphen) + "connect"),
491+
/*: Explanatory text for a temporary Outbound peer connection which
492+
is used to test the validity of known addresses. */
481493
tr("Outbound Feeler: short-lived, for testing addresses"),
494+
/*: Explanatory text for an Outbound peer connection which is used
495+
to get addresses from a peer. */
482496
tr("Outbound Address Fetch: short-lived, for soliciting addresses")};
483497
const QString list{"<ul><li>" + Join(CONNECTION_TYPE_DOC, QString("</li><li>")) + "</li></ul>"};
484498
ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(list));

0 commit comments

Comments
 (0)