summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefs.cpp
authorzautrix <zautrix>2004-08-06 16:50:03 (UTC)
committer zautrix <zautrix>2004-08-06 16:50:03 (UTC)
commit02963edb373e263bd50ab431633ea66adf32a4aa (patch) (side-by-side diff)
tree3affe8b9605f31e2a85c1c9c6cf4dfb9ab386394 /korganizer/koprefs.cpp
parent55a7ffaccca40d10932c98527a34cc6cc9c89afb (diff)
downloadkdepimpi-02963edb373e263bd50ab431633ea66adf32a4aa.zip
kdepimpi-02963edb373e263bd50ab431633ea66adf32a4aa.tar.gz
kdepimpi-02963edb373e263bd50ab431633ea66adf32a4aa.tar.bz2
Fixed translation problem
Diffstat (limited to 'korganizer/koprefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefs.cpp17
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
@@ -404,7 +404,11 @@ void KOPrefs::usrReadConfig()
setLocaleDict( mLocaleDict );
- }
- if ( mPreferredLanguage == 3 ) {
- QString fileName = MainWindow::resourcePath()+"usertranslation.txt";
+ } else {
+ QString fileName ;
+ if ( mPreferredLanguage == 3 )
+ fileName = MainWindow::resourcePath()+"usertranslation.txt";
+ else if ( mPreferredLanguage == 2 )
+ fileName = MainWindow::resourcePath()+"frenchtranslation.txt";
+ else return;
QFile file( fileName );
if (file.open( IO_ReadOnly ) ) {
@@ -413,5 +417,5 @@ void KOPrefs::usrReadConfig()
QString text = ts.read();
file.close();
-
+ text.replace( QRegExp("\\\\n"), "\n" );
QString line;
QString we;
@@ -443,7 +447,8 @@ void KOPrefs::usrReadConfig()
setLocaleDict( mLocaleDict );
} else {
- qDebug("KO: Cannot find translation file usertranslation.txt");
+ qDebug("KO: Cannot find translation file %s",fileName.latin1() );
}
- }
+
+}
config()->setGroup("General");