translation of all project, and new translation mechanism

This commit is contained in:
2026-09-03 09:18:48 +03:00
parent 00e7c957e4
commit 01af372ef2
32 changed files with 2813 additions and 537 deletions
+5 -5
View File
@@ -1,4 +1,5 @@
#include "javalocator.h"
#include "localization.h"
#include "javaruntime.h"
@@ -173,7 +174,7 @@ QString JavaLocator::select(const QString &gameDir,
if (candidates.isEmpty()) {
if (error)
*error = QObject::tr("Java по указанному пути не найдена: %1")
*error = Loc::text("java.error.notAtPath")
.arg(QDir::toNativeSeparators(preferred));
return {};
}
@@ -182,7 +183,7 @@ QString JavaLocator::select(const QString &gameDir,
if (candidates.isEmpty()) {
if (error)
*error = QObject::tr("Java не найдена. Установите JDK %1 или укажите путь в настройках.")
*error = Loc::text("java.error.notFound")
.arg(requiredMajor);
return {};
}
@@ -201,12 +202,11 @@ QString JavaLocator::select(const QString &gameDir,
if (error) {
*error = bestBelowMajor > 0
? QObject::tr("Для этой версии нужна Java %1 или новее, найдена только Java %2 (%3).")
? Loc::text("java.error.tooOld")
.arg(requiredMajor)
.arg(bestBelowMajor)
.arg(QDir::toNativeSeparators(bestBelow))
: QObject::tr("Не удалось определить версию установленной Java. "
"Укажите путь к JDK %1 в настройках.")
: Loc::text("java.error.versionUnknown")
.arg(requiredMajor);
}
return {};