wrap UI strings with tr()
This commit is contained in:
@@ -30,11 +30,11 @@ void ArenaWidget::buildLayout(const std::string& arenaName)
|
||||
|
||||
titleRow->addStretch();
|
||||
|
||||
m_inspectButton = new QPushButton("Inspect", this);
|
||||
m_inspectButton = new QPushButton(tr("Inspect"), this);
|
||||
connect(m_inspectButton, &QPushButton::clicked, this, &ArenaWidget::inspectRequested);
|
||||
titleRow->addWidget(m_inspectButton);
|
||||
|
||||
m_startButton = new QPushButton("Start", this);
|
||||
m_startButton = new QPushButton(tr("Start"), this);
|
||||
connect(m_startButton, &QPushButton::clicked, this, &ArenaWidget::startRequested);
|
||||
titleRow->addWidget(m_startButton);
|
||||
|
||||
@@ -94,7 +94,7 @@ void ArenaWidget::updateStatus(const ArenaStatus& status)
|
||||
|
||||
if (status.finished && status.winnerTeam == ti)
|
||||
{
|
||||
header->setText("[WON] " + QString::fromStdString(team.name));
|
||||
header->setText(tr("[WON] %1").arg(QString::fromStdString(team.name)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -22,15 +22,15 @@ BalancingWindow::BalancingWindow(const BalancingConfig& balancingConfig,
|
||||
, m_inspectedArenaIndex(-1)
|
||||
{
|
||||
m_visuals = VisualsLoader::load(m_configDir + "/visuals.toml");
|
||||
setWindowTitle("DotaFactory — Balancing Tool");
|
||||
setWindowTitle(tr("DotaFactory — Balancing Tool"));
|
||||
resize(800, 600);
|
||||
|
||||
QVBoxLayout* mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
QHBoxLayout* buttonRow = new QHBoxLayout();
|
||||
m_reloadButton = new QPushButton("Reload Config", this);
|
||||
m_startAllButton = new QPushButton("Start All", this);
|
||||
m_reloadButton = new QPushButton(tr("Reload Config"), this);
|
||||
m_startAllButton = new QPushButton(tr("Start All"), this);
|
||||
buttonRow->addWidget(m_reloadButton);
|
||||
buttonRow->addWidget(m_startAllButton);
|
||||
buttonRow->addStretch();
|
||||
@@ -146,7 +146,7 @@ void BalancingWindow::reloadConfig()
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
QMessageBox::critical(this, "Reload Failed", QString::fromStdString(e.what()));
|
||||
QMessageBox::critical(this, tr("Reload Failed"), QString::fromStdString(e.what()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ InspectWindow::InspectWindow(ArenaSimulation* sim, const VisualsConfig* visuals,
|
||||
: QWidget(parent)
|
||||
, m_sim(sim)
|
||||
{
|
||||
setWindowTitle(QString("Inspect \u2014 %1").arg(QString::fromStdString(arenaName)));
|
||||
setWindowTitle(tr("Inspect \u2014 %1").arg(QString::fromStdString(arenaName)));
|
||||
resize(900, 700);
|
||||
setAttribute(Qt::WA_DeleteOnClose, false);
|
||||
|
||||
@@ -163,7 +163,7 @@ void InspectWindow::updateInfoPanel(const ArenaStatus& status)
|
||||
|
||||
if (status.finished && status.winnerTeam == ti)
|
||||
{
|
||||
header->setText("[WON] " + QString::fromStdString(team.name));
|
||||
header->setText(tr("[WON] %1").arg(QString::fromStdString(team.name)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user