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

@@ -289,7 +289,7 @@ public:
layout->setContentsMargins(4, 4, 4, 4);
layout->setSpacing(4);
QPushButton* createBtn = new QPushButton("Create Blueprint", this);
QPushButton* createBtn = new QPushButton(tr("Create Blueprint"), this);
createBtn->setFixedHeight(36);
layout->addWidget(createBtn);
@@ -308,7 +308,7 @@ public:
connect(createBtn, &QPushButton::clicked, this, [this]() {
bool ok = false;
const QString name = QInputDialog::getText(
this, "Create Blueprint", "Blueprint name:",
this, tr("Create Blueprint"), tr("Blueprint name:"),
QLineEdit::Normal, QString(), &ok);
if (!ok || name.trimmed().isEmpty()) { return; }
@@ -398,7 +398,7 @@ ShipLayoutDialog::ShipLayoutDialog(const GameConfig* config,
, m_removeButton(nullptr)
, m_gridWidget(nullptr)
{
setWindowTitle("Configure Ship Layout");
setWindowTitle(tr("Configure Ship Layout"));
setModal(true);
// Find the ship's layout grid.
@@ -482,7 +482,7 @@ ShipLayoutDialog::ShipLayoutDialog(const GameConfig* config,
this, &ShipLayoutDialog::onModuleButtonClicked);
// Remove button.
m_removeButton = new QPushButton("Remove", this);
m_removeButton = new QPushButton(tr("Remove"), this);
m_removeButton->setCheckable(true);
m_removeButton->setFixedHeight(48);
if (col > 0)
@@ -513,8 +513,8 @@ ShipLayoutDialog::ShipLayoutDialog(const GameConfig* config,
// Confirm / Cancel buttons.
QHBoxLayout* bottomBar = new QHBoxLayout();
QPushButton* confirmBtn = new QPushButton("Confirm", this);
QPushButton* cancelBtn = new QPushButton("Cancel", this);
QPushButton* confirmBtn = new QPushButton(tr("Confirm"), this);
QPushButton* cancelBtn = new QPushButton(tr("Cancel"), this);
bottomBar->addWidget(confirmBtn);
bottomBar->addWidget(cancelBtn);
rightLayout->addLayout(bottomBar);