-rw-r--r-- | korganizer/koprefs.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 0db8e6d..dd978bf 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -393,6 +393,7 @@ void KOPrefs::usrReadConfig() | |||
393 | mLocaleDict = 0; | 393 | mLocaleDict = 0; |
394 | // pending LR fix translation | 394 | // pending LR fix translation |
395 | // qDebug("KOPrefs::usrReadConfig() fix translation "); | 395 | // qDebug("KOPrefs::usrReadConfig() fix translation "); |
396 | if ( mPreferredLanguage > 0 && mPreferredLanguage < 4 ) { | ||
396 | if ( mPreferredLanguage == 1 ) { | 397 | if ( mPreferredLanguage == 1 ) { |
397 | mLocaleDict = new QDict<QString>; | 398 | mLocaleDict = new QDict<QString>; |
398 | int i = 0; | 399 | int i = 0; |
@@ -410,11 +411,11 @@ void KOPrefs::usrReadConfig() | |||
410 | fileName = MainWindow::resourcePath()+"usertranslation.txt"; | 411 | fileName = MainWindow::resourcePath()+"usertranslation.txt"; |
411 | else if ( mPreferredLanguage == 2 ) | 412 | else if ( mPreferredLanguage == 2 ) |
412 | fileName = MainWindow::resourcePath()+"frenchtranslation.txt"; | 413 | fileName = MainWindow::resourcePath()+"frenchtranslation.txt"; |
413 | else return; | ||
414 | QFile file( fileName ); | 414 | QFile file( fileName ); |
415 | if (file.open( IO_ReadOnly ) ) { | 415 | if (file.open( IO_ReadOnly ) ) { |
416 | QTextStream ts( &file ); | 416 | QTextStream ts( &file ); |
417 | ts.setCodec( QTextCodec::codecForLocale() ); | 417 | ts.setEncoding( QTextStream::Latin1 ); |
418 | //ts.setCodec( QTextCodec::latin1 ); | ||
418 | QString text = ts.read(); | 419 | QString text = ts.read(); |
419 | file.close(); | 420 | file.close(); |
420 | text.replace( QRegExp("\\\\n"), "\n" ); | 421 | text.replace( QRegExp("\\\\n"), "\n" ); |
@@ -451,6 +452,7 @@ void KOPrefs::usrReadConfig() | |||
451 | } | 452 | } |
452 | 453 | ||
453 | } | 454 | } |
455 | } | ||
454 | config()->setGroup("General"); | 456 | config()->setGroup("General"); |
455 | 457 | ||
456 | mCustomCategories = config()->readListEntry("Custom Categories"); | 458 | mCustomCategories = config()->readListEntry("Custom Categories"); |
@@ -460,8 +462,8 @@ void KOPrefs::usrReadConfig() | |||
460 | mTodoSummaryUser.clear(); | 462 | mTodoSummaryUser.clear(); |
461 | } | 463 | } |
462 | if (mLocationDefaults.isEmpty()) { | 464 | if (mLocationDefaults.isEmpty()) { |
463 | mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Libary") << i18n("School") << i18n("Doctor") << i18n("Beach") | 465 | mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") |
464 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarden") | 466 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") |
465 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; | 467 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; |
466 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") | 468 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") |
467 | mLocationDefaults.sort(); | 469 | mLocationDefaults.sort(); |