diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-07-29 22:43:34 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-07-30 16:00:07 +0200 |
commit | fe44776673b28ca94338f23d8e7ac71593fa88ba (patch) | |
tree | b900146c853acbd44900bfb77a35a1af3c77aa5d /CMakeL10n.txt | |
parent | c0b663c4c873df495743600b8f703744420eddfa (diff) | |
download | tdevelop-fe44776673b28ca94338f23d8e7ac71593fa88ba.tar.gz tdevelop-fe44776673b28ca94338f23d8e7ac71593fa88ba.zip |
Desktop file translations:
+ Creation of POT template for desktop files added to CMakeL10n rules.
+ Added creation of translated desktop files during build.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'CMakeL10n.txt')
-rw-r--r-- | CMakeL10n.txt | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/CMakeL10n.txt b/CMakeL10n.txt index 36799e40..4f41ba43 100644 --- a/CMakeL10n.txt +++ b/CMakeL10n.txt @@ -33,3 +33,90 @@ tde_l10n_create_template( ) tde_l10n_auto_add_subdirectories() + +file( + GLOB_RECURSE _desktops + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.desktop +) +list( SORT _desktops ) + +file( + GLOB_RECURSE _protocols + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.protocol +) +list( SORT _protocols ) + +file( + GLOB_RECURSE _directories + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.directory +) +list( SORT _directories ) + +file( + GLOB_RECURSE _plugins + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.plugin +) +list( SORT _plugins ) + +file( + GLOB_RECURSE _profiles + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*profile.config +) +list( SORT _profiles ) + +file( + GLOB_RECURSE _template_names + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.kdevtemplate +) +unset( _templates ) +foreach( _template_name IN LISTS _template_names ) + string( REGEX REPLACE "\\.kdevtemplate$" "" _template_base ${_template_name} ) + if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_template_base}" AND + NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_template_base}" ) + list( APPEND _templates "${_template_base}" ) + endif() + list( APPEND _templates "${_template_name}" ) +endforeach() +list( SORT _templates ) + +file( + GLOB_RECURSE _wizards + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/parts/appwizard/imports/* +) +foreach( _wizard_name IN LISTS _wizards ) + if( _wizard_name MATCHES "/(CMakeLists\\.txt|CMakeL10n\\.txt|Makefile\\.am)$" OR + _wizard_name MATCHES "\\.[kt]develop" OR + _wizard_name MATCHES "\\.tde_l10n$" OR + _wizard_name MATCHES "/\\." ) + list( REMOVE_ITEM _wizards ${_wizard_name} ) + endif() +endforeach() +list( SORT _wizards ) + +tde_l10n_create_template( + CATALOG "desktop_files/tdevelop-desktops/" + SOURCES_DESKTOP + ${_desktops} + ${_protocols} + ${_directories} + ${_plugins} + ${_profiles} + ${_templates} + ${_wizards} + KEYWORDS + Category + DESTINATION "${CMAKE_SOURCE_DIR}/translations" +) + +tde_l10n_create_template( + CATALOG "desktop_files/tdevelop-eventsrc/" + SOURCES *eventsrc + DESTINATION "${CMAKE_SOURCE_DIR}/translations" +) |