diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2022-05-15 21:41:31 +0000 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-03-31 12:21:51 +0100 |
commit | 08b8b287d3762dd6d4be09fad0b71c4cacfe6658 (patch) | |
tree | af746f84645c6e3de689bfe806ed8f2890f7bb83 | |
parent | dacc322be10c6709338d2f0d7f5c4366609ad1a0 (diff) |
Bugfix: GUI: Debug info: Use correct "kB" case for small mempool sizes, and make translation-friendly
-rw-r--r-- | src/qt/rpcconsole.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 0e712062af..76500a4a36 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -984,10 +984,11 @@ void RPCConsole::setMempoolSize(long numberOfTxs, size_t dynUsage) { ui->mempoolNumberTxs->setText(QString::number(numberOfTxs)); - if (dynUsage < 1000000) - ui->mempoolSize->setText(QString::number(dynUsage/1000.0, 'f', 2) + " KB"); - else - ui->mempoolSize->setText(QString::number(dynUsage/1000000.0, 'f', 2) + " MB"); + if (dynUsage < 1000000) { + ui->mempoolSize->setText(QObject::tr("%1 kB").arg(dynUsage / 1000.0, 0, 'f', 2)); + } else { + ui->mempoolSize->setText(QObject::tr("%1 MB").arg(dynUsage / 1000000.0, 0, 'f', 2)); + } } void RPCConsole::on_lineEdit_returnPressed() |