f8cc68f
diff -up cppcheck-1.81/gui/CMakeLists.txt.translations cppcheck-1.81/gui/CMakeLists.txt
f8cc68f
--- cppcheck-1.81/gui/CMakeLists.txt.translations	2017-10-18 16:41:50.647580110 +0200
f8cc68f
+++ cppcheck-1.81/gui/CMakeLists.txt	2017-10-18 16:42:38.432882931 +0200
f8cc68f
@@ -27,7 +27,7 @@ if (BUILD_GUI)
f8cc68f
     qt5_use_modules(cppcheck-gui ${GUI_QT_COMPONENTS})
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)
dd7b18f
+    install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/lang/ COMPONENT applications)
dd7b18f
 
dd7b18f
     install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
dd7b18f
 
f8cc68f
diff -up cppcheck-1.81/gui/translationhandler.cpp.translations cppcheck-1.81/gui/translationhandler.cpp
f8cc68f
--- cppcheck-1.81/gui/translationhandler.cpp.translations	2017-10-07 23:11:39.000000000 +0200
f8cc68f
+++ cppcheck-1.81/gui/translationhandler.cpp	2017-10-18 16:41:50.649580081 +0200
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