aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/GpgFrontendUIInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-18 13:47:17 +0000
committersaturneric <[email protected]>2024-01-18 13:47:17 +0000
commite8d604cf2924ab101c2a102c23d5028473289814 (patch)
tree8eb6eee373c0343b1836fac5aed79b9be83a67dd /src/ui/GpgFrontendUIInit.cpp
parentfix: add test cases and solve discovered issues (diff)
downloadGpgFrontend-e8d604cf2924ab101c2a102c23d5028473289814.tar.gz
GpgFrontend-e8d604cf2924ab101c2a102c23d5028473289814.zip
fix: slove discovered bugs
Diffstat (limited to 'src/ui/GpgFrontendUIInit.cpp')
-rw-r--r--src/ui/GpgFrontendUIInit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/GpgFrontendUIInit.cpp b/src/ui/GpgFrontendUIInit.cpp
index c7f54286..dd01bc9d 100644
--- a/src/ui/GpgFrontendUIInit.cpp
+++ b/src/ui/GpgFrontendUIInit.cpp
@@ -211,10 +211,12 @@ void InitLocale() {
// read from settings file
auto lang = settings.value("basic/lang").toString();
- GF_UI_LOG_INFO("current system locale: {}", QLocale().name());
- GF_UI_LOG_INFO("current custom locale settings: {}", lang);
+ GF_UI_LOG_INFO("current system default locale: {}", QLocale().name());
auto target_locale = lang.isEmpty() ? QLocale() : QLocale(lang);
+ QLocale::setDefault(target_locale);
+ GF_UI_LOG_INFO("target locale settings: {}", target_locale.name());
+
auto* translator = new QTranslator(QCoreApplication::instance());
if (translator->load(target_locale, QLatin1String(PROJECT_NAME),
QLatin1String("."), QLatin1String(":/i18n"),