Update TDEL10n module

+ Little modification in code formatting.
+ Added comment about editing the list inside foreach.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/7/head
Slávek Banko 5 years ago
parent 0f348d894e
commit 4eb308f914
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -155,6 +155,12 @@ endfunction( )
##### source_spec:element,attribute[,context]
##### DESTINATION determines directory to save translation template.
#####
##### Note:
##### Editing the _files list inside foreach( ${_files} ) below in the
##### code is safe, because in CMake foreach parameters are evaluated
##### before the loop starts. Therefore, the changes in the list inside
##### the loop do not have an unwanted impact on the loop processing.
#####
macro( tde_l10n_create_template )
@ -278,8 +284,9 @@ macro( tde_l10n_create_template )
endif( )
endforeach( )
# add common translator info
if( _files )
# add common translator info
set( _translatorinfo
"i18n(\"NAME OF TRANSLATORS\", \"Your names\")\n"
"i18n(\"EMAIL OF TRANSLATORS\", \"Your emails\")\n"
@ -287,8 +294,9 @@ macro( tde_l10n_create_template )
file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/_translatorinfo.tde_l10n ${_translatorinfo} )
list( INSERT _files 0 "_translatorinfo.tde_l10n" )
endif( )
# filter files by excludes
if( _excludes )
# filter files by excludes
foreach( _src ${_files} )
foreach( _exclude ${_excludes} )
if( ${_src} MATCHES ${_exclude} )

Loading…
Cancel
Save