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
+3 -8
View File
@@ -1,6 +1,6 @@
#include "launcherpaths.h"
#include "localization.h"
#include <QCoreApplication>
#include <QDir>
#include <QFileInfo>
@@ -8,11 +8,6 @@ namespace {
const QString kFolderName = QStringLiteral("galeonLauncher");
QString translate(const char *text)
{
return QCoreApplication::translate("LauncherPaths", text);
}
} // namespace
QString LauncherPaths::containerDir()
@@ -129,7 +124,7 @@ bool LauncherPaths::ensureRootExists(QString *error)
for (const QString &path : required) {
if (!QDir().mkpath(path)) {
if (error)
*error = translate("не удалось создать %1").arg(QDir::toNativeSeparators(path));
*error = Loc::text("storage.error.createFailed").arg(QDir::toNativeSeparators(path));
return false;
}
@@ -138,7 +133,7 @@ bool LauncherPaths::ensureRootExists(QString *error)
const QFileInfo info(path);
if (!info.isDir() || !info.isWritable()) {
if (error)
*error = translate("нет доступа на запись в %1").arg(QDir::toNativeSeparators(path));
*error = Loc::text("storage.error.notWritable").arg(QDir::toNativeSeparators(path));
return false;
}
}