summaryrefslogtreecommitdiffstats
path: root/kcontrol/locale/CMakeL10n.txt
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-12-09 04:00:36 +0100
committerSlávek Banko <slavek.banko@axis.cz>2018-12-09 04:00:36 +0100
commitb95b665c78a047fc540e2bc4a8c19be6db03b825 (patch)
treed458400982a64cea4f679de3419f3ae344ec34a1 /kcontrol/locale/CMakeL10n.txt
parent4fd188ff945d25bc049301e3f033d939bca87565 (diff)
downloadtdebase-b95b665c78a047fc540e2bc4a8c19be6db03b825.tar.gz
tdebase-b95b665c78a047fc540e2bc4a8c19be6db03b825.zip
Add CMakeL10n rules.
Update TIMEZONES list. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kcontrol/locale/CMakeL10n.txt')
-rw-r--r--kcontrol/locale/CMakeL10n.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/kcontrol/locale/CMakeL10n.txt b/kcontrol/locale/CMakeL10n.txt
new file mode 100644
index 000000000..e94d7b7a1
--- /dev/null
+++ b/kcontrol/locale/CMakeL10n.txt
@@ -0,0 +1,33 @@
+##### upate TIMEZONES ###########################
+
+if( EXISTS /usr/share/zoneinfo/zone.tab )
+ message( STATUS "Update TIMEZONES list from system zone table" )
+ unset( _zone_list )
+ file( STRINGS /usr/share/zoneinfo/zone.tab _zone_tab REGEX "^[^#]" )
+ foreach( _zone_line ${_zone_tab} )
+ string( REGEX REPLACE "[ \t]+" ";" _zone_line ${_zone_line} )
+ if( "${_zone_line}" MATCHES ".*;.*;.*" )
+ list( GET _zone_line 2 _zone_name )
+ list( APPEND _zone_list ${_zone_name} )
+ endif( )
+ endforeach( )
+ list( SORT _zone_list )
+ file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/TIMEZONES "" )
+ foreach( _zone_name ${_zone_list} )
+ file( APPEND ${CMAKE_CURRENT_SOURCE_DIR}/TIMEZONES "i18n(\"${_zone_name}\");\n" )
+ endforeach( )
+endif( )
+
+
+##### create translation templates ##############
+
+tde_l10n_create_template(
+ CATALOG "kcmlocale"
+ KEYWORDS translate
+)
+
+tde_l10n_create_template(
+ CATALOG "timezones"
+ SOURCES "TIMEZONES"
+ DESTINATION "${POT_SOURCE_DIR}/../tdelibs"
+)