diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2018-12-10 03:15:20 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2018-12-10 03:15:36 +0100 |
commit | 8349b4a317609218e2fee98c08af883f50f91c67 (patch) | |
tree | 24f8cfe03d5748bfb21bfdc732208be071456b9d | |
parent | 3cfc9620c8b7afe9ed159bc64fde60404267bf91 (diff) | |
download | tde-cmake-8349b4a317609218e2fee98c08af883f50f91c67.tar.gz tde-cmake-8349b4a317609218e2fee98c08af883f50f91c67.zip |
Update TDEL10n module
+ Fix unwanted semicolons processing within CMake.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit b88855a2934b96a2af767d1cecfae5ca66641fdf)
-rw-r--r-- | modules/TDEL10n.cmake | 30 |
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 ) |