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:39 +0100
commit4c786d49ae4ba3387a14057da5c4487b698e976d (patch)
tree34e607da77d8db025783f4c5a49915a257081ce5 /translations/CMakeLists.txt
parent84eae75a2185f3b48e25aaddc1e97a068298aea0 (diff)
downloadknetstats-4c786d49ae4ba3387a14057da5c4487b698e976d.tar.gz
knetstats-4c786d49ae4ba3387a14057da5c4487b698e976d.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 395c1540bb8b05b1d7b2feab203ba15a1c38d8d8)
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( )