wrap UI strings with tr()

This commit is contained in:
2026-06-05 16:31:54 +02:00
parent 900b5fdec1
commit 17e9913c98
9 changed files with 72 additions and 72 deletions

View File

@@ -63,7 +63,7 @@ BuildButtonGrid::BuildButtonGrid(const GameConfig* config, QWidget* parent)
m_costs[def.type] = def.cost;
const QString label = displayName(def.id)
+ "\n" + QString::number(def.cost) + " Blocks";
+ "\n" + tr("%1 Blocks").arg(def.cost);
QPushButton* btn = new QPushButton(label, this);
btn->setCheckable(true);
btn->setFixedHeight(48);
@@ -83,7 +83,7 @@ BuildButtonGrid::BuildButtonGrid(const GameConfig* config, QWidget* parent)
}
connect(mapper, qOverload<int>(&QSignalMapper::mapped), this, &BuildButtonGrid::onBuildButton);
m_demolishButton = new QPushButton("Demolish", this);
m_demolishButton = new QPushButton(tr("Demolish"), this);
m_demolishButton->setCheckable(true);
m_demolishButton->setFixedHeight(48);
layout->addWidget(m_demolishButton, row, col);