diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-02-25 18:46:50 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-02-25 18:46:50 +0100 |
commit | 00f4f533aa6f64582f647fe891c761b311fb1ac3 (patch) | |
tree | f598d755f90bb25142ad3c494f4e70b1c8dc6e06 /translations/CMakeLists.txt | |
parent | 3133bb3ea0be5a3e0e3688db9fb3077a772f53a0 (diff) | |
download | MultiMC-00f4f533aa6f64582f647fe891c761b311fb1ac3.tar MultiMC-00f4f533aa6f64582f647fe891c761b311fb1ac3.tar.gz MultiMC-00f4f533aa6f64582f647fe891c761b311fb1ac3.tar.lz MultiMC-00f4f533aa6f64582f647fe891c761b311fb1ac3.tar.xz MultiMC-00f4f533aa6f64582f647fe891c761b311fb1ac3.zip |
Fix to the way translations are handled. Also updated the german translation with the new strings.
Diffstat (limited to 'translations/CMakeLists.txt')
-rw-r--r-- | translations/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt new file mode 100644 index 00000000..7463ae40 --- /dev/null +++ b/translations/CMakeLists.txt @@ -0,0 +1,20 @@ +set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1) + +### translation stuff + +file(GLOB TRANSLATION_FILES ${CMAKE_CURRENT_LIST_DIR}/*.ts) +set(FILES_TO_TRANSLATE_ABSOLUTE) +foreach(file ${FILES_TO_TRANSLATE}) + list(APPEND FILES_TO_TRANSLATE_ABSOLUTE "${CMAKE_SOURCE_DIR}/${file}") +endforeach() + +qt5_create_translation(TRANSLATION_MESSAGES ${FILES_TO_TRANSLATE_ABSOLUTE} ${TRANSLATION_FILES}) +qt5_add_translation(TRANSLATION_QM ${TRANSLATION_FILES}) +add_custom_target(translations_update DEPENDS ${TRANSLATION_MESSAGES}) +add_custom_target(translations DEPENDS ${TRANSLATION_QM}) + +IF(APPLE AND UNIX) ## OSX + install(FILES ${TRANSLATION_QM} DESTINATION MultiMC.app/Contents/MacOS/translations) +ELSE() + install(FILES ${TRANSLATION_QM} DESTINATION translations) +ENDIF() |