|
|
@ -155,6 +155,12 @@ endfunction( )
|
|
|
|
##### source_spec:element,attribute[,context]
|
|
|
|
##### source_spec:element,attribute[,context]
|
|
|
|
##### DESTINATION determines directory to save translation template.
|
|
|
|
##### 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 )
|
|
|
|
macro( tde_l10n_create_template )
|
|
|
|
|
|
|
|
|
|
|
@ -278,8 +284,9 @@ macro( tde_l10n_create_template )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
endforeach( )
|
|
|
|
endforeach( )
|
|
|
|
if( _files )
|
|
|
|
|
|
|
|
# add common translator info
|
|
|
|
# add common translator info
|
|
|
|
|
|
|
|
if( _files )
|
|
|
|
set( _translatorinfo
|
|
|
|
set( _translatorinfo
|
|
|
|
"i18n(\"NAME OF TRANSLATORS\", \"Your names\")\n"
|
|
|
|
"i18n(\"NAME OF TRANSLATORS\", \"Your names\")\n"
|
|
|
|
"i18n(\"EMAIL OF TRANSLATORS\", \"Your emails\")\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} )
|
|
|
|
file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/_translatorinfo.tde_l10n ${_translatorinfo} )
|
|
|
|
list( INSERT _files 0 "_translatorinfo.tde_l10n" )
|
|
|
|
list( INSERT _files 0 "_translatorinfo.tde_l10n" )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
if( _excludes )
|
|
|
|
|
|
|
|
# filter files by excludes
|
|
|
|
# filter files by excludes
|
|
|
|
|
|
|
|
if( _excludes )
|
|
|
|
foreach( _src ${_files} )
|
|
|
|
foreach( _src ${_files} )
|
|
|
|
foreach( _exclude ${_excludes} )
|
|
|
|
foreach( _exclude ${_excludes} )
|
|
|
|
if( ${_src} MATCHES ${_exclude} )
|
|
|
|
if( ${_src} MATCHES ${_exclude} )
|
|
|
|