blob: f355c7f09382d7b8c1f892b89e6821254b77cd08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
##### prepare level names #######################
file( GLOB_RECURSE _level_files
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/levels/level_*
)
list( SORT _level_files )
unset( _level_files_l10n )
foreach( _level_file ${_level_files} )
file( READ "${CMAKE_CURRENT_SOURCE_DIR}/${_level_file}" _level_data )
string( REGEX REPLACE
"(^|\n)Name=([^\n]+)"
"\\1i18n(\"\\2\");"
_level_l10n "${_level_data}"
)
file( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/${_level_file}.tde_l10n" "${_level_l10n}" )
list( APPEND _level_files_l10n "${_level_file}.tde_l10n" )
endforeach( )
##### create translation templates ##############
tde_l10n_create_template(
CATALOG "katomic"
SOURCES
"."
${_level_files_l10n}
)
tde_l10n_create_template(
CATALOG "desktop_files/katomic.desktop/"
SOURCES katomic.desktop
DESTINATION "${CMAKE_SOURCE_DIR}/translations"
)
|