Skip to content

Commit

Permalink
qt: Do not use QObject::tr plural syntax for numbers with a unit symbol
Browse files Browse the repository at this point in the history
This is useless and unnecessarily burdensome for translators.
  • Loading branch information
hebasto committed Apr 25, 2021
1 parent c4571a0 commit 3adde72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qt/intro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable

void Intro::UpdateFreeSpaceLabel()
{
QString freeString = tr("%n GB of free space available", "", m_bytes_available / GB_BYTES);
QString freeString = tr("%1 GB of free space available").arg(m_bytes_available / GB_BYTES);
if (m_bytes_available < m_required_space_gb * GB_BYTES) {
freeString += " " + tr("(of %n GB needed)", "", m_required_space_gb);
freeString += " " + tr("(of %1 GB needed)").arg(m_required_space_gb);
ui->freeSpace->setStyleSheet("QLabel { color: #800000 }");
} else if (m_bytes_available / GB_BYTES - m_required_space_gb < 10) {
freeString += " " + tr("(%n GB needed for full chain)", "", m_required_space_gb);
freeString += " " + tr("(%1 GB needed for full chain)").arg(m_required_space_gb);
ui->freeSpace->setStyleSheet("QLabel { color: #999900 }");
} else {
ui->freeSpace->setStyleSheet("");
Expand Down

0 comments on commit 3adde72

Please sign in to comment.