summaryrefslogtreecommitdiffstats
path: root/translations/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2018-12-11 12:55:10 +0100
committerSlávek Banko <[email protected]>2018-12-11 12:55:10 +0100
commit395c1540bb8b05b1d7b2feab203ba15a1c38d8d8 (patch)
tree18a59eeab94d6cf31b50df8d12a1ddb4dfd6d2a4 /translations/CMakeLists.txt
parent9e759ab9f700596246a80b5284521fb4f86153da (diff)
downloadknetstats-395c1540bb8b05b1d7b2feab203ba15a1c38d8d8.tar.gz
knetstats-395c1540bb8b05b1d7b2feab203ba15a1c38d8d8.zip
Add CMakeL10n rules.
Create translation template. Modify CMake rules for translations to make them independent of languages. Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'translations/CMakeLists.txt')
-rw-r--r--translations/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
index 6d0aa9f..2ce6ef4 100644
--- a/translations/CMakeLists.txt
+++ b/translations/CMakeLists.txt
@@ -1 +1,9 @@
-tde_auto_add_subdirectories( )
+# build translations if some are already available
+
+file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_NAME}.po )
+
+foreach( _po ${po_files} )
+ string( REPLACE "/" ";" _path "${_po}" )
+ list( GET _path 0 _lang )
+ tde_create_translation( FILES ${_po} LANG ${_lang} )
+endforeach( )