summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-06-21 11:37:26 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-06-21 11:37:27 +0200
commit3d7a0102b1abb948396b5c5c82aace91c4c0f22c (patch)
tree00409658bd767b99c026d2a3a65157deb05cc75c
parent2d5bba7248e81f0b901ed2637867418b4bce8a8d (diff)
downloadkdbusnotification-3d7a0102.tar.gz
kdbusnotification-3d7a0102.zip
Add translations for the daemon as such.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/CMakeL10n.txt2
-rw-r--r--src/daemon/CMakeL10n.txt3
-rw-r--r--translations/CMakeLists.txt1
-rw-r--r--translations/messages/CMakeLists.txt14
-rw-r--r--translations/messages/notification-daemon-tde/daemon.pot40
6 files changed, 67 insertions, 0 deletions
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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\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 ""