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>
pull/33/head
Slávek Banko 4 år sedan
förälder 589e29d020
incheckning aa852adcd2
Ingen känd nyckel hittad för denna signaturen i databasen
GPG-nyckel ID: 608F5293A04BE668

@ -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( )

Laddar…
Avbryt
Spara