Skip to content

Commit 0f035c1

Browse files
committed
RPCConsole::updateDetailWidget: convert strings to translated strings
and in the touched lines: - replace 2 occurrences of `== ""` with `isEmpty()` - replace an unneeded `+=` with `=`
1 parent e491174 commit 0f035c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/qt/rpcconsole.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,11 +1114,11 @@ void RPCConsole::updateDetailWidget()
11141114
peerAddrDetails += "<br />" + tr("via %1").arg(QString::fromStdString(stats->nodeStats.addrLocal));
11151115
ui->peerHeading->setText(peerAddrDetails);
11161116
ui->peerServices->setText(GUIUtil::formatServicesStr(stats->nodeStats.nServices));
1117-
ui->peerRelayTxes->setText(stats->nodeStats.fRelayTxes ? "Yes" : "No");
1117+
ui->peerRelayTxes->setText(stats->nodeStats.fRelayTxes ? tr("Yes") : tr("No"));
11181118
QString bip152_hb_settings;
1119-
if (stats->nodeStats.m_bip152_highbandwidth_to) bip152_hb_settings += "To";
1120-
if (stats->nodeStats.m_bip152_highbandwidth_from) bip152_hb_settings += (bip152_hb_settings == "" ? "From" : "/From");
1121-
if (bip152_hb_settings == "") bip152_hb_settings = "No";
1119+
if (stats->nodeStats.m_bip152_highbandwidth_to) bip152_hb_settings = tr("To");
1120+
if (stats->nodeStats.m_bip152_highbandwidth_from) bip152_hb_settings += (bip152_hb_settings.isEmpty() ? tr("From") : QLatin1Char('/') + tr("From"));
1121+
if (bip152_hb_settings.isEmpty()) bip152_hb_settings = tr("No");
11221122
ui->peerHighBandwidth->setText(bip152_hb_settings);
11231123
const int64_t time_now{GetSystemTimeInSeconds()};
11241124
ui->peerConnTime->setText(GUIUtil::formatDurationStr(time_now - stats->nodeStats.nTimeConnected));

0 commit comments

Comments
 (0)