@ -1,6 +1,6 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# ( C ) 2 0 1 8 - 2 0 19 S l á v e k B a n k o
# ( C ) 2 0 1 8 - 2 0 20 S l á v e k B a n k o
# slavek ( DOT ) banko ( AT ) a x i s . c z
#
# I m p r o v e m e n t s a n d f e e d b a c k a r e w e l c o m e
@ -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
" - " " N a m e " " G e n e r i c N a m e " " C o m m e n t " " K e y w o r d s "
" D e s c r i p t i o n " " E x t r a N a m e s " " X - T D E - S u b m e n u " )
foreach ( _arg ${ ARGN } )
@ -232,6 +234,13 @@ macro( tde_l10n_create_template )
set ( _directive 1 )
endif ( )
# f o u n d d i r e c t i v e " S O U R C E S _ D E S K T O P "
if ( "+${_arg}" STREQUAL "+SOURCES_DESKTOP" )
unset ( _desktops )
set ( _var _desktops )
set ( _directive 1 )
endif ( )
# f o u n d d i r e c t i v e " E X C L U D E S "
if ( "+${_arg}" STREQUAL "+EXCLUDES" )
unset ( _excludes )
@ -312,7 +321,7 @@ macro( tde_l10n_create_template )
message ( STATUS "Create translation template ${_potFilename}" )
# v e r i f y s o u r c e s
if ( NOT _sources AND NOT _attributes )
if ( NOT _sources AND NOT _attributes AND NOT _desktops )
# a d d c u r r e n t d i r e c t o r y
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 ( )
# p i c k d e s k t o p f i l e s *. d e s k t o p a n d * . p r o t o c o l
# p i c k d e s k t o p f i l e s - *. d e s k t o p , * . d i r e c t o r y , * . k c s r c , * . p r o t o c o l a n d * . t h e m e r c
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 ( )