NOISSUE Don't translate logged entries
This commit is contained in:
parent
c0f72488d0
commit
e148cfbbfd
@ -15,7 +15,7 @@ void CreateGameFolders::executeTask()
|
|||||||
if(!FS::ensureFolderPathExists(minecraftInstance->gameRoot()))
|
if(!FS::ensureFolderPathExists(minecraftInstance->gameRoot()))
|
||||||
{
|
{
|
||||||
emit logLine("Couldn't create the main game folder", MessageLevel::Error);
|
emit logLine("Couldn't create the main game folder", MessageLevel::Error);
|
||||||
emitFailed("Couldn't create the main game folder");
|
emitFailed(tr("Couldn't create the main game folder"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,9 +66,9 @@ void DirectJavaLaunch::executeTask()
|
|||||||
auto realWrapperCommand = QStandardPaths::findExecutable(wrapperCommand);
|
auto realWrapperCommand = QStandardPaths::findExecutable(wrapperCommand);
|
||||||
if (realWrapperCommand.isEmpty())
|
if (realWrapperCommand.isEmpty())
|
||||||
{
|
{
|
||||||
QString reason = tr("The wrapper command \"%1\" couldn't be found.").arg(wrapperCommand);
|
const char *reason = QT_TR_NOOP("The wrapper command \"%1\" couldn't be found.");
|
||||||
emit logLine(reason, MessageLevel::Fatal);
|
emit logLine(QString(reason).arg(wrapperCommand), MessageLevel::Fatal);
|
||||||
emitFailed(reason);
|
emitFailed(tr(reason).arg(wrapperCommand));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit logLine("Wrapper command is:\n" + wrapperCommandStr + "\n\n", MessageLevel::MultiMC);
|
emit logLine("Wrapper command is:\n" + wrapperCommandStr + "\n\n", MessageLevel::MultiMC);
|
||||||
@ -87,18 +87,17 @@ void DirectJavaLaunch::on_state(LoggedProcess::State state)
|
|||||||
{
|
{
|
||||||
case LoggedProcess::FailedToStart:
|
case LoggedProcess::FailedToStart:
|
||||||
{
|
{
|
||||||
//: Error message displayed if instace can't start
|
//: Error message displayed if instance can't start
|
||||||
QString reason = tr("Could not launch minecraft!");
|
const char *reason = QT_TR_NOOP("Could not launch minecraft!");
|
||||||
emit logLine(reason, MessageLevel::Fatal);
|
emit logLine(reason, MessageLevel::Fatal);
|
||||||
emitFailed(reason);
|
emitFailed(tr(reason));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case LoggedProcess::Aborted:
|
case LoggedProcess::Aborted:
|
||||||
case LoggedProcess::Crashed:
|
case LoggedProcess::Crashed:
|
||||||
|
|
||||||
{
|
{
|
||||||
m_parent->setPid(-1);
|
m_parent->setPid(-1);
|
||||||
emitFailed("Game crashed.");
|
emitFailed(tr("Game crashed."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case LoggedProcess::Finished:
|
case LoggedProcess::Finished:
|
||||||
@ -108,7 +107,7 @@ void DirectJavaLaunch::on_state(LoggedProcess::State state)
|
|||||||
auto exitCode = m_process.exitCode();
|
auto exitCode = m_process.exitCode();
|
||||||
if(exitCode != 0)
|
if(exitCode != 0)
|
||||||
{
|
{
|
||||||
emitFailed("Game crashed.");
|
emitFailed(tr("Game crashed."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//FIXME: make this work again
|
//FIXME: make this work again
|
||||||
@ -118,7 +117,7 @@ void DirectJavaLaunch::on_state(LoggedProcess::State state)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LoggedProcess::Running:
|
case LoggedProcess::Running:
|
||||||
emit logLine(tr("Minecraft process ID: %1\n\n").arg(m_process.processId()), MessageLevel::MultiMC);
|
emit logLine(QString("Minecraft process ID: %1\n\n").arg(m_process.processId()), MessageLevel::MultiMC);
|
||||||
m_parent->setPid(m_process.processId());
|
m_parent->setPid(m_process.processId());
|
||||||
m_parent->instance()->setLastLaunch();
|
m_parent->instance()->setLastLaunch();
|
||||||
break;
|
break;
|
||||||
|
@ -94,9 +94,9 @@ void ExtractNatives::executeTask()
|
|||||||
{
|
{
|
||||||
if(!unzipNatives(source, outputPath, jniHackEnabled, nativeOpenAL, nativeGLFW))
|
if(!unzipNatives(source, outputPath, jniHackEnabled, nativeOpenAL, nativeGLFW))
|
||||||
{
|
{
|
||||||
auto reason = tr("Couldn't extract native jar '%1' to destination '%2'").arg(source, outputPath);
|
const char *reason = QT_TR_NOOP("Couldn't extract native jar '%1' to destination '%2'");
|
||||||
emit logLine(reason, MessageLevel::Fatal);
|
emit logLine(QString(reason).arg(source, outputPath), MessageLevel::Fatal);
|
||||||
emitFailed(reason);
|
emitFailed(tr(reason).arg(source, outputPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emitSucceeded();
|
emitSucceeded();
|
||||||
|
@ -118,9 +118,9 @@ void LauncherPartLaunch::executeTask()
|
|||||||
auto realWrapperCommand = QStandardPaths::findExecutable(wrapperCommand);
|
auto realWrapperCommand = QStandardPaths::findExecutable(wrapperCommand);
|
||||||
if (realWrapperCommand.isEmpty())
|
if (realWrapperCommand.isEmpty())
|
||||||
{
|
{
|
||||||
QString reason = tr("The wrapper command \"%1\" couldn't be found.").arg(wrapperCommand);
|
const char *reason = QT_TR_NOOP("The wrapper command \"%1\" couldn't be found.");
|
||||||
emit logLine(reason, MessageLevel::Fatal);
|
emit logLine(QString(reason).arg(wrapperCommand), MessageLevel::Fatal);
|
||||||
emitFailed(reason);
|
emitFailed(tr(reason).arg(wrapperCommand));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit logLine("Wrapper command is:\n" + wrapperCommandStr + "\n\n", MessageLevel::MultiMC);
|
emit logLine("Wrapper command is:\n" + wrapperCommandStr + "\n\n", MessageLevel::MultiMC);
|
||||||
@ -140,17 +140,16 @@ void LauncherPartLaunch::on_state(LoggedProcess::State state)
|
|||||||
case LoggedProcess::FailedToStart:
|
case LoggedProcess::FailedToStart:
|
||||||
{
|
{
|
||||||
//: Error message displayed if instace can't start
|
//: Error message displayed if instace can't start
|
||||||
QString reason = tr("Could not launch minecraft!");
|
const char *reason = QT_TR_NOOP("Could not launch minecraft!");
|
||||||
emit logLine(reason, MessageLevel::Fatal);
|
emit logLine(reason, MessageLevel::Fatal);
|
||||||
emitFailed(reason);
|
emitFailed(tr(reason));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case LoggedProcess::Aborted:
|
case LoggedProcess::Aborted:
|
||||||
case LoggedProcess::Crashed:
|
case LoggedProcess::Crashed:
|
||||||
|
|
||||||
{
|
{
|
||||||
m_parent->setPid(-1);
|
m_parent->setPid(-1);
|
||||||
emitFailed("Game crashed.");
|
emitFailed(tr("Game crashed."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case LoggedProcess::Finished:
|
case LoggedProcess::Finished:
|
||||||
@ -160,7 +159,7 @@ void LauncherPartLaunch::on_state(LoggedProcess::State state)
|
|||||||
auto exitCode = m_process.exitCode();
|
auto exitCode = m_process.exitCode();
|
||||||
if(exitCode != 0)
|
if(exitCode != 0)
|
||||||
{
|
{
|
||||||
emitFailed("Game crashed.");
|
emitFailed(tr("Game crashed."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//FIXME: make this work again
|
//FIXME: make this work again
|
||||||
@ -170,7 +169,7 @@ void LauncherPartLaunch::on_state(LoggedProcess::State state)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LoggedProcess::Running:
|
case LoggedProcess::Running:
|
||||||
emit logLine(tr("Minecraft process ID: %1\n\n").arg(m_process.processId()), MessageLevel::MultiMC);
|
emit logLine(QString("Minecraft process ID: %1\n\n").arg(m_process.processId()), MessageLevel::MultiMC);
|
||||||
m_parent->setPid(m_process.processId());
|
m_parent->setPid(m_process.processId());
|
||||||
m_parent->instance()->setLastLaunch();
|
m_parent->instance()->setLastLaunch();
|
||||||
// send the launch script to the launcher part
|
// send the launch script to the launcher part
|
||||||
|
@ -236,15 +236,15 @@ void LogPage::on_btnPaste_clicked()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
//FIXME: turn this into a proper task and move the upload logic out of GuiUtil!
|
//FIXME: turn this into a proper task and move the upload logic out of GuiUtil!
|
||||||
m_model->append(MessageLevel::MultiMC, tr("MultiMC: Log upload triggered at: %1").arg(QDateTime::currentDateTime().toString(Qt::RFC2822Date)));
|
m_model->append(MessageLevel::MultiMC, QString("MultiMC: Log upload triggered at: %1").arg(QDateTime::currentDateTime().toString(Qt::RFC2822Date)));
|
||||||
auto url = GuiUtil::uploadPaste(m_model->toPlainText(), this);
|
auto url = GuiUtil::uploadPaste(m_model->toPlainText(), this);
|
||||||
if(!url.isEmpty())
|
if(!url.isEmpty())
|
||||||
{
|
{
|
||||||
m_model->append(MessageLevel::MultiMC, tr("MultiMC: Log uploaded to: %1").arg(url));
|
m_model->append(MessageLevel::MultiMC, QString("MultiMC: Log uploaded to: %1").arg(url));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_model->append(MessageLevel::Error, tr("MultiMC: Log upload failed!"));
|
m_model->append(MessageLevel::Error, "MultiMC: Log upload failed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user