GH-1701 Check job size for translation

This commit is contained in:
janrupf 2019-06-19 15:06:05 +02:00 committed by Petr Mrázek
parent ce12f1a734
commit 320637e8dc

View File

@ -131,7 +131,14 @@ void DownloadTask::processDownloadedVersionInfo()
QObject::connect(netJob.get(), &NetJob::progress, this, &DownloadTask::fileDownloadProgressChanged); QObject::connect(netJob.get(), &NetJob::progress, this, &DownloadTask::fileDownloadProgressChanged);
QObject::connect(netJob.get(), &NetJob::failed, this, &DownloadTask::fileDownloadFailed); QObject::connect(netJob.get(), &NetJob::failed, this, &DownloadTask::fileDownloadFailed);
if(netJob->size() == 1) // Translation issues... see https://github.com/MultiMC/MultiMC5/issues/1701
{
setStatus(tr("Downloading one update file."));
}
else
{
setStatus(tr("Downloading %1 update files.").arg(QString::number(netJob->size()))); setStatus(tr("Downloading %1 update files.").arg(QString::number(netJob->size())));
}
qDebug() << "Begin downloading update files to" << m_updateFilesDir.path(); qDebug() << "Begin downloading update files to" << m_updateFilesDir.path();
m_filesNetJob = netJob; m_filesNetJob = netJob;
m_filesNetJob->start(); m_filesNetJob->start();