From 8f6543355110a109878bde10b912555019af1212 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Wed, 15 Aug 2012 01:04:14 +0200 Subject: adding locale support to libsowatch --- libsowatch/allwatchscanner.cpp | 4 ++++ libsowatch/allwatchscanner.h | 2 +- libsowatch/libsowatch.pro | 7 ++++++- libsowatch/libsowatch_en.ts | 31 +++++++++++++++++++++++++++++++ libsowatch/libsowatch_es.ts | 31 +++++++++++++++++++++++++++++++ libsowatch/sowatch_global.h | 21 ++++++++++++--------- 6 files changed, 85 insertions(+), 11 deletions(-) create mode 100644 libsowatch/libsowatch_en.ts create mode 100644 libsowatch/libsowatch_es.ts (limited to 'libsowatch') 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 + +#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 #include -#include +#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 @@ + + + + + sowatch::Notification + + + %n second(s) ago + + %n second ago + %n seconds ago + + + + + %n minute(s) ago + + %n minute ago + %n minutes ago + + + + + %n hour(s) ago + + %n hour ago + %n hours ago + + + + 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 @@ + + + + + sowatch::Notification + + + %n second(s) ago + + hace %n segundo + hace %n segundos + + + + + %n minute(s) ago + + hace %n minuto + hace %n minutos + + + + + %n hour(s) ago + + hace %n hora + hace %n horas + + + + 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 -- cgit v1.2.3