summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/TDEL10n.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/TDEL10n.cmake b/modules/TDEL10n.cmake
index 9702553..dfafa1b 100644
--- a/modules/TDEL10n.cmake
+++ b/modules/TDEL10n.cmake
@@ -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} )