Skip to content

Commit d04ebda

Browse files
committed
gui: improve connection type translations and translator comments
1 parent 1c46329 commit d04ebda

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/qt/guiutil.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,12 @@ QString ConnectionTypeToQString(ConnectionType conn_type, bool prepend_direction
666666
{
667667
QString prefix;
668668
if (prepend_direction) {
669+
//: Connection direction. Also used in CONNECTION_TYPE_DOC and PeerTableModel::data().
669670
prefix = (conn_type == ConnectionType::INBOUND) ? QObject::tr("Inbound") : QObject::tr("Outbound") + " ";
670671
}
671672
switch (conn_type) {
672673
case ConnectionType::INBOUND: return prefix;
674+
//: The connection types (Full Relay, Block Relay, Manual, Feeler, Address Fetch) are also used in CONNECTION_TYPE_DOC.
673675
case ConnectionType::OUTBOUND_FULL_RELAY: return prefix + QObject::tr("Full Relay");
674676
case ConnectionType::BLOCK_RELAY: return prefix + QObject::tr("Block Relay");
675677
case ConnectionType::MANUAL: return prefix + QObject::tr("Manual");

src/qt/rpcconsole.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,15 +462,17 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
462462

463463
constexpr QChar nonbreaking_hyphen(8209);
464464
const std::vector<QString> CONNECTION_TYPE_DOC{
465-
tr("Inbound: initiated by peer"),
466-
tr("Outbound Full Relay: default"),
467-
tr("Outbound Block Relay: does not relay transactions or addresses"),
468-
tr("Outbound Manual: added using RPC %1 or %2/%3 configuration options")
465+
//: The connection direction (Inbound/Outbound) is also used in ConnectionTypeToQString() and PeerTableModel::data().
466+
//: The connection types (Full Relay, Block Relay, Manual, Feeler, Address Fetch) are also used in ConnectionTypeToQString().
467+
tr("Inbound") + ": " + tr("initiated by peer"),
468+
tr("Outbound") + " " + tr("Full Relay") + ": " + tr("default"),
469+
tr("Outbound") + " " + tr("Block Relay") + ": " + tr("does not relay transactions or addresses"),
470+
tr("Outbound") + " " + tr("Manual") + ": " + tr("added using RPC %1 or %2/%3 configuration options")
469471
.arg("addnode")
470472
.arg(QString(nonbreaking_hyphen) + "addnode")
471473
.arg(QString(nonbreaking_hyphen) + "connect"),
472-
tr("Outbound Feeler: short-lived, for testing addresses"),
473-
tr("Outbound Address Fetch: short-lived, for soliciting addresses")};
474+
tr("Outbound") + " " + tr("Feeler") + ": " + tr("short-lived, for testing addresses"),
475+
tr("Outbound") + " " + tr("Address Fetch") + ": " + tr("short-lived, for soliciting addresses")};
474476
const QString list{"<ul><li>" + Join(CONNECTION_TYPE_DOC, QString("</li><li>")) + "</li></ul>"};
475477
ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(list));
476478
const QString hb_list{"<ul><li>\""

0 commit comments

Comments
 (0)