summary refs log tree commit diff
path: root/cmake
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-13 22:09:26 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-13 22:09:26 +0300
commitccf089ddb650c337dcac75a26990db0360c78024 (patch)
treef53e81ba35466c84ba0b96519b14346fb4393aa7 /cmake
parentAdd read support for room access options (#324) (diff)
downloadnheko-ccf089ddb650c337dcac75a26990db0360c78024.tar.xz
Fix translations
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Translations.cmake15
1 files changed, 8 insertions, 7 deletions
diff --git a/cmake/Translations.cmake b/cmake/Translations.cmake
index 16ca72ed..8ca91883 100644
--- a/cmake/Translations.cmake
+++ b/cmake/Translations.cmake
@@ -2,21 +2,22 @@
 # Generate the translation resource file
 #
 
-FILE(GLOB LANG_TS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/resources/langs/*.ts")
+file(GLOB LANG_TS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/resources/langs/*.ts")
 
 qt5_add_translation(QM_SRC ${LANG_TS_SRC})
+qt5_create_translation(${QM_SRC})
 add_custom_target(LANG_QRC ALL DEPENDS ${QM_SRC})
 
 # Generate a qrc file for the translations
 set(_qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
 
 if(NOT EXISTS ${_qrc})
-    file(WRITE ${_qrc} "<RCC> <qresource prefix=\"/translations\">")
-    foreach(_lang ${QM_SRC})
-        get_filename_component(_filename ${_lang} NAME)
-        file(APPEND ${_qrc} "<file>${_filename}</file>")
-    endforeach(_lang)
-    file(APPEND ${_qrc} "</qresource> </RCC>")
+  file(WRITE ${_qrc} "<RCC>\n <qresource prefix=\"/translations\">\n")
+  foreach(_lang ${QM_SRC})
+    get_filename_component(_filename ${_lang} NAME)
+    file(APPEND ${_qrc} "  <file>${_filename}</file>\n")
+  endforeach(_lang)
+  file(APPEND ${_qrc} " </qresource>\n</RCC>\n")
 endif()
 
 qt5_add_resources(LANG_QRC ${_qrc})