summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koprefs.cpp10
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()
mLocaleDict = 0;
// pending LR fix translation
// qDebug("KOPrefs::usrReadConfig() fix translation ");
+ if ( mPreferredLanguage > 0 && mPreferredLanguage < 4 ) {
if ( mPreferredLanguage == 1 ) {
mLocaleDict = new QDict<QString>;
int i = 0;
@@ -410,11 +411,11 @@ void KOPrefs::usrReadConfig()
fileName = MainWindow::resourcePath()+"usertranslation.txt";
else if ( mPreferredLanguage == 2 )
fileName = MainWindow::resourcePath()+"frenchtranslation.txt";
- else return;
QFile file( fileName );
if (file.open( IO_ReadOnly ) ) {
QTextStream ts( &file );
- ts.setCodec( QTextCodec::codecForLocale() );
+ ts.setEncoding( QTextStream::Latin1 );
+ //ts.setCodec( QTextCodec::latin1 );
QString text = ts.read();
file.close();
text.replace( QRegExp("\\\\n"), "\n" );
@@ -451,6 +452,7 @@ void KOPrefs::usrReadConfig()
}
}
+ }
config()->setGroup("General");
mCustomCategories = config()->readListEntry("Custom Categories");
@@ -460,8 +462,8 @@ void KOPrefs::usrReadConfig()
mTodoSummaryUser.clear();
}
if (mLocationDefaults.isEmpty()) {
- mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Libary") << i18n("School") << i18n("Doctor") << i18n("Beach")
- << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarden")
+ mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach")
+ << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten")
<< i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ;
// << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("")
mLocationDefaults.sort();