-rw-r--r-- | korganizer/koprefs.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index f3231ff..042046e 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -403,16 +403,20 @@ void KOPrefs::usrReadConfig() | |||
403 | } | 403 | } |
404 | 404 | ||
405 | setLocaleDict( mLocaleDict ); | 405 | setLocaleDict( mLocaleDict ); |
406 | } | 406 | } else { |
407 | if ( mPreferredLanguage == 3 ) { | 407 | QString fileName ; |
408 | QString fileName = MainWindow::resourcePath()+"usertranslation.txt"; | 408 | if ( mPreferredLanguage == 3 ) |
409 | fileName = MainWindow::resourcePath()+"usertranslation.txt"; | ||
410 | else if ( mPreferredLanguage == 2 ) | ||
411 | fileName = MainWindow::resourcePath()+"frenchtranslation.txt"; | ||
412 | else return; | ||
409 | QFile file( fileName ); | 413 | QFile file( fileName ); |
410 | if (file.open( IO_ReadOnly ) ) { | 414 | if (file.open( IO_ReadOnly ) ) { |
411 | QTextStream ts( &file ); | 415 | QTextStream ts( &file ); |
412 | ts.setCodec( QTextCodec::codecForLocale() ); | 416 | ts.setCodec( QTextCodec::codecForLocale() ); |
413 | QString text = ts.read(); | 417 | QString text = ts.read(); |
414 | file.close(); | 418 | file.close(); |
415 | 419 | text.replace( QRegExp("\\\\n"), "\n" ); | |
416 | QString line; | 420 | QString line; |
417 | QString we; | 421 | QString we; |
418 | QString wt; | 422 | QString wt; |
@@ -442,9 +446,10 @@ void KOPrefs::usrReadConfig() | |||
442 | 446 | ||
443 | setLocaleDict( mLocaleDict ); | 447 | setLocaleDict( mLocaleDict ); |
444 | } else { | 448 | } else { |
445 | qDebug("KO: Cannot find translation file usertranslation.txt"); | 449 | qDebug("KO: Cannot find translation file %s",fileName.latin1() ); |
446 | } | 450 | } |
447 | } | 451 | |
452 | } | ||
448 | config()->setGroup("General"); | 453 | config()->setGroup("General"); |
449 | 454 | ||
450 | mCustomCategories = config()->readListEntry("Custom Categories"); | 455 | mCustomCategories = config()->readListEntry("Custom Categories"); |