Update TDEL10n module

+ Simplify entering a catalog name for placement in a directory of the same name.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 1f4d4093ad)
r14.0.x
Slávek Banko 5 years ago
parent e4ea4fb5f0
commit ca613e7db0
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -155,6 +155,8 @@ endfunction( )
##### #####
##### Where: ##### Where:
##### CATALOG determines the target file name (without pot suffix). ##### CATALOG determines the target file name (without pot suffix).
##### If the name ends with '/', a catalog of the same name
##### will be created in the specified directory.
##### SOURCES can be specified by several options: ##### SOURCES can be specified by several options:
##### a) Do not specify anything ##### a) Do not specify anything
##### - all usual source files will be automatically searched. ##### - all usual source files will be automatically searched.
@ -307,6 +309,11 @@ macro( tde_l10n_create_template )
set( _dest "${CMAKE_CURRENT_SOURCE_DIR}/${_dest}" ) set( _dest "${CMAKE_CURRENT_SOURCE_DIR}/${_dest}" )
endif( ) endif( )
if( ${_catalog} MATCHES "/$" )
string( REGEX REPLACE "/$" "" _catalog "${_catalog}" )
get_filename_component( _catalog_base "${_catalog}" NAME )
set( _catalog "${_catalog}/${_catalog_base}" )
endif( )
get_filename_component( _potFilename "${_dest}${_catalog}.pot" ABSOLUTE ) get_filename_component( _potFilename "${_dest}${_catalog}.pot" ABSOLUTE )
file( RELATIVE_PATH _potFilename ${CMAKE_SOURCE_DIR} ${_potFilename} ) file( RELATIVE_PATH _potFilename ${CMAKE_SOURCE_DIR} ${_potFilename} )
message( STATUS "Create translation template ${_potFilename}" ) message( STATUS "Create translation template ${_potFilename}" )

Loading…
Cancel
Save