|
|
|
@ -129,6 +129,7 @@ endfunction( )
|
|
|
|
|
##### tde_l10n_create_template(
|
|
|
|
|
##### [CATALOG] file_name
|
|
|
|
|
##### [SOURCES source_spec [source_spec]]
|
|
|
|
|
##### [COMMENT tag]
|
|
|
|
|
##### [EXCLUDES regex [regex]]
|
|
|
|
|
##### [KEYWORDS keyword [keyword]]
|
|
|
|
|
##### [ATTRIBUTES attrib_spec [attrib_spec]]
|
|
|
|
@ -148,6 +149,7 @@ endfunction( )
|
|
|
|
|
##### d) Specify the name of the individual file.
|
|
|
|
|
##### The methods from b) to d) can be combined.
|
|
|
|
|
##### EXCLUDES determines which files are to be excluded from processing
|
|
|
|
|
##### COMMENT determines additional comment to extract by xgettext.
|
|
|
|
|
##### KEYWORDS determines additional keywords for xgettext.
|
|
|
|
|
##### Use "-" if is needed to disable default keywords.
|
|
|
|
|
##### ATTRIBUTES determines files and specification for extractattr:
|
|
|
|
@ -176,6 +178,7 @@ macro( tde_l10n_create_template )
|
|
|
|
|
unset( _pots )
|
|
|
|
|
unset( _dest )
|
|
|
|
|
unset( _keywords_add )
|
|
|
|
|
unset( _comment )
|
|
|
|
|
unset( _attributes )
|
|
|
|
|
unset( _pot )
|
|
|
|
|
unset( _directive )
|
|
|
|
@ -213,6 +216,13 @@ macro( tde_l10n_create_template )
|
|
|
|
|
set( _directive 1 )
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
# found directive "COMMENT"
|
|
|
|
|
if( "+${_arg}" STREQUAL "+COMMENT" )
|
|
|
|
|
unset( _comment )
|
|
|
|
|
set( _var _comment )
|
|
|
|
|
set( _directive 1 )
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
# found directive "KEYWORDS"
|
|
|
|
|
if( "+${_arg}" STREQUAL "+KEYWORDS" )
|
|
|
|
|
unset( _keywords_add )
|
|
|
|
@ -331,6 +341,15 @@ macro( tde_l10n_create_template )
|
|
|
|
|
tde_message_fatal( "no source files found" )
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
# prepare comment
|
|
|
|
|
if( NOT "${_comment}" STREQUAL "" )
|
|
|
|
|
if( "${_comment}" STREQUAL "-" OR "${_comment}" STREQUAL "all" )
|
|
|
|
|
set( _comment "-c" )
|
|
|
|
|
else( )
|
|
|
|
|
set( _comment "-c${_comment}" )
|
|
|
|
|
endif( )
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
# prepare keywords
|
|
|
|
|
unset( _keywords_c )
|
|
|
|
|
unset( _keywords_desktop )
|
|
|
|
@ -417,7 +436,7 @@ macro( tde_l10n_create_template )
|
|
|
|
|
if( _files )
|
|
|
|
|
execute_process(
|
|
|
|
|
COMMAND ${KDE_XGETTEXT_EXECUTABLE} --foreign-user -C
|
|
|
|
|
${_keywords_c} -o - ${_files}
|
|
|
|
|
${_comment} ${_keywords_c} -o - ${_files}
|
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
OUTPUT_VARIABLE _pot
|
|
|
|
|
)
|
|
|
|
|