summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/abstractmail.cpp22
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp58
-rw-r--r--kmicromail/libmailwrapper/mboxwrapper.cpp29
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp21
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp59
5 files changed, 96 insertions, 93 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp
index 2d7533c..8ee112c 100644
--- a/kmicromail/libmailwrapper/abstractmail.cpp
+++ b/kmicromail/libmailwrapper/abstractmail.cpp
@@ -12,5 +12,5 @@
12#include <qapplication.h> 12#include <qapplication.h>
13#include <qmessagebox.h> 13#include <qmessagebox.h>
14 14#include <klocale.h>
15#include <kdecore/kstandarddirs.h> 15#include <kdecore/kstandarddirs.h>
16#include <qfile.h> 16#include <qfile.h>
@@ -148,8 +148,8 @@ void AbstractMail::deleteMailList(const QValueList<RecMailP>&target)
148 int count = target.count(); 148 int count = target.count();
149 QProgressBar wid ( count ); 149 QProgressBar wid ( count );
150 wid.setCaption( tr("Deleting ...")); 150 wid.setCaption( i18n("Deleting ..."));
151 wid.show(); 151 wid.show();
152 while (iii < count ) { 152 while (iii < count ) {
153 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); 153 Global::statusMessage(i18n("Delete message %1 of %2").arg(iii).arg(count));
154 wid.setProgress( iii ); 154 wid.setProgress( iii );
155 wid.raise(); 155 wid.raise();
@@ -173,6 +173,6 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
173 if ( !targetMail->createMbox(lfName)) 173 if ( !targetMail->createMbox(lfName))
174 { 174 {
175 QMessageBox::critical(0,tr("Error creating new Folder"), 175 QMessageBox::critical(0,i18n("Error creating new Folder"),
176 tr("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName)); 176 i18n("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName));
177 return; 177 return;
178 } 178 }
@@ -181,5 +181,5 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
181 if ( t.count() == 0 ) { 181 if ( t.count() == 0 ) {
182 qDebug("There are no new messages %s", fromFolder->getName().latin1()); 182 qDebug("There are no new messages %s", fromFolder->getName().latin1());
183 Global::statusMessage(tr("There are no new messages")); 183 Global::statusMessage(i18n("There are no new messages"));
184 return; 184 return;
185 } 185 }
@@ -211,9 +211,9 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
211 qDebug("Downloaded %d messages ",n.count() ); 211 qDebug("Downloaded %d messages ",n.count() );
212 if ( n.count() == 0 ) { 212 if ( n.count() == 0 ) {
213 Global::statusMessage(tr("There are no new messages")); 213 Global::statusMessage(i18n("There are no new messages"));
214 return; 214 return;
215 } 215 }
216 mvcpMailList( n,lfName,targetMail,!acc->getLeaveOnServer()); 216 mvcpMailList( n,lfName,targetMail,!acc->getLeaveOnServer());
217 Global::statusMessage(tr("Downloaded %1 messages").arg(n.count())); 217 Global::statusMessage(i18n("Downloaded %1 messages").arg(n.count()));
218 218
219#if 0 219#if 0
@@ -241,11 +241,11 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t,
241 return; 241 return;
242 // wel, processevents is qite strange, we need a widget for getting 242 // wel, processevents is qite strange, we need a widget for getting
243 // Global::statusMessage(tr("Copy2 message %1").arg(iii)); displaye 243 // Global::statusMessage(i18n("Copy2 message %1").arg(iii)); displaye
244 244
245 QProgressBar wid ( count ); 245 QProgressBar wid ( count );
246 wid.setCaption( tr("Copying ...")); 246 wid.setCaption( i18n("Copying..."));
247 wid.show(); 247 wid.show();
248 while (iii < count ) { 248 while (iii < count ) {
249 Global::statusMessage(tr("Copy message %1 of %2").arg(iii).arg(count)); 249 Global::statusMessage(i18n("Copy message %1 of %2").arg(iii).arg(count));
250 wid.setProgress( iii ); 250 wid.setProgress( iii );
251 wid.raise(); 251 wid.raise();
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 8150453..3aec13d 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -49,5 +49,5 @@ void IMAPwrapper::imap_progress( size_t current, size_t maximum )
49{ 49{
50 //qDebug("imap progress %d of %d ",current,maximum ); 50 //qDebug("imap progress %d of %d ",current,maximum );
51 //Global::statusMessage(tr("Downloading message %1 of %2").arg( current).arg(maximum)); 51 //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum));
52 //qApp->processEvents() 52 //qApp->processEvents()
53 static int last = 0; 53 static int last = 0;
@@ -67,6 +67,6 @@ void IMAPwrapper::progress( QString m )
67 QString mess; 67 QString mess;
68 //qDebug("progress "); 68 //qDebug("progress ");
69 if ( mMax ) mess = mProgrMess +tr(" message %1 of %2").arg( mCurrent++).arg(mMax); 69 if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax);
70 else mess = mProgrMess +tr(" message %1").arg( mCurrent++); 70 else mess = mProgrMess +i18n(" message %1").arg( mCurrent++);
71 Global::statusMessage(mess); 71 Global::statusMessage(mess);
72 //qDebug("Progress %s %s", mess.latin1(), m.latin1()); 72 //qDebug("Progress %s %s", mess.latin1(), m.latin1());
@@ -101,5 +101,5 @@ bool IMAPwrapper::start_tls(bool force_tls)
101 err = mailimap_starttls(m_imap); 101 err = mailimap_starttls(m_imap);
102 if (err != MAILIMAP_NO_ERROR && force_tls) { 102 if (err != MAILIMAP_NO_ERROR && force_tls) {
103 Global::statusMessage(tr("Server has no TLS support!")); 103 Global::statusMessage(i18n("Server has no TLS support!"));
104 try_tls = false; 104 try_tls = false;
105 } else { 105 } else {
@@ -189,5 +189,5 @@ void IMAPwrapper::login()
189 failure="Unknown failure"; 189 failure="Unknown failure";
190 } 190 }
191 Global::statusMessage(tr("error connecting imap server: %1").arg(failure)); 191 Global::statusMessage(i18n("error connecting imap server: %1").arg(failure));
192 mailimap_free( m_imap ); 192 mailimap_free( m_imap );
193 m_imap = 0; 193 m_imap = 0;
@@ -201,5 +201,5 @@ void IMAPwrapper::login()
201 bool ok = true; 201 bool ok = true;
202 if (force_tls && !try_tls) { 202 if (force_tls && !try_tls) {
203 Global::statusMessage(tr("Server has no TLS support!")); 203 Global::statusMessage(i18n("Server has no TLS support!"));
204 ok = false; 204 ok = false;
205 } 205 }
@@ -211,5 +211,5 @@ void IMAPwrapper::login()
211 err = mailimap_login_simple( m_imap, (char*)user.latin1(), (char*)pass.latin1() ); 211 err = mailimap_login_simple( m_imap, (char*)user.latin1(), (char*)pass.latin1() );
212 if ( err != MAILIMAP_NO_ERROR ) { 212 if ( err != MAILIMAP_NO_ERROR ) {
213 Global::statusMessage(tr("error logging in imap server: %1").arg(m_imap->imap_response)); 213 Global::statusMessage(i18n("error logging in imap server: %1").arg(m_imap->imap_response));
214 ok = false; 214 ok = false;
215 } 215 }
@@ -257,12 +257,12 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
257 257
258 if (last == 0) { 258 if (last == 0) {
259 Global::statusMessage(tr("Mailbox has no mails")); 259 Global::statusMessage(i18n("Mailbox has no mails"));
260 return; 260 return;
261 } else { 261 } else {
262 } 262 }
263 progress( tr("Fetch ")); 263 progress( i18n("Fetch "));
264 mMax = last; 264 mMax = last;
265 //qDebug("last %d ", last); 265 //qDebug("last %d ", last);
266 Global::statusMessage(tr("Fetching header list")); 266 Global::statusMessage(i18n("Fetching header list"));
267 qApp->processEvents(); 267 qApp->processEvents();
268 /* the range has to start at 1!!! not with 0!!!! */ 268 /* the range has to start at 1!!! not with 0!!!! */
@@ -300,10 +300,10 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
300 } 300 }
301 } 301 }
302 Global::statusMessage(tr("Mailbox has %1 mails").arg(target.count())); 302 Global::statusMessage(i18n("Mailbox has %1 mails").arg(target.count()));
303 } else { 303 } else {
304 --tryAgain; 304 --tryAgain;
305 --tryAgain;//disabled tryagain by adding this line 305 --tryAgain;//disabled tryagain by adding this line
306 if ( tryAgain < 0 ) 306 if ( tryAgain < 0 )
307 Global::statusMessage(tr("Error fetching headers: %1").arg(m_imap->imap_response)); 307 Global::statusMessage(i18n("Error fetching headers: %1").arg(m_imap->imap_response));
308 else 308 else
309 qDebug("try again... "); 309 qDebug("try again... ");
@@ -334,5 +334,5 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders()
334 * it seems like ugly code. and yes - it is ugly code. but the best way. 334 * it seems like ugly code. and yes - it is ugly code. but the best way.
335 */ 335 */
336 Global::statusMessage(tr("Fetching folder list")); 336 Global::statusMessage(i18n("Fetching folder list"));
337 qApp->processEvents(); 337 qApp->processEvents();
338 QString temp; 338 QString temp;
@@ -970,11 +970,11 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
970 970
971 mMax = count; 971 mMax = count;
972 progress( tr("Delete")); 972 progress( i18n("Delete"));
973 973
974 QProgressBar wid ( count ); 974 QProgressBar wid ( count );
975 wid.setCaption( tr("Deleting ...")); 975 wid.setCaption( i18n("Deleting ..."));
976 wid.show(); 976 wid.show();
977 while (iii < count ) { 977 while (iii < count ) {
978 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); 978 Global::statusMessage(i18n("Delete message %1 of %2").arg(iii).arg(count));
979 wid.setProgress( iii ); 979 wid.setProgress( iii );
980 wid.raise(); 980 wid.raise();
@@ -1004,5 +1004,5 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
1004 // err = mailimap_expunge(m_imap); 1004 // err = mailimap_expunge(m_imap);
1005 //if (err != MAILIMAP_NO_ERROR) { 1005 //if (err != MAILIMAP_NO_ERROR) {
1006 // Global::statusMessage(tr("Error deleting mails: %s").arg(m_imap->imap_response)); 1006 // Global::statusMessage(i18n("Error deleting mails: %s").arg(m_imap->imap_response));
1007 // } 1007 // }
1008 //#endif 1008 //#endif
@@ -1013,5 +1013,5 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
1013 err = mailimap_expunge(m_imap); 1013 err = mailimap_expunge(m_imap);
1014 if (err != MAILIMAP_NO_ERROR) { 1014 if (err != MAILIMAP_NO_ERROR) {
1015 Global::statusMessage(tr("Error deleting mails: %s").arg(m_imap->imap_response)); 1015 Global::statusMessage(i18n("Error deleting mails: %s").arg(m_imap->imap_response));
1016 } 1016 }
1017} 1017}
@@ -1047,5 +1047,5 @@ void IMAPwrapper::deleteMail(const RecMailP&mail)
1047 err = mailimap_expunge(m_imap); 1047 err = mailimap_expunge(m_imap);
1048 if (err != MAILIMAP_NO_ERROR) { 1048 if (err != MAILIMAP_NO_ERROR) {
1049 Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); 1049 Global::statusMessage(i18n("error deleting mail: %s").arg(m_imap->imap_response));
1050 } 1050 }
1051 //qDebug("IMAPwrapper::deleteMail 2"); 1051 //qDebug("IMAPwrapper::deleteMail 2");
@@ -1130,5 +1130,5 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder)
1130 int last = m_imap->imap_selection_info->sel_exists; 1130 int last = m_imap->imap_selection_info->sel_exists;
1131 if (last == 0) { 1131 if (last == 0) {
1132 Global::statusMessage(tr("Mailbox has no mails!")); 1132 Global::statusMessage(i18n("Mailbox has no mails!"));
1133 return 0; 1133 return 0;
1134 } 1134 }
@@ -1141,5 +1141,5 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder)
1141 mailimap_store_att_flags_free(store_flags); 1141 mailimap_store_att_flags_free(store_flags);
1142 if (err != MAILIMAP_NO_ERROR) { 1142 if (err != MAILIMAP_NO_ERROR) {
1143 Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); 1143 Global::statusMessage(i18n("error deleting mail: %s").arg(m_imap->imap_response));
1144 return 0; 1144 return 0;
1145 } 1145 }
@@ -1148,5 +1148,5 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder)
1148 err = mailimap_expunge(m_imap); 1148 err = mailimap_expunge(m_imap);
1149 if (err != MAILIMAP_NO_ERROR) { 1149 if (err != MAILIMAP_NO_ERROR) {
1150 Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); 1150 Global::statusMessage(i18n("error deleting mail: %s").arg(m_imap->imap_response));
1151 return 0; 1151 return 0;
1152 } 1152 }
@@ -1172,5 +1172,5 @@ int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,cons
1172 pre+=delemiter; 1172 pre+=delemiter;
1173 } else { 1173 } else {
1174 Global::statusMessage(tr("Cannot create folder %1 for holding subfolders").arg(pre)); 1174 Global::statusMessage(i18n("Cannot create folder %1 for holding subfolders").arg(pre));
1175 return 0; 1175 return 0;
1176 } 1176 }
@@ -1179,5 +1179,5 @@ int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,cons
1179 int res = mailimap_create(m_imap,pre.latin1()); 1179 int res = mailimap_create(m_imap,pre.latin1());
1180 if (res != MAILIMAP_NO_ERROR) { 1180 if (res != MAILIMAP_NO_ERROR) {
1181 Global::statusMessage(tr("%1").arg(m_imap->imap_response)); 1181 Global::statusMessage(i18n("%1").arg(m_imap->imap_response));
1182 return 0; 1182 return 0;
1183 } 1183 }
@@ -1192,5 +1192,5 @@ int IMAPwrapper::deleteMbox(const FolderP&folder)
1192 int res = mailimap_delete(m_imap,folder->getName()); 1192 int res = mailimap_delete(m_imap,folder->getName());
1193 if (res != MAILIMAP_NO_ERROR) { 1193 if (res != MAILIMAP_NO_ERROR) {
1194 Global::statusMessage(tr("%1").arg(m_imap->imap_response)); 1194 Global::statusMessage(i18n("%1").arg(m_imap->imap_response));
1195 return 0; 1195 return 0;
1196 } 1196 }
@@ -1275,5 +1275,5 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder,
1275 if (targetWrapper != this || maxSizeInKb > 0 ) { 1275 if (targetWrapper != this || maxSizeInKb > 0 ) {
1276 mMax = 0; 1276 mMax = 0;
1277 progress( tr("Copy")); 1277 progress( i18n("Copy"));
1278 AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit, maxSizeInKb); 1278 AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit, maxSizeInKb);
1279 //qDebug("IMAPwrapper::mvcpAllMails::Using generic"); 1279 //qDebug("IMAPwrapper::mvcpAllMails::Using generic");
@@ -1290,5 +1290,5 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder,
1290 return; 1290 return;
1291 } 1291 }
1292 Global::statusMessage( tr("Copying mails on server...") ); 1292 Global::statusMessage( i18n("Copying mails on server...") );
1293 int last = m_imap->imap_selection_info->sel_exists; 1293 int last = m_imap->imap_selection_info->sel_exists;
1294 set = mailimap_set_new_interval( 1, last ); 1294 set = mailimap_set_new_interval( 1, last );
@@ -1296,5 +1296,5 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder,
1296 mailimap_set_free( set ); 1296 mailimap_set_free( set );
1297 if ( err != MAILIMAP_NO_ERROR ) { 1297 if ( err != MAILIMAP_NO_ERROR ) {
1298 QString error_msg = tr("Error copy mails: %1").arg(m_imap->imap_response); 1298 QString error_msg = i18n("Error copy mails: %1").arg(m_imap->imap_response);
1299 Global::statusMessage(error_msg); 1299 Global::statusMessage(error_msg);
1300 // odebug << error_msg << oendl; 1300 // odebug << error_msg << oendl;
@@ -1326,5 +1326,5 @@ void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstra
1326 mailimap_set_free( set ); 1326 mailimap_set_free( set );
1327 if ( err != MAILIMAP_NO_ERROR ) { 1327 if ( err != MAILIMAP_NO_ERROR ) {
1328 QString error_msg = tr("error copy mail: %1").arg(m_imap->imap_response); 1328 QString error_msg = i18n("error copy mail: %1").arg(m_imap->imap_response);
1329 Global::statusMessage(error_msg); 1329 Global::statusMessage(error_msg);
1330 // odebug << error_msg << oendl; 1330 // odebug << error_msg << oendl;
diff --git a/kmicromail/libmailwrapper/mboxwrapper.cpp b/kmicromail/libmailwrapper/mboxwrapper.cpp
index 39dd156..0cdbae4 100644
--- a/kmicromail/libmailwrapper/mboxwrapper.cpp
+++ b/kmicromail/libmailwrapper/mboxwrapper.cpp
@@ -5,4 +5,5 @@
5#include <qdir.h> 5#include <qdir.h>
6#include <stdlib.h> 6#include <stdlib.h>
7#include <klocale.h>
7 8
8 9
@@ -45,5 +46,5 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta
45 mailfolder_free(folder); 46 mailfolder_free(folder);
46 mailstorage_free(storage); 47 mailstorage_free(storage);
47 Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); 48 Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count()));
48} 49}
49 50
@@ -144,10 +145,10 @@ int MBOXwrapper::createMbox(const QString&folder,const FolderP&,const QString&,b
144 QFileInfo fi(p); 145 QFileInfo fi(p);
145 if (fi.exists()) { 146 if (fi.exists()) {
146 Global::statusMessage(tr("Mailbox exists.")); 147 Global::statusMessage(i18n("Mailbox exists."));
147 return 0; 148 return 0;
148 } 149 }
149 mailmbox_folder*f = 0; 150 mailmbox_folder*f = 0;
150 if (mailmbox_init(p.latin1(),0,1,0,&f) != MAIL_NO_ERROR) { 151 if (mailmbox_init(p.latin1(),0,1,0,&f) != MAIL_NO_ERROR) {
151 Global::statusMessage(tr("Error init folder")); 152 Global::statusMessage(i18n("Error init folder"));
152 return 0; 153 return 0;
153 } 154 }
@@ -163,10 +164,10 @@ void MBOXwrapper::storeMessage(const char*msg,size_t length, const QString&folde
163 int r = mailmbox_init(p.latin1(),0,1,0,&f); 164 int r = mailmbox_init(p.latin1(),0,1,0,&f);
164 if (r != MAIL_NO_ERROR) { 165 if (r != MAIL_NO_ERROR) {
165 Global::statusMessage(tr("Error init folder")); 166 Global::statusMessage(i18n("Error init folder"));
166 return; 167 return;
167 } 168 }
168 r = mailmbox_append_message(f,msg,length); 169 r = mailmbox_append_message(f,msg,length);
169 if (r != MAIL_NO_ERROR) { 170 if (r != MAIL_NO_ERROR) {
170 Global::statusMessage(tr("Error writing to message folder")); 171 Global::statusMessage(i18n("Error writing to message folder"));
171 } 172 }
172 mailmbox_done(f); 173 mailmbox_done(f);
@@ -188,5 +189,5 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail)
188 r = mailfolder_connect(folder); 189 r = mailfolder_connect(folder);
189 if (r != MAIL_NO_ERROR) { 190 if (r != MAIL_NO_ERROR) {
190 Global::statusMessage(tr("Error initializing mbox")); 191 Global::statusMessage(i18n("Error initializing mbox"));
191 mailfolder_free(folder); 192 mailfolder_free(folder);
192 mailstorage_free(storage); 193 mailstorage_free(storage);
@@ -195,5 +196,5 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail)
195 r = mailsession_get_message(folder->fld_session, mail->getNumber(), &msg); 196 r = mailsession_get_message(folder->fld_session, mail->getNumber(), &msg);
196 if (r != MAIL_NO_ERROR) { 197 if (r != MAIL_NO_ERROR) {
197 Global::statusMessage(tr("Error fetching mail %i").arg(mail->getNumber())); 198 Global::statusMessage(i18n("Error fetching mail %i").arg(mail->getNumber()));
198 mailfolder_free(folder); 199 mailfolder_free(folder);
199 mailstorage_free(storage); 200 mailstorage_free(storage);
@@ -202,5 +203,5 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail)
202 r = mailmessage_fetch(msg,&data,&size); 203 r = mailmessage_fetch(msg,&data,&size);
203 if (r != MAIL_NO_ERROR) { 204 if (r != MAIL_NO_ERROR) {
204 Global::statusMessage(tr("Error fetching mail %i").arg(mail->getNumber())); 205 Global::statusMessage(i18n("Error fetching mail %i").arg(mail->getNumber()));
205 mailfolder_free(folder); 206 mailfolder_free(folder);
206 mailstorage_free(storage); 207 mailstorage_free(storage);
@@ -258,5 +259,5 @@ int MBOXwrapper::deleteAllMail(const FolderP&tfolder)
258 int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); 259 int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0);
259 if (r != MAIL_NO_ERROR) { 260 if (r != MAIL_NO_ERROR) {
260 Global::statusMessage(tr("Error initializing mbox")); 261 Global::statusMessage(i18n("Error initializing mbox"));
261 res = 0; 262 res = 0;
262 } 263 }
@@ -265,5 +266,5 @@ int MBOXwrapper::deleteAllMail(const FolderP&tfolder)
265 r = mailfolder_connect(folder); 266 r = mailfolder_connect(folder);
266 if (r != MAIL_NO_ERROR) { 267 if (r != MAIL_NO_ERROR) {
267 Global::statusMessage(tr("Error initializing mbox")); 268 Global::statusMessage(i18n("Error initializing mbox"));
268 res = 0; 269 res = 0;
269 } 270 }
@@ -279,5 +280,5 @@ int MBOXwrapper::deleteAllMail(const FolderP&tfolder)
279 r = mailsession_remove_message(folder->fld_session,i+1); 280 r = mailsession_remove_message(folder->fld_session,i+1);
280 if (r != MAIL_NO_ERROR) { 281 if (r != MAIL_NO_ERROR) {
281 Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); 282 Global::statusMessage(i18n("Error deleting mail %1").arg(i+1));
282 res = 0; 283 res = 0;
283 break; 284 break;
@@ -296,9 +297,9 @@ int MBOXwrapper::deleteMbox(const FolderP&tfolder)
296 QFile fi(p); 297 QFile fi(p);
297 if (!fi.exists()) { 298 if (!fi.exists()) {
298 Global::statusMessage(tr("Mailbox doesn't exist.")); 299 Global::statusMessage(i18n("Mailbox doesn't exist."));
299 return 0; 300 return 0;
300 } 301 }
301 if (!fi.remove()) { 302 if (!fi.remove()) {
302 Global::statusMessage(tr("Error deleting Mailbox.")); 303 Global::statusMessage(i18n("Error deleting Mailbox."));
303 return 0; 304 return 0;
304 } 305 }
@@ -316,5 +317,5 @@ void MBOXwrapper::statusFolder(folderStat&target_stat,const QString & mailbox)
316 QFile fi(p); 317 QFile fi(p);
317 if (!fi.exists()) { 318 if (!fi.exists()) {
318 Global::statusMessage(tr("Mailbox doesn't exist.")); 319 Global::statusMessage(i18n("Mailbox doesn't exist."));
319 return; 320 return;
320 } 321 }
diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp
index 9d52f52..2888f7c 100644
--- a/kmicromail/libmailwrapper/pop3wrapper.cpp
+++ b/kmicromail/libmailwrapper/pop3wrapper.cpp
@@ -6,4 +6,5 @@
6#include <libetpan/libetpan.h> 6#include <libetpan/libetpan.h>
7 7
8#include <klocale.h>
8 9
9#include <qpe/global.h> 10#include <qpe/global.h>
@@ -108,5 +109,5 @@ void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPoi
108 mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); 109 mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen);
109 parseList(target,m_pop3->sto_session,"INBOX", false, maxSizeInKb); 110 parseList(target,m_pop3->sto_session,"INBOX", false, maxSizeInKb);
110 Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages)); 111 Global::statusMessage( i18n("Mailbox contains %1 mail(s)").arg(res_messages));
111} 112}
112 113
@@ -166,5 +167,5 @@ void POP3wrapper::login()
166 if (err != MAIL_NO_ERROR) { 167 if (err != MAIL_NO_ERROR) {
167 ; // odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl; 168 ; // odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl;
168 Global::statusMessage(tr("Error %1 initializing folder").arg( err )); 169 Global::statusMessage(i18n("Error %1 initializing folder").arg( err ));
169 mailstorage_free(m_pop3); 170 mailstorage_free(m_pop3);
170 m_pop3 = 0; 171 m_pop3 = 0;
@@ -203,8 +204,8 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target)
203 204
204 QProgressBar wid ( count ); 205 QProgressBar wid ( count );
205 wid.setCaption( tr("Deleting ...")); 206 wid.setCaption( i18n("Deleting ..."));
206 wid.show(); 207 wid.show();
207 while (iii < count ) { 208 while (iii < count ) {
208 Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count)); 209 Global::statusMessage(i18n("Delete message %1 of %2").arg(iii).arg(count));
209 wid.setProgress( iii ); 210 wid.setProgress( iii );
210 wid.raise(); 211 wid.raise();
@@ -214,5 +215,5 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target)
214 int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber()); 215 int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber());
215 if (err != MAIL_NO_ERROR) { 216 if (err != MAIL_NO_ERROR) {
216 Global::statusMessage(tr("Error deleting mail")); 217 Global::statusMessage(i18n("Error deleting mail"));
217 } 218 }
218 ++iii; 219 ++iii;
@@ -225,5 +226,5 @@ void POP3wrapper::deleteMail(const RecMailP&mail) {
225 int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber()); 226 int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber());
226 if (err != MAIL_NO_ERROR) { 227 if (err != MAIL_NO_ERROR) {
227 Global::statusMessage(tr("error deleting mail")); 228 Global::statusMessage(i18n("error deleting mail"));
228 } 229 }
229} 230}
@@ -240,5 +241,5 @@ int POP3wrapper::deleteAllMail(const FolderP&) {
240 int err = mailsession_messages_number(m_pop3->sto_session,NULL,&result); 241 int err = mailsession_messages_number(m_pop3->sto_session,NULL,&result);
241 if (err != MAIL_NO_ERROR) { 242 if (err != MAIL_NO_ERROR) {
242 Global::statusMessage(tr("Error getting folder info")); 243 Global::statusMessage(i18n("Error getting folder info"));
243 return 0; 244 return 0;
244 } 245 }
@@ -247,8 +248,8 @@ int POP3wrapper::deleteAllMail(const FolderP&) {
247 248
248 QProgressBar wid ( result ); 249 QProgressBar wid ( result );
249 wid.setCaption( tr("Deleting ...")); 250 wid.setCaption( i18n("Deleting ..."));
250 wid.show(); 251 wid.show();
251 for (unsigned int i = 0; i < result; ++i) { 252 for (unsigned int i = 0; i < result; ++i) {
252 Global::statusMessage(tr("Delete message %1 of %2").arg(i).arg(result)); 253 Global::statusMessage(i18n("Delete message %1 of %2").arg(i).arg(result));
253 wid.setProgress( i ); 254 wid.setProgress( i );
254 wid.raise(); 255 wid.raise();
@@ -257,5 +258,5 @@ int POP3wrapper::deleteAllMail(const FolderP&) {
257 err = mailsession_remove_message(m_pop3->sto_session,i+1); 258 err = mailsession_remove_message(m_pop3->sto_session,i+1);
258 if (err != MAIL_NO_ERROR) { 259 if (err != MAIL_NO_ERROR) {
259 Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); 260 Global::statusMessage(i18n("Error deleting mail %1").arg(i+1));
260 res=0; 261 res=0;
261 } 262 }
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index d5a528c..dee1477 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -15,4 +15,5 @@
15 15
16#include <libetpan/libetpan.h> 16#include <libetpan/libetpan.h>
17#include <klocale.h>
17 18
18 19
@@ -45,41 +46,41 @@ QString SMTPwrapper::mailsmtpError( int errnum ) {
45 switch ( errnum ) { 46 switch ( errnum ) {
46 case MAILSMTP_NO_ERROR: 47 case MAILSMTP_NO_ERROR:
47 return tr( "No error" ); 48 return i18n( "No error" );
48 case MAILSMTP_ERROR_UNEXPECTED_CODE: 49 case MAILSMTP_ERROR_UNEXPECTED_CODE:
49 return tr( "Unexpected error code" ); 50 return i18n( "Unexpected error code" );
50 case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE: 51 case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE:
51 return tr( "Service not available" ); 52 return i18n( "Service not available" );
52 case MAILSMTP_ERROR_STREAM: 53 case MAILSMTP_ERROR_STREAM:
53 return tr( "Stream error" ); 54 return i18n( "Stream error" );
54 case MAILSMTP_ERROR_HOSTNAME: 55 case MAILSMTP_ERROR_HOSTNAME:
55 return tr( "gethostname() failed" ); 56 return i18n( "gethostname() failed" );
56 case MAILSMTP_ERROR_NOT_IMPLEMENTED: 57 case MAILSMTP_ERROR_NOT_IMPLEMENTED:
57 return tr( "Not implemented" ); 58 return i18n( "Not implemented" );
58 case MAILSMTP_ERROR_ACTION_NOT_TAKEN: 59 case MAILSMTP_ERROR_ACTION_NOT_TAKEN:
59 return tr( "Error, action not taken" ); 60 return i18n( "Error, action not taken" );
60 case MAILSMTP_ERROR_EXCEED_STORAGE_ALLOCATION: 61 case MAILSMTP_ERROR_EXCEED_STORAGE_ALLOCATION:
61 return tr( "Data exceeds storage allocation" ); 62 return i18n( "Data exceeds storage allocation" );
62 case MAILSMTP_ERROR_IN_PROCESSING: 63 case MAILSMTP_ERROR_IN_PROCESSING:
63 return tr( "Error in processing" ); 64 return i18n( "Error in processing" );
64 case MAILSMTP_ERROR_STARTTLS_NOT_SUPPORTED: 65 case MAILSMTP_ERROR_STARTTLS_NOT_SUPPORTED:
65 return tr( "Starttls not supported" ); 66 return i18n( "Starttls not supported" );
66 // case MAILSMTP_ERROR_INSUFFISANT_SYSTEM_STORAGE: 67 // case MAILSMTP_ERROR_INSUFFISANT_SYSTEM_STORAGE:
67 // return tr( "Insufficient system storage" ); 68 // return i18n( "Insufficient system storage" );
68 case MAILSMTP_ERROR_MAILBOX_UNAVAILABLE: 69 case MAILSMTP_ERROR_MAILBOX_UNAVAILABLE:
69 return tr( "Mailbox unavailable" ); 70 return i18n( "Mailbox unavailable" );
70 case MAILSMTP_ERROR_MAILBOX_NAME_NOT_ALLOWED: 71 case MAILSMTP_ERROR_MAILBOX_NAME_NOT_ALLOWED:
71 return tr( "Mailbox name not allowed" ); 72 return i18n( "Mailbox name not allowed" );
72 case MAILSMTP_ERROR_BAD_SEQUENCE_OF_COMMAND: 73 case MAILSMTP_ERROR_BAD_SEQUENCE_OF_COMMAND:
73 return tr( "Bad command sequence" ); 74 return i18n( "Bad command sequence" );
74 case MAILSMTP_ERROR_USER_NOT_LOCAL: 75 case MAILSMTP_ERROR_USER_NOT_LOCAL:
75 return tr( "User not local" ); 76 return i18n( "User not local" );
76 case MAILSMTP_ERROR_TRANSACTION_FAILED: 77 case MAILSMTP_ERROR_TRANSACTION_FAILED:
77 return tr( "Transaction failed" ); 78 return i18n( "Transaction failed" );
78 case MAILSMTP_ERROR_MEMORY: 79 case MAILSMTP_ERROR_MEMORY:
79 return tr( "Memory error" ); 80 return i18n( "Memory error" );
80 case MAILSMTP_ERROR_CONNECTION_REFUSED: 81 case MAILSMTP_ERROR_CONNECTION_REFUSED:
81 return tr( "Connection refused" ); 82 return i18n( "Connection refused" );
82 default: 83 default:
83 return tr( "Unknown error code" ); 84 return i18n( "Unknown error code" );
84 } 85 }
85} 86}
@@ -153,6 +154,6 @@ void SMTPwrapper::storeFailedMail(const char*data,unsigned int size, const char*
153 } 154 }
154 if (failuremessage) { 155 if (failuremessage) {
155 QMessageBox::critical(0,tr("Error sending mail"), 156 QMessageBox::critical(0,i18n("Error sending mail"),
156 tr("<center>%1</center>").arg(failuremessage)); 157 i18n("<center>%1</center>").arg(failuremessage));
157 } 158 }
158} 159}
@@ -222,5 +223,5 @@ void SMTPwrapper::connect_server()
222 if ( err != MAILSMTP_NO_ERROR ) { 223 if ( err != MAILSMTP_NO_ERROR ) {
223 ; // odebug << "Error init connection" << oendl; 224 ; // odebug << "Error init connection" << oendl;
224 failuretext = tr("Error init SMTP connection: %1").arg(mailsmtpError(err)); 225 failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err));
225 result = 0; 226 result = 0;
226 } 227 }
@@ -231,5 +232,5 @@ void SMTPwrapper::connect_server()
231 if (err != MAILSMTP_NO_ERROR) { 232 if (err != MAILSMTP_NO_ERROR) {
232 result = 0; 233 result = 0;
233 failuretext = tr("Error init SMTP connection: %1").arg(mailsmtpError(err)); 234 failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err));
234 } 235 }
235 } 236 }
@@ -246,5 +247,5 @@ void SMTPwrapper::connect_server()
246 if (!try_tls && force_tls) { 247 if (!try_tls && force_tls) {
247 result = 0; 248 result = 0;
248 failuretext = tr("Error init SMTP tls: %1").arg(mailsmtpError(err)); 249 failuretext = i18n("Error init SMTP tls: %1").arg(mailsmtpError(err));
249 } 250 }
250 251
@@ -262,5 +263,5 @@ void SMTPwrapper::connect_server()
262 } else { 263 } else {
263 result = 0; 264 result = 0;
264 failuretext=tr("Login aborted - storing mail to localfolder"); 265 failuretext=i18n("Login aborted - storing mail to localfolder");
265 } 266 }
266 } else { 267 } else {
@@ -274,5 +275,5 @@ void SMTPwrapper::connect_server()
274 ; // odebug << "auth ok" << oendl; 275 ; // odebug << "auth ok" << oendl;
275 } else { 276 } else {
276 failuretext = tr("Authentification failed"); 277 failuretext = i18n("Authentification failed");
277 result = 0; 278 result = 0;
278 } 279 }
@@ -301,5 +302,5 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size )
301 err = mailsmtp_send( m_smtp, from, rcpts, data, size ); 302 err = mailsmtp_send( m_smtp, from, rcpts, data, size );
302 if ( err != MAILSMTP_NO_ERROR ) { 303 if ( err != MAILSMTP_NO_ERROR ) {
303 failuretext=tr("Error sending mail: %1").arg(mailsmtpError(err)); 304 failuretext=i18n("Error sending mail: %1").arg(mailsmtpError(err));
304 result = 0; 305 result = 0;
305 } 306 }
@@ -434,6 +435,6 @@ bool SMTPwrapper::flushOutbox() {
434 while (mailsToSend.count()>0) { 435 while (mailsToSend.count()>0) {
435 if (sendQueuedMail(wrap, (*mailsToSend.begin()))==0) { 436 if (sendQueuedMail(wrap, (*mailsToSend.begin()))==0) {
436 QMessageBox::critical(0,tr("Error sending mail"), 437 QMessageBox::critical(0,i18n("Error sending mail"),
437 tr("Error sending queued mail - breaking")); 438 i18n("Error sending queued mail - breaking"));
438 returnValue = false; 439 returnValue = false;
439 break; 440 break;