CMakeL10n: Prevent exclusion _translatorinfo when using X-POT.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/78/head
Slávek Banko 3 years ago
parent 285ad7baee
commit fa09639dea
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -525,6 +525,7 @@ macro( tde_l10n_create_template )
endforeach( )
# add common translator info
unset( _tranlatorinfo_pot )
if( _files )
list( FIND _excludes "_translatorinfo" _translatorinfo_index )
if( "${_translatorinfo_index}" LESS 0 )
@ -533,7 +534,13 @@ macro( tde_l10n_create_template )
"i18n(\"EMAIL OF TRANSLATORS\", \"Your emails\")\n"
)
file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/_translatorinfo.tde_l10n ${_translatorinfo} )
list( INSERT _files 0 "_translatorinfo.tde_l10n" )
execute_process(
COMMAND ${KDE_XGETTEXT_EXECUTABLE} --foreign-user -C
${_keywords_c} -o - _translatorinfo.tde_l10n
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE _translatorinfo_pot
)
file( REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/_translatorinfo.tde_l10n )
endif( )
endif( )
@ -545,6 +552,13 @@ macro( tde_l10n_create_template )
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE _pot
)
if( _translatorinfo_pot )
if( _pot )
set( _pot "${_translatorinfo_pot}\n${_pot}" )
else( )
set( _pot "${_translatorinfo_pot}" )
endif( )
endif( )
endif( )
# process desktop files

Loading…
Cancel
Save