NOISSUE Fix string formatting issues
This allows translations to have more control over the output :)
This commit is contained in:
parent
64617201b0
commit
524fc5b6ec
@ -73,13 +73,13 @@ void PackInstallTask::onDownloadSucceeded()
|
|||||||
auto vlist = ENV.metadataIndex()->get("net.minecraft");
|
auto vlist = ENV.metadataIndex()->get("net.minecraft");
|
||||||
if(!vlist)
|
if(!vlist)
|
||||||
{
|
{
|
||||||
emitFailed(tr("Failed to get local metadata index for ") + "net.minecraft");
|
emitFailed(tr("Failed to get local metadata index for %1").arg("net.minecraft"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ver = vlist->getVersion(m_version.minecraft);
|
auto ver = vlist->getVersion(m_version.minecraft);
|
||||||
if (!ver) {
|
if (!ver) {
|
||||||
emitFailed(tr("Failed to get local metadata index for ") + "net.minecraft" + " " + m_version.minecraft);
|
emitFailed(tr("Failed to get local metadata index for '%1' v%2").arg("net.minecraft").arg(m_version.minecraft));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ver->load(Net::Mode::Online);
|
ver->load(Net::Mode::Online);
|
||||||
@ -141,7 +141,7 @@ QString PackInstallTask::getDirForModType(ModType type, QString raw)
|
|||||||
qWarning() << "Unsupported mod type: " + raw;
|
qWarning() << "Unsupported mod type: " + raw;
|
||||||
return Q_NULLPTR;
|
return Q_NULLPTR;
|
||||||
case ModType::Unknown:
|
case ModType::Unknown:
|
||||||
emitFailed(tr("Unknown mod type: ") + raw);
|
emitFailed(tr("Unknown mod type: %1").arg(raw));
|
||||||
return Q_NULLPTR;
|
return Q_NULLPTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ bool PackInstallTask::createLibrariesComponent(QString instanceRoot, std::shared
|
|||||||
break;
|
break;
|
||||||
case DownloadType::Browser:
|
case DownloadType::Browser:
|
||||||
case DownloadType::Unknown:
|
case DownloadType::Unknown:
|
||||||
emitFailed(tr("Unknown or unsupported download type: ") + lib.download_raw);
|
emitFailed(tr("Unknown or unsupported download type: %1").arg(lib.download_raw));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,13 +437,13 @@ void PackInstallTask::downloadMods()
|
|||||||
url = BuildConfig.ATL_DOWNLOAD_SERVER_URL + mod.url;
|
url = BuildConfig.ATL_DOWNLOAD_SERVER_URL + mod.url;
|
||||||
break;
|
break;
|
||||||
case DownloadType::Browser:
|
case DownloadType::Browser:
|
||||||
emitFailed(tr("Unsupported download type: ") + mod.download_raw);
|
emitFailed(tr("Unsupported download type: %1").arg(mod.download_raw));
|
||||||
return;
|
return;
|
||||||
case DownloadType::Direct:
|
case DownloadType::Direct:
|
||||||
url = mod.url;
|
url = mod.url;
|
||||||
break;
|
break;
|
||||||
case DownloadType::Unknown:
|
case DownloadType::Unknown:
|
||||||
emitFailed(tr("Unknown download type: ") + mod.download_raw);
|
emitFailed(tr("Unknown download type: %1").arg(mod.download_raw));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ void PackInstallTask::executeTask()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!found) {
|
if(!found) {
|
||||||
emitFailed("failed to find pack version " + m_version_name);
|
emitFailed(tr("Failed to find pack version %1").arg(m_version_name));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ void GAnalyticsWorker::postMessageFinished()
|
|||||||
int httpStausCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
int httpStausCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||||
if (httpStausCode < 200 || httpStausCode > 299)
|
if (httpStausCode < 200 || httpStausCode > 299)
|
||||||
{
|
{
|
||||||
logMessage(GAnalytics::Error, QString("Error posting message: %s").arg(reply->errorString()));
|
logMessage(GAnalytics::Error, QString("Error posting message: %1").arg(reply->errorString()));
|
||||||
|
|
||||||
// An error ocurred. Try sending later.
|
// An error ocurred. Try sending later.
|
||||||
m_timer.start();
|
m_timer.start();
|
||||||
|
Loading…
Reference in New Issue
Block a user