42 lines
2.1 KiB
Diff
42 lines
2.1 KiB
Diff
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
|
|
index 9cd93a21f..d07094a00 100644
|
|
--- a/gui/CMakeLists.txt
|
|
+++ b/gui/CMakeLists.txt
|
|
@@ -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 --git a/gui/translationhandler.cpp b/gui/translationhandler.cpp
|
|
index d12fb7057..626f8641a 100644
|
|
--- a/gui/translationhandler.cpp
|
|
+++ b/gui/translationhandler.cpp
|
|
@@ -113,15 +113,16 @@ bool TranslationHandler::setLanguage(const QString &code)
|
|
|
|
QString datadir = getDataDir();
|
|
|
|
- QString translationFile;
|
|
- if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm"))
|
|
- translationFile = datadir + "/lang/" + mTranslations[index].mFilename + ".qm";
|
|
+// 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 if (QFile::exists(datadir + "/" + mTranslations[index].mFilename + ".qm"))
|
|
+// translationFile = datadir + "/" + mTranslations[index].mFilename + ".qm";
|
|
|
|
- else
|
|
- translationFile = appPath + "/" + 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
|