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