author | llornkcor <llornkcor> | 2003-04-06 18:09:49 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-04-06 18:09:49 (UTC) |
commit | edbdd8c8df7ff99f4273ae0296386fecf4f3b189 (patch) (side-by-side diff) | |
tree | 4d4c68fbf014ff762c3d3402bcdec5814128037e | |
parent | 8bc3b4fff609fa7f4809173724ab197ec08e599a (diff) | |
download | opie-edbdd8c8df7ff99f4273ae0296386fecf4f3b189.zip opie-edbdd8c8df7ff99f4273ae0296386fecf4f3b189.tar.gz opie-edbdd8c8df7ff99f4273ae0296386fecf4f3b189.tar.bz2 |
add some tr to status messages
-rw-r--r-- | noncore/net/mailit/popclient.cpp | 22 | ||||
-rw-r--r-- | noncore/net/mailit/smtpclient.cpp | 8 | ||||
-rw-r--r-- | noncore/unsupported/mailit/popclient.cpp | 22 | ||||
-rw-r--r-- | noncore/unsupported/mailit/smtpclient.cpp | 8 |
4 files changed, 30 insertions, 30 deletions
diff --git a/noncore/net/mailit/popclient.cpp b/noncore/net/mailit/popclient.cpp index a406af2..2f14ed2 100644 --- a/noncore/net/mailit/popclient.cpp +++ b/noncore/net/mailit/popclient.cpp @@ -92,22 +92,22 @@ void PopClient::headersOnly(bool headers, int limit) void PopClient::setSelectedMails(MailList *list) { selected = TRUE; mailList = list; } void PopClient::connectionEstablished() { - emit updateStatus("Connection established"); + emit updateStatus(tr("Connection established")); } void PopClient::errorHandling(int status) { - emit updateStatus("Error Occured"); + emit updateStatus(tr("Error Occured")); emit errorOccurred(status); socket->close(); receiving = FALSE; } void PopClient::incomingData() { QString response, temp, temp2, timeStamp; @@ -207,29 +207,29 @@ void PopClient::incomingData() //Read message number x, count upwards to messageCount case List: { if (messageCount <= newMessages) { *stream << "LIST " << messageCount << "\r\n"; status = Size; temp2.setNum(newMessages - lastSync); temp.setNum(messageCount - lastSync); if (!selected) { - emit updateStatus("Retrieving " + temp + "/" + temp2); + emit updateStatus(tr("Retrieving ") + temp + "/" + temp2); } else { //completing a previously closed transfer if ( (messageCount - lastSync) <= 0) { temp.setNum(messageCount); - emit updateStatus("Previous message " + temp); + emit updateStatus(tr("Previous message ") + temp); } else { - emit updateStatus("Completing message " + temp); + emit updateStatus(tr("Completing message ") + temp); } } break; } else { - emit updateStatus("No new Messages"); + emit updateStatus(tr("No new Messages")); status = Quit; } } //get size of message, eg "500 characters in message.." -> int 500 case Size: { if (status != Quit) { //because of idiotic switch if (response[0] == '+') { temp = response.replace(0, 4, ""); @@ -295,50 +295,50 @@ void PopClient::incomingData() int *ptr = mailList->next(); if (ptr != 0) { messageCount = *ptr; *stream << "LIST " << messageCount << "\r\n"; status = Size; //completing a previously closed transfer if ( (messageCount - lastSync) <= 0) { temp.setNum(messageCount); - emit updateStatus("Previous message " + temp); + emit updateStatus(tr("Previous message ") + temp); } else { temp.setNum(messageCount - lastSync); - emit updateStatus("Completing message " + temp); + emit updateStatus(tr("Completing message ") + temp); } break; } else { newMessages--; status = Quit; } } else { *stream << "LIST " << messageCount << "\r\n"; status = Size; temp2.setNum(newMessages - lastSync); temp.setNum(messageCount - lastSync); - emit updateStatus("Retrieving " + temp + "/" + temp2); + emit updateStatus(tr("Retrieving ") + temp + "/" + temp2); break; } } } if (status != Quit) break; } } case Quit: { *stream << "Quit\r\n"; status = Done; int newM = newMessages - lastSync; if (newM > 0) { temp.setNum(newM); - emit updateStatus(temp + " new messages"); + emit updateStatus(temp + tr(" new messages")); } else { - emit updateStatus("No new messages"); + emit updateStatus(tr("No new messages")); } socket->close(); receiving = FALSE; emit mailTransfered(newM); break; } } diff --git a/noncore/net/mailit/smtpclient.cpp b/noncore/net/mailit/smtpclient.cpp index 7bb7933..3bdc072 100644 --- a/noncore/net/mailit/smtpclient.cpp +++ b/noncore/net/mailit/smtpclient.cpp @@ -45,34 +45,34 @@ void SmtpClient::newConnection(QString target, int port) qWarning("socket in use, connection refused"); return; } status = Init; sending = TRUE; socket->connectToHost(target, port); - emit updateStatus("DNS lookup"); + emit updateStatus(tr("DNS lookup")); } void SmtpClient::addMail(QString from, QString subject, QStringList to, QString body) { RawEmail *mail = new RawEmail; mail->from = from; mail->subject = subject; mail->to = to; mail->body = body; mailList.append(mail); } void SmtpClient::connectionEstablished() { - emit updateStatus("Connection established"); + emit updateStatus(tr("Connection established")); } void SmtpClient::errorHandling(int status) { emit errorOccurred(status); socket->close(); mailList.clear(); @@ -124,17 +124,17 @@ void SmtpClient::incomingData() status = Data; } } else errorHandling(ErrUnknownResponse); } case Data: { if (response[0] == '2') { *stream << "DATA\r\n"; status = Body; - emit updateStatus("Sending: " + mailPtr->subject); + emit updateStatus(tr("Sending: ") + mailPtr->subject); } else errorHandling(ErrUnknownResponse); break; } case Body: { if (response[0] == '3') { *stream << mailPtr->body << "\r\n.\r\n"; mailPtr = mailList.next(); if (mailPtr != NULL) { @@ -146,17 +146,17 @@ void SmtpClient::incomingData() break; } case Quit: { if (response[0] == '2') { *stream << "QUIT\r\n"; status = Done; QString temp; temp.setNum(mailList.count()); - emit updateStatus("Sent " + temp + " messages"); + emit updateStatus(tr("Sent ") + temp + tr(" messages")); emit mailSent(); mailList.clear(); sending = FALSE; socket->close(); } else errorHandling(ErrUnknownResponse); break; } } diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp index a406af2..2f14ed2 100644 --- a/noncore/unsupported/mailit/popclient.cpp +++ b/noncore/unsupported/mailit/popclient.cpp @@ -92,22 +92,22 @@ void PopClient::headersOnly(bool headers, int limit) void PopClient::setSelectedMails(MailList *list) { selected = TRUE; mailList = list; } void PopClient::connectionEstablished() { - emit updateStatus("Connection established"); + emit updateStatus(tr("Connection established")); } void PopClient::errorHandling(int status) { - emit updateStatus("Error Occured"); + emit updateStatus(tr("Error Occured")); emit errorOccurred(status); socket->close(); receiving = FALSE; } void PopClient::incomingData() { QString response, temp, temp2, timeStamp; @@ -207,29 +207,29 @@ void PopClient::incomingData() //Read message number x, count upwards to messageCount case List: { if (messageCount <= newMessages) { *stream << "LIST " << messageCount << "\r\n"; status = Size; temp2.setNum(newMessages - lastSync); temp.setNum(messageCount - lastSync); if (!selected) { - emit updateStatus("Retrieving " + temp + "/" + temp2); + emit updateStatus(tr("Retrieving ") + temp + "/" + temp2); } else { //completing a previously closed transfer if ( (messageCount - lastSync) <= 0) { temp.setNum(messageCount); - emit updateStatus("Previous message " + temp); + emit updateStatus(tr("Previous message ") + temp); } else { - emit updateStatus("Completing message " + temp); + emit updateStatus(tr("Completing message ") + temp); } } break; } else { - emit updateStatus("No new Messages"); + emit updateStatus(tr("No new Messages")); status = Quit; } } //get size of message, eg "500 characters in message.." -> int 500 case Size: { if (status != Quit) { //because of idiotic switch if (response[0] == '+') { temp = response.replace(0, 4, ""); @@ -295,50 +295,50 @@ void PopClient::incomingData() int *ptr = mailList->next(); if (ptr != 0) { messageCount = *ptr; *stream << "LIST " << messageCount << "\r\n"; status = Size; //completing a previously closed transfer if ( (messageCount - lastSync) <= 0) { temp.setNum(messageCount); - emit updateStatus("Previous message " + temp); + emit updateStatus(tr("Previous message ") + temp); } else { temp.setNum(messageCount - lastSync); - emit updateStatus("Completing message " + temp); + emit updateStatus(tr("Completing message ") + temp); } break; } else { newMessages--; status = Quit; } } else { *stream << "LIST " << messageCount << "\r\n"; status = Size; temp2.setNum(newMessages - lastSync); temp.setNum(messageCount - lastSync); - emit updateStatus("Retrieving " + temp + "/" + temp2); + emit updateStatus(tr("Retrieving ") + temp + "/" + temp2); break; } } } if (status != Quit) break; } } case Quit: { *stream << "Quit\r\n"; status = Done; int newM = newMessages - lastSync; if (newM > 0) { temp.setNum(newM); - emit updateStatus(temp + " new messages"); + emit updateStatus(temp + tr(" new messages")); } else { - emit updateStatus("No new messages"); + emit updateStatus(tr("No new messages")); } socket->close(); receiving = FALSE; emit mailTransfered(newM); break; } } diff --git a/noncore/unsupported/mailit/smtpclient.cpp b/noncore/unsupported/mailit/smtpclient.cpp index 7bb7933..3bdc072 100644 --- a/noncore/unsupported/mailit/smtpclient.cpp +++ b/noncore/unsupported/mailit/smtpclient.cpp @@ -45,34 +45,34 @@ void SmtpClient::newConnection(QString target, int port) qWarning("socket in use, connection refused"); return; } status = Init; sending = TRUE; socket->connectToHost(target, port); - emit updateStatus("DNS lookup"); + emit updateStatus(tr("DNS lookup")); } void SmtpClient::addMail(QString from, QString subject, QStringList to, QString body) { RawEmail *mail = new RawEmail; mail->from = from; mail->subject = subject; mail->to = to; mail->body = body; mailList.append(mail); } void SmtpClient::connectionEstablished() { - emit updateStatus("Connection established"); + emit updateStatus(tr("Connection established")); } void SmtpClient::errorHandling(int status) { emit errorOccurred(status); socket->close(); mailList.clear(); @@ -124,17 +124,17 @@ void SmtpClient::incomingData() status = Data; } } else errorHandling(ErrUnknownResponse); } case Data: { if (response[0] == '2') { *stream << "DATA\r\n"; status = Body; - emit updateStatus("Sending: " + mailPtr->subject); + emit updateStatus(tr("Sending: ") + mailPtr->subject); } else errorHandling(ErrUnknownResponse); break; } case Body: { if (response[0] == '3') { *stream << mailPtr->body << "\r\n.\r\n"; mailPtr = mailList.next(); if (mailPtr != NULL) { @@ -146,17 +146,17 @@ void SmtpClient::incomingData() break; } case Quit: { if (response[0] == '2') { *stream << "QUIT\r\n"; status = Done; QString temp; temp.setNum(mailList.count()); - emit updateStatus("Sent " + temp + " messages"); + emit updateStatus(tr("Sent ") + temp + tr(" messages")); emit mailSent(); mailList.clear(); sending = FALSE; socket->close(); } else errorHandling(ErrUnknownResponse); break; } } |