diff -urp cppcheck-2.2.orig/gui/CMakeLists.txt cppcheck-2.2/gui/CMakeLists.txt --- cppcheck-2.2.orig/gui/CMakeLists.txt 2020-10-03 11:05:53.000000000 +0200 +++ cppcheck-2.2/gui/CMakeLists.txt 2020-10-04 07:18:23.309796000 +0200 @@ -40,7 +40,7 @@ if (BUILD_GUI) endif() install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) - install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) + install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/lang COMPONENT applications) install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) diff -urp cppcheck-2.2.orig/gui/translationhandler.cpp cppcheck-2.2/gui/translationhandler.cpp --- cppcheck-2.2.orig/gui/translationhandler.cpp 2020-10-03 11:05:53.000000000 +0200 +++ cppcheck-2.2/gui/translationhandler.cpp 2020-10-04 07:19:44.765892500 +0200 @@ -113,15 +113,7 @@ bool TranslationHandler::setLanguage(con QString datadir = getDataDir(); - QString translationFile; - if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm")) - translationFile = datadir + "/lang/" + mTranslations[index].mFilename + ".qm"; - - else if (QFile::exists(datadir + "/" + mTranslations[index].mFilename + ".qm")) - translationFile = datadir + "/" + mTranslations[index].mFilename + ".qm"; - - else - translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm"; + QString translationFile("/usr/share/Cppcheck/lang/" + mTranslations[index].mFilename + ".qm"); if (!mTranslator->load(translationFile) && !failure) { //If it failed, lets check if the default file exists