-rw-r--r-- | core/pim/today/plugins/datebook/datebookevent.cpp | 4 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 25 |
2 files changed, 24 insertions, 5 deletions
diff --git a/core/pim/today/plugins/datebook/datebookevent.cpp b/core/pim/today/plugins/datebook/datebookevent.cpp index 48f204e..3c1e97a 100644 --- a/core/pim/today/plugins/datebook/datebookevent.cpp +++ b/core/pim/today/plugins/datebook/datebookevent.cpp @@ -46,3 +46,3 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev, if ( (ev).event().hasAlarm() ) { - msg += " <b>[with alarm]</b>"; + msg += " <b>" + tr("[with alarm]") +"</b>"; } @@ -69,3 +69,3 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev, if ( show_notes ) { - msg += "<br> <i>note</i>:" +( (ev).notes() ).mid( 0, maxCharClip ); + msg += "<br> <i>" + tr("note") + "</i>:" +( (ev).notes() ).mid( 0, maxCharClip ); } diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 2f6907d..2497ee1 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -17,2 +17,5 @@ + +#define QTOPIA_INTERNAL_LANGLIST + #include "today.h" @@ -38,3 +41,3 @@ #include <qwhatsthis.h> - +#include <qtranslator.h> @@ -163,4 +166,4 @@ void Today::loadPlugins() { (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); - (*tit).library->unload(); delete (*tit).guiBox; + (*tit).library->unload(); delete (*tit).library; @@ -192,2 +195,16 @@ void Today::loadPlugins() { + QString type = (*it).left( (*it).find(".") ); + QStringList langs = Global::languageList(); + for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { + QString lang = *lit; + qDebug( "Languages: " + lang ); + QTranslator * trans = new QTranslator( qApp ); + QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; + if ( trans->load( tfn ) ) { + qApp->installTranslator( trans ); + } else { + delete trans; + } + } + // find out if plugins should be shown @@ -305,2 +322,3 @@ void Today::startConfig() { disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); + m_refreshTimer->stop( ); @@ -336,3 +354,4 @@ void Today::startConfig() { // since refresh is not called in that case , reconnect the signal - connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); + m_refreshTimer->start( 15000 ); // get the config value in here later + connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); } |