From 107977f3d103d403624be6b9ef889e4c86937c2a Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 12 Dec 2022 23:10:03 +0100 Subject: [PATCH] fix: update source strings Signed-off-by: Sefa Eyeoglu --- launcher/ui/pages/instance/ManagedPackPage.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/launcher/ui/pages/instance/ManagedPackPage.cpp b/launcher/ui/pages/instance/ManagedPackPage.cpp index 7a0d234c..183de589 100644 --- a/launcher/ui/pages/instance/ManagedPackPage.cpp +++ b/launcher/ui/pages/instance/ManagedPackPage.cpp @@ -223,17 +223,16 @@ void ModrinthManagedPackPage::parseManagedPack() ui->versionsComboBox->blockSignals(false); for (auto version : m_pack.versions) { - QString name; + QString name = version.version; if (!version.name.contains(version.version)) name = QString("%1 — %2").arg(version.name, version.version); - else - name = version.name; // NOTE: the id from version isn't the same id in the modpack format spec... // e.g. HexMC's 4.4.0 has versionId 4.0.0 in the modpack index.............. if (version.version == m_inst->getManagedPackVersionName()) - name.append(tr(" (Current)")); + name = tr("%1 (Current)").arg(name); + ui->versionsComboBox->addItem(name, QVariant(version.id)); } @@ -370,12 +369,10 @@ void FlameManagedPackPage::parseManagedPack() ui->versionsComboBox->blockSignals(false); for (auto version : m_pack.versions) { - QString name; - - name = version.version; + QString name = version.version; if (version.fileId == m_inst->getManagedPackVersionID().toInt()) - name.append(tr(" (Current)")); + name = tr("%1 (Current)").arg(name); ui->versionsComboBox->addItem(name, QVariant(version.fileId)); }