summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-05-03 02:39:22 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-05-03 02:39:22 +0200
commit460b0273772f313ff533ba655ccaa11cf7acef5c (patch)
tree9ee16960767f394dd426921f86ae1a710301772d /src
parent51efb685369b4126eeb67225b7a775f9bc2ad66d (diff)
downloadksplash-engine-moodin-460b0273772f313ff533ba655ccaa11cf7acef5c.tar.gz
ksplash-engine-moodin-460b0273772f313ff533ba655ccaa11cf7acef5c.zip
Add the ability to translate:
+ Catalog for strings in the plugin. + Desktop file translations. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeL10n.txt10
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/thememoodin.cpp1
-rw-r--r--src/themes/Architecture/CMakeLists.txt11
-rw-r--r--src/themes/CMakeL10n.txt9
-rw-r--r--src/themes/FingerPrint/CMakeLists.txt11
-rw-r--r--src/themes/MoodinKDE/CMakeLists.txt11
7 files changed, 51 insertions, 8 deletions
diff --git a/src/CMakeL10n.txt b/src/CMakeL10n.txt
new file mode 100644
index 0000000..cdeb121
--- /dev/null
+++ b/src/CMakeL10n.txt
@@ -0,0 +1,10 @@
+##### create translation templates ##############
+
+tde_l10n_create_template( "messages/ksplash-engine-moodin" )
+
+tde_l10n_create_template(
+ CATALOG "desktop_files/ksplashmoodin.desktop/"
+ SOURCES ksplashmoodin.desktop
+)
+
+tde_l10n_auto_add_subdirectories( )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7ad6a22..e635036 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_subdirectory( themes )
+tde_conditional_add_subdirectory( BUILD_THEMES themes )
include_directories(
${CMAKE_BINARY_DIR}
@@ -36,7 +36,7 @@ tde_add_kpart( ksplashmoodin AUTOMOC
##### other data
-install(
- FILES ksplashmoodin.desktop
+tde_create_translated_desktop(
+ SOURCE ksplashmoodin.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)
diff --git a/src/thememoodin.cpp b/src/thememoodin.cpp
index b87b92a..d7fb17f 100644
--- a/src/thememoodin.cpp
+++ b/src/thememoodin.cpp
@@ -37,6 +37,7 @@ K_EXPORT_COMPONENT_FACTORY(ksplashmoodin, KGenericFactory<ThemeMoodin>("ksplash"
ThemeMoodin::ThemeMoodin(TQWidget* parent, const char* name, const TQStringList& args)
:ThemeEngine(parent, name, args)
{
+ TDEGlobal::locale()->insertCatalogue( "ksplash-engine-moodin" );
readSettings();
init();
}
diff --git a/src/themes/Architecture/CMakeLists.txt b/src/themes/Architecture/CMakeLists.txt
index 90bc1fb..5af4a21 100644
--- a/src/themes/Architecture/CMakeLists.txt
+++ b/src/themes/Architecture/CMakeLists.txt
@@ -1,6 +1,13 @@
-file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png )
+file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png *.jpg )
install(
- FILES ${_pics} Background.jpg Theme.rc
+ FILES ${_pics}
DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/Architecture
)
+
+tde_create_translated_desktop(
+ SOURCE Theme.rc
+ KEYWORDS Label1 Label2 Label3 Label4 Label5
+ DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/Architecture
+ PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/themes
+)
diff --git a/src/themes/CMakeL10n.txt b/src/themes/CMakeL10n.txt
new file mode 100644
index 0000000..66cd231
--- /dev/null
+++ b/src/themes/CMakeL10n.txt
@@ -0,0 +1,9 @@
+##### create translation templates ##############
+
+file( GLOB_RECURSE _themes RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} Theme.rc )
+
+tde_l10n_create_template(
+ CATALOG "desktop_files/themes/"
+ SOURCES_DESKTOP ${_themes}
+ KEYWORDS Label1 Label2 Label3 Label4 Label5
+)
diff --git a/src/themes/FingerPrint/CMakeLists.txt b/src/themes/FingerPrint/CMakeLists.txt
index cfcad13..fa5afec 100644
--- a/src/themes/FingerPrint/CMakeLists.txt
+++ b/src/themes/FingerPrint/CMakeLists.txt
@@ -1,6 +1,13 @@
-file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png )
+file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png *.jpg )
install(
- FILES ${_pics} Background.jpg Theme.rc
+ FILES ${_pics}
DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/FingerPrint
)
+
+tde_create_translated_desktop(
+ SOURCE Theme.rc
+ KEYWORDS Label1 Label2 Label3 Label4 Label5
+ DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/FingerPrint
+ PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/themes
+)
diff --git a/src/themes/MoodinKDE/CMakeLists.txt b/src/themes/MoodinKDE/CMakeLists.txt
index d0fbb88..68afed2 100644
--- a/src/themes/MoodinKDE/CMakeLists.txt
+++ b/src/themes/MoodinKDE/CMakeLists.txt
@@ -1,4 +1,13 @@
+file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png *.jpg )
+
install(
- FILES Background.jpg Preview.png Theme.rc
+ FILES ${_pics}
DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/MoodinKDE
)
+
+tde_create_translated_desktop(
+ SOURCE Theme.rc
+ KEYWORDS Label1 Label2 Label3 Label4 Label5
+ DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/MoodinKDE
+ PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/themes
+)