e13f8f2
diff -urp cppcheck-1.84.orig/gui/CMakeLists.txt cppcheck-1.84/gui/CMakeLists.txt
e13f8f2
--- cppcheck-1.84.orig/gui/CMakeLists.txt	2018-08-13 13:29:29.082264726 -0400
e13f8f2
+++ cppcheck-1.84/gui/CMakeLists.txt	2018-08-13 13:32:21.181246257 -0400
e13f8f2
@@ -26,7 +26,7 @@ if (BUILD_GUI)
e13f8f2
     target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
dd7b18f
 
dd7b18f
     install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
dd7b18f
-    install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
e13f8f2
+    install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/lang COMPONENT applications)
dd7b18f
 
dd7b18f
     install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
dd7b18f
 
e13f8f2
diff -urp cppcheck-1.84.orig/gui/translationhandler.cpp cppcheck-1.84/gui/translationhandler.cpp
e13f8f2
--- cppcheck-1.84.orig/gui/translationhandler.cpp	2018-06-10 16:41:03.000000000 -0400
e13f8f2
+++ cppcheck-1.84/gui/translationhandler.cpp	2018-08-13 13:30:45.279256549 -0400
f8cc68f
@@ -116,15 +116,7 @@ bool TranslationHandler::setLanguage(con
19d3766
     if (datadir.isEmpty())
19d3766
         datadir = appPath;
19d3766
 
19d3766
-    QString translationFile;
19d3766
-    if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm"))
19d3766
-        translationFile = datadir + "/lang/" + mTranslations[index].mFilename + ".qm";
19d3766
-
19d3766
-    else if (QFile::exists(datadir + "/" + mTranslations[index].mFilename + ".qm"))
19d3766
-        translationFile = datadir + "/" + mTranslations[index].mFilename + ".qm";
19d3766
-
19d3766
-    else
19d3766
-        translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm";
19d3766
+    QString translationFile("/usr/share/CppCheck/lang/" + mTranslations[index].mFilename + ".qm");
19d3766
 
19d3766
     if (!mTranslator->load(translationFile) && !failure) {
dd7b18f
         //If it failed, lets check if the default file exists