fix: fix translations for mod updater
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
c86610b917
commit
28ae5d710e
@ -123,7 +123,7 @@ void FlameCheckUpdate::executeTask()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
setStatus(tr("Getting API response from CurseForge for '%1'").arg(mod->name()));
|
setStatus(tr("Getting API response from CurseForge for '%1'...").arg(mod->name()));
|
||||||
setProgress(i++, m_mods.size());
|
setProgress(i++, m_mods.size());
|
||||||
|
|
||||||
auto latest_ver = api.getLatestVersion({ mod->metadata()->project_id.toString(), m_game_versions, m_loaders });
|
auto latest_ver = api.getLatestVersion({ mod->metadata()->project_id.toString(), m_game_versions, m_loaders });
|
||||||
@ -145,7 +145,7 @@ void FlameCheckUpdate::executeTask()
|
|||||||
if (latest_ver.downloadUrl.isEmpty() && latest_ver.fileId != mod->metadata()->file_id) {
|
if (latest_ver.downloadUrl.isEmpty() && latest_ver.fileId != mod->metadata()->file_id) {
|
||||||
auto pack = getProjectInfo(latest_ver);
|
auto pack = getProjectInfo(latest_ver);
|
||||||
auto recover_url = QString("%1/download/%2").arg(pack.websiteUrl, latest_ver.fileId.toString());
|
auto recover_url = QString("%1/download/%2").arg(pack.websiteUrl, latest_ver.fileId.toString());
|
||||||
emit checkFailed(mod, tr("Mod has a new update available, but is opted-out on CurseForge"), recover_url);
|
emit checkFailed(mod, tr("Mod has a new update available, but is not downloadable using CurseForge."), recover_url);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -158,8 +158,8 @@ void ModUpdateDialog::checkCandidates()
|
|||||||
if (!reason.isEmpty())
|
if (!reason.isEmpty())
|
||||||
text += tr("Reason: %1").arg(reason) + "<br>";
|
text += tr("Reason: %1").arg(reason) + "<br>";
|
||||||
if (!recover_url.isEmpty())
|
if (!recover_url.isEmpty())
|
||||||
text += tr("Possible solution: ") + tr("Getting the latest version manually:") + "<br>" +
|
text += tr("Possible solution: Getting the latest version manually:<br>"
|
||||||
QString("<a href='%1'>").arg(recover_url.toString()) + recover_url.toString() + "</a><br>";
|
"<a href='%1'>%1</a><br>").arg(recover_url.toString());
|
||||||
text += "<br>";
|
text += "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,9 +241,9 @@ auto ModUpdateDialog::ensureMetadata() -> bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
ChooseProviderDialog chooser(this);
|
ChooseProviderDialog chooser(this);
|
||||||
chooser.setDescription(tr("This mod (%1) does not have a metadata yet. We need to create one in order to keep relevant "
|
chooser.setDescription(tr("The mod '%1' does not have a metadata yet. We need to generate it in order to track relevant "
|
||||||
"information on how to update this "
|
"information on how to update this mod. "
|
||||||
"mod. To do this, please select a mod provider from which we can search for updates for %1.")
|
"To do this, please select a mod provider which we can use to check for updates for this mod.")
|
||||||
.arg(candidate->name()));
|
.arg(candidate->name()));
|
||||||
auto confirmed = chooser.exec() == QDialog::DialogCode::Accepted;
|
auto confirmed = chooser.exec() == QDialog::DialogCode::Accepted;
|
||||||
|
|
||||||
@ -330,7 +330,7 @@ void ModUpdateDialog::onMetadataFailed(Mod* mod, bool try_others, ModPlatform::P
|
|||||||
|
|
||||||
m_second_try_metadata->addTask(task);
|
m_second_try_metadata->addTask(task);
|
||||||
} else {
|
} else {
|
||||||
QString reason{ tr("Didn't find a valid version on the selected mod provider(s)") };
|
QString reason{ tr("Couldn't find a valid version on the selected mod provider(s)") };
|
||||||
|
|
||||||
m_failed_metadata.append({mod, reason});
|
m_failed_metadata.append({mod, reason});
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@
|
|||||||
<string>Check for &Updates</string>
|
<string>Check for &Updates</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>"Tries to find / update all selected resources (all resources if none is selected)"</string>
|
<string>Try to check or update all selected resources (all resources if none are selected)</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -80,7 +80,7 @@ ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel>
|
|||||||
|
|
||||||
connect(ui->actionDownloadItem, &QAction::triggered, this, &ModFolderPage::installMods);
|
connect(ui->actionDownloadItem, &QAction::triggered, this, &ModFolderPage::installMods);
|
||||||
|
|
||||||
ui->actionUpdateItem->setToolTip(tr("Tries to find / update all selected mods (all mods if none is selected)"));
|
ui->actionUpdateItem->setToolTip(tr("Try to check or update all selected mods (all mods if none are selected)"));
|
||||||
ui->actionsToolbar->insertActionAfter(ui->actionAddItem, ui->actionUpdateItem);
|
ui->actionsToolbar->insertActionAfter(ui->actionAddItem, ui->actionUpdateItem);
|
||||||
connect(ui->actionUpdateItem, &QAction::triggered, this, &ModFolderPage::updateMods);
|
connect(ui->actionUpdateItem, &QAction::triggered, this, &ModFolderPage::updateMods);
|
||||||
|
|
||||||
@ -190,10 +190,15 @@ void ModFolderPage::updateMods()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (update_dialog.noUpdates()) {
|
if (update_dialog.noUpdates()) {
|
||||||
CustomMessageBox::selectable(this, tr("Update checker"),
|
QString message{ tr("'%1' is up-to-date! :)").arg(mods_list.front()->name()) };
|
||||||
(mods_list.size() == 1)
|
if (mods_list.size() > 1) {
|
||||||
? tr("'%1' is up-to-date! :)").arg(mods_list.front()->name())
|
if (use_all) {
|
||||||
: tr("All %1mods are up-to-date! :)").arg(use_all ? "" : (tr("selected") + " ")))
|
message = tr("All mods are up-to-date! :)");
|
||||||
|
} else {
|
||||||
|
message = tr("All selected mods are up-to-date! :)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CustomMessageBox::selectable(this, tr("Update checker"), message)
|
||||||
->exec();
|
->exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user