summaryrefslogtreecommitdiffstats
path: root/CMakeL10n.txt
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-01-09 20:09:00 +0100
committerSlávek Banko <[email protected]>2019-01-11 14:44:31 +0100
commit02e400a3aa47adaeb6b5c0b3e947c53e32d83dbf (patch)
tree8d2b3a049d4dc950b6dffcb09ea850f0b15e97e1 /CMakeL10n.txt
parentee7ee75ee01073595081f9e96b03c31f1b8125d3 (diff)
downloadkvirc-02e400a3aa47adaeb6b5c0b3e947c53e32d83dbf.tar.gz
kvirc-02e400a3aa47adaeb6b5c0b3e947c53e32d83dbf.zip
Add CMakeL10n rules.
Create translation template. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 0fbed184dad1ff80086bf6b3cd5d411837f3cacb)
Diffstat (limited to 'CMakeL10n.txt')
-rw-r--r--CMakeL10n.txt67
1 files changed, 67 insertions, 0 deletions
diff --git a/CMakeL10n.txt b/CMakeL10n.txt
new file mode 100644
index 00000000..5b8de3d2
--- /dev/null
+++ b/CMakeL10n.txt
@@ -0,0 +1,67 @@
+#################################################
+#
+# (C) 2019 Slávek Banko
+# slavek.banko (AT) axis.cz
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+cmake_minimum_required( VERSION 2.8 )
+
+
+##### include our cmake modules #################
+
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
+include( TDEL10n )
+
+
+##### force to use standard xgettext ############
+
+set( __bak_KDE_XGETTEXT_EXECUTABLE ${KDE_XGETTEXT_EXECUTABLE} )
+set( KDE_XGETTEXT_EXECUTABLE "${XGETTEXT_EXECUTABLE}" )
+
+
+##### create translation templates ##############
+
+tde_l10n_create_template(
+ CATALOG "kvirc"
+ SOURCES
+ "src"
+ "data/defscript/*.kvs"
+ KEYWORDS
+ - i18n:1c,2
+ __tr __tr_no_lookup __tr2qs __tr2wc __tr2ws tr
+ X-POT -
+ DESTINATION "po/kvirc"
+)
+
+file( GLOB _modules
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po/modules
+ "${CMAKE_CURRENT_SOURCE_DIR}/po/modules/*"
+)
+foreach( _module ${_modules} )
+ if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/po/modules/${_module} AND
+ IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/${_module} )
+
+ tde_l10n_create_template(
+ CATALOG "${_module}"
+ SOURCES
+ "src/modules/${_module}"
+ KEYWORDS
+ - i18n:1c,2
+ __tr_ctx __tr_no_lookup_ctx __tr_no_lookup
+ __tr2qs_ctx __tr2wc_ctx __tr2ws_ctx __tr2qs_no_lookup
+ X-POT -
+ DESTINATION "po/modules/${_module}"
+ )
+ endif( )
+endforeach( )
+
+
+##### restore kde-xgettext ######################
+
+set( KDE_XGETTEXT_EXECUTABLE "${__bak_KDE_XGETTEXT_EXECUTABLE}" )
+unset( __bak_KDE_XGETTEXT_EXECUTABLE )