translation of all project, and new translation mechanism
This commit is contained in:
+3
-8
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user