author | zautrix <zautrix> | 2004-10-08 15:42:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-08 15:42:53 (UTC) |
commit | d46e6bd77c336ce98bafe884a3f7ee5b0d884f1f (patch) (side-by-side diff) | |
tree | 02f36df75c4d82d012e1d014431d6f3ad8207a36 /korganizer | |
parent | ec5bc1b8c708b55884f1e03861204123de097129 (diff) | |
download | kdepimpi-d46e6bd77c336ce98bafe884a3f7ee5b0d884f1f.zip kdepimpi-d46e6bd77c336ce98bafe884a3f7ee5b0d884f1f.tar.gz kdepimpi-d46e6bd77c336ce98bafe884a3f7ee5b0d884f1f.tar.bz2 |
added italian translation file for kopi
-rw-r--r-- | korganizer/koprefs.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 13035e0..2cfb382 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -388,52 +388,54 @@ QStringList KOPrefs::getDefaultList() retval.sort(); return retval; } void KOPrefs::usrReadConfig() { mPreferredLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; 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; QString fw ( germanwords[i] [0]); while ( !fw.isEmpty() ) { mLocaleDict->insert( fw, new QString (germanwords[i] [1] )); ++i; fw = germanwords[i] [0]; } setLocaleDict( mLocaleDict ); } else { QString fileName ; - if ( mPreferredLanguage == 3 ) + if ( mPreferredLanguage == 4 ) fileName = MainWindow::resourcePath()+"usertranslation.txt"; else if ( mPreferredLanguage == 2 ) - fileName = MainWindow::resourcePath()+"frenchtranslation.txt"; + fileName = MainWindow::resourcePath()+"frenchtranslation.txt"; + else if ( mPreferredLanguage == 3 ) + fileName = MainWindow::resourcePath()+"italiantranslation.txt"; QFile file( fileName ); if (file.open( IO_ReadOnly ) ) { QTextStream ts( &file ); ts.setEncoding( QTextStream::Latin1 ); //ts.setCodec( QTextCodec::latin1 ); QString text = ts.read(); file.close(); text.replace( QRegExp("\\\\n"), "\n" ); QString line; QString we; QString wt; int br = 0; int nbr; nbr = text.find ( "},", br ); line = text.mid( br, nbr - br ); br = nbr+1; int se, ee, st, et; mLocaleDict = new QDict<QString>; QString end = "{ \"\",\"\" }"; while ( (line != end) && (br > 1) ) { //qDebug("%d *%s* ", br, line.latin1()); se = line.find("\"")+1; et = line.findRev("\"",-1); ee = line.find("\",\""); |