summaryrefslogtreecommitdiffstats
path: root/po/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2018-12-13 04:46:09 +0100
committerSlávek Banko <[email protected]>2018-12-13 04:46:27 +0100
commitc0defc64697e8ed2d1facb126abbecdc654621df (patch)
tree07193a4a2d558b84de48776d450d38c8d4da6ac7 /po/CMakeLists.txt
parent2e833a333d3d985d94a24c72f752ede0ffd1144a (diff)
downloadknetload-c0defc64697e8ed2d1facb126abbecdc654621df.tar.gz
knetload-c0defc64697e8ed2d1facb126abbecdc654621df.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]> (cherry picked from commit 5272377bc13d4ce585ae061c0d2dc0bed3d41708)
Diffstat (limited to 'po/CMakeLists.txt')
-rw-r--r--po/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 6d0aa9f..2ce6ef4 100644
--- a/po/CMakeLists.txt
+++ b/po/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( )