diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-01-08 00:35:30 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-01-08 00:35:30 +0100 |
commit | cea604e003a6e32ee9fd987595a1c7e51daac347 (patch) | |
tree | d799779afc2423ed3e24bc986a7aba351f51410d /CMakeL10n.txt | |
parent | 8dbc69988aeff03749d197ccf9555b858cdcdd43 (diff) | |
download | rosegarden-cea604e003a6e32ee9fd987595a1c7e51daac347.tar.gz rosegarden-cea604e003a6e32ee9fd987595a1c7e51daac347.zip |
Add CMakeL10n rules.
Update translation template.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'CMakeL10n.txt')
-rw-r--r-- | CMakeL10n.txt | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/CMakeL10n.txt b/CMakeL10n.txt new file mode 100644 index 0000000..4e4edff --- /dev/null +++ b/CMakeL10n.txt @@ -0,0 +1,58 @@ +################################################# +# +# (C) 2019 Slávek Banko +# slavek.banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +cmake_minimum_required( VERSION 2.8 ) + + +##### include our cmake modules ################# + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/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 "rosegarden" + SOURCES + "src" + "doc/en/tips" + "data/styles/.tde_l10n" + ATTRIBUTES + ${_fonts_attribs} +) |