-rw-r--r-- | library/qpeapplication.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index e5da48c..f4db1ab 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -604,20 +604,8 @@ QPEApplication::QPEApplication( int & argc, char **argv, Type t ) | |||
604 | QString lang = *it; | 604 | QString lang = *it; |
605 | 605 | ||
606 | QTranslator * trans; | 606 | installTranslation( lang + "/libopie.qm"); |
607 | QString tfn; | 607 | installTranslation( lang + "/libqpe.qm" ); |
608 | installTranslation( lang + "/" + d->appName + ".qm" ); | ||
608 | 609 | ||
609 | trans = new QTranslator( this ); | ||
610 | tfn = qpeDir() + "/i18n/" + lang + "/libqpe.qm"; | ||
611 | if ( trans->load( tfn ) ) | ||
612 | installTranslator( trans ); | ||
613 | else | ||
614 | delete trans; | ||
615 | |||
616 | trans = new QTranslator( this ); | ||
617 | tfn = qpeDir() + "/i18n/" + lang + "/" + d->appName + ".qm"; | ||
618 | if ( trans->load( tfn ) ) | ||
619 | installTranslator( trans ); | ||
620 | else | ||
621 | delete trans; | ||
622 | 610 | ||
623 | //###language/font hack; should look it up somewhere | 611 | //###language/font hack; should look it up somewhere |
@@ -1728,4 +1716,16 @@ void QPEApplication::tryQuit() | |||
1728 | /*! | 1716 | /*! |
1729 | \internal | 1717 | \internal |
1718 | */ | ||
1719 | void QPEApplication::installTranslation( const QString& baseName ) { | ||
1720 | QTranslator* trans = new QTranslator(this); | ||
1721 | QString tfn = qpeDir() + "/i18n/"+baseName; | ||
1722 | if ( trans->load( tfn ) ) | ||
1723 | installTranslator( trans ); | ||
1724 | else | ||
1725 | delete trans; | ||
1726 | } | ||
1727 | |||
1728 | /*! | ||
1729 | \internal | ||
1730 | User initiated quit. Makes the window 'Go Away'. If preloaded this means | 1730 | User initiated quit. Makes the window 'Go Away'. If preloaded this means |
1731 | hiding the window. If not it means quitting the application. | 1731 | hiding the window. If not it means quitting the application. |