summaryrefslogtreecommitdiffstats
path: root/kcontrol/kicker/CMakeL10n.txt
blob: 1f79f54931160f9e50bd37ed981d48b9ed9ceed6 (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
##### prepare list of kicker tiles ##############

file( GLOB _kicker_tile_files
  RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/../../kicker/data/tiles
  ${CMAKE_CURRENT_SOURCE_DIR}/../../kicker/data/tiles/*_tiny_up.png
)
list( SORT _kicker_tile_files )
file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/../../kicker/data/tiles.tde_l10n "" )
foreach( _kicker_tile_file ${_kicker_tile_files} )
  string( REGEX REPLACE "_tiny_up\\.png$" "" _kicker_tile ${_kicker_tile_file} )
  string( REGEX REPLACE "[_ ]+" ";" _kicker_tile ${_kicker_tile} )
  unset( _kicker_tile_name )
  foreach( _kicker_tile_part ${_kicker_tile} )
    string( SUBSTRING ${_kicker_tile_part} 0 1 _kicker_tile_first )
    string( SUBSTRING ${_kicker_tile_part} 1 -1 _kicker_tile_rest )
    string( TOUPPER ${_kicker_tile_first} _kicker_tile_first )
    set( _kicker_tile_name "${_kicker_tile_name}${_kicker_tile_first}${_kicker_tile_rest} " )
  endforeach( )
  string( STRIP ${_kicker_tile_name} _kicker_tile_name )
  file( APPEND ${CMAKE_CURRENT_SOURCE_DIR}/../../kicker/data/tiles.tde_l10n "i18n(\"${_kicker_tile_name}\");\n" )
endforeach( )


##### create translation templates ##############
tde_l10n_create_template(
    CATALOG "kcmkicker"
    SOURCES "." "../../kicker/data/tiles.tde_l10n"
)