summaryrefslogtreecommitdiff
path: root/libsowatch
diff options
context:
space:
mode:
Diffstat (limited to 'libsowatch')
-rw-r--r--libsowatch/allwatchscanner.cpp4
-rw-r--r--libsowatch/allwatchscanner.h2
-rw-r--r--libsowatch/libsowatch.pro7
-rw-r--r--libsowatch/libsowatch_en.ts31
-rw-r--r--libsowatch/libsowatch_es.ts31
-rw-r--r--libsowatch/sowatch_global.h21
6 files changed, 85 insertions, 11 deletions
diff --git a/libsowatch/allwatchscanner.cpp b/libsowatch/allwatchscanner.cpp
index 8a49b86..97f8454 100644
--- a/libsowatch/allwatchscanner.cpp
+++ b/libsowatch/allwatchscanner.cpp
@@ -1,3 +1,7 @@
+#include <QtCore/QDebug>
+
+#include "registry.h"
+#include "watchplugininterface.h"
#include "allwatchscanner.h"
using namespace sowatch;
diff --git a/libsowatch/allwatchscanner.h b/libsowatch/allwatchscanner.h
index ac0baae..561c6a8 100644
--- a/libsowatch/allwatchscanner.h
+++ b/libsowatch/allwatchscanner.h
@@ -4,7 +4,7 @@
#include <QtCore/QObject>
#include <QtCore/QList>
-#include <sowatch.h>
+#include "watchscanner.h"
namespace sowatch
{
diff --git a/libsowatch/libsowatch.pro b/libsowatch/libsowatch.pro
index 59f2eee..ce0468e 100644
--- a/libsowatch/libsowatch.pro
+++ b/libsowatch/libsowatch.pro
@@ -59,13 +59,18 @@ HEADERS += \
gconfkey.h \
notificationsmodel.h
+TRANSLATIONS += libsowatch_en.ts libsowatch_es.ts
+
install_headers.files = $$HEADERS
+install_translations.files = libsowatch*.qm
install_headers.path = /usr/include/sowatch
!isEmpty(MEEGO_VERSION_MAJOR)|maemo5 {
target.path = /opt/sowatch/lib
+ install_translations.path = /opt/sowatch/i18n
} else {
target.path = /usr/lib
+ install_translations.path = /usr/share/sowatch/i18n
}
-INSTALLS += install_headers target
+INSTALLS += install_headers install_translations target
diff --git a/libsowatch/libsowatch_en.ts b/libsowatch/libsowatch_en.ts
new file mode 100644
index 0000000..eb24692
--- /dev/null
+++ b/libsowatch/libsowatch_en.ts
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+ <name>sowatch::Notification</name>
+ <message numerus="yes">
+ <location filename="notification.cpp" line="21"/>
+ <source>%n second(s) ago</source>
+ <translation>
+ <numerusform>%n second ago</numerusform>
+ <numerusform>%n seconds ago</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location filename="notification.cpp" line="24"/>
+ <source>%n minute(s) ago</source>
+ <translation>
+ <numerusform>%n minute ago</numerusform>
+ <numerusform>%n minutes ago</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location filename="notification.cpp" line="27"/>
+ <source>%n hour(s) ago</source>
+ <translation>
+ <numerusform>%n hour ago</numerusform>
+ <numerusform>%n hours ago</numerusform>
+ </translation>
+ </message>
+</context>
+</TS>
diff --git a/libsowatch/libsowatch_es.ts b/libsowatch/libsowatch_es.ts
new file mode 100644
index 0000000..2d19ef2
--- /dev/null
+++ b/libsowatch/libsowatch_es.ts
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="es_ES">
+<context>
+ <name>sowatch::Notification</name>
+ <message numerus="yes">
+ <location filename="notification.cpp" line="21"/>
+ <source>%n second(s) ago</source>
+ <translation>
+ <numerusform>hace %n segundo</numerusform>
+ <numerusform>hace %n segundos</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location filename="notification.cpp" line="24"/>
+ <source>%n minute(s) ago</source>
+ <translation>
+ <numerusform>hace %n minuto</numerusform>
+ <numerusform>hace %n minutos</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location filename="notification.cpp" line="27"/>
+ <source>%n hour(s) ago</source>
+ <translation>
+ <numerusform>hace %n hora</numerusform>
+ <numerusform>hace %n horas</numerusform>
+ </translation>
+ </message>
+</context>
+</TS>
diff --git a/libsowatch/sowatch_global.h b/libsowatch/sowatch_global.h
index b537930..3e2f795 100644
--- a/libsowatch/sowatch_global.h
+++ b/libsowatch/sowatch_global.h
@@ -11,17 +11,20 @@
#endif
#if defined(QT_SIMULATOR) || (!defined(MEEGO_VERSION_MAJOR) && !defined(Q_WS_MAEMO_5) && !defined(QT_NO_DEBUG))
-# define SOWATCH_PLUGINS_DIR ".."
-# define SOWATCH_RESOURCES_DIR ".."
-# define SOWATCH_QML_DIR ".."
+# define SOWATCH_PLUGINS_DIR ".."
+# define SOWATCH_RESOURCES_DIR ".."
+# define SOWATCH_QML_DIR ".."
+# define SOWATCH_I18N_DIR ".."
#elif defined(MEEGO_VERSION_MAJOR) || defined(Q_WS_MAEMO_5)
-# define SOWATCH_PLUGINS_DIR "/opt/sowatch/lib"
-# define SOWATCH_RESOURCES_DIR "/opt/sowatch/share"
-# define SOWATCH_QML_DIR "/opt/sowatch/qml"
+# define SOWATCH_PLUGINS_DIR "/opt/sowatch/lib"
+# define SOWATCH_RESOURCES_DIR "/opt/sowatch/share"
+# define SOWATCH_QML_DIR "/opt/sowatch/qml"
+# define SOWATCH_I18N_DIR "/opt/sowatch/i18n"
#elif defined(Q_OS_LINUX)
-# define SOWATCH_PLUGINS_DIR "/usr/lib/sowatch"
-# define SOWATCH_RESOURCES_DIR "/usr/share/sowatch"
-# define SOWATCH_QML_DIR SOWATCH_RESOURCES_DIR "/qml"
+# define SOWATCH_PLUGINS_DIR "/usr/lib/sowatch"
+# define SOWATCH_RESOURCES_DIR "/usr/share/sowatch"
+# define SOWATCH_QML_DIR SOWATCH_RESOURCES_DIR "/qml"
+# define SOWATCH_I18N_DIR SOWATCH_RESOURCES_DIR "/i18n"
#else
# error Please define the paths for your platform
#endif