fix: addressing some of the issues identified
This commit is contained in:
parent
8d7cef2ad0
commit
2be9cf21ae
@ -45,17 +45,35 @@
|
|||||||
|
|
||||||
#define LISTEN(event) GFModuleListenEvent(GFGetModuleID(), DUP(event))
|
#define LISTEN(event) GFModuleListenEvent(GFGetModuleID(), DUP(event))
|
||||||
|
|
||||||
#define LOAD_TRANS(name) \
|
#define DEFINE_TRANSLATIONS_STRUCTURE(name) \
|
||||||
{ \
|
class GTrC { \
|
||||||
QFile f(QString(":/i18n/%2.%1.qm").arg(GFAppActiveLocale()).arg(name)); \
|
Q_DECLARE_TR_FUNCTIONS(GTrC) \
|
||||||
|
}; \
|
||||||
|
auto TranslatorDataReader(const char* p_l, char** p_d) -> int { \
|
||||||
|
auto locale = UDUP(p_l); \
|
||||||
|
QFile f(QString(":/i18n/%2.%1.qm").arg(locale).arg(#name)); \
|
||||||
if (f.exists() && f.open(QIODevice::ReadOnly)) { \
|
if (f.exists() && f.open(QIODevice::ReadOnly)) { \
|
||||||
FLOG_INFO("%3 loading, locale: %1, path: %2", GFAppActiveLocale(), \
|
|
||||||
f.fileName(), UDUP(GFGetModuleID())); \
|
|
||||||
auto b = f.readAll(); \
|
auto b = f.readAll(); \
|
||||||
GFAppRegisterTranslator(AllocBufferAndCopy(b), b.size()); \
|
*p_d = AllocBufferAndCopy(b); \
|
||||||
|
return b.size(); \
|
||||||
} \
|
} \
|
||||||
|
FLOG_WARN("%3 loading, locale: %1, not found", locale, f.fileName(), \
|
||||||
|
UDUP(GFGetModuleID())); \
|
||||||
|
*p_d = nullptr; \
|
||||||
|
return 0; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define REGISTER_TRANS_READER() \
|
||||||
|
GFAppRegisterTranslatorReader(GFGetModuleID(), TranslatorDataReader)
|
||||||
|
|
||||||
|
#define CONCATENATE_DETAIL(x, y) x##y
|
||||||
|
#define CONCATENATE(x, y) CONCATENATE_DETAIL(x, y)
|
||||||
|
#define GTRC_TR(name, src) CONCATENATE(GTrC_, name)::tr(src)
|
||||||
|
|
||||||
|
#define STRINGIFY(x) #x
|
||||||
|
#define TOSTRING(x) STRINGIFY(x)
|
||||||
|
#define GTRC_AS_STRING(name) TOSTRING(GTrC_##name)
|
||||||
|
|
||||||
#define EXECUTE_MODULE() \
|
#define EXECUTE_MODULE() \
|
||||||
auto GFExecuteModule(GFModuleEvent* p_event) -> int { \
|
auto GFExecuteModule(GFModuleEvent* p_event) -> int { \
|
||||||
auto event = ConvertEventToMap(p_event);
|
auto event = ConvertEventToMap(p_event);
|
||||||
@ -96,10 +114,29 @@ inline void MLogError(const QString& s) { GFModuleLogError(s.toUtf8()); }
|
|||||||
|
|
||||||
inline auto QStrDup(QString str) -> char* { return DUP(str.toUtf8()); }
|
inline auto QStrDup(QString str) -> char* { return DUP(str.toUtf8()); }
|
||||||
|
|
||||||
inline auto UnStrDup(const char* src) -> QString {
|
inline auto UnStrDup(const char* s) -> QString {
|
||||||
auto qt_str = QString::fromUtf8(src);
|
auto q_s = QString::fromUtf8(s == nullptr ? "" : s);
|
||||||
GFFreeMemory(static_cast<void*>(const_cast<char*>(src)));
|
if (s != nullptr) GFFreeMemory(static_cast<void*>(const_cast<char*>(s)));
|
||||||
return qt_str;
|
return q_s;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
auto FormatStringHelper(const QString& format, T arg) -> QString {
|
||||||
|
return format.arg(arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, typename... Args>
|
||||||
|
auto FormatStringHelper(const QString& format, T arg, Args... args) -> QString {
|
||||||
|
return FormatStringHelper(format.arg(arg), args...);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline auto FormatStringHelper(const QString& format) -> QString {
|
||||||
|
return format;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename... Args>
|
||||||
|
auto FormatString(const QString& format, Args... args) -> QString {
|
||||||
|
return FormatStringHelper(format, args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline auto QMapToMetaDataArray(const QMap<QString, QString>& map)
|
inline auto QMapToMetaDataArray(const QMap<QString, QString>& map)
|
||||||
@ -160,7 +197,10 @@ inline auto ConvertEventParamsToMap(GFModuleEventParam* params)
|
|||||||
GFModuleEventParam* last;
|
GFModuleEventParam* last;
|
||||||
|
|
||||||
while (current != nullptr) {
|
while (current != nullptr) {
|
||||||
param_map[current->name] = UDUP(current->value);
|
const auto name = UDUP(current->name);
|
||||||
|
const auto value = UDUP(current->value);
|
||||||
|
|
||||||
|
if (!name.isEmpty()) param_map[name] = value;
|
||||||
|
|
||||||
last = current;
|
last = current;
|
||||||
current = current->next;
|
current = current->next;
|
||||||
@ -306,22 +346,3 @@ inline auto CharArrayToQStringList(char** pl_components,
|
|||||||
GFFreeMemory(pl_components);
|
GFFreeMemory(pl_components);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
auto FormatStringHelper(const QString& format, T arg) -> QString {
|
|
||||||
return format.arg(arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, typename... Args>
|
|
||||||
auto FormatStringHelper(const QString& format, T arg, Args... args) -> QString {
|
|
||||||
return FormatStringHelper(format.arg(arg), args...);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline auto FormatStringHelper(const QString& format) -> QString {
|
|
||||||
return format;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename... Args>
|
|
||||||
auto FormatString(const QString& format, Args... args) -> QString {
|
|
||||||
return FormatStringHelper(format, args...);
|
|
||||||
}
|
|
||||||
|
@ -32,9 +32,6 @@
|
|||||||
#include "GFSDKBuildInfo.h"
|
#include "GFSDKBuildInfo.h"
|
||||||
|
|
||||||
#define GF_MODULE_API_DEFINE(id, name, ver, desc, author) \
|
#define GF_MODULE_API_DEFINE(id, name, ver, desc, author) \
|
||||||
class GTrC { \
|
|
||||||
Q_DECLARE_TR_FUNCTIONS(GTrC) \
|
|
||||||
}; \
|
|
||||||
auto GFGetModuleGFSDKVersion() -> const char* { \
|
auto GFGetModuleGFSDKVersion() -> const char* { \
|
||||||
return DUP(GF_SDK_VERSION_STR); \
|
return DUP(GF_SDK_VERSION_STR); \
|
||||||
} \
|
} \
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
# com.bktus.gpgfrontend.module.integrated.gnupg_info_gathering
|
# com.bktus.gpgfrontend.module.integrated.gnupg_info_gathering
|
||||||
|
|
||||||
|
set(INTEGRATED_MODULE_SOURCE "")
|
||||||
aux_source_directory(. INTEGRATED_MODULE_SOURCE)
|
aux_source_directory(. INTEGRATED_MODULE_SOURCE)
|
||||||
|
|
||||||
# define libgpgfrontend_module
|
# define libgpgfrontend_module
|
||||||
@ -38,13 +39,8 @@ install(TARGETS mod_gpg_info
|
|||||||
target_link_libraries(mod_gpg_info PRIVATE
|
target_link_libraries(mod_gpg_info PRIVATE
|
||||||
gpgfrontend_module_sdk)
|
gpgfrontend_module_sdk)
|
||||||
|
|
||||||
if(GPGFRONTEND_QT5_BUILD)
|
# link qt
|
||||||
# link Qt core
|
target_link_libraries(mod_gpg_info PRIVATE Qt::Core Qt::Widgets)
|
||||||
target_link_libraries(mod_gpg_info PRIVATE Qt5::Core Qt5::Widgets)
|
|
||||||
else()
|
|
||||||
# link Qt core
|
|
||||||
target_link_libraries(mod_gpg_info PRIVATE Qt6::Core Qt6::Widgets)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# using std c++ 17
|
# using std c++ 17
|
||||||
target_compile_features(mod_gpg_info PRIVATE cxx_std_17)
|
target_compile_features(mod_gpg_info PRIVATE cxx_std_17)
|
||||||
@ -60,5 +56,5 @@ set(TS_FILES "${LOCALE_TS_PATH}/ModuleGnuPGInfoGathering.en_US.ts"
|
|||||||
qt_add_translations(mod_gpg_info
|
qt_add_translations(mod_gpg_info
|
||||||
RESOURCE_PREFIX "/i18n"
|
RESOURCE_PREFIX "/i18n"
|
||||||
TS_FILES ${TS_FILES}
|
TS_FILES ${TS_FILES}
|
||||||
SOURCES ${MODULE_SOURCE_FILES}
|
SOURCES ${INTEGRATED_MODULE_SOURCE}
|
||||||
INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR})
|
INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR})
|
@ -50,6 +50,8 @@ GF_MODULE_API_DEFINE("com.bktus.gpgfrontend.module.gnupg_info_gathering",
|
|||||||
"GatherGnupgInfo", "1.0.0",
|
"GatherGnupgInfo", "1.0.0",
|
||||||
"Try gathering gnupg informations.", "Saturneric")
|
"Try gathering gnupg informations.", "Saturneric")
|
||||||
|
|
||||||
|
DEFINE_TRANSLATIONS_STRUCTURE(ModuleGnuPGInfoGathering);
|
||||||
|
|
||||||
extern auto CalculateBinaryChacksum(const QString &path)
|
extern auto CalculateBinaryChacksum(const QString &path)
|
||||||
-> std::optional<QString>;
|
-> std::optional<QString>;
|
||||||
|
|
||||||
@ -69,16 +71,23 @@ using Context = struct {
|
|||||||
GpgComponentInfo component_info;
|
GpgComponentInfo component_info;
|
||||||
};
|
};
|
||||||
|
|
||||||
auto GFRegisterModule() -> int { return 0; }
|
auto GFRegisterModule() -> int {
|
||||||
|
MLogDebug("gnupg info gathering module registering...");
|
||||||
|
|
||||||
|
REGISTER_TRANS_READER();
|
||||||
|
|
||||||
|
GFUIMountEntry(DUP("AboutDialogTabs"),
|
||||||
|
QMapToMetaDataArray({
|
||||||
|
{"TabTitle", GTrC::tr("GnuPG")},
|
||||||
|
}),
|
||||||
|
1, GnupgTabFactory);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
auto GFActiveModule() -> int {
|
auto GFActiveModule() -> int {
|
||||||
LISTEN("REQUEST_GATHERING_GNUPG_INFO");
|
LISTEN("REQUEST_GATHERING_GNUPG_INFO");
|
||||||
|
|
||||||
LOAD_TRANS("ModuleGnuPGInfoGathering");
|
|
||||||
|
|
||||||
GFUIMountEntry(DUP("AboutDialogTabs"),
|
|
||||||
QMapToMetaDataArray({{"TabTitle", GTrC::tr("GnuPG")}}), 1,
|
|
||||||
GnupgTabFactory);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +104,7 @@ END_EXECUTE_MODULE()
|
|||||||
auto GFDeactivateModule() -> int { return 0; }
|
auto GFDeactivateModule() -> int { return 0; }
|
||||||
|
|
||||||
auto GFUnregisterModule() -> int {
|
auto GFUnregisterModule() -> int {
|
||||||
MLogDebug("gnupg info gathering module unregistering");
|
MLogDebug("gnupg info gathering module unregistering...");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -118,10 +127,10 @@ auto StartGatheringGnuPGInfo() -> int {
|
|||||||
GFExecuteCommandSync(gpgconf_path, 1, argv, GetGpgComponentInfos, &context);
|
GFExecuteCommandSync(gpgconf_path, 1, argv, GetGpgComponentInfos, &context);
|
||||||
MLogDebug("load gnupg component info done.");
|
MLogDebug("load gnupg component info done.");
|
||||||
|
|
||||||
#ifdef QT5_BUILD
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 4)
|
||||||
QVector<GFCommandExecuteContext> exec_contexts;
|
|
||||||
#else
|
|
||||||
QList<GFCommandExecuteContext> exec_contexts;
|
QList<GFCommandExecuteContext> exec_contexts;
|
||||||
|
#else
|
||||||
|
QVector<GFCommandExecuteContext> exec_contexts;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char **argv_0 =
|
const char **argv_0 =
|
||||||
@ -277,7 +286,7 @@ void GetGpgComponentInfos(void *data, int exit_code, const char *out,
|
|||||||
auto component_desc = info_split_list[1].trimmed();
|
auto component_desc = info_split_list[1].trimmed();
|
||||||
auto component_path = info_split_list[2].trimmed();
|
auto component_path = info_split_list[2].trimmed();
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef __MINGW32__
|
||||||
// replace some special substrings on windows
|
// replace some special substrings on windows
|
||||||
// platform
|
// platform
|
||||||
component_path.replace("%3a", ":");
|
component_path.replace("%3a", ":");
|
||||||
@ -353,7 +362,7 @@ void GetGpgDirectoryInfos(void *, int exit_code, const char *out,
|
|||||||
auto configuration_name = info_split_list[0].trimmed();
|
auto configuration_name = info_split_list[0].trimmed();
|
||||||
auto configuration_value = info_split_list[1].trimmed();
|
auto configuration_value = info_split_list[1].trimmed();
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef __MINGW32__
|
||||||
// replace some special substrings on windows
|
// replace some special substrings on windows
|
||||||
// platform
|
// platform
|
||||||
configuration_value.replace("%3a", ":");
|
configuration_value.replace("%3a", ":");
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
# com.bktus.gpgfrontend.module.integrated.gnupg_info_gathering
|
# com.bktus.gpgfrontend.module.integrated.gnupg_info_gathering
|
||||||
|
|
||||||
|
set(INTEGRATED_MODULE_SOURCE "")
|
||||||
aux_source_directory(. INTEGRATED_MODULE_SOURCE)
|
aux_source_directory(. INTEGRATED_MODULE_SOURCE)
|
||||||
|
|
||||||
# define libgpgfrontend_module
|
# define libgpgfrontend_module
|
||||||
@ -38,13 +39,8 @@ install(TARGETS mod_paper_key
|
|||||||
target_link_libraries(mod_paper_key PRIVATE
|
target_link_libraries(mod_paper_key PRIVATE
|
||||||
gpgfrontend_module_sdk)
|
gpgfrontend_module_sdk)
|
||||||
|
|
||||||
if(GPGFRONTEND_QT5_BUILD)
|
# link qt
|
||||||
# link Qt core
|
target_link_libraries(mod_paper_key PRIVATE Qt::Core)
|
||||||
target_link_libraries(mod_paper_key PRIVATE Qt5::Core)
|
|
||||||
else()
|
|
||||||
# link Qt core
|
|
||||||
target_link_libraries(mod_paper_key PRIVATE Qt6::Core)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# using std c++ 17
|
# using std c++ 17
|
||||||
target_compile_features(mod_paper_key PRIVATE cxx_std_17)
|
target_compile_features(mod_paper_key PRIVATE cxx_std_17)
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
set(INTEGRATED_MODULE_SOURCE "")
|
||||||
aux_source_directory(. INTEGRATED_MODULE_SOURCE)
|
aux_source_directory(. INTEGRATED_MODULE_SOURCE)
|
||||||
|
|
||||||
# capslock
|
# capslock
|
||||||
@ -49,13 +50,8 @@ install(TARGETS mod_pinentry
|
|||||||
target_link_libraries(mod_pinentry PRIVATE
|
target_link_libraries(mod_pinentry PRIVATE
|
||||||
gpgfrontend_module_sdk)
|
gpgfrontend_module_sdk)
|
||||||
|
|
||||||
if(GPGFRONTEND_QT5_BUILD)
|
# link qt
|
||||||
# link Qt core
|
target_link_libraries(mod_pinentry PUBLIC Qt::Widgets)
|
||||||
target_link_libraries(mod_pinentry PUBLIC Qt5::Widgets)
|
|
||||||
else()
|
|
||||||
# link Qt core
|
|
||||||
target_link_libraries(mod_pinentry PUBLIC Qt6::Widgets)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# using std c++ 17
|
# using std c++ 17
|
||||||
target_compile_features(mod_pinentry PUBLIC cxx_std_17)
|
target_compile_features(mod_pinentry PUBLIC cxx_std_17)
|
||||||
|
@ -55,3 +55,7 @@ auto GpgPassphraseContext::GetPassphraseInfo() const -> QString {
|
|||||||
auto GpgPassphraseContext::IsPreWasBad() const -> bool { return prev_was_bad_; }
|
auto GpgPassphraseContext::IsPreWasBad() const -> bool { return prev_was_bad_; }
|
||||||
|
|
||||||
auto GpgPassphraseContext::IsAskForNew() const -> bool { return ask_for_new_; }
|
auto GpgPassphraseContext::IsAskForNew() const -> bool { return ask_for_new_; }
|
||||||
|
|
||||||
|
auto GpgPassphraseContext::IsSuccess() const -> bool { return success_; }
|
||||||
|
|
||||||
|
void GpgPassphraseContext::SetSuccess(bool success) { success_ = success; }
|
@ -42,6 +42,8 @@ class GpgPassphraseContext : public QObject {
|
|||||||
|
|
||||||
void SetPassphrase(const QString& passphrase);
|
void SetPassphrase(const QString& passphrase);
|
||||||
|
|
||||||
|
void SetSuccess(bool success);
|
||||||
|
|
||||||
[[nodiscard]] auto GetPassphrase() const -> QString;
|
[[nodiscard]] auto GetPassphrase() const -> QString;
|
||||||
|
|
||||||
[[nodiscard]] auto GetUidsInfo() const -> QString;
|
[[nodiscard]] auto GetUidsInfo() const -> QString;
|
||||||
@ -52,10 +54,13 @@ class GpgPassphraseContext : public QObject {
|
|||||||
|
|
||||||
[[nodiscard]] auto IsAskForNew() const -> bool;
|
[[nodiscard]] auto IsAskForNew() const -> bool;
|
||||||
|
|
||||||
|
[[nodiscard]] auto IsSuccess() const -> bool;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString passphrase_info_;
|
QString passphrase_info_;
|
||||||
QString uids_info_;
|
QString uids_info_;
|
||||||
QString passphrase_;
|
QString passphrase_;
|
||||||
bool prev_was_bad_;
|
bool prev_was_bad_;
|
||||||
bool ask_for_new_;
|
bool ask_for_new_;
|
||||||
|
bool success_;
|
||||||
};
|
};
|
||||||
|
@ -58,26 +58,37 @@ auto GFExecuteModule(GFModuleEvent *p_event) -> int {
|
|||||||
auto event = ConvertEventToMap(p_event);
|
auto event = ConvertEventToMap(p_event);
|
||||||
|
|
||||||
if (event["prev_was_bad"].isEmpty() || event["ask_for_new"].isEmpty()) {
|
if (event["prev_was_bad"].isEmpty() || event["ask_for_new"].isEmpty()) {
|
||||||
GFModuleTriggerModuleEventCallback(
|
CB(event, GFGetModuleID(),
|
||||||
ConvertMapToEvent(event), GFGetModuleID(),
|
{
|
||||||
ConvertMapToParams({{"ret", "-1"}, {"passphrase", ""}}));
|
{"ret", "-1"},
|
||||||
|
{"passphrase", ""},
|
||||||
|
});
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMetaObject::invokeMethod(
|
QMetaObject::invokeMethod(
|
||||||
QApplication::instance()->thread(), [p_event, event]() -> int {
|
QApplication::instance()->thread(), [event]() -> int {
|
||||||
auto *p = new RaisePinentry(
|
auto *p = new RaisePinentry(
|
||||||
nullptr,
|
nullptr,
|
||||||
SecureCreateQSharedObject<GpgPassphraseContext>(
|
SecureCreateQSharedObject<GpgPassphraseContext>(
|
||||||
event["uid_hint"], event["passphrase_info"],
|
event["uid_hint"], event["passphrase_info"],
|
||||||
event["prev_was_bad"].toInt(), event["ask_for_new"].toInt()));
|
event["prev_was_bad"].toInt(), event["ask_for_new"].toInt()));
|
||||||
|
|
||||||
QObject::connect(
|
QObject::connect(p, &RaisePinentry::SignalUserInputPassphraseCallback,
|
||||||
p, &RaisePinentry::SignalUserInputPassphraseCallback, p,
|
p, [event](QSharedPointer<GpgPassphraseContext> c) {
|
||||||
[event](const QSharedPointer<GpgPassphraseContext> &c) {
|
if (c) {
|
||||||
GFModuleTriggerModuleEventCallback(
|
CB(event, GFGetModuleID(),
|
||||||
ConvertMapToEvent(event), GFGetModuleID(),
|
{
|
||||||
ConvertMapToParams({{"passphrase", c->GetPassphrase()}}));
|
{"ret", "0"},
|
||||||
|
{"passphrase", c->GetPassphrase()},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
CB(event, GFGetModuleID(),
|
||||||
|
{
|
||||||
|
{"ret", "-1"},
|
||||||
|
{"passphrase", ""},
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
p->Exec();
|
p->Exec();
|
||||||
|
@ -90,12 +90,14 @@ auto RaisePinentry::Exec() -> int {
|
|||||||
bool ret = result != 0;
|
bool ret = result != 0;
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
emit SignalUserInputPassphraseCallback({});
|
context_->SetSuccess(false);
|
||||||
|
emit SignalUserInputPassphraseCallback(context_);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto pin = pinentry->pin().toUtf8();
|
auto pin = pinentry->pin().toUtf8();
|
||||||
|
|
||||||
|
context_->SetSuccess(true);
|
||||||
context_->SetPassphrase(pin);
|
context_->SetPassphrase(pin);
|
||||||
emit SignalUserInputPassphraseCallback(context_);
|
emit SignalUserInputPassphraseCallback(context_);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "GFModuleCommonUtils.hpp"
|
#include "GFModuleCommonUtils.hpp"
|
||||||
#include "GFSDKBasic.h"
|
#include "GFSDKBasic.h"
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#if defined(_WIN32) || defined(WIN32)
|
||||||
#define getpid() GetCurrentProcessId()
|
#define getpid() GetCurrentProcessId()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ static const char *flavor_flag;
|
|||||||
|
|
||||||
/* Return a malloced copy of the commandline for PID. If this is not
|
/* Return a malloced copy of the commandline for PID. If this is not
|
||||||
* possible NULL is returned. */
|
* possible NULL is returned. */
|
||||||
#ifndef WINDOWS
|
#if !(defined(_WIN32) || defined(WIN32))
|
||||||
static char *get_cmdline(unsigned long pid) {
|
static char *get_cmdline(unsigned long pid) {
|
||||||
char buffer[200];
|
char buffer[200];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
@ -76,7 +76,7 @@ static char *get_cmdline(unsigned long pid) {
|
|||||||
* This is not as informative as get_cmdline, but it verifies that the
|
* This is not as informative as get_cmdline, but it verifies that the
|
||||||
* process does belong to the user in question.
|
* process does belong to the user in question.
|
||||||
*/
|
*/
|
||||||
#ifndef WINDOWS
|
#if !(defined(_WIN32) || defined(WIN32))
|
||||||
static char *get_pid_name_for_uid(unsigned long pid, int uid) {
|
static char *get_pid_name_for_uid(unsigned long pid, int uid) {
|
||||||
char buffer[400];
|
char buffer[400];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
@ -325,7 +325,7 @@ void pinentry_parse_opts(int argc, char *argv[]);
|
|||||||
/* Set the optional flag used with getinfo. */
|
/* Set the optional flag used with getinfo. */
|
||||||
void pinentry_set_flavor_flag(const char *string);
|
void pinentry_set_flavor_flag(const char *string);
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#if defined(_WIN32) || defined(WIN32)
|
||||||
/* Windows declares sleep as obsolete, but provides a definition for
|
/* Windows declares sleep as obsolete, but provides a definition for
|
||||||
_sleep but non for the still existing sleep. */
|
_sleep but non for the still existing sleep. */
|
||||||
#define sleep(a) _sleep((a))
|
#define sleep(a) _sleep((a))
|
||||||
|
@ -1,93 +0,0 @@
|
|||||||
/* qti18n.cpp - Load qt translations for pinentry.
|
|
||||||
* Copyright 2021 g10 Code GmbH
|
|
||||||
* SPDX-FileCopyrightText: 2015 Lukáš Tinkl <ltinkl@redhat.com>
|
|
||||||
* SPDX-FileCopyrightText: 2021 Ingo Klöcker <kloecker@kde.org>
|
|
||||||
*
|
|
||||||
* Copied from k18n under the terms of LGPLv2 or later.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
||||||
* SPDX-License-Identifier: GPL-2.0+
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QLibraryInfo>
|
|
||||||
#include <QLocale>
|
|
||||||
#include <QTranslator>
|
|
||||||
|
|
||||||
static bool loadCatalog(const QString &catalog, const QLocale &locale) {
|
|
||||||
auto translator = new QTranslator(QCoreApplication::instance());
|
|
||||||
|
|
||||||
if (!translator->load(locale, catalog, QString(),
|
|
||||||
QLatin1String(":/i18n_qt"))) {
|
|
||||||
qDebug() << "Loading the" << catalog << "catalog failed for locale"
|
|
||||||
<< locale;
|
|
||||||
delete translator;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
QCoreApplication::instance()->installTranslator(translator);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool loadCatalog(const QString &catalog, const QLocale &locale,
|
|
||||||
const QLocale &fallbackLocale) {
|
|
||||||
// try to load the catalog for locale
|
|
||||||
if (loadCatalog(catalog, locale)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// if this fails, then try the fallback locale (if it's different from locale)
|
|
||||||
if (fallbackLocale != locale) {
|
|
||||||
return loadCatalog(catalog, fallbackLocale);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// load global Qt translation, needed in KDE e.g. by lots of builtin dialogs
|
|
||||||
// (QColorDialog, QFontDialog) that we use
|
|
||||||
static void loadTranslation(const QString &localeName,
|
|
||||||
const QString &fallbackLocaleName) {
|
|
||||||
const QLocale locale{localeName};
|
|
||||||
const QLocale fallbackLocale{fallbackLocaleName};
|
|
||||||
// first, try to load the qt_ meta catalog
|
|
||||||
if (loadCatalog(QStringLiteral("qt_"), locale, fallbackLocale)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// if loading the meta catalog failed, then try loading the four catalogs
|
|
||||||
// it depends on, i.e. qtbase, qtscript, qtmultimedia, qtxmlpatterns,
|
|
||||||
// separately
|
|
||||||
const auto catalogs = {
|
|
||||||
QStringLiteral("qtbase_"),
|
|
||||||
/* QStringLiteral("qtscript_"),
|
|
||||||
QStringLiteral("qtmultimedia_"),
|
|
||||||
QStringLiteral("qtxmlpatterns_"), */
|
|
||||||
};
|
|
||||||
for (const auto &catalog : catalogs) {
|
|
||||||
loadCatalog(catalog, locale, fallbackLocale);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void load() {
|
|
||||||
// The way Qt translation system handles plural forms makes it necessary to
|
|
||||||
// have a translation file which contains only plural forms for `en`. That's
|
|
||||||
// why we load the `en` translation unconditionally, then load the
|
|
||||||
// translation for the current locale to overload it.
|
|
||||||
loadCatalog(QStringLiteral("qt_"), QLocale{QStringLiteral("en")});
|
|
||||||
|
|
||||||
const QLocale locale = QLocale::system();
|
|
||||||
if (locale.name() != QStringLiteral("en")) {
|
|
||||||
loadTranslation(locale.name(), locale.bcp47Name());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_COREAPP_STARTUP_FUNCTION(load)
|
|
@ -25,10 +25,11 @@
|
|||||||
|
|
||||||
# com.bktus.gpgfrontend.module.integrated.version_checking
|
# com.bktus.gpgfrontend.module.integrated.version_checking
|
||||||
|
|
||||||
aux_source_directory(. MODULE_SOURCE_FILES)
|
set(INTEGRATED_MODULE_SOURCE "")
|
||||||
|
aux_source_directory(. INTEGRATED_MODULE_SOURCE)
|
||||||
|
|
||||||
# define libgpgfrontend_module
|
# define libgpgfrontend_module
|
||||||
add_library(mod_ver_check SHARED ${MODULE_SOURCE_FILES})
|
add_library(mod_ver_check SHARED ${INTEGRATED_MODULE_SOURCE})
|
||||||
|
|
||||||
# install dir
|
# install dir
|
||||||
install(TARGETS mod_ver_check
|
install(TARGETS mod_ver_check
|
||||||
@ -38,13 +39,8 @@ install(TARGETS mod_ver_check
|
|||||||
target_link_libraries(mod_ver_check PRIVATE
|
target_link_libraries(mod_ver_check PRIVATE
|
||||||
gpgfrontend_module_sdk)
|
gpgfrontend_module_sdk)
|
||||||
|
|
||||||
if(GPGFRONTEND_QT5_BUILD)
|
# link qt
|
||||||
# link Qt
|
target_link_libraries(mod_ver_check PUBLIC Qt::Core Qt::Network Qt::Widgets)
|
||||||
target_link_libraries(mod_ver_check PUBLIC Qt5::Core Qt5::Network Qt5::Widgets)
|
|
||||||
else()
|
|
||||||
# link Qt
|
|
||||||
target_link_libraries(mod_ver_check PUBLIC Qt6::Core Qt6::Network Qt6::Widgets)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# using std c++ 17
|
# using std c++ 17
|
||||||
target_compile_features(mod_ver_check PRIVATE cxx_std_17)
|
target_compile_features(mod_ver_check PRIVATE cxx_std_17)
|
||||||
@ -64,5 +60,5 @@ set(TS_FILES
|
|||||||
qt_add_translations(mod_ver_check
|
qt_add_translations(mod_ver_check
|
||||||
RESOURCE_PREFIX "/i18n"
|
RESOURCE_PREFIX "/i18n"
|
||||||
TS_FILES ${TS_FILES}
|
TS_FILES ${TS_FILES}
|
||||||
SOURCES ${MODULE_SOURCE_FILES}
|
SOURCES ${INTEGRATED_MODULE_SOURCE}
|
||||||
INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR})
|
INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR})
|
@ -43,11 +43,23 @@
|
|||||||
#include "UpdateTab.h"
|
#include "UpdateTab.h"
|
||||||
#include "VersionCheckTask.h"
|
#include "VersionCheckTask.h"
|
||||||
|
|
||||||
GF_MODULE_API_DEFINE("com.bktus.gpgfrontend.module.VersionChecking", "Pinentry",
|
GF_MODULE_API_DEFINE("com.bktus.gpgfrontend.module.version_checking",
|
||||||
"1.0.0", "Try checking GpgFrontend version.", "Saturneric")
|
"VersionChecking", "1.0.0",
|
||||||
|
"Try checking GpgFrontend version.", "Saturneric");
|
||||||
|
|
||||||
|
DEFINE_TRANSLATIONS_STRUCTURE(ModuleVersionChecking);
|
||||||
|
|
||||||
auto GFRegisterModule() -> int {
|
auto GFRegisterModule() -> int {
|
||||||
MLogInfo("version checking module registering");
|
MLogInfo("version checking module registering");
|
||||||
|
|
||||||
|
REGISTER_TRANS_READER();
|
||||||
|
|
||||||
|
GFUIMountEntry(DUP("AboutDialogTabs"),
|
||||||
|
QMapToMetaDataArray({
|
||||||
|
{"TabTitle", GTrC::tr("Update")},
|
||||||
|
}),
|
||||||
|
1, UpdateTabFactory);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,12 +69,6 @@ auto GFActiveModule() -> int {
|
|||||||
LISTEN("APPLICATION_LOADED");
|
LISTEN("APPLICATION_LOADED");
|
||||||
LISTEN("CHECK_APPLICATION_VERSION");
|
LISTEN("CHECK_APPLICATION_VERSION");
|
||||||
|
|
||||||
LOAD_TRANS("ModuleVersionChecking");
|
|
||||||
|
|
||||||
GFUIMountEntry(DUP("AboutDialogTabs"),
|
|
||||||
QMapToMetaDataArray({{"TabTitle", GTrC::tr("Update")}}), 1,
|
|
||||||
UpdateTabFactory);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>GTrC</name>
|
<name>GTrC</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../VersionCheckingModule.cpp" line="72"/>
|
<location filename="../VersionCheckingModule.cpp" line="59"/>
|
||||||
<source>Update</source>
|
<source>Update</source>
|
||||||
<translation type="unfinished">Aktualisieren</translation>
|
<translation type="unfinished">Aktualisieren</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>GTrC</name>
|
<name>GTrC</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../VersionCheckingModule.cpp" line="72"/>
|
<location filename="../VersionCheckingModule.cpp" line="59"/>
|
||||||
<source>Update</source>
|
<source>Update</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>GTrC</name>
|
<name>GTrC</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../VersionCheckingModule.cpp" line="72"/>
|
<location filename="../VersionCheckingModule.cpp" line="59"/>
|
||||||
<source>Update</source>
|
<source>Update</source>
|
||||||
<translation type="unfinished">Mettre à jour</translation>
|
<translation type="unfinished">Mettre à jour</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>GTrC</name>
|
<name>GTrC</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../VersionCheckingModule.cpp" line="72"/>
|
<location filename="../VersionCheckingModule.cpp" line="59"/>
|
||||||
<source>Update</source>
|
<source>Update</source>
|
||||||
<translation type="unfinished">Aggiorna</translation>
|
<translation type="unfinished">Aggiorna</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -12,63 +12,63 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>UpdateTab</name>
|
<name>UpdateTab</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="163"/>
|
<location filename="../UpdateTab.cpp" line="46"/>
|
||||||
<source>It is recommended that you always check the version of GpgFrontend and upgrade to the latest version.</source>
|
<source>It is recommended that you always check the version of GpgFrontend and upgrade to the latest version.</source>
|
||||||
<translation type="unfinished">Si consiglia di controllare sempre la versione di GpgFrontend e di aggiornare all'ultima versione.</translation>
|
<translation type="unfinished">Si consiglia di controllare sempre la versione di GpgFrontend e di aggiornare all'ultima versione.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="166"/>
|
<location filename="../UpdateTab.cpp" line="49"/>
|
||||||
<source>New versions not only represent new features, but also often represent functional and security fixes.</source>
|
<source>New versions not only represent new features, but also often represent functional and security fixes.</source>
|
||||||
<translation type="unfinished">Le nuove versioni non rappresentano solo nuove funzionalità, ma spesso rappresentano anche correzioni funzionali e di sicurezza.</translation>
|
<translation type="unfinished">Le nuove versioni non rappresentano solo nuove funzionalità, ma spesso rappresentano anche correzioni funzionali e di sicurezza.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="172"/>
|
<location filename="../UpdateTab.cpp" line="55"/>
|
||||||
<source>Current Version</source>
|
<source>Current Version</source>
|
||||||
<translation type="unfinished">Versione corrente</translation>
|
<translation type="unfinished">Versione corrente</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="173"/>
|
<location filename="../UpdateTab.cpp" line="56"/>
|
||||||
<source>: </source>
|
<source>: </source>
|
||||||
<translation type="unfinished">: </translation>
|
<translation type="unfinished">: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="248"/>
|
<location filename="../UpdateTab.cpp" line="132"/>
|
||||||
<source>Latest Version From Github</source>
|
<source>Latest Version From Github</source>
|
||||||
<translation type="unfinished">Ultima versione da Github</translation>
|
<translation type="unfinished">Ultima versione da Github</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="254"/>
|
<location filename="../UpdateTab.cpp" line="138"/>
|
||||||
<source>The current version is less than the latest version on github.</source>
|
<source>The current version is less than the latest version on github.</source>
|
||||||
<translation type="unfinished">La versione corrente è inferiore all'ultima versione su github.</translation>
|
<translation type="unfinished">La versione corrente è inferiore all'ultima versione su github.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="256"/>
|
<location filename="../UpdateTab.cpp" line="140"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="267"/>
|
<location filename="../UpdateTab.cpp" line="151"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="279"/>
|
<location filename="../UpdateTab.cpp" line="163"/>
|
||||||
<source>Please click</source>
|
<source>Please click</source>
|
||||||
<translation type="unfinished">Per favore clicca</translation>
|
<translation type="unfinished">Per favore clicca</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="259"/>
|
<location filename="../UpdateTab.cpp" line="143"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="270"/>
|
<location filename="../UpdateTab.cpp" line="154"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="282"/>
|
<location filename="../UpdateTab.cpp" line="166"/>
|
||||||
<source>Here</source>
|
<source>Here</source>
|
||||||
<translation type="unfinished">Qui</translation>
|
<translation type="unfinished">Qui</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="259"/>
|
<location filename="../UpdateTab.cpp" line="143"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="270"/>
|
<location filename="../UpdateTab.cpp" line="154"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="282"/>
|
<location filename="../UpdateTab.cpp" line="166"/>
|
||||||
<source>to download the latest stable version.</source>
|
<source>to download the latest stable version.</source>
|
||||||
<translation type="unfinished">per scaricare l'ultima versione stabile.</translation>
|
<translation type="unfinished">per scaricare l'ultima versione stabile.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="265"/>
|
<location filename="../UpdateTab.cpp" line="149"/>
|
||||||
<source>This version has serious problems and has been withdrawn. Please stop using it immediately.</source>
|
<source>This version has serious problems and has been withdrawn. Please stop using it immediately.</source>
|
||||||
<translation type="unfinished">Questa versione ha seri problemi ed è stata ritirata. Si prega di smettere di usarlo immediatamente.</translation>
|
<translation type="unfinished">Questa versione ha seri problemi ed è stata ritirata. Si prega di smettere di usarlo immediatamente.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="276"/>
|
<location filename="../UpdateTab.cpp" line="160"/>
|
||||||
<source>This version has not been released yet, it may be a beta version. If you are not a tester and care about version stability, please do not use this version.</source>
|
<source>This version has not been released yet, it may be a beta version. If you are not a tester and care about version stability, please do not use this version.</source>
|
||||||
<translation type="unfinished">Questa versione non è ancora stata rilasciata, potrebbe essere una versione beta. Se non sei un tester e ti interessa la stabilità della versione, non utilizzare questa versione.</translation>
|
<translation type="unfinished">Questa versione non è ancora stata rilasciata, potrebbe essere una versione beta. Se non sei un tester e ti interessa la stabilità della versione, non utilizzare questa versione.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>GTrC</name>
|
<name>GTrC</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../VersionCheckingModule.cpp" line="72"/>
|
<location filename="../VersionCheckingModule.cpp" line="59"/>
|
||||||
<source>Update</source>
|
<source>Update</source>
|
||||||
<translation type="unfinished">更新</translation>
|
<translation type="unfinished">更新</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -12,46 +12,63 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>UpdateTab</name>
|
<name>UpdateTab</name>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="46"/>
|
||||||
<source>It is recommended that you always check the version of GpgFrontend and upgrade to the latest version.</source>
|
<source>It is recommended that you always check the version of GpgFrontend and upgrade to the latest version.</source>
|
||||||
<translation type="unfinished">建议您经常检查 GpgFrontend 的版本更新。</translation>
|
<translation type="unfinished">建议您经常检查 GpgFrontend 的版本更新。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="49"/>
|
||||||
<source>New versions not only represent new features, but also often represent functional and security fixes.</source>
|
<source>New versions not only represent new features, but also often represent functional and security fixes.</source>
|
||||||
<translation type="unfinished">新版本不仅代表新功能,而且通常代表功能和安全修复。</translation>
|
<translation type="unfinished">新版本不仅代表新功能,而且通常代表功能和安全修复。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="55"/>
|
||||||
<source>Current Version</source>
|
<source>Current Version</source>
|
||||||
<translation type="unfinished">当前版本</translation>
|
<translation type="unfinished">当前版本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="56"/>
|
||||||
<source>: </source>
|
<source>: </source>
|
||||||
<translation type="vanished">: </translation>
|
<translation>: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="132"/>
|
||||||
<source>Latest Version From Github</source>
|
<source>Latest Version From Github</source>
|
||||||
<translation type="unfinished">来自 Github 的最新版本</translation>
|
<translation type="unfinished">来自 Github 的最新版本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="138"/>
|
||||||
<source>The current version is less than the latest version on github.</source>
|
<source>The current version is less than the latest version on github.</source>
|
||||||
<translation type="unfinished">当前版本低于github上的最新版本。</translation>
|
<translation type="unfinished">当前版本低于github上的最新版本。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="140"/>
|
||||||
|
<location filename="../UpdateTab.cpp" line="151"/>
|
||||||
|
<location filename="../UpdateTab.cpp" line="163"/>
|
||||||
<source>Please click</source>
|
<source>Please click</source>
|
||||||
<translation type="unfinished">请点击</translation>
|
<translation type="unfinished">请点击</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="143"/>
|
||||||
|
<location filename="../UpdateTab.cpp" line="154"/>
|
||||||
|
<location filename="../UpdateTab.cpp" line="166"/>
|
||||||
<source>Here</source>
|
<source>Here</source>
|
||||||
<translation type="unfinished">这里</translation>
|
<translation type="unfinished">这里</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="143"/>
|
||||||
|
<location filename="../UpdateTab.cpp" line="154"/>
|
||||||
|
<location filename="../UpdateTab.cpp" line="166"/>
|
||||||
<source>to download the latest stable version.</source>
|
<source>to download the latest stable version.</source>
|
||||||
<translation type="unfinished">来下载最新的稳定版本。</translation>
|
<translation type="unfinished">来下载最新的稳定版本。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="149"/>
|
||||||
<source>This version has serious problems and has been withdrawn. Please stop using it immediately.</source>
|
<source>This version has serious problems and has been withdrawn. Please stop using it immediately.</source>
|
||||||
<translation type="vanished">此版本存在严重问题,已经被召回。请立即停止使用。</translation>
|
<translation>此版本存在严重问题,已经被召回。请立即停止使用。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../UpdateTab.cpp" line="160"/>
|
||||||
<source>This version has not been released yet, it may be a beta version. If you are not a tester and care about version stability, please do not use this version.</source>
|
<source>This version has not been released yet, it may be a beta version. If you are not a tester and care about version stability, please do not use this version.</source>
|
||||||
<translation type="unfinished">此版本尚未发布,可能是测试版。如果您不是测试人员并且关心版本稳定性,请不要使用此版本。</translation>
|
<translation type="unfinished">此版本尚未发布,可能是测试版。如果您不是测试人员并且关心版本稳定性,请不要使用此版本。</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>GTrC</name>
|
<name>GTrC</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../VersionCheckingModule.cpp" line="72"/>
|
<location filename="../VersionCheckingModule.cpp" line="59"/>
|
||||||
<source>Update</source>
|
<source>Update</source>
|
||||||
<translation type="unfinished">更新</translation>
|
<translation type="unfinished">更新</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -12,63 +12,63 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>UpdateTab</name>
|
<name>UpdateTab</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="163"/>
|
<location filename="../UpdateTab.cpp" line="46"/>
|
||||||
<source>It is recommended that you always check the version of GpgFrontend and upgrade to the latest version.</source>
|
<source>It is recommended that you always check the version of GpgFrontend and upgrade to the latest version.</source>
|
||||||
<translation type="unfinished">建議您經常檢查 GpgFrontend 的版本併升級到最新版本。</translation>
|
<translation type="unfinished">建議您經常檢查 GpgFrontend 的版本併升級到最新版本。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="166"/>
|
<location filename="../UpdateTab.cpp" line="49"/>
|
||||||
<source>New versions not only represent new features, but also often represent functional and security fixes.</source>
|
<source>New versions not only represent new features, but also often represent functional and security fixes.</source>
|
||||||
<translation type="unfinished">新版本不僅代表新功能,而且通常代表功能和安全修復。</translation>
|
<translation type="unfinished">新版本不僅代表新功能,而且通常代表功能和安全修復。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="172"/>
|
<location filename="../UpdateTab.cpp" line="55"/>
|
||||||
<source>Current Version</source>
|
<source>Current Version</source>
|
||||||
<translation type="unfinished">當前版本</translation>
|
<translation type="unfinished">當前版本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="173"/>
|
<location filename="../UpdateTab.cpp" line="56"/>
|
||||||
<source>: </source>
|
<source>: </source>
|
||||||
<translation type="unfinished">: </translation>
|
<translation type="unfinished">: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="248"/>
|
<location filename="../UpdateTab.cpp" line="132"/>
|
||||||
<source>Latest Version From Github</source>
|
<source>Latest Version From Github</source>
|
||||||
<translation type="unfinished">來自 Github 的最新版本</translation>
|
<translation type="unfinished">來自 Github 的最新版本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="254"/>
|
<location filename="../UpdateTab.cpp" line="138"/>
|
||||||
<source>The current version is less than the latest version on github.</source>
|
<source>The current version is less than the latest version on github.</source>
|
||||||
<translation type="unfinished">當前版本低於github上的最新版本。</translation>
|
<translation type="unfinished">當前版本低於github上的最新版本。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="256"/>
|
<location filename="../UpdateTab.cpp" line="140"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="267"/>
|
<location filename="../UpdateTab.cpp" line="151"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="279"/>
|
<location filename="../UpdateTab.cpp" line="163"/>
|
||||||
<source>Please click</source>
|
<source>Please click</source>
|
||||||
<translation type="unfinished">請點擊</translation>
|
<translation type="unfinished">請點擊</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="259"/>
|
<location filename="../UpdateTab.cpp" line="143"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="270"/>
|
<location filename="../UpdateTab.cpp" line="154"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="282"/>
|
<location filename="../UpdateTab.cpp" line="166"/>
|
||||||
<source>Here</source>
|
<source>Here</source>
|
||||||
<translation type="unfinished">這裡</translation>
|
<translation type="unfinished">這裡</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="259"/>
|
<location filename="../UpdateTab.cpp" line="143"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="270"/>
|
<location filename="../UpdateTab.cpp" line="154"/>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="282"/>
|
<location filename="../UpdateTab.cpp" line="166"/>
|
||||||
<source>to download the latest stable version.</source>
|
<source>to download the latest stable version.</source>
|
||||||
<translation type="unfinished">下載最新的穩定版本。</translation>
|
<translation type="unfinished">下載最新的穩定版本。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="265"/>
|
<location filename="../UpdateTab.cpp" line="149"/>
|
||||||
<source>This version has serious problems and has been withdrawn. Please stop using it immediately.</source>
|
<source>This version has serious problems and has been withdrawn. Please stop using it immediately.</source>
|
||||||
<translation type="unfinished">此版本存在嚴重問題,已撤回。請立即停止使用。</translation>
|
<translation type="unfinished">此版本存在嚴重問題,已撤回。請立即停止使用。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="276"/>
|
<location filename="../UpdateTab.cpp" line="160"/>
|
||||||
<source>This version has not been released yet, it may be a beta version. If you are not a tester and care about version stability, please do not use this version.</source>
|
<source>This version has not been released yet, it may be a beta version. If you are not a tester and care about version stability, please do not use this version.</source>
|
||||||
<translation type="unfinished">此版本尚未發布,可能是測試版。如果您不是測試人員並且關心版本穩定性,請不要使用此版本。</translation>
|
<translation type="unfinished">此版本尚未發布,可能是測試版。如果您不是測試人員並且關心版本穩定性,請不要使用此版本。</translation>
|
||||||
</message>
|
</message>
|
||||||
|
Loading…
Reference in New Issue
Block a user