From 2be9cf21aef39a34a807eb29b29eec726ec68f97 Mon Sep 17 00:00:00 2001 From: saturneric Date: Wed, 31 Jul 2024 07:55:59 +0200 Subject: fix: addressing some of the issues identified --- src/m_ver_check/CMakeLists.txt | 16 ++++------ src/m_ver_check/VersionCheckingModule.cpp | 22 +++++++++----- src/m_ver_check/ts/ModuleVersionChecking.de_DE.ts | 2 +- src/m_ver_check/ts/ModuleVersionChecking.en_US.ts | 2 +- src/m_ver_check/ts/ModuleVersionChecking.fr_FR.ts | 2 +- src/m_ver_check/ts/ModuleVersionChecking.it_IT.ts | 36 +++++++++++------------ src/m_ver_check/ts/ModuleVersionChecking.zh_CN.ts | 23 +++++++++++++-- src/m_ver_check/ts/ModuleVersionChecking.zh_TW.ts | 36 +++++++++++------------ 8 files changed, 79 insertions(+), 60 deletions(-) (limited to 'src/m_ver_check') diff --git a/src/m_ver_check/CMakeLists.txt b/src/m_ver_check/CMakeLists.txt index ce68f30..cdf691a 100644 --- a/src/m_ver_check/CMakeLists.txt +++ b/src/m_ver_check/CMakeLists.txt @@ -25,10 +25,11 @@ # 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 -add_library(mod_ver_check SHARED ${MODULE_SOURCE_FILES}) +add_library(mod_ver_check SHARED ${INTEGRATED_MODULE_SOURCE}) # install dir install(TARGETS mod_ver_check @@ -38,13 +39,8 @@ install(TARGETS mod_ver_check target_link_libraries(mod_ver_check PRIVATE gpgfrontend_module_sdk) -if(GPGFRONTEND_QT5_BUILD) - # link Qt - 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() +# link qt +target_link_libraries(mod_ver_check PUBLIC Qt::Core Qt::Network Qt::Widgets) # using std c++ 17 target_compile_features(mod_ver_check PRIVATE cxx_std_17) @@ -64,5 +60,5 @@ set(TS_FILES qt_add_translations(mod_ver_check RESOURCE_PREFIX "/i18n" TS_FILES ${TS_FILES} - SOURCES ${MODULE_SOURCE_FILES} + SOURCES ${INTEGRATED_MODULE_SOURCE} INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file diff --git a/src/m_ver_check/VersionCheckingModule.cpp b/src/m_ver_check/VersionCheckingModule.cpp index b819288..5e6fef6 100644 --- a/src/m_ver_check/VersionCheckingModule.cpp +++ b/src/m_ver_check/VersionCheckingModule.cpp @@ -43,11 +43,23 @@ #include "UpdateTab.h" #include "VersionCheckTask.h" -GF_MODULE_API_DEFINE("com.bktus.gpgfrontend.module.VersionChecking", "Pinentry", - "1.0.0", "Try checking GpgFrontend version.", "Saturneric") +GF_MODULE_API_DEFINE("com.bktus.gpgfrontend.module.version_checking", + "VersionChecking", "1.0.0", + "Try checking GpgFrontend version.", "Saturneric"); + +DEFINE_TRANSLATIONS_STRUCTURE(ModuleVersionChecking); auto GFRegisterModule() -> int { MLogInfo("version checking module registering"); + + REGISTER_TRANS_READER(); + + GFUIMountEntry(DUP("AboutDialogTabs"), + QMapToMetaDataArray({ + {"TabTitle", GTrC::tr("Update")}, + }), + 1, UpdateTabFactory); + return 0; } @@ -57,12 +69,6 @@ auto GFActiveModule() -> int { LISTEN("APPLICATION_LOADED"); LISTEN("CHECK_APPLICATION_VERSION"); - LOAD_TRANS("ModuleVersionChecking"); - - GFUIMountEntry(DUP("AboutDialogTabs"), - QMapToMetaDataArray({{"TabTitle", GTrC::tr("Update")}}), 1, - UpdateTabFactory); - return 0; } diff --git a/src/m_ver_check/ts/ModuleVersionChecking.de_DE.ts b/src/m_ver_check/ts/ModuleVersionChecking.de_DE.ts index e9f23e2..e9a6a4c 100644 --- a/src/m_ver_check/ts/ModuleVersionChecking.de_DE.ts +++ b/src/m_ver_check/ts/ModuleVersionChecking.de_DE.ts @@ -4,7 +4,7 @@ GTrC - + Update Aktualisieren diff --git a/src/m_ver_check/ts/ModuleVersionChecking.en_US.ts b/src/m_ver_check/ts/ModuleVersionChecking.en_US.ts index 1235090..5f2890b 100644 --- a/src/m_ver_check/ts/ModuleVersionChecking.en_US.ts +++ b/src/m_ver_check/ts/ModuleVersionChecking.en_US.ts @@ -4,7 +4,7 @@ GTrC - + Update diff --git a/src/m_ver_check/ts/ModuleVersionChecking.fr_FR.ts b/src/m_ver_check/ts/ModuleVersionChecking.fr_FR.ts index fff22ee..0b073d1 100644 --- a/src/m_ver_check/ts/ModuleVersionChecking.fr_FR.ts +++ b/src/m_ver_check/ts/ModuleVersionChecking.fr_FR.ts @@ -4,7 +4,7 @@ GTrC - + Update Mettre à jour diff --git a/src/m_ver_check/ts/ModuleVersionChecking.it_IT.ts b/src/m_ver_check/ts/ModuleVersionChecking.it_IT.ts index c8d1df9..1879041 100644 --- a/src/m_ver_check/ts/ModuleVersionChecking.it_IT.ts +++ b/src/m_ver_check/ts/ModuleVersionChecking.it_IT.ts @@ -4,7 +4,7 @@ GTrC - + Update Aggiorna @@ -12,63 +12,63 @@ UpdateTab - + It is recommended that you always check the version of GpgFrontend and upgrade to the latest version. Si consiglia di controllare sempre la versione di GpgFrontend e di aggiornare all'ultima versione. - + New versions not only represent new features, but also often represent functional and security fixes. Le nuove versioni non rappresentano solo nuove funzionalità, ma spesso rappresentano anche correzioni funzionali e di sicurezza. - + Current Version Versione corrente - + : : - + Latest Version From Github Ultima versione da Github - + The current version is less than the latest version on github. La versione corrente è inferiore all'ultima versione su github. - - - + + + Please click Per favore clicca - - - + + + Here Qui - - - + + + to download the latest stable version. per scaricare l'ultima versione stabile. - + This version has serious problems and has been withdrawn. Please stop using it immediately. Questa versione ha seri problemi ed è stata ritirata. Si prega di smettere di usarlo immediatamente. - + 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. 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. diff --git a/src/m_ver_check/ts/ModuleVersionChecking.zh_CN.ts b/src/m_ver_check/ts/ModuleVersionChecking.zh_CN.ts index f789572..2d02588 100644 --- a/src/m_ver_check/ts/ModuleVersionChecking.zh_CN.ts +++ b/src/m_ver_check/ts/ModuleVersionChecking.zh_CN.ts @@ -4,7 +4,7 @@ GTrC - + Update 更新 @@ -12,46 +12,63 @@ UpdateTab + It is recommended that you always check the version of GpgFrontend and upgrade to the latest version. 建议您经常检查 GpgFrontend 的版本更新。 + New versions not only represent new features, but also often represent functional and security fixes. 新版本不仅代表新功能,而且通常代表功能和安全修复。 + Current Version 当前版本 + : - + + Latest Version From Github 来自 Github 的最新版本 + The current version is less than the latest version on github. 当前版本低于github上的最新版本。 + + + Please click 请点击 + + + Here 这里 + + + to download the latest stable version. 来下载最新的稳定版本。 + This version has serious problems and has been withdrawn. Please stop using it immediately. - 此版本存在严重问题,已经被召回。请立即停止使用。 + 此版本存在严重问题,已经被召回。请立即停止使用。 + 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. 此版本尚未发布,可能是测试版。如果您不是测试人员并且关心版本稳定性,请不要使用此版本。 diff --git a/src/m_ver_check/ts/ModuleVersionChecking.zh_TW.ts b/src/m_ver_check/ts/ModuleVersionChecking.zh_TW.ts index 4873fc5..e59955e 100644 --- a/src/m_ver_check/ts/ModuleVersionChecking.zh_TW.ts +++ b/src/m_ver_check/ts/ModuleVersionChecking.zh_TW.ts @@ -4,7 +4,7 @@ GTrC - + Update 更新 @@ -12,63 +12,63 @@ UpdateTab - + It is recommended that you always check the version of GpgFrontend and upgrade to the latest version. 建議您經常檢查 GpgFrontend 的版本併升級到最新版本。 - + New versions not only represent new features, but also often represent functional and security fixes. 新版本不僅代表新功能,而且通常代表功能和安全修復。 - + Current Version 當前版本 - + : : - + Latest Version From Github 來自 Github 的最新版本 - + The current version is less than the latest version on github. 當前版本低於github上的最新版本。 - - - + + + Please click 請點擊 - - - + + + Here 這裡 - - - + + + to download the latest stable version. 下載最新的穩定版本。 - + This version has serious problems and has been withdrawn. Please stop using it immediately. 此版本存在嚴重問題,已撤回。請立即停止使用。 - + 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. 此版本尚未發布,可能是測試版。如果您不是測試人員並且關心版本穩定性,請不要使用此版本。 -- cgit v1.2.3