summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/smtpwrapper.cpp
authorzautrix <zautrix>2004-10-23 19:32:41 (UTC)
committer zautrix <zautrix>2004-10-23 19:32:41 (UTC)
commit94df6192e59b7d4c69e2fb43ef2c39db08bb1c39 (patch) (side-by-side diff)
tree28956adbf73a61010d98deb27d83b324cb285471 /kmicromail/libmailwrapper/smtpwrapper.cpp
parent52b6fc17c0dcd1f13f701f698e0305440f26fc3e (diff)
downloadkdepimpi-94df6192e59b7d4c69e2fb43ef2c39db08bb1c39.zip
kdepimpi-94df6192e59b7d4c69e2fb43ef2c39db08bb1c39.tar.gz
kdepimpi-94df6192e59b7d4c69e2fb43ef2c39db08bb1c39.tar.bz2
compile fixes
Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp59
1 files changed, 30 insertions, 29 deletions
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
@@ -14,6 +14,7 @@
#include <qpe/qcopenvelope_qws.h>
#include <libetpan/libetpan.h>
+#include <klocale.h>
using namespace Opie::Core;
@@ -44,43 +45,43 @@ void SMTPwrapper::emitQCop( int queued ) {
QString SMTPwrapper::mailsmtpError( int errnum ) {
switch ( errnum ) {
case MAILSMTP_NO_ERROR:
- return tr( "No error" );
+ return i18n( "No error" );
case MAILSMTP_ERROR_UNEXPECTED_CODE:
- return tr( "Unexpected error code" );
+ return i18n( "Unexpected error code" );
case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE:
- return tr( "Service not available" );
+ return i18n( "Service not available" );
case MAILSMTP_ERROR_STREAM:
- return tr( "Stream error" );
+ return i18n( "Stream error" );
case MAILSMTP_ERROR_HOSTNAME:
- return tr( "gethostname() failed" );
+ return i18n( "gethostname() failed" );
case MAILSMTP_ERROR_NOT_IMPLEMENTED:
- return tr( "Not implemented" );
+ return i18n( "Not implemented" );
case MAILSMTP_ERROR_ACTION_NOT_TAKEN:
- return tr( "Error, action not taken" );
+ return i18n( "Error, action not taken" );
case MAILSMTP_ERROR_EXCEED_STORAGE_ALLOCATION:
- return tr( "Data exceeds storage allocation" );
+ return i18n( "Data exceeds storage allocation" );
case MAILSMTP_ERROR_IN_PROCESSING:
- return tr( "Error in processing" );
+ return i18n( "Error in processing" );
case MAILSMTP_ERROR_STARTTLS_NOT_SUPPORTED:
- return tr( "Starttls not supported" );
+ return i18n( "Starttls not supported" );
// case MAILSMTP_ERROR_INSUFFISANT_SYSTEM_STORAGE:
- // return tr( "Insufficient system storage" );
+ // return i18n( "Insufficient system storage" );
case MAILSMTP_ERROR_MAILBOX_UNAVAILABLE:
- return tr( "Mailbox unavailable" );
+ return i18n( "Mailbox unavailable" );
case MAILSMTP_ERROR_MAILBOX_NAME_NOT_ALLOWED:
- return tr( "Mailbox name not allowed" );
+ return i18n( "Mailbox name not allowed" );
case MAILSMTP_ERROR_BAD_SEQUENCE_OF_COMMAND:
- return tr( "Bad command sequence" );
+ return i18n( "Bad command sequence" );
case MAILSMTP_ERROR_USER_NOT_LOCAL:
- return tr( "User not local" );
+ return i18n( "User not local" );
case MAILSMTP_ERROR_TRANSACTION_FAILED:
- return tr( "Transaction failed" );
+ return i18n( "Transaction failed" );
case MAILSMTP_ERROR_MEMORY:
- return tr( "Memory error" );
+ return i18n( "Memory error" );
case MAILSMTP_ERROR_CONNECTION_REFUSED:
- return tr( "Connection refused" );
+ return i18n( "Connection refused" );
default:
- return tr( "Unknown error code" );
+ return i18n( "Unknown error code" );
}
}
@@ -152,8 +153,8 @@ void SMTPwrapper::storeFailedMail(const char*data,unsigned int size, const char*
storeMail(data,size,"Sendfailed");
}
if (failuremessage) {
- QMessageBox::critical(0,tr("Error sending mail"),
- tr("<center>%1</center>").arg(failuremessage));
+ QMessageBox::critical(0,i18n("Error sending mail"),
+ i18n("<center>%1</center>").arg(failuremessage));
}
}
@@ -221,7 +222,7 @@ void SMTPwrapper::connect_server()
}
if ( err != MAILSMTP_NO_ERROR ) {
; // odebug << "Error init connection" << oendl;
- failuretext = tr("Error init SMTP connection: %1").arg(mailsmtpError(err));
+ failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err));
result = 0;
}
@@ -230,7 +231,7 @@ void SMTPwrapper::connect_server()
err = mailsmtp_init( m_smtp );
if (err != MAILSMTP_NO_ERROR) {
result = 0;
- failuretext = tr("Error init SMTP connection: %1").arg(mailsmtpError(err));
+ failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err));
}
}
@@ -245,7 +246,7 @@ void SMTPwrapper::connect_server()
if (!try_tls && force_tls) {
result = 0;
- failuretext = tr("Error init SMTP tls: %1").arg(mailsmtpError(err));
+ failuretext = i18n("Error init SMTP tls: %1").arg(mailsmtpError(err));
}
if (result==1 && m_SmtpAccount->getLogin() ) {
@@ -261,7 +262,7 @@ void SMTPwrapper::connect_server()
pass = login.getPassword();
} else {
result = 0;
- failuretext=tr("Login aborted - storing mail to localfolder");
+ failuretext=i18n("Login aborted - storing mail to localfolder");
}
} else {
user = m_SmtpAccount->getUser();
@@ -273,7 +274,7 @@ void SMTPwrapper::connect_server()
if ( err == MAILSMTP_NO_ERROR ) {
; // odebug << "auth ok" << oendl;
} else {
- failuretext = tr("Authentification failed");
+ failuretext = i18n("Authentification failed");
result = 0;
}
}
@@ -300,7 +301,7 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size )
if (m_smtp) {
err = mailsmtp_send( m_smtp, from, rcpts, data, size );
if ( err != MAILSMTP_NO_ERROR ) {
- failuretext=tr("Error sending mail: %1").arg(mailsmtpError(err));
+ failuretext=i18n("Error sending mail: %1").arg(mailsmtpError(err));
result = 0;
}
} else {
@@ -433,8 +434,8 @@ bool SMTPwrapper::flushOutbox() {
while (mailsToSend.count()>0) {
if (sendQueuedMail(wrap, (*mailsToSend.begin()))==0) {
- QMessageBox::critical(0,tr("Error sending mail"),
- tr("Error sending queued mail - breaking"));
+ QMessageBox::critical(0,i18n("Error sending mail"),
+ i18n("Error sending queued mail - breaking"));
returnValue = false;
break;
}