WEditorProperties: Mark strings as translatable

This commit is contained in:
Lioncash 2020-06-28 06:57:39 -04:00
parent d5f7699f34
commit 719fed015e
1 changed files with 13 additions and 13 deletions

View File

@ -6,21 +6,21 @@ WEditorProperties::WEditorProperties(QWidget *pParent)
: QWidget(pParent) : QWidget(pParent)
{ {
mpInstanceInfoLabel = new QLabel; mpInstanceInfoLabel = new QLabel;
mpInstanceInfoLabel->setText("<i>[No selection]</i>"); mpInstanceInfoLabel->setText(tr("<i>[No selection]</i>"));
mpInstanceInfoLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); mpInstanceInfoLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
mpInstanceInfoLayout = new QHBoxLayout; mpInstanceInfoLayout = new QHBoxLayout;
mpInstanceInfoLayout->addWidget(mpInstanceInfoLabel); mpInstanceInfoLayout->addWidget(mpInstanceInfoLabel);
mpActiveCheckBox = new QCheckBox; mpActiveCheckBox = new QCheckBox;
mpActiveCheckBox->setToolTip("Active"); mpActiveCheckBox->setToolTip(tr("Active"));
mpInstanceNameLineEdit = new QLineEdit; mpInstanceNameLineEdit = new QLineEdit;
mpInstanceNameLineEdit->setToolTip("Instance Name"); mpInstanceNameLineEdit->setToolTip(tr("Instance Name"));
mpNameLayout = new QHBoxLayout; mpNameLayout = new QHBoxLayout;
mpNameLayout->addWidget(mpActiveCheckBox); mpNameLayout->addWidget(mpActiveCheckBox);
mpNameLayout->addWidget(mpInstanceNameLineEdit); mpNameLayout->addWidget(mpInstanceNameLineEdit);
mpLayersLabel = new QLabel; mpLayersLabel = new QLabel;
mpLayersLabel->setText("Layer:"); mpLayersLabel->setText(tr("Layer:"));
mpLayersLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); mpLayersLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
mpLayersComboBox = new QComboBox; mpLayersComboBox = new QComboBox;
mpLayersComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); mpLayersComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
@ -109,12 +109,12 @@ void WEditorProperties::OnSelectionModified()
if (pSelection->IsEmpty()) if (pSelection->IsEmpty())
{ {
mpInstanceInfoLabel->setText("<i>[No selection]</i>"); mpInstanceInfoLabel->setText(tr("<i>[No selection]</i>"));
mpInstanceNameLineEdit->clear(); mpInstanceNameLineEdit->clear();
} }
else if (mpDisplayNode) else if (mpDisplayNode)
{ {
mpInstanceInfoLabel->setText("[Light]"); mpInstanceInfoLabel->setText(tr("[Light]"));
mpInstanceNameLineEdit->setText(TO_QSTRING(mpDisplayNode->Name())); mpInstanceNameLineEdit->setText(TO_QSTRING(mpDisplayNode->Name()));
} }
else else
@ -131,13 +131,13 @@ void WEditorProperties::OnSelectionModified()
CScriptNode *pScript = static_cast<CScriptNode*>(mpDisplayNode); CScriptNode *pScript = static_cast<CScriptNode*>(mpDisplayNode);
CInstanceID InstanceID = pScript->Instance()->InstanceID(); CInstanceID InstanceID = pScript->Instance()->InstanceID();
TString ObjectType = pScript->Template()->Name(); TString ObjectType = pScript->Template()->Name();
mpInstanceInfoLabel->setText(QString("[%1] [%2]"). mpInstanceInfoLabel->setText(tr("[%1] [%2]")
arg( TO_QSTRING(ObjectType) ). .arg(TO_QSTRING(ObjectType))
arg( TO_QSTRING(TString::HexString(InstanceID, 8, false)) )); .arg(TO_QSTRING(TString::HexString(InstanceID, 8, false))));
mpInstanceInfoLabel->setToolTip(QString("[Layer: %1] [Area: %2] [ID: %3]"). mpInstanceInfoLabel->setToolTip(tr("[Layer: %1] [Area: %2] [ID: %3]")
arg( InstanceID.Layer() ). .arg(InstanceID.Layer())
arg( InstanceID.Area() ). .arg(InstanceID.Area())
arg( TO_QSTRING(TString::HexString(InstanceID.Id(), 4, false)) )); .arg(TO_QSTRING(TString::HexString(InstanceID.Id(), 4, false))));
UpdatePropertyValues(); UpdatePropertyValues();
} }