summaryrefslogtreecommitdiffstats
path: root/kpercentage
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2018-12-27 12:51:39 +0100
committerSlávek Banko <[email protected]>2018-12-27 19:20:18 +0100
commit3aac1fb851abb5452f06a01194806ec41b0dacd8 (patch)
tree09d7b09ec160ff1fc30b121d22a7e468ea1fb0b9 /kpercentage
parent3946c8ef277ca9a214cb9edbcc7cdfc710a5ca3a (diff)
downloadtdeedu-3aac1fb851abb5452f06a01194806ec41b0dacd8.tar.gz
tdeedu-3aac1fb851abb5452f06a01194806ec41b0dacd8.zip
Add CMakeL10n rules.
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit b97668ea3912b7562afd4e4af132a88e8fd5ab16)
Diffstat (limited to 'kpercentage')
-rw-r--r--kpercentage/CMakeL10n.txt3
-rw-r--r--kpercentage/kpercentage/CMakeL10n.txt17
2 files changed, 20 insertions, 0 deletions
diff --git a/kpercentage/CMakeL10n.txt b/kpercentage/CMakeL10n.txt
new file mode 100644
index 00000000..b585ce4a
--- /dev/null
+++ b/kpercentage/CMakeL10n.txt
@@ -0,0 +1,3 @@
+##### create translation templates ##############
+
+tde_l10n_auto_add_subdirectories( )
diff --git a/kpercentage/kpercentage/CMakeL10n.txt b/kpercentage/kpercentage/CMakeL10n.txt
new file mode 100644
index 00000000..d9eee4a4
--- /dev/null
+++ b/kpercentage/kpercentage/CMakeL10n.txt
@@ -0,0 +1,17 @@
+##### prepare right and wrong files #############
+
+unset( _answers_l10n )
+foreach( _answers right.txt wrong.txt )
+ file( READ "${CMAKE_CURRENT_SOURCE_DIR}/${_answers}" _file_data )
+ string( REGEX REPLACE "(^|\n)([^\n]+)" "\\1i18n(\"\\2\");" _file_l10n "${_file_data}" )
+ file( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/${_answers}.tde_l10n" "${_file_l10n}" )
+ list( APPEND _answers_l10n "${_answers}.tde_l10n" )
+endforeach( )
+
+
+##### create translation templates ##############
+
+tde_l10n_create_template(
+ CATALOG "kpercentage"
+ SOURCES "." ${_answers_l10n}
+)