wrap UI strings with tr()
This commit is contained in:
@@ -21,8 +21,8 @@ HeaderBar::HeaderBar(QWidget* parent)
|
||||
layout->setSpacing(8);
|
||||
|
||||
m_timeLabel = new QLabel("00:00", this);
|
||||
m_blocksLabel = new QLabel("Blocks: 0", this);
|
||||
m_bossLabel = new QLabel("Boss Wave #1 Next boss: 5:00", this);
|
||||
m_blocksLabel = new QLabel(tr("Blocks: 0"), this);
|
||||
m_bossLabel = new QLabel(tr("Boss Wave #1 Next boss: 5:00"), this);
|
||||
layout->addWidget(m_timeLabel);
|
||||
layout->addWidget(m_blocksLabel);
|
||||
layout->addStretch();
|
||||
@@ -57,14 +57,14 @@ void HeaderBar::onStateUpdated(Tick tick, int buildingBlocks, double gameSpeed,
|
||||
.arg(minutes, 2, 10, QChar('0'))
|
||||
.arg(seconds, 2, 10, QChar('0')));
|
||||
|
||||
m_blocksLabel->setText(QString("Blocks: %1").arg(buildingBlocks));
|
||||
m_blocksLabel->setText(tr("Blocks: %1").arg(buildingBlocks));
|
||||
|
||||
const int bossSeconds = static_cast<int>(ticksToSeconds(
|
||||
bossCountdownTicks > 0 ? bossCountdownTicks : 0));
|
||||
const int bossMin = bossSeconds / 60;
|
||||
const int bossSec = bossSeconds % 60;
|
||||
m_bossLabel->setText(
|
||||
QString("Boss Wave #%1 Next boss: %2:%3")
|
||||
tr("Boss Wave #%1 Next boss: %2:%3")
|
||||
.arg(bossCounter)
|
||||
.arg(bossMin)
|
||||
.arg(bossSec, 2, 10, QChar('0')));
|
||||
|
||||
Reference in New Issue
Block a user