From 43a24ac12e0b57619fe83c25be0e6f0453b274fa Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 17 Jun 2014 18:44:46 +0200 Subject: [PATCH] Figure out Messages.sh after code refactoring KDED is translated again Rename the core's pot to kdeconnect-core.pot and make sure the library loads the catalog when it's linked to. Provide a separate translations file for all the plugins, together. REVIEW: 118774 --- core/Messages.sh | 10 ++-------- core/daemon.cpp | 3 +++ kded/Messages.sh | 4 ++++ plugins/Messages.sh | 4 ++++ 4 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 kded/Messages.sh create mode 100644 plugins/Messages.sh diff --git a/core/Messages.sh b/core/Messages.sh index 2a61de22c..002bda0cf 100755 --- a/core/Messages.sh +++ b/core/Messages.sh @@ -1,10 +1,4 @@ #!/usr/bin/env bash -$EXTRACTRC `find -name '*.ui' -o -name '*.rc'` >> rc.cpp -$XGETTEXT rc.cpp -o $podir/kdeconnect-kded.pot -rm -f rc.cpp - -#.cpp (-j passed to merge into existing file) -$XGETTEXT `find . -name '*.cpp'` -j -o $podir/kdeconnect-kded.pot - -#.desktop and .notifyrc files doesn't need to be included here +$EXTRACTRC `find . -name '*.ui' -o -name '*.rc'` >> rc.cpp +$XGETTEXT `find . -name '*.cpp'` -o $podir/kdeconnect-core.pot diff --git a/core/daemon.cpp b/core/daemon.cpp index 4243ea9f7..9a259eebf 100644 --- a/core/daemon.cpp +++ b/core/daemon.cpp @@ -41,6 +41,9 @@ #include "backends/devicelink.h" #include "backends/linkprovider.h" +static const KCatalogLoader loader("kdeconnect-core"); +static const KCatalogLoader loaderPlugins("kdeconnect-plugins"); + struct DaemonPrivate { //Different ways to find devices and connect to them diff --git a/kded/Messages.sh b/kded/Messages.sh new file mode 100644 index 000000000..268721e7e --- /dev/null +++ b/kded/Messages.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +$EXTRACTRC `find . -name '*.ui' -o -name '*.rc'` >> rc.cpp +$XGETTEXT `find . -name '*.cpp'` -o $podir/kdeconnect-kded.pot diff --git a/plugins/Messages.sh b/plugins/Messages.sh new file mode 100644 index 000000000..93278d219 --- /dev/null +++ b/plugins/Messages.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +$EXTRACTRC `find . -name '*.ui' -o -name '*.rc'` >> rc.cpp +$XGETTEXT `find . -name '*.cpp'` -o $podir/kdeconnect-plugins.pot