summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-12-10 03:15:20 +0100
committerSlávek Banko <slavek.banko@axis.cz>2018-12-10 03:15:20 +0100
commitb88855a2934b96a2af767d1cecfae5ca66641fdf (patch)
treef86c67741bafe5948ce27924764b95cf97be7d10
parente66f00401fc3b78e77197f3fa37b72a145a93d2e (diff)
downloadcmake-b88855a2934b96a2af767d1cecfae5ca66641fdf.tar.gz
cmake-b88855a2934b96a2af767d1cecfae5ca66641fdf.zip
Update TDEL10n module
+ Fix unwanted semicolons processing within CMake. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--modules/TDEL10n.cmake30
1 files changed, 15 insertions, 15 deletions
diff --git a/modules/TDEL10n.cmake b/modules/TDEL10n.cmake
index 8c2caf8..503f883 100644
--- a/modules/TDEL10n.cmake
+++ b/modules/TDEL10n.cmake
@@ -431,8 +431,8 @@ macro( tde_l10n_create_template )
# set charset and encoding headers
if( _pot )
- string( REPLACE "Content-Type: text/plain charset=CHARSET" "Content-Type: text/plain charset=UTF-8" _pot ${_pot} )
- string( REPLACE "Content-Transfer-Encoding: ENCODING" "Content-Transfer-Encoding: 8bit" _pot ${_pot} )
+ string( REPLACE "Content-Type: text/plain; charset=CHARSET" "Content-Type: text/plain; charset=UTF-8" _pot "${_pot}" )
+ string( REPLACE "Content-Transfer-Encoding: ENCODING" "Content-Transfer-Encoding: 8bit" _pot "${_pot}" )
endif( )
endif( )
@@ -455,8 +455,8 @@ macro( tde_l10n_create_template )
# merge translation templates
if( _potDesktop )
if( _pot )
- file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/extracted-pot.tmp ${_pot} )
- file( APPEND ${CMAKE_CURRENT_SOURCE_DIR}/extracted-pot.tmp ${_potDesktop} )
+ file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/extracted-pot.tmp "${_pot}" )
+ file( APPEND ${CMAKE_CURRENT_SOURCE_DIR}/extracted-pot.tmp "${_potDesktop}" )
execute_process(
COMMAND ${MSGUNIQ_EXECUTABLE} --use-first
INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/extracted-pot.tmp
@@ -465,18 +465,18 @@ macro( tde_l10n_create_template )
)
file( REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/extracted-pot.tmp )
else( )
- set( _pot ${_potDesktop} )
+ set( _pot "${_potDesktop}" )
# set charset and encoding headers
- string( REPLACE "Content-Type: text/plain charset=CHARSET" "Content-Type: text/plain charset=UTF-8" _pot ${_pot} )
- string( REPLACE "Content-Transfer-Encoding: ENCODING" "Content-Transfer-Encoding: 8bit" _pot ${_pot} )
+ string( REPLACE "Content-Type: text/plain; charset=CHARSET" "Content-Type: text/plain; charset=UTF-8" _pot "${_pot}" )
+ string( REPLACE "Content-Transfer-Encoding: ENCODING" "Content-Transfer-Encoding: 8bit" _pot "${_pot}" )
endif( )
endif( )
endif( )
# merge additional pot files
if( _pots )
- file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/extracted-pot.tmp ${_pot} )
+ file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/extracted-pot.tmp "${_pot}" )
execute_process(
COMMAND ${MSGCAT_EXECUTABLE} --use-first extracted-pot.tmp ${_pots}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -485,8 +485,8 @@ macro( tde_l10n_create_template )
file( REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/extracted-pot.tmp )
# set charset and encoding headers
- string( REPLACE "Content-Type: text/plain charset=CHARSET" "Content-Type: text/plain charset=UTF-8" _pot ${_pot} )
- string( REPLACE "Content-Transfer-Encoding: ENCODING" "Content-Transfer-Encoding: 8bit" _pot ${_pot} )
+ string( REPLACE "Content-Type: text/plain; charset=CHARSET" "Content-Type: text/plain; charset=UTF-8" _pot "${_pot}" )
+ string( REPLACE "Content-Transfer-Encoding: ENCODING" "Content-Transfer-Encoding: 8bit" _pot "${_pot}" )
endif( )
# finalize translation template
@@ -506,14 +506,14 @@ macro( tde_l10n_create_template )
string( REGEX REPLACE "^//i18n: file (.*) line ([0-9]*)$" "\\1:\\2" _rcOrig ${_rcLine} )
endif( )
if( "${_rcLine}" MATCHES "^i18n\\(" AND _rcOrig )
- string( REGEX REPLACE "(^|\n)(#:.*) extracted-rc.tde_l10n:${_rcPos}( |\n)" "\\1\\2 ${_rcOrig}\\3" _pot ${_pot} )
+ string( REGEX REPLACE "(^|\n)(#:.*) extracted-rc.tde_l10n:${_rcPos}( |\n)" "\\1\\2 ${_rcOrig}\\3" _pot "${_pot}" )
unset( _rcOrig )
endif( )
endwhile( )
endif( )
# update references for modified source files (".tde_l10n" extension)
- string( REGEX REPLACE "\\.tde_l10n(:[0-9]+)" "\\1" _pot ${_pot} )
+ string( REGEX REPLACE "\\.tde_l10n(:[0-9]+)" "\\1" _pot "${_pot}" )
# save translation template
if( EXISTS "${_dest}${_catalog}.pot" )
@@ -522,11 +522,11 @@ macro( tde_l10n_create_template )
unset( _potOrig )
endif( )
if( _potOrig )
- string( REGEX REPLACE "\n\"POT-Creation-Date: [^\"]*\"\n" "" _potOrig ${_potOrig} )
- string( REGEX REPLACE "\n\"POT-Creation-Date: [^\"]*\"\n" "" _potNew ${_pot} )
+ string( REGEX REPLACE "\n\"POT-Creation-Date: [^\"]*\"\n" "" _potOrig "${_potOrig}" )
+ string( REGEX REPLACE "\n\"POT-Creation-Date: [^\"]*\"\n" "" _potNew "${_pot}" )
endif( )
if( NOT _potOrig OR NOT "${_potNew}" STREQUAL "${_potOrig}" )
- file( WRITE "${_dest}${_catalog}.pot" ${_pot} )
+ file( WRITE "${_dest}${_catalog}.pot" "${_pot}" )
endif( )
endif( _pot )