summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-07-06 15:53:27 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-07-08 03:19:14 +0200
commitfa09639dea9e19cf05593052da9419fc09a0513a (patch)
treed6feab2c7d6570720447765c22ed4a0de7ed92f7 /modules
parent285ad7baee805733bd3492a6055c4577c6e69c45 (diff)
downloadtde-cmake-fa09639dea9e19cf05593052da9419fc09a0513a.tar.gz
tde-cmake-fa09639dea9e19cf05593052da9419fc09a0513a.zip
CMakeL10n: Prevent exclusion _translatorinfo when using X-POT.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'modules')
-rw-r--r--modules/TDEL10n.cmake16
1 files changed, 15 insertions, 1 deletions
diff --git a/modules/TDEL10n.cmake b/modules/TDEL10n.cmake
index 2beadf6..b16b058 100644
--- a/modules/TDEL10n.cmake
+++ b/modules/TDEL10n.cmake
@@ -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