diff options
author | saturneric <[email protected]> | 2024-07-31 05:55:59 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-07-31 05:55:59 +0000 |
commit | 2be9cf21aef39a34a807eb29b29eec726ec68f97 (patch) | |
tree | b1c053696132d4754bff72261061cfb84c4365ab /src/m_ver_check | |
parent | feat: update copyright info (diff) | |
download | Modules-2be9cf21aef39a34a807eb29b29eec726ec68f97.tar.gz Modules-2be9cf21aef39a34a807eb29b29eec726ec68f97.zip |
fix: addressing some of the issues identified
Diffstat (limited to 'src/m_ver_check')
-rw-r--r-- | src/m_ver_check/CMakeLists.txt | 16 | ||||
-rw-r--r-- | src/m_ver_check/VersionCheckingModule.cpp | 22 | ||||
-rw-r--r-- | src/m_ver_check/ts/ModuleVersionChecking.de_DE.ts | 2 | ||||
-rw-r--r-- | src/m_ver_check/ts/ModuleVersionChecking.en_US.ts | 2 | ||||
-rw-r--r-- | src/m_ver_check/ts/ModuleVersionChecking.fr_FR.ts | 2 | ||||
-rw-r--r-- | src/m_ver_check/ts/ModuleVersionChecking.it_IT.ts | 36 | ||||
-rw-r--r-- | src/m_ver_check/ts/ModuleVersionChecking.zh_CN.ts | 23 | ||||
-rw-r--r-- | src/m_ver_check/ts/ModuleVersionChecking.zh_TW.ts | 36 |
8 files changed, 79 insertions, 60 deletions
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 @@ <context> <name>GTrC</name> <message> - <location filename="../VersionCheckingModule.cpp" line="72"/> + <location filename="../VersionCheckingModule.cpp" line="59"/> <source>Update</source> <translation type="unfinished">Aktualisieren</translation> </message> 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 @@ <context> <name>GTrC</name> <message> - <location filename="../VersionCheckingModule.cpp" line="72"/> + <location filename="../VersionCheckingModule.cpp" line="59"/> <source>Update</source> <translation type="unfinished"></translation> </message> 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 @@ <context> <name>GTrC</name> <message> - <location filename="../VersionCheckingModule.cpp" line="72"/> + <location filename="../VersionCheckingModule.cpp" line="59"/> <source>Update</source> <translation type="unfinished">Mettre à jour</translation> </message> 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 @@ <context> <name>GTrC</name> <message> - <location filename="../VersionCheckingModule.cpp" line="72"/> + <location filename="../VersionCheckingModule.cpp" line="59"/> <source>Update</source> <translation type="unfinished">Aggiorna</translation> </message> @@ -12,63 +12,63 @@ <context> <name>UpdateTab</name> <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> <translation type="unfinished">Si consiglia di controllare sempre la versione di GpgFrontend e di aggiornare all'ultima versione.</translation> </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> <translation type="unfinished">Le nuove versioni non rappresentano solo nuove funzionalità, ma spesso rappresentano anche correzioni funzionali e di sicurezza.</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="172"/> + <location filename="../UpdateTab.cpp" line="55"/> <source>Current Version</source> <translation type="unfinished">Versione corrente</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="173"/> + <location filename="../UpdateTab.cpp" line="56"/> <source>: </source> <translation type="unfinished">: </translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="248"/> + <location filename="../UpdateTab.cpp" line="132"/> <source>Latest Version From Github</source> <translation type="unfinished">Ultima versione da Github</translation> </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> <translation type="unfinished">La versione corrente è inferiore all'ultima versione su github.</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="256"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="267"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="279"/> + <location filename="../UpdateTab.cpp" line="140"/> + <location filename="../UpdateTab.cpp" line="151"/> + <location filename="../UpdateTab.cpp" line="163"/> <source>Please click</source> <translation type="unfinished">Per favore clicca</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="259"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="270"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="282"/> + <location filename="../UpdateTab.cpp" line="143"/> + <location filename="../UpdateTab.cpp" line="154"/> + <location filename="../UpdateTab.cpp" line="166"/> <source>Here</source> <translation type="unfinished">Qui</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="259"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="270"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="282"/> + <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> <translation type="unfinished">per scaricare l'ultima versione stabile.</translation> </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> <translation type="unfinished">Questa versione ha seri problemi ed è stata ritirata. Si prega di smettere di usarlo immediatamente.</translation> </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> <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> 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 @@ <context> <name>GTrC</name> <message> - <location filename="../VersionCheckingModule.cpp" line="72"/> + <location filename="../VersionCheckingModule.cpp" line="59"/> <source>Update</source> <translation type="unfinished">更新</translation> </message> @@ -12,46 +12,63 @@ <context> <name>UpdateTab</name> <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> <translation type="unfinished">建议您经常检查 GpgFrontend 的版本更新。</translation> </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> <translation type="unfinished">新版本不仅代表新功能,而且通常代表功能和安全修复。</translation> </message> <message> + <location filename="../UpdateTab.cpp" line="55"/> <source>Current Version</source> <translation type="unfinished">当前版本</translation> </message> <message> + <location filename="../UpdateTab.cpp" line="56"/> <source>: </source> - <translation type="vanished">: </translation> + <translation>: </translation> </message> <message> + <location filename="../UpdateTab.cpp" line="132"/> <source>Latest Version From Github</source> <translation type="unfinished">来自 Github 的最新版本</translation> </message> <message> + <location filename="../UpdateTab.cpp" line="138"/> <source>The current version is less than the latest version on github.</source> <translation type="unfinished">当前版本低于github上的最新版本。</translation> </message> <message> + <location filename="../UpdateTab.cpp" line="140"/> + <location filename="../UpdateTab.cpp" line="151"/> + <location filename="../UpdateTab.cpp" line="163"/> <source>Please click</source> <translation type="unfinished">请点击</translation> </message> <message> + <location filename="../UpdateTab.cpp" line="143"/> + <location filename="../UpdateTab.cpp" line="154"/> + <location filename="../UpdateTab.cpp" line="166"/> <source>Here</source> <translation type="unfinished">这里</translation> </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> <translation type="unfinished">来下载最新的稳定版本。</translation> </message> <message> + <location filename="../UpdateTab.cpp" line="149"/> <source>This version has serious problems and has been withdrawn. Please stop using it immediately.</source> - <translation type="vanished">此版本存在严重问题,已经被召回。请立即停止使用。</translation> + <translation>此版本存在严重问题,已经被召回。请立即停止使用。</translation> </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> <translation type="unfinished">此版本尚未发布,可能是测试版。如果您不是测试人员并且关心版本稳定性,请不要使用此版本。</translation> </message> 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 @@ <context> <name>GTrC</name> <message> - <location filename="../VersionCheckingModule.cpp" line="72"/> + <location filename="../VersionCheckingModule.cpp" line="59"/> <source>Update</source> <translation type="unfinished">更新</translation> </message> @@ -12,63 +12,63 @@ <context> <name>UpdateTab</name> <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> <translation type="unfinished">建議您經常檢查 GpgFrontend 的版本併升級到最新版本。</translation> </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> <translation type="unfinished">新版本不僅代表新功能,而且通常代表功能和安全修復。</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="172"/> + <location filename="../UpdateTab.cpp" line="55"/> <source>Current Version</source> <translation type="unfinished">當前版本</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="173"/> + <location filename="../UpdateTab.cpp" line="56"/> <source>: </source> <translation type="unfinished">: </translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="248"/> + <location filename="../UpdateTab.cpp" line="132"/> <source>Latest Version From Github</source> <translation type="unfinished">來自 Github 的最新版本</translation> </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> <translation type="unfinished">當前版本低於github上的最新版本。</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="256"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="267"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="279"/> + <location filename="../UpdateTab.cpp" line="140"/> + <location filename="../UpdateTab.cpp" line="151"/> + <location filename="../UpdateTab.cpp" line="163"/> <source>Please click</source> <translation type="unfinished">請點擊</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="259"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="270"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="282"/> + <location filename="../UpdateTab.cpp" line="143"/> + <location filename="../UpdateTab.cpp" line="154"/> + <location filename="../UpdateTab.cpp" line="166"/> <source>Here</source> <translation type="unfinished">這裡</translation> </message> <message> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="259"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="270"/> - <location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="282"/> + <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> <translation type="unfinished">下載最新的穩定版本。</translation> </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> <translation type="unfinished">此版本存在嚴重問題,已撤回。請立即停止使用。</translation> </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> <translation type="unfinished">此版本尚未發布,可能是測試版。如果您不是測試人員並且關心版本穩定性,請不要使用此版本。</translation> </message> |