summaryrefslogtreecommitdiffstats
path: root/modules/TDEL10n.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/TDEL10n.cmake')
-rw-r--r--modules/TDEL10n.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/TDEL10n.cmake b/modules/TDEL10n.cmake
index 58a4313..9702553 100644
--- a/modules/TDEL10n.cmake
+++ b/modules/TDEL10n.cmake
@@ -432,11 +432,13 @@ macro( tde_l10n_create_template )
# update references for resources to original files and line numbers
if( _rcs OR _attributes )
- file( STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/extracted-rc.tde_l10n" _extractedRC )
- list( LENGTH _extractedRC _extractedRC_len )
+ file( READ "${CMAKE_CURRENT_SOURCE_DIR}/extracted-rc.tde_l10n" _extractedRC )
+ string( REGEX REPLACE "[^\n]" "" _extractedRC_len "${_extractedRC}" )
+ string( LENGTH "+${_extractedRC_len}" _extractedRC_len )
set( _rcPos 0 )
while( _rcPos LESS ${_extractedRC_len} )
- list( GET _extractedRC ${_rcPos} _rcLine )
+ string( REGEX REPLACE "^([^\n]*)\n(.*)" "\\1" _rcLine "${_extractedRC}" )
+ string( REGEX REPLACE "^([^\n]*)\n(.*)" "\\2" _extractedRC "${_extractedRC}" )
math( EXPR _rcPos "${_rcPos}+1" )
if( "${_rcLine}" MATCHES "^//i18n: file .* line [0-9]*$" )
string( REGEX REPLACE "^//i18n: file (.*) line ([0-9]*)$" "\\1:\\2" _rcOrig ${_rcLine} )