translation of all project, and new translation mechanism
This commit is contained in:
+3
-13
@@ -1,6 +1,6 @@
|
||||
#include "zlibreference.h"
|
||||
#include "localization.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QProcessEnvironment>
|
||||
@@ -12,15 +12,6 @@
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
QString translate(const char *text)
|
||||
{
|
||||
return QCoreApplication::translate("ZlibReference", text);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
bool ZlibReference::systemIsZlibNg()
|
||||
{
|
||||
#if defined(Q_OS_LINUX)
|
||||
@@ -80,8 +71,7 @@ bool ZlibReference::applyTo(QProcessEnvironment &env, QString *note)
|
||||
const QString path = bundledPath();
|
||||
if (path.isEmpty()) {
|
||||
if (note)
|
||||
*note = translate("В системе zlib-ng, а эталонный libz.so.1 рядом с лаунчером "
|
||||
"не найден — установщик почти наверняка не сойдётся по sha1.");
|
||||
*note = Loc::text("zlib.warning.referenceMissing");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -89,7 +79,7 @@ bool ZlibReference::applyTo(QProcessEnvironment &env, QString *note)
|
||||
const QString existing = env.value(QStringLiteral("LD_PRELOAD"));
|
||||
env.insert(QStringLiteral("LD_PRELOAD"), existing.isEmpty() ? path : path + u':' + existing);
|
||||
if (note)
|
||||
*note = translate("Системный zlib-ng подменён эталонным zlib: %1")
|
||||
*note = Loc::text("zlib.status.preloaded")
|
||||
.arg(QDir::toNativeSeparators(path));
|
||||
return true;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user