summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-01-13 16:32:25 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-01-13 16:33:09 +0100
commit9259e989bd395a0bbccec9c24ea9cdce08bb422a (patch)
tree9f3eb14f95ceceec9179bc8312b9ad75d94823a9
parent0e523fe55d4d676068247c39a0e7c53a52ca8766 (diff)
downloadtdewebdev-9259e989bd395a0bbccec9c24ea9cdce08bb422a.tar.gz
tdewebdev-9259e989bd395a0bbccec9c24ea9cdce08bb422a.zip
Add CMakeL10n rules.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 1174bdb4683065dc555622f394a36ee1fa2b446c)
-rw-r--r--CMakeL10n.txt28
-rw-r--r--kimagemapeditor/CMakeL10n.txt3
-rw-r--r--klinkstatus/CMakeL10n.txt3
-rw-r--r--klinkstatus/src/CMakeL10n.txt3
-rw-r--r--kommander/CMakeL10n.txt3
-rw-r--r--kxsldbg/CMakeL10n.txt3
-rw-r--r--quanta/CMakeL10n.txt45
7 files changed, 88 insertions, 0 deletions
diff --git a/CMakeL10n.txt b/CMakeL10n.txt
new file mode 100644
index 00000000..74d04a87
--- /dev/null
+++ b/CMakeL10n.txt
@@ -0,0 +1,28 @@
+#################################################
+#
+# (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 )
+
+
+##### set directory for POT files ###############
+
+set( POT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../tde-i18n/template/messages/tdewebdev" )
+
+
+##### create translation templates ##############
+
+tde_l10n_auto_add_subdirectories()
diff --git a/kimagemapeditor/CMakeL10n.txt b/kimagemapeditor/CMakeL10n.txt
new file mode 100644
index 00000000..35419028
--- /dev/null
+++ b/kimagemapeditor/CMakeL10n.txt
@@ -0,0 +1,3 @@
+##### create translation templates ##############
+
+tde_l10n_create_template( "kimagemapeditor" )
diff --git a/klinkstatus/CMakeL10n.txt b/klinkstatus/CMakeL10n.txt
new file mode 100644
index 00000000..b585ce4a
--- /dev/null
+++ b/klinkstatus/CMakeL10n.txt
@@ -0,0 +1,3 @@
+##### create translation templates ##############
+
+tde_l10n_auto_add_subdirectories( )
diff --git a/klinkstatus/src/CMakeL10n.txt b/klinkstatus/src/CMakeL10n.txt
new file mode 100644
index 00000000..15d6cad7
--- /dev/null
+++ b/klinkstatus/src/CMakeL10n.txt
@@ -0,0 +1,3 @@
+##### create translation templates ##############
+
+tde_l10n_create_template( "klinkstatus" )
diff --git a/kommander/CMakeL10n.txt b/kommander/CMakeL10n.txt
new file mode 100644
index 00000000..0efe7f6a
--- /dev/null
+++ b/kommander/CMakeL10n.txt
@@ -0,0 +1,3 @@
+##### create translation templates ##############
+
+tde_l10n_create_template( "kommander" )
diff --git a/kxsldbg/CMakeL10n.txt b/kxsldbg/CMakeL10n.txt
new file mode 100644
index 00000000..c758693d
--- /dev/null
+++ b/kxsldbg/CMakeL10n.txt
@@ -0,0 +1,3 @@
+##### create translation templates ##############
+
+tde_l10n_create_template( "kxsldbg" )
diff --git a/quanta/CMakeL10n.txt b/quanta/CMakeL10n.txt
new file mode 100644
index 00000000..295a764d
--- /dev/null
+++ b/quanta/CMakeL10n.txt
@@ -0,0 +1,45 @@
+##### prepare strings from data files ###########
+
+message( STATUS "Prepare to extract strings from quanta data files..." )
+
+## extra resources
+unset( _resources_l10n )
+file( GLOB_RECURSE _resources_files
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/data/toolbars/*.actions
+ ${CMAKE_CURRENT_SOURCE_DIR}/data/toolbars/*.toolbar
+ ${CMAKE_CURRENT_SOURCE_DIR}/*.kmdr
+)
+list( SORT _resources_files )
+foreach( _resource_file ${_resources_files} )
+ tde_l10n_prepare_xml( "${_resource_file}" )
+ list( APPEND _resources_l10n "${_resource_file}.tde_l10n" )
+endforeach( )
+
+## chars
+file( READ "${CMAKE_CURRENT_SOURCE_DIR}/data/chars" _chars_file )
+string( REPLACE "\"" "\\\"" _chars_l10n "${_chars_file}" )
+string( REGEX REPLACE
+ "(^|\n)([^\n]+)"
+ "\\1i18n(\"\\2\");"
+ _chars_l10n "${_chars_l10n}"
+)
+file( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/data/chars.tde_l10n" "${_chars_l10n}" )
+
+
+##### create translation templates ##############
+
+tde_l10n_create_template(
+ CATALOG "quanta"
+ SOURCES
+ "."
+ "../lib"
+ ${_resources_l10n}
+ "data/chars.tde_l10n"
+ "data/tips"
+ ATTRIBUTES
+ "data/toolbars/*.actions:action,text"
+ "data/toolbars/*.toolbar:action,text"
+ "data/config/actions.rc:action,text"
+ "*.tag:tag,comment"
+)