summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-23 13:53:49 (UTC)
committer zecke <zecke>2004-09-23 13:53:49 (UTC)
commitb31b9fd0b3ef2cddef4343e565fe0330c076da57 (patch) (unidiff)
treed41af1ba728077bd1546994d629dd32ddd51f7dc
parent763823cd6707432c515dd0eb2f8c699f4668df93 (diff)
downloadopie-b31b9fd0b3ef2cddef4343e565fe0330c076da57.zip
opie-b31b9fd0b3ef2cddef4343e565fe0330c076da57.tar.gz
opie-b31b9fd0b3ef2cddef4343e565fe0330c076da57.tar.bz2
-Filter de_DE@euro to de_DE@euro, de_DE, de
-Load the right translation file at the right location
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/opluginloader.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/libopie2/opiecore/opluginloader.cpp b/libopie2/opiecore/opluginloader.cpp
index b8b6b79..ec19fa0 100644
--- a/libopie2/opiecore/opluginloader.cpp
+++ b/libopie2/opiecore/opluginloader.cpp
@@ -440,3 +440,3 @@ QUnknownInterface* OGenericPluginLoader::load( const OPluginItem& item, const QU
440 if ( lib->queryInterface( uuid, &iface ) == QS_OK ) { 440 if ( lib->queryInterface( uuid, &iface ) == QS_OK ) {
441 installTranslators(pa.left( pa.find("."))); 441 installTranslators( item.name() );
442 m_library.insert( iface, lib ); 442 m_library.insert( iface, lib );
@@ -605,2 +605,4 @@ QStringList OGenericPluginLoader::languageList() {
605 * to our list of languages. 605 * to our list of languages.
606 * Also for de_DE@euro we will add de_DE@eurp, de_DE, de
607 * to our list of languages
606 */ 608 */
@@ -608,4 +610,8 @@ QStringList OGenericPluginLoader::languageList() {
608 m_languages += str; 610 m_languages += str;
609 int pos = str.find( '.' ); 611 int pos = str.find( '@' );
610 612 if( pos > 0 )
613 m_languages += str.left( pos );
614
615
616 pos = str.find( '.' );
611 if ( pos > 0 ) 617 if ( pos > 0 )
@@ -614,3 +620,3 @@ QStringList OGenericPluginLoader::languageList() {
614 int n_pos = str.find( '_' ); 620 int n_pos = str.find( '_' );
615 if ( pos > 0 && n_pos >= pos ) 621 if ( n_pos > 0 )
616 m_languages += str.left( n_pos ); 622 m_languages += str.left( n_pos );
@@ -634,3 +640,3 @@ void OGenericPluginLoader::installTranslators(const QString& type) {
634 QTranslator* trans = new QTranslator( qApp ); 640 QTranslator* trans = new QTranslator( qApp );
635 QString tfn = QPEApplication::qpeDir()+"/i18n/" + *it + "/" + type + ".qm" ; 641 QString tfn = QPEApplication::qpeDir()+"/i18n/" + *it + "/lib" + type + ".qm" ;
636 642
@@ -639,4 +645,4 @@ void OGenericPluginLoader::installTranslators(const QString& type) {
639 */ 645 */
640 if ( trans->load( tfn ) ) 646 if ( trans->load( tfn ) )
641 qApp->installTranslator( trans ); 647 qApp->installTranslator( trans );
642 else 648 else