File qcheckers_translations.patch of Package qcheckers
diff --git a/src/main.cc b/src/main.cc
index 7989a2c..d7ea8f0 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
QString current_lang = QLocale::system().name().split("_").front();
QString qt_lang_path = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
//QString qcheckers_share_path = PREFIX"/share/qcheckers/lang";
- QString lang_path = QStandardPaths::locate(QStandardPaths::DataLocation, "lang", QStandardPaths::LocateDirectory);
+ QString lang_path = QStandardPaths::locate(QStandardPaths::DataLocation, "translations", QStandardPaths::LocateDirectory);
qDebug()
<< "Your Locale:" << current_lang << endl
diff --git a/src/src.pro b/src/src.pro
index df72aae..7c8667a 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -29,8 +29,12 @@ SOURCES = pdn.cc \
RESOURCES = ../qcheckers.qrc ../icons.qrc
-TRANSLATIONS = ../lang/qcheckers_de.ts ../lang/qcheckers_fr.ts ../lang/qcheckers_ru.ts
-QM_FILES_INSTALL_PATH = $$PREFIX/share/qcheckers/lang
+TRANSLATIONS = $$system("find ../lang/ -name 'qcheckers_*.ts'")
+updateqm.input = TRANSLATIONS
+updateqm.output = ../lang/translations/${QMAKE_FILE_BASE}.qm
+updateqm.commands = $$[QT_INSTALL_BINS]/lrelease ${QMAKE_FILE_IN} -qm ../lang/translations/${QMAKE_FILE_BASE}.qm
+updateqm.CONFIG += no_link target_predeps
+QMAKE_EXTRA_COMPILERS += updateqm
# Set binary install path
target.path = $$PREFIX/bin
@@ -38,7 +42,7 @@ INSTALLS += target
# Install data files
share.path += $$PREFIX/share/qcheckers
-share.files += qcheckers.pdn ../COPYING ../AUTHORS ../ChangeLog ../README ../themes
+share.files += qcheckers.pdn ../themes ../lang/translations
INSTALLS += share
# Install desktop entry