diff -r 4241d948af28 -r 38f6fad61bad src/main.cpp --- a/src/main.cpp Tue Jun 28 19:25:45 2022 +0300 +++ b/src/main.cpp Tue Jun 28 19:31:55 2022 +0300 @@ -145,36 +145,6 @@ QObject::tr("LDraw models (*.ldr *.dat)")); } -#if 0 -static const QString localeCode(const QString& locale) -{ - if (locale == "system") { - return QLocale::system().name(); - } - else { - return locale; - } -} - -/** - * @brief Changes the application language to the specified language - */ -static void changeLanguage(const QString& locale, QTranslator* translator) -{ - if (not locale.isEmpty()) { - const QString localeCode = ::localeCode(locale); - QLocale::setDefault(QLocale{localeCode}); - qApp->removeTranslator(translator); - const QString path = LOCALE_DIR.filePath(localeCode + ".qm"); - const bool loadSuccessful = translator->load(path); - if (loadSuccessful) - { - qApp->installTranslator(translator); - } - } -} -#endif - static ModelData* findModelData(const DocumentManager* documents, ModelId modelId) { return documents->findPayload(modelId); @@ -495,7 +465,6 @@ const auto restoreSettings = [&]{ recentlyOpenedFiles = setting(); renderPreferences = loadRenderPreferences(); - //changeLanguage(setting(), &translator); libraries.restoreFromSettings(); updateRecentlyOpenedDocumentsMenu(); colorTable = loadColors(&libraries);