diff --git a/src/Editor/WorldEditor/CLinkDialog.cpp b/src/Editor/WorldEditor/CLinkDialog.cpp index 1e0c09c9..cfb7f545 100644 --- a/src/Editor/WorldEditor/CLinkDialog.cpp +++ b/src/Editor/WorldEditor/CLinkDialog.cpp @@ -134,26 +134,26 @@ void CLinkDialog::UpdateOkEnabled() void CLinkDialog::UpdateSenderNameLabel() { - QString Text = (mpSender ? TO_QSTRING(mpSender->InstanceName()) : "No sender"); + const QString Text = (mpSender ? TO_QSTRING(mpSender->InstanceName()) : tr("No sender")); ui->SenderNameLabel->setToolTip(Text); - QFontMetrics Metrics(ui->SenderNameLabel->font()); - QString Elided = Metrics.elidedText(Text, Qt::ElideRight, ui->SenderNameLabel->width() - (ui->SenderNameLabel->frameWidth() * 2)); + const QFontMetrics Metrics(ui->SenderNameLabel->font()); + const QString Elided = Metrics.elidedText(Text, Qt::ElideRight, ui->SenderNameLabel->width() - (ui->SenderNameLabel->frameWidth() * 2)); ui->SenderNameLabel->setText(Elided); - ui->SenderGroupBox->setTitle(mpSender ? "Sender - " + TO_QSTRING(mpSender->Template()->Name()) : "Sender"); + ui->SenderGroupBox->setTitle(mpSender ? tr("Sender - %1").arg(TO_QSTRING(mpSender->Template()->Name())) : tr("Sender")); } void CLinkDialog::UpdateReceiverNameLabel() { - QString Text = (mpReceiver ? TO_QSTRING(mpReceiver->InstanceName()) : "No receiver"); + const QString Text = (mpReceiver ? TO_QSTRING(mpReceiver->InstanceName()) : tr("No receiver")); ui->ReceiverNameLabel->setToolTip(Text); - QFontMetrics Metrics(ui->ReceiverNameLabel->font()); - QString Elided = Metrics.elidedText(Text, Qt::ElideRight, ui->ReceiverNameLabel->width() - (ui->ReceiverNameLabel->frameWidth() * 2)); + const QFontMetrics Metrics(ui->ReceiverNameLabel->font()); + const QString Elided = Metrics.elidedText(Text, Qt::ElideRight, ui->ReceiverNameLabel->width() - (ui->ReceiverNameLabel->frameWidth() * 2)); ui->ReceiverNameLabel->setText(Elided); - ui->ReceiverGroupBox->setTitle(mpReceiver ? "Receiver - " + TO_QSTRING(mpReceiver->Template()->Name()) : "Receiver"); + ui->ReceiverGroupBox->setTitle(mpReceiver ? tr("Receiver - %1").arg(TO_QSTRING(mpReceiver->Template()->Name())) : tr("Receiver")); } // ************ PUBLIC SLOTS ************