aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-02-23 18:09:51 +0100
committerJon Atack <jon@atack.com>2021-02-28 19:13:53 +0100
commit0f035c12fb0a5c5f98fc2b9907d475c08018df36 (patch)
treed1b69830cb58495c5eebb5d81bbe5a1389441fe3 /src/qt
parente49117470b77fb7d53be122c6490ba163c6e304d (diff)
downloadbitcoin-0f035c12fb0a5c5f98fc2b9907d475c08018df36.tar.xz
RPCConsole::updateDetailWidget: convert strings to translated strings
and in the touched lines: - replace 2 occurrences of `== ""` with `isEmpty()` - replace an unneeded `+=` with `=`
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/rpcconsole.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 5acf8b1cf0..593374b03c 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -1114,11 +1114,11 @@ void RPCConsole::updateDetailWidget()
peerAddrDetails += "<br />" + tr("via %1").arg(QString::fromStdString(stats->nodeStats.addrLocal));
ui->peerHeading->setText(peerAddrDetails);
ui->peerServices->setText(GUIUtil::formatServicesStr(stats->nodeStats.nServices));
- ui->peerRelayTxes->setText(stats->nodeStats.fRelayTxes ? "Yes" : "No");
+ ui->peerRelayTxes->setText(stats->nodeStats.fRelayTxes ? tr("Yes") : tr("No"));
QString bip152_hb_settings;
- if (stats->nodeStats.m_bip152_highbandwidth_to) bip152_hb_settings += "To";
- if (stats->nodeStats.m_bip152_highbandwidth_from) bip152_hb_settings += (bip152_hb_settings == "" ? "From" : "/From");
- if (bip152_hb_settings == "") bip152_hb_settings = "No";
+ if (stats->nodeStats.m_bip152_highbandwidth_to) bip152_hb_settings = tr("To");
+ if (stats->nodeStats.m_bip152_highbandwidth_from) bip152_hb_settings += (bip152_hb_settings.isEmpty() ? tr("From") : QLatin1Char('/') + tr("From"));
+ if (bip152_hb_settings.isEmpty()) bip152_hb_settings = tr("No");
ui->peerHighBandwidth->setText(bip152_hb_settings);
const int64_t time_now{GetSystemTimeInSeconds()};
ui->peerConnTime->setText(GUIUtil::formatDurationStr(time_now - stats->nodeStats.nTimeConnected));