From fdabfa4682797a28265bcdf85ea536aecf398b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 22 Dec 2018 20:23:30 +0100 Subject: Add CMakeL10n rules. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- CMakeL10n.txt | 28 ++++++++++++++++++++++++++++ amor/CMakeL10n.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ fifteenapplet/CMakeL10n.txt | 3 +++ kmoon/CMakeL10n.txt | 3 +++ kodo/CMakeL10n.txt | 3 +++ kteatime/CMakeL10n.txt | 3 +++ ktux/CMakeL10n.txt | 3 +++ kweather/CMakeL10n.txt | 3 +++ kworldwatch/CMakeL10n.txt | 3 +++ 9 files changed, 93 insertions(+) create mode 100644 CMakeL10n.txt create mode 100644 amor/CMakeL10n.txt create mode 100644 fifteenapplet/CMakeL10n.txt create mode 100644 kmoon/CMakeL10n.txt create mode 100644 kodo/CMakeL10n.txt create mode 100644 kteatime/CMakeL10n.txt create mode 100644 ktux/CMakeL10n.txt create mode 100644 kweather/CMakeL10n.txt create mode 100644 kworldwatch/CMakeL10n.txt diff --git a/CMakeL10n.txt b/CMakeL10n.txt new file mode 100644 index 0000000..e304b1b --- /dev/null +++ b/CMakeL10n.txt @@ -0,0 +1,28 @@ +################################################# +# +# (C) 2018 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/tdetoys" ) + + +##### create translation templates ############## + +tde_l10n_auto_add_subdirectories() diff --git a/amor/CMakeL10n.txt b/amor/CMakeL10n.txt new file mode 100644 index 0000000..9a458e3 --- /dev/null +++ b/amor/CMakeL10n.txt @@ -0,0 +1,44 @@ +##### prepare data/tips-en ###################### + +file( READ ${CMAKE_CURRENT_SOURCE_DIR}/data/tips-en _tips_file ) +string( REGEX REPLACE "[^\n]" "" _tips_len "${_tips_file}" ) +string( LENGTH "+${_tips_len}" _tips_len ) +unset( _tips_inside ) +unset( _tips_l10n ) +set( _tips_pos 0 ) +while( _tips_pos LESS ${_tips_len} ) + string( REGEX REPLACE "^([^\n]*)\n(.*)" "\\1" _tip_line "${_tips_file}" ) + string( REGEX REPLACE "^([^\n]*)\n(.*)" "\\2" _tips_file "${_tips_file}" ) + math( EXPR _tips_pos "${_tips_pos}+1" ) + + if( "${_tip_line}" STREQUAL "%" ) + if( _tips_inside ) + set( _tip_line ");" ) + unset( _tips_inside ) + else( ) + set( _tip_line "" ) + endif( ) + else( ) + string( REGEX REPLACE "\\\\" "\\\\\\\\" _tip_line "${_tip_line}" ) + string( REGEX REPLACE "\\\"" "\\\\\"" _tip_line "${_tip_line}" ) + string( REGEX REPLACE "\t" "\\\\t" _tip_line "${_tip_line}" ) + if( _tips_inside ) + set( _tip_line "\"\\n${_tip_line}\"" ) + else( ) + if( NOT "${_tip_line}" STREQUAL "" ) + set( _tip_line "i18n(\"${_tip_line}\"" ) + set( _tips_inside 1 ) + endif( ) + endif( ) + endif( ) + set( _tips_l10n "${_tips_l10n}${_tip_line}\n" ) +endwhile( ) +file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/data/tips-en.tde_l10n "${_tips_l10n}" ) + + +##### create translation templates ############## + +tde_l10n_create_template( + CATALOG "amor" + SOURCES "data/tips-en.tde_l10n" "." +) diff --git a/fifteenapplet/CMakeL10n.txt b/fifteenapplet/CMakeL10n.txt new file mode 100644 index 0000000..4e7cce8 --- /dev/null +++ b/fifteenapplet/CMakeL10n.txt @@ -0,0 +1,3 @@ +##### create translation templates ############## + +tde_l10n_create_template( "kfifteenapplet" ) diff --git a/kmoon/CMakeL10n.txt b/kmoon/CMakeL10n.txt new file mode 100644 index 0000000..5e68785 --- /dev/null +++ b/kmoon/CMakeL10n.txt @@ -0,0 +1,3 @@ +##### create translation templates ############## + +tde_l10n_create_template( "kmoon" ) diff --git a/kodo/CMakeL10n.txt b/kodo/CMakeL10n.txt new file mode 100644 index 0000000..14cdaef --- /dev/null +++ b/kodo/CMakeL10n.txt @@ -0,0 +1,3 @@ +##### create translation templates ############## + +tde_l10n_create_template( "kodo" ) diff --git a/kteatime/CMakeL10n.txt b/kteatime/CMakeL10n.txt new file mode 100644 index 0000000..1ad7fd7 --- /dev/null +++ b/kteatime/CMakeL10n.txt @@ -0,0 +1,3 @@ +##### create translation templates ############## + +tde_l10n_create_template( "kteatime" ) diff --git a/ktux/CMakeL10n.txt b/ktux/CMakeL10n.txt new file mode 100644 index 0000000..0877e0d --- /dev/null +++ b/ktux/CMakeL10n.txt @@ -0,0 +1,3 @@ +##### create translation templates ############## + +tde_l10n_create_template( "ktux" ) diff --git a/kweather/CMakeL10n.txt b/kweather/CMakeL10n.txt new file mode 100644 index 0000000..8450dc2 --- /dev/null +++ b/kweather/CMakeL10n.txt @@ -0,0 +1,3 @@ +##### create translation templates ############## + +tde_l10n_create_template( "kweather" ) diff --git a/kworldwatch/CMakeL10n.txt b/kworldwatch/CMakeL10n.txt new file mode 100644 index 0000000..a63584f --- /dev/null +++ b/kworldwatch/CMakeL10n.txt @@ -0,0 +1,3 @@ +##### create translation templates ############## + +tde_l10n_create_template( "kworldclock" ) -- cgit v1.2.1