diff options
Diffstat (limited to 'tdemid')
-rw-r--r-- | tdemid/CMakeL10n.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tdemid/CMakeL10n.txt b/tdemid/CMakeL10n.txt new file mode 100644 index 00000000..c511041f --- /dev/null +++ b/tdemid/CMakeL10n.txt @@ -0,0 +1,31 @@ +##### prepare instrname.cpp ##################### + +file( READ "${CMAKE_CURRENT_SOURCE_DIR}/instrname.cpp" _instrname_data ) +string( REGEX REPLACE "[^\n]" "" _instrname_len "${_instrname_data}" ) +string( LENGTH "+${_instrname_len}" _instrname_len ) +set( _instrname_pos 0 ) +set( _instrname_l10n "" ) +while( _instrname_pos LESS ${_instrname_len} ) + # pick line + string( REGEX REPLACE "^([^\n]*)\n(.*)" "\\1" _line "${_instrname_data}" ) + string( REGEX REPLACE "^([^\n]*)\n(.*)" "\\2" _instrname_data "${_instrname_data}" ) + math( EXPR _instrname_pos "${_instrname_pos}+1" ) + + # write instrument name + if( "${_line}" MATCHES "\".+\"" ) + string( REGEX MATCH "\".+\"" _line "${_line}" ) + set( _line "i18n(${_line});" ) + else( ) + set( _line "" ) + endif( ) + set( _instrname_l10n "${_instrname_l10n}${_line}\n" ) +endwhile( ) +file( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/instrname.cpp.tde_l10n" "${_instrname_l10n}" ) + + +##### create translation templates ############## + +tde_l10n_create_template( + CATALOG "tdemid" + SOURCES "." "instrname.cpp.tde_l10n" +) |