diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 82a6a564e..0d5b42492 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -42,6 +42,7 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv) settings(nullptr), qtTranslator(nullptr), qtxmlTranslator(nullptr), + qtBaseTranslator(nullptr), appTranslator(nullptr), pmsTranslator(nullptr), _patternUnit(Unit::Cm), @@ -233,6 +234,14 @@ void VAbstractApplication::LoadTranslation(const QString &locale) #endif installTranslator(qtxmlTranslator); + qtBaseTranslator = new QTranslator(this); +#if defined(Q_OS_WIN) || defined(Q_OS_MAC) + qtBaseTranslator->load("qtbase_" + locale, translationsPath(locale)); +#else + qtBaseTranslator->load("qtbase_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); +#endif + installTranslator(qtBaseTranslator); + appTranslator = new QTranslator(this); appTranslator->load("valentina_" + locale, translationsPath(locale)); installTranslator(appTranslator); @@ -261,6 +270,12 @@ void VAbstractApplication::ClearTranslation() delete qtxmlTranslator; } + if (not qtBaseTranslator.isNull()) + { + removeTranslator(qtBaseTranslator); + delete qtBaseTranslator; + } + if (not appTranslator.isNull()) { removeTranslator(appTranslator); diff --git a/src/libs/vmisc/vabstractapplication.h b/src/libs/vmisc/vabstractapplication.h index e6c0aa3fc..f1e54e06e 100644 --- a/src/libs/vmisc/vabstractapplication.h +++ b/src/libs/vmisc/vabstractapplication.h @@ -118,6 +118,7 @@ protected: QPointer qtTranslator; QPointer qtxmlTranslator; + QPointer qtBaseTranslator; QPointer appTranslator; QPointer pmsTranslator;