author | harlekin <harlekin> | 2003-02-12 11:40:53 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-02-12 11:40:53 (UTC) |
commit | d5ca5bf9f6fc8d47c2786af80342b13036f14d36 (patch) (unidiff) | |
tree | 83b131e59306b2a387f893bc13491fbae6357702 | |
parent | d9f46624eff7817ea46a4cb2f9bd4e908308df45 (diff) | |
download | opie-d5ca5bf9f6fc8d47c2786af80342b13036f14d36.zip opie-d5ca5bf9f6fc8d47c2786af80342b13036f14d36.tar.gz opie-d5ca5bf9f6fc8d47c2786af80342b13036f14d36.tar.bz2 |
now plugins should be translatable too
-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, | |||
46 | if ( (ev).event().hasAlarm() ) { | 46 | if ( (ev).event().hasAlarm() ) { |
47 | msg += " <b>[with alarm]</b>"; | 47 | msg += " <b>" + tr("[with alarm]") +"</b>"; |
48 | } | 48 | } |
@@ -69,3 +69,3 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev, | |||
69 | if ( show_notes ) { | 69 | if ( show_notes ) { |
70 | msg += "<br> <i>note</i>:" +( (ev).notes() ).mid( 0, maxCharClip ); | 70 | msg += "<br> <i>" + tr("note") + "</i>:" +( (ev).notes() ).mid( 0, maxCharClip ); |
71 | } | 71 | } |
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 @@ | |||
17 | 17 | ||
18 | |||
19 | #define QTOPIA_INTERNAL_LANGLIST | ||
20 | |||
18 | #include "today.h" | 21 | #include "today.h" |
@@ -38,3 +41,3 @@ | |||
38 | #include <qwhatsthis.h> | 41 | #include <qwhatsthis.h> |
39 | 42 | #include <qtranslator.h> | |
40 | 43 | ||
@@ -163,4 +166,4 @@ void Today::loadPlugins() { | |||
163 | (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); | 166 | (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); |
164 | (*tit).library->unload(); | ||
165 | delete (*tit).guiBox; | 167 | delete (*tit).guiBox; |
168 | (*tit).library->unload(); | ||
166 | delete (*tit).library; | 169 | delete (*tit).library; |
@@ -192,2 +195,16 @@ void Today::loadPlugins() { | |||
192 | 195 | ||
196 | QString type = (*it).left( (*it).find(".") ); | ||
197 | QStringList langs = Global::languageList(); | ||
198 | for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { | ||
199 | QString lang = *lit; | ||
200 | qDebug( "Languages: " + lang ); | ||
201 | QTranslator * trans = new QTranslator( qApp ); | ||
202 | QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; | ||
203 | if ( trans->load( tfn ) ) { | ||
204 | qApp->installTranslator( trans ); | ||
205 | } else { | ||
206 | delete trans; | ||
207 | } | ||
208 | } | ||
209 | |||
193 | // find out if plugins should be shown | 210 | // find out if plugins should be shown |
@@ -305,2 +322,3 @@ void Today::startConfig() { | |||
305 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 322 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
323 | m_refreshTimer->stop( ); | ||
306 | 324 | ||
@@ -336,3 +354,4 @@ void Today::startConfig() { | |||
336 | // since refresh is not called in that case , reconnect the signal | 354 | // since refresh is not called in that case , reconnect the signal |
337 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 355 | m_refreshTimer->start( 15000 ); // get the config value in here later |
356 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | ||
338 | } | 357 | } |