summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-12-20 18:46:01 +0100
committerSlávek Banko <slavek.banko@axis.cz>2018-12-20 18:50:33 +0100
commit66c73b1bc2823c2849eb4f12af8922d60bca8ce1 (patch)
treef790a3ab2f14c6a3f0639899eb8549d881effc6a /CMakeLists.txt
parent06d2c2be77f50b83f04dd86e3d9a68473b72d1ae (diff)
downloadk3b-i18n-66c73b1bc2823c2849eb4f12af8922d60bca8ce1.tar.gz
k3b-i18n-66c73b1bc2823c2849eb4f12af8922d60bca8ce1.zip
Add translation templates.
Modify CMake rules for translations to make them independent of languages. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 9fed4e832edb35b2d169172a8380453aac98b143)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ebcbd95..0d87eda 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,7 +57,19 @@ option( BUILD_DOC "Build documentation" ON )
option( BUILD_MESSAGES "Build message and GUI translation" ON )
+###### build translations for all languages #####
+
+if( BUILD_MESSAGES )
+ file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} */messages/*.po )
+
+ foreach( _po ${po_files} )
+ string( REPLACE "/" ";" _path "${_po}" )
+ list( GET _path 0 _lang )
+ tde_create_translation( FILES ${_po} LANG ${_lang} )
+ endforeach( )
+endif( )
+
+
###### subdirectories ###########################
tde_auto_add_subdirectories( )
-