summaryrefslogtreecommitdiffstats
path: root/CMakeL10n.txt
blob: 6803506000aab2e70963afcfbc00a149899895ce (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#################################################
#
#  (C) 2019 Slávek Banko
#  slavek.banko (AT) axis.cz
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################


##### set project version ########################

include( TDEVersion )
cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )


##### include our cmake modules #################

include( TDEL10n )


##### prepare strings from data files ###########

## style names
file( GLOB_RECURSE _style_files
      RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
      ${CMAKE_CURRENT_SOURCE_DIR}/data/styles/*.xml )
unset( _styles_l10n )
foreach( _style_file ${_style_files} )
    get_filename_component( _style_name "${_style_file}" NAME_WE )
    string( REPLACE "_" " " _style_name "${_style_name}" )
    set( _styles_l10n "${_styles_l10n}i18n(\"${_style_name}\");\n" )
endforeach( )
file( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/data/styles/.tde_l10n" "${_styles_l10n}" )

## font attributes
set( _fonts_attribs "data/fonts/mappings/*.xml" )
foreach( _fonts_attrib
    "rosegarden-font-encoding,name"
    "font-information,origin"
    "font-information,copyright"
    "font-information,mapped-by"
    "font-information,type" )

    set( _fonts_attribs "${_fonts_attribs}:${_fonts_attrib}" )
endforeach( )


##### create translation templates ##############

tde_l10n_create_template(
    CATALOG "messages/rosegarden"
    SOURCES
        "src"
        "doc/en/tips"
        "data/styles/.tde_l10n"
    ATTRIBUTES
        ${_fonts_attribs}
)

tde_l10n_create_template(
    CATALOG "desktop_files/rosegarden-desktops"
    SOURCES data/desktop/*.desktop
)