make error message for temporary and archive translatable

This commit is contained in:
FlexBy420 2024-11-19 18:24:49 +01:00
parent cc86e01df9
commit c828220dc1

View file

@ -1097,14 +1097,14 @@ int main(int argc, char** argv)
// Check temporary directories
for (const QString& path : QStandardPaths::standardLocations(QStandardPaths::StandardLocation::TempLocation))
{
if (Emu.IsPathInsideDir(emu_dir, path.toStdString()))
{
report_fatal_error(fmt::format(
"RPCS3 should never be run from a temporary location!\n"
"Please install RPCS3 in a persistent location.\n"
"Current location:\n%s", emu_dir));
return 1;
}
{
report_fatal_error(fmt::format(
QObject::tr("RPCS3 should never be run from a temporary location!\n"
"Please install RPCS3 in a persistent location.\n"
"Current location:\n%1").toStdString(),
QString::fromStdString(emu_dir).toStdString()));
return 1;
}
}
// Check nonsensical archive locations
@ -1113,9 +1113,11 @@ int main(int argc, char** argv)
if (emu_dir.find(expr) != umax)
{
report_fatal_error(fmt::format(
"RPCS3 should never be run from an archive!\n"
"Please install RPCS3 in a persistent location.\n"
"Current location:\n%s", emu_dir));
QObject::tr("RPCS3 should never be run from an archive!\n"
"Please install RPCS3 in a persistent location.\n"
"Current location:\n%1")
.toStdString(),
QString::fromStdString(emu_dir).toStdString()));
return 1;
}
}