Browse Source

Add CMakeL10n rules.

Update translation template.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
master
Slávek Banko 4 months ago
parent
commit
cea604e003
Signed by: Slávek Banko <slavek.banko@axis.cz> GPG Key ID: 608F5293A04BE668
2 changed files with 6119 additions and 5832 deletions
  1. 58
    0
      CMakeL10n.txt
  2. 6061
    5832
      po/rosegarden.pot

+ 58
- 0
CMakeL10n.txt View File

@@ -0,0 +1,58 @@
1
+#################################################
2
+#
3
+#  (C) 2019 Slávek Banko
4
+#  slavek.banko (AT) axis.cz
5
+#
6
+#  Improvements and feedback are welcome
7
+#
8
+#  This file is released under GPL >= 2
9
+#
10
+#################################################
11
+
12
+cmake_minimum_required( VERSION 2.8 )
13
+
14
+
15
+##### include our cmake modules #################
16
+
17
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
18
+include( TDEL10n )
19
+
20
+
21
+##### prepare strings from data files ###########
22
+
23
+## style names
24
+file( GLOB_RECURSE _style_files
25
+      RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
26
+      ${CMAKE_CURRENT_SOURCE_DIR}/data/styles/*.xml )
27
+unset( _styles_l10n )
28
+foreach( _style_file ${_style_files} )
29
+    get_filename_component( _style_name "${_style_file}" NAME_WE )
30
+    string( REPLACE "_" " " _style_name "${_style_name}" )
31
+    set( _styles_l10n "${_styles_l10n}i18n(\"${_style_name}\");\n" )
32
+endforeach( )
33
+file( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/data/styles/.tde_l10n" "${_styles_l10n}" )
34
+
35
+## font attributes
36
+set( _fonts_attribs "data/fonts/mappings/*.xml" )
37
+foreach( _fonts_attrib
38
+    "rosegarden-font-encoding,name"
39
+    "font-information,origin"
40
+    "font-information,copyright"
41
+    "font-information,mapped-by"
42
+    "font-information,type" )
43
+
44
+    set( _fonts_attribs "${_fonts_attribs}:${_fonts_attrib}" )
45
+endforeach( )
46
+
47
+
48
+##### create translation templates ##############
49
+
50
+tde_l10n_create_template(
51
+    CATALOG "rosegarden"
52
+    SOURCES
53
+        "src"
54
+        "doc/en/tips"
55
+        "data/styles/.tde_l10n"
56
+    ATTRIBUTES
57
+        ${_fonts_attribs}
58
+)

+ 6061
- 5832
po/rosegarden.pot
File diff suppressed because it is too large
View File


Loading…
Cancel
Save