From 3d7a0102b1abb948396b5c5c82aace91c4c0f22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 21 Jun 2020 11:37:26 +0200 Subject: Add translations for the daemon as such. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- CMakeLists.txt | 7 ++++ src/CMakeL10n.txt | 2 ++ src/daemon/CMakeL10n.txt | 3 ++ translations/CMakeLists.txt | 1 + translations/messages/CMakeLists.txt | 14 ++++++++ .../messages/notification-daemon-tde/daemon.pot | 40 ++++++++++++++++++++++ 6 files changed, 67 insertions(+) create mode 100644 src/daemon/CMakeL10n.txt create mode 100644 translations/CMakeLists.txt create mode 100644 translations/messages/CMakeLists.txt create mode 100644 translations/messages/notification-daemon-tde/daemon.pot diff --git a/CMakeLists.txt b/CMakeLists.txt index a6afb71..72de746 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,12 @@ option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) +##### user requested modules ##### + +option( BUILD_ALL "Build all" ON ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + ##### configure checks include( ConfigureChecks.cmake ) @@ -62,6 +68,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ##### directories add_subdirectory( src ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations ) ##### write configure files diff --git a/src/CMakeL10n.txt b/src/CMakeL10n.txt index 1ab81f1..3b74967 100644 --- a/src/CMakeL10n.txt +++ b/src/CMakeL10n.txt @@ -1,5 +1,7 @@ ##### create translation templates ############## +tde_l10n_auto_add_subdirectories( ) + tde_l10n_create_template( CATALOG "desktop_files/kdbusnotification-autostart.desktop/" SOURCES kdbusnotification-autostart.desktop diff --git a/src/daemon/CMakeL10n.txt b/src/daemon/CMakeL10n.txt new file mode 100644 index 0000000..46afaec --- /dev/null +++ b/src/daemon/CMakeL10n.txt @@ -0,0 +1,3 @@ +##### create translation templates ############## + +tde_l10n_create_template( "messages/notification-daemon-tde/daemon" ) diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt new file mode 100644 index 0000000..42b186a --- /dev/null +++ b/translations/CMakeLists.txt @@ -0,0 +1 @@ +tde_auto_add_subdirectories() diff --git a/translations/messages/CMakeLists.txt b/translations/messages/CMakeLists.txt new file mode 100644 index 0000000..75c89f8 --- /dev/null +++ b/translations/messages/CMakeLists.txt @@ -0,0 +1,14 @@ +file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po ) +string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" ) + +foreach( _po ${po_files} ) + get_filename_component( _lang ${_po} NAME_WE ) + if( "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_lang};" ) + if( "${_po}" MATCHES "^([^/]*)/.*" ) + string( REGEX REPLACE "^([^/]*)/.*" "\\1" _component "${_po}" ) + else( ) + set( _component "${PROJECT_NAME}" ) + endif( ) + tde_create_translation( FILES ${_po} LANG ${_lang} OUTPUT_NAME ${_component} ) + endif( ) +endforeach( ) diff --git a/translations/messages/notification-daemon-tde/daemon.pot b/translations/messages/notification-daemon-tde/daemon.pot new file mode 100644 index 0000000..7e5b83b --- /dev/null +++ b/translations/messages/notification-daemon-tde/daemon.pot @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2020-06-21 10:55+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Instead of a literal translation, add your name to the end of the list (separated by a comma). +#, ignore-inconsistent +msgid "" +"_: NAME OF TRANSLATORS\n" +"Your names" +msgstr "" + +#. Instead of a literal translation, add your email to the end of the list (separated by a comma). +#, ignore-inconsistent +msgid "" +"_: EMAIL OF TRANSLATORS\n" +"Your emails" +msgstr "" + +#: daemon.cpp:85 +msgid "A DBUS notification to TDE interface." +msgstr "" + +#: daemon.cpp:87 +msgid "First release October 2011." +msgstr "" + +#: daemon.cpp:294 +msgid "TDE DBUS Notification Daemon" +msgstr "" -- cgit v1.2.1