1442c51
diff -urp cppcheck-1.89.orig/gui/CMakeLists.txt cppcheck-1.89/gui/CMakeLists.txt
1442c51
--- cppcheck-1.89.orig/gui/CMakeLists.txt	2019-12-07 13:41:32.651559443 -0500
1442c51
+++ cppcheck-1.89/gui/CMakeLists.txt	2019-12-07 13:45:16.037535529 -0500
1442c51
@@ -30,7 +30,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
 
1442c51
diff -urp cppcheck-1.89.orig/gui/translationhandler.cpp cppcheck-1.89/gui/translationhandler.cpp
1442c51
--- cppcheck-1.89.orig/gui/translationhandler.cpp	2019-09-01 09:01:12.000000000 -0400
1442c51
+++ cppcheck-1.89/gui/translationhandler.cpp	2019-12-07 13:46:47.085525782 -0500
1442c51
@@ -116,15 +116,7 @@ bool TranslationHandler::setLanguage(con
1442c51
         if (datadir.isEmpty())
1442c51
             datadir = appPath;
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";
613ef46
+	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