summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-03-15 18:59:44 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-03-23 17:28:45 +0100
commita86292d71a098c2b956915077d4249687e43674a (patch)
tree9f7498a15766a5887fb49cc9181e6527cb5dcccc
parentc838406b19f8d1f2a0b8496b01670b199adf1029 (diff)
downloadtde-cmake-a86292d71a098c2b956915077d4249687e43674a.tar.gz
tde-cmake-a86292d71a098c2b956915077d4249687e43674a.zip
Update TDEL10n module
+ Pick *.directory, *.kcsrc and *.themerc files as desktop style files. + Add the ability to specify source files explicitly as desktop style. + Override default keywords for desktop style files to exclude Icon. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit aa852adcd2ad1b19579a07a5fc8473394a698bd4)
-rw-r--r--modules/TDEL10n.cmake21
1 files changed, 15 insertions, 6 deletions
diff --git a/modules/TDEL10n.cmake b/modules/TDEL10n.cmake
index 62aad3a..7c29dd8 100644
--- a/modules/TDEL10n.cmake
+++ b/modules/TDEL10n.cmake
@@ -1,6 +1,6 @@
#################################################
#
-# (C) 2018-2019 Slávek Banko
+# (C) 2018-2020 Slávek Banko
# slavek (DOT) banko (AT) axis.cz
#
# Improvements and feedback are welcome
@@ -214,7 +214,9 @@ macro( tde_l10n_create_template )
unset( _directive )
set( _var _catalog )
set( _keywords_c_default "i18n" "i18n:1,2" "tr2i18n" "tr2i18n:1,2" "I18N_NOOP" "I18N_NOOP2" )
- set( _keywords_desktop_default "Description" "ExtraNames" "X-TDE-Submenu" )
+ set( _keywords_desktop_default
+ "-" "Name" "GenericName" "Comment" "Keywords"
+ "Description" "ExtraNames" "X-TDE-Submenu" )
foreach( _arg ${ARGN} )
@@ -232,6 +234,13 @@ macro( tde_l10n_create_template )
set( _directive 1 )
endif( )
+ # found directive "SOURCES_DESKTOP"
+ if( "+${_arg}" STREQUAL "+SOURCES_DESKTOP" )
+ unset( _desktops )
+ set( _var _desktops )
+ set( _directive 1 )
+ endif( )
+
# found directive "EXCLUDES"
if( "+${_arg}" STREQUAL "+EXCLUDES" )
unset( _excludes )
@@ -312,7 +321,7 @@ macro( tde_l10n_create_template )
message( STATUS "Create translation template ${_potFilename}" )
# verify sources
- if( NOT _sources AND NOT _attributes )
+ if( NOT _sources AND NOT _attributes AND NOT _desktops )
# add current directory
list( APPEND _sources "." )
endif( )
@@ -364,7 +373,7 @@ macro( tde_l10n_create_template )
endforeach( )
endforeach( )
endif( )
- if( NOT _files AND NOT _attributes )
+ if( NOT _files AND NOT _attributes AND NOT _desktops )
tde_message_fatal( "no source files found" )
endif( )
@@ -505,9 +514,9 @@ macro( tde_l10n_create_template )
endif( )
endforeach( )
- # pick desktop files *.desktop and *.protocol
+ # pick desktop files - *.desktop, *.directory, *.kcsrc, *.protocol and *.themerc
foreach( _src ${_files} )
- if( ${_src} MATCHES "\\.(desktop|protocol)(\\.cmake)?$" )
+ if( ${_src} MATCHES "\\.(desktop|directory|kcsrc|protocol|themerc)(\\.cmake)?$" )
list( APPEND _desktops ${_src} )
list( REMOVE_ITEM _files ${_src} )
endif( )