summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.cpp5
-rw-r--r--kmicromail/accountitem.cpp97
-rw-r--r--kmicromail/accountview.cpp9
-rw-r--r--kmicromail/addresspicker.cpp6
-rw-r--r--kmicromail/composemail.cpp66
-rw-r--r--kmicromail/editaccounts.cpp45
-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
-rw-r--r--kmicromail/nntpgroupsdlg.cpp3
-rw-r--r--kmicromail/selectsmtp.cpp5
-rw-r--r--kmicromail/viewmail.cpp23
-rw-r--r--kmicromail/viewmailbase.cpp21
15 files changed, 240 insertions, 229 deletions
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp
index 99e8618..d6df981 100644
--- a/kabc/plugins/qtopia/resourceqtopia.cpp
+++ b/kabc/plugins/qtopia/resourceqtopia.cpp
@@ -25,10 +25,11 @@ Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <sys/types.h>
#include <sys/stat.h>
-//#include <unistd.h>
-
+#ifndef _WIN32_
+#include <unistd.h>
+#endif
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qfileinfo.h>
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp
index 49d86fc..567de87 100644
--- a/kmicromail/accountitem.cpp
+++ b/kmicromail/accountitem.cpp
@@ -14,8 +14,9 @@
/* QT */
#include <qpopupmenu.h>
#include <qmessagebox.h>
#include <kiconloader.h>
+#include <klocale.h>
#define GET_NEW_MAILS 101
using namespace Opie::Core;
@@ -91,16 +92,16 @@ QPopupMenu * POP3viewItem::getContextMenu()
if (m)
{
if (!account->getOffline())
{
- m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
- m->insertItem(QObject::tr("Disconnect",contextName),0);
- m->insertItem(QObject::tr("Set offline",contextName),1);
+ m->insertItem(i18n("Get new messages"),GET_NEW_MAILS);
+ m->insertItem(i18n("Disconnect"),0);
+ m->insertItem(i18n("Set offline"),1);
}
else
{
- m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
- m->insertItem(QObject::tr("Set online",contextName),1);
+ m->insertItem(i18n("Get new messages"),GET_NEW_MAILS);
+ m->insertItem(i18n("Set online"),1);
}
}
return m;
}
@@ -186,12 +187,12 @@ QPopupMenu * POP3folderItem::getContextMenu()
{
QPopupMenu *m = new QPopupMenu(0);
if (m)
{
- m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
- m->insertItem(QObject::tr("Refresh header list",contextName),0);
- m->insertItem(QObject::tr("Delete all mails",contextName),1);
- m->insertItem(QObject::tr("Move/Copie all mails",contextName),2);
+ m->insertItem(i18n("Get new messages"),GET_NEW_MAILS);
+ m->insertItem(i18n("Refresh header list"),0);
+ m->insertItem(i18n("Delete all mails"),1);
+ m->insertItem(i18n("Move/Copie all mails"),2);
}
return m;
}
@@ -299,15 +300,15 @@ QPopupMenu * NNTPviewItem::getContextMenu()
if (m)
{
if (!account->getOffline())
{
- m->insertItem(QObject::tr("Disconnect",contextName),0);
- m->insertItem(QObject::tr("Set offline",contextName),1);
- //m->insertItem(QObject::tr("(Un-)Subscribe groups",contextName),2);
+ m->insertItem(i18n("Disconnect"),0);
+ m->insertItem(i18n("Set offline"),1);
+ //m->insertItem(i18n("(Un-)Subscribe groups"),2);
}
else
{
- m->insertItem(QObject::tr("Set online",contextName),1);
+ m->insertItem(i18n("Set online"),1);
}
}
return m;
}
@@ -395,10 +396,10 @@ QPopupMenu * NNTPfolderItem::getContextMenu()
{
QPopupMenu *m = new QPopupMenu(0);
if (m)
{
- m->insertItem(QObject::tr("Refresh header list",contextName),0);
- m->insertItem(QObject::tr("Copy all postings",contextName),1);
+ m->insertItem(i18n("Refresh header list"),0);
+ m->insertItem(i18n("Copy all postings"),1);
}
return m;
}
@@ -516,20 +517,20 @@ QPopupMenu * IMAPviewItem::getContextMenu()
if (m)
{
if (!account->getOffline())
{
- m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
- m->insertItem(QObject::tr("Refresh folder list",contextName),0);
- m->insertItem(QObject::tr("Create new folder",contextName),1);
+ m->insertItem(i18n("Get new messages"),GET_NEW_MAILS);
+ m->insertItem(i18n("Refresh folder list"),0);
+ m->insertItem(i18n("Create new folder"),1);
m->insertSeparator();
- m->insertItem(QObject::tr("Disconnect",contextName),2);
- m->insertItem(QObject::tr("Set offline",contextName),3);
+ m->insertItem(i18n("Disconnect"),2);
+ m->insertItem(i18n("Set offline"),3);
m->insertSeparator();
}
else
{
- m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
- m->insertItem(QObject::tr("Set online",contextName),3);
+ m->insertItem(i18n("Get new messages"),GET_NEW_MAILS);
+ m->insertItem(i18n("Set online"),3);
}
}
return m;
}
@@ -671,20 +672,20 @@ QPopupMenu * IMAPfolderItem::getContextMenu()
if (m)
{
if (folder->may_select())
{
- m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS);
- m->insertItem(QObject::tr("Refresh header list",contextName),0);
- m->insertItem(QObject::tr("Move/Copie all mails",contextName),4);
- m->insertItem(QObject::tr("Delete all mails",contextName),1);
+ m->insertItem(i18n("Get new messages"),GET_NEW_MAILS);
+ m->insertItem(i18n("Refresh header list"),0);
+ m->insertItem(i18n("Move/Copie all mails"),4);
+ m->insertItem(i18n("Delete all mails"),1);
}
if (folder->no_inferior()==false)
{
- m->insertItem(QObject::tr("Create new subfolder",contextName),2);
+ m->insertItem(i18n("Create new subfolder"),2);
}
if (folder->getDisplayName().lower()!="inbox")
{
- m->insertItem(QObject::tr("Delete folder",contextName),3);
+ m->insertItem(i18n("Delete folder"),3);
}
}
return m;
}
@@ -706,12 +707,12 @@ void IMAPfolderItem::createNewFolder()
}
void IMAPfolderItem::deleteFolder()
{
- int yesno = QMessageBox::warning(0,QObject::tr("Delete folder",contextName),
- QObject::tr("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>",contextName).arg(folder->getDisplayName()),
- QObject::tr("Yes",contextName),
- QObject::tr("No",contextName),QString::null,1,1);
+ int yesno = QMessageBox::warning(0,i18n("Delete folder"),
+ i18n("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>").arg(folder->getDisplayName()),
+ i18n("Yes"),
+ i18n("No"),QString::null,1,1);
if (yesno == 0)
{
if (imap->getWrapper()->deleteMbox(folder))
@@ -856,12 +857,12 @@ QPopupMenu * MHviewItem::getContextMenu()
{
QPopupMenu *m = new QPopupMenu(0);
if (m)
{
- m->insertItem(QObject::tr("Refresh folder list",contextName),0);
- m->insertItem(QObject::tr("Create new folder",contextName),1);
- m->insertItem(QObject::tr("Delete all mails",contextName),2);
- m->insertItem(QObject::tr("Move/Copie all mails",contextName),3);
+ m->insertItem(i18n("Refresh folder list"),0);
+ m->insertItem(i18n("Create new folder"),1);
+ m->insertItem(i18n("Delete all mails"),2);
+ m->insertItem(i18n("Move/Copie all mails"),3);
}
return m;
}
@@ -974,12 +975,12 @@ RECBODYP MHfolderItem::fetchBody(const RecMailP&aMail)
}
void MHfolderItem::deleteFolder()
{
- int yesno = QMessageBox::warning(0,QObject::tr("Delete folder",contextName),
- QObject::tr("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>",contextName).arg(folder->getDisplayName()),
- QObject::tr("Yes",contextName),
- QObject::tr("No",contextName),QString::null,1,1);
+ int yesno = QMessageBox::warning(0,i18n("Delete folder"),
+ i18n("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>").arg(folder->getDisplayName()),
+ i18n("Yes"),
+ i18n("No"),QString::null,1,1);
if (yesno == 0)
{
if (mbox->getWrapper()->deleteMbox(folder))
@@ -1001,12 +1002,12 @@ QPopupMenu * MHfolderItem::getContextMenu()
{
QPopupMenu *m = new QPopupMenu(0);
if (m)
{
- m->insertItem(QObject::tr("Move/Copie all mails",contextName),2);
- m->insertItem(QObject::tr("Delete all mails",contextName),0);
- m->insertItem(QObject::tr("Create new subfolder",contextName),3);
- m->insertItem(QObject::tr("Delete folder",contextName),1);
+ m->insertItem(i18n("Move/Copie all mails"),2);
+ m->insertItem(i18n("Delete all mails"),0);
+ m->insertItem(i18n("Create new subfolder"),3);
+ m->insertItem(i18n("Delete folder"),1);
}
return m;
}
@@ -1116,13 +1117,13 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,const FolderP&folder)
{
if (!wrapper) return;
QString fname="";
if (folder) fname = folder->getDisplayName();
- int yesno = QMessageBox::warning(0,QObject::tr("Delete all mails",contextName),
- QObject::tr("<center>Realy delete all mails in box <br>%1</center>",contextName).
+ int yesno = QMessageBox::warning(0,i18n("Delete all mails"),
+ i18n("<center>Realy delete all mails in box <br>%1</center>").
arg(fname),
- QObject::tr("Yes",contextName),
- QObject::tr("No",contextName),QString::null,1,1);
+ i18n("Yes"),
+ i18n("No"),QString::null,1,1);
if (yesno == 0)
{
if (wrapper->deleteAllMail(folder))
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index de8c5bb..c10d384 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -15,8 +15,9 @@
#include <qmessagebox.h>
#include <qpopupmenu.h>
#include <qcheckbox.h>
#include <qspinbox.h>
+#include <klocale.h>
using namespace Opie::Core;
AccountView::AccountView( QWidget *parent, const char *name, WFlags flags )
: QListView( parent, name, flags )
@@ -155,10 +156,10 @@ void AccountView::downloadMailsInbox(const FolderP&fromFolder,AbstractMail*fromW
return;
}
if (sels.newFolder() && !targetMail->createMbox(targetFolder))
{
- QMessageBox::critical(0,tr("Error creating new Folder"),
- tr("<center>Error while creating<br>new folder - breaking.</center>"));
+ QMessageBox::critical(0,i18n("Error creating new Folder"),
+ i18n("<center>Error while creating<br>new folder - breaking.</center>"));
return;
}
int maxsize = 0;
if ( sels.useSize->isChecked())
@@ -185,10 +186,10 @@ void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrappe
return;
}
if (sels.newFolder() && !targetMail->createMbox(targetFolder))
{
- QMessageBox::critical(0,tr("Error creating new Folder"),
- tr("<center>Error while creating<br>new folder - breaking.</center>"));
+ QMessageBox::critical(0,i18n("Error creating new Folder"),
+ i18n("<center>Error while creating<br>new folder - breaking.</center>"));
return;
}
int maxsize = 0;
if ( sels.useSize->isChecked())
diff --git a/kmicromail/addresspicker.cpp b/kmicromail/addresspicker.cpp
index ec6da49..f4234b4 100644
--- a/kmicromail/addresspicker.cpp
+++ b/kmicromail/addresspicker.cpp
@@ -61,9 +61,9 @@ AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFl
{
#if 0
// makes this realy sense??
addressList->insertItem(
- tr( "There are no entries in the addressbook." ) );
+ i18n( "There are no entries in the addressbook." ) );
#endif
addressList->setEnabled( false );
okButton->setEnabled( false );
}
@@ -88,10 +88,10 @@ void AddressPicker::accept()
names.replace( names.length() - 2, 2, "" );
if ( names.isEmpty() )
{
- QMessageBox::information(this, tr("Error"), tr("<p>You have to select"
- " at least one address entry.</p>"), tr("Ok"));
+ QMessageBox::information(this, i18n("Error"), i18n("<p>You have to select"
+ " at least one address entry.</p>"), i18n("Ok"));
return;
}
selectedNames = names;
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 946e97d..35ad367 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -51,11 +51,11 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
config.setGroup( "General" );
QString whoami_uid = config.readEntry( "WhoAmI" );
if ( whoami_uid.isEmpty() ) {
- QMessageBox::information( 0, tr( "Hint" ),
- tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
- tr( "Ok" ) );
+ QMessageBox::information( 0, i18n( "Hint" ),
+ i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
+ i18n( "Ok" ) );
fillSettings();
} else
@@ -66,11 +66,11 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( );
QStringList mails = con.emails();
QString defmail = con.preferredEmail();
if ( mails.count() == 0)
- QMessageBox::information( 0, tr( "Hint" ),
- tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
- tr( "Ok" ) );
+ QMessageBox::information( 0, i18n( "Hint" ),
+ i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
+ i18n( "Ok" ) );
if (defmail.length()!=0) {
fromBox->insertItem(defmail);
}
QStringList::ConstIterator sit = mails.begin();
@@ -86,10 +86,10 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
fillSettings();
}
checkBoxLater->setChecked( KOPrefs::instance()->mSendLater );
- attList->addColumn( tr( "Name" ) );
- attList->addColumn( tr( "Size" ) );
+ attList->addColumn( i18n( "Name" ) );
+ attList->addColumn( i18n( "Size" ) );
QList<Account> accounts = settings->getAccounts();
if ( QApplication::desktop()->width() < 320 )
smtpAccountBox->setMaximumWidth( 80 );
@@ -112,11 +112,11 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
warnAttach = true;
if ( smtpAccounts.count() > 0 ) {
fillValues( smtpAccountBox->currentItem() );
} else {
- QMessageBox::information( 0, tr( "Problem" ),
- tr( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ),
- tr( "Ok" ) );
+ QMessageBox::information( 0, i18n( "Problem" ),
+ i18n( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ),
+ i18n( "Ok" ) );
return;
}
connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) );
message->setFont ( KOPrefs::instance()->mComposeFont );
@@ -171,17 +171,17 @@ void ComposeMail::saveAsDraft()
AttachViewItem *it = (AttachViewItem *) attList->firstChild();
/* attachments we will ignore! */
if ( it != 0 ) {
if ( warnAttach )
- QMessageBox::warning(0,tr("Store message"),
- tr("<center>Attachments will not be stored in \"Draft\" folder</center>"));
+ QMessageBox::warning(0,i18n("Store message"),
+ i18n("<center>Attachments will not be stored in \"Draft\" folder</center>"));
warnAttach = false;
}
- setStatus( tr("Mail saved as draft!") );
+ setStatus( i18n("Mail saved as draft!") );
}
void ComposeMail::clearStatus()
{
- topLevelWidget()->setCaption( tr("Compose mail") );
+ topLevelWidget()->setCaption( i18n("Compose mail") );
}
void ComposeMail::setStatus( QString status )
{
topLevelWidget()->setCaption( status );
@@ -227,11 +227,11 @@ void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameLis
if ( mPickLineEdit == 0 ) { //whoami received
QString defmail = uidList[0];
if ( emailList.count() == 0 )
- QMessageBox::information( 0, tr( "Hint" ),
- tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
- tr( "Ok" ) );
+ QMessageBox::information( 0, i18n( "Hint" ),
+ i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
+ i18n( "Ok" ) );
if (defmail.length()!=0) {
fromBox->insertItem(defmail);
}
QStringList::ConstIterator sit = emailList.begin();
@@ -354,11 +354,11 @@ void ComposeMail::addAttachment()
void ComposeMail::removeAttachment()
{
if ( !attList->currentItem() ) {
- QMessageBox::information( this, tr( "Error" ),
- tr( "<p>Please select a File.</p>" ),
- tr( "Ok" ) );
+ QMessageBox::information( this, i18n( "Error" ),
+ i18n( "<p>Please select a File.</p>" ),
+ i18n( "Ok" ) );
} else {
attList->takeItem( attList->currentItem() );
}
}
@@ -371,12 +371,12 @@ void ComposeMail::accept()
return;
}
if (! checkBoxLater->isChecked() ) {
- int yesno = QMessageBox::warning(0,tr("Stop editing message"),
- tr("Send this message?"),
- tr("Yes"),
- tr("Cancel"));
+ int yesno = QMessageBox::warning(0,i18n("Stop editing message"),
+ i18n("Send this message?"),
+ i18n("Yes"),
+ i18n("Cancel"));
if (yesno == 1) {
return;
}
@@ -392,10 +392,10 @@ void ComposeMail::accept()
if ( !toLine->text().isEmpty() ) {
mail->setTo( toLine->text() );
} else {
- QMessageBox::warning(0,tr("Sending mail"),
- tr("No Receiver spezified" ) );
+ QMessageBox::warning(0,i18n("Sending mail"),
+ i18n("No Receiver spezified" ) );
return;
}
mail->setName(senderNameEdit->text());
@@ -434,18 +434,18 @@ void ComposeMail::accept()
void ComposeMail::reject()
{
//qDebug("ComposeMail::reject() ");
- int yesno = QMessageBox::warning(0,tr("Store message?"),
- tr("Store message into drafts?\n"),
- tr("Yes"),
- tr("No"));
+ int yesno = QMessageBox::warning(0,i18n("Store message?"),
+ i18n("Store message into drafts?\n"),
+ i18n("Yes"),
+ i18n("No"));
//qDebug("button %d ", yesno);
if (yesno == 0) {
if ( toLine->text().isEmpty() ) {
- QMessageBox::warning(0,tr("Sending mail"),
- tr("No Receiver spezified" ) );
+ QMessageBox::warning(0,i18n("Sending mail"),
+ i18n("No Receiver spezified" ) );
return;
}
saveAsDraft();
}
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 733e38a..7ad4ec8 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -16,8 +16,9 @@
#include <qlabel.h>
#include <qtabwidget.h>
#include <qlistview.h>
#include <qspinbox.h>
+#include <klocale.h>
#include <libmailwrapper/nntpwrapper.h>
using namespace Opie::Core;
@@ -52,12 +53,12 @@ EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool
: EditAccountsUI( parent, name, modal, flags )
{
settings = s;
- mailList->addColumn( tr( "Account" ) );
- mailList->addColumn( tr( "Type" ) );
+ mailList->addColumn( i18n( "Account" ) );
+ mailList->addColumn( i18n( "Type" ) );
- newsList->addColumn( tr( "Account" ) );
+ newsList->addColumn( i18n( "Account" ) );
connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) );
connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) );
connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) );
@@ -206,11 +207,11 @@ void EditAccounts::slotEditAccount( Account *account )
}
void EditAccounts::slotDeleteAccount( Account *account )
{
- if ( QMessageBox::information( this, tr( "Question" ),
- tr( "<p>Do you really want to delete the selected Account?</p>" ),
- tr( "Yes" ), tr( "No" ) ) == 0 )
+ if ( QMessageBox::information( this, i18n( "Question" ),
+ i18n( "<p>Do you really want to delete the selected Account?</p>" ),
+ i18n( "Yes" ), i18n( "No" ) ) == 0 )
{
settings->delAccount( account );
slotFillLists();
}
@@ -219,11 +220,11 @@ void EditAccounts::slotDeleteAccount( Account *account )
void EditAccounts::slotEditMail()
{
if ( !mailList->currentItem() )
{
- QMessageBox::information( this, tr( "Error" ),
- tr( "<p>Please select an account.</p>" ),
- tr( "Ok" ) );
+ QMessageBox::information( this, i18n( "Error" ),
+ i18n( "<p>Please select an account.</p>" ),
+ i18n( "Ok" ) );
return;
}
Account *a = ((AccountListItem *) mailList->currentItem())->getAccount();
@@ -233,11 +234,11 @@ void EditAccounts::slotEditMail()
void EditAccounts::slotDeleteMail()
{
if ( !mailList->currentItem() )
{
- QMessageBox::information( this, tr( "Error" ),
- tr( "<p>Please select an account.</p>" ),
- tr( "Ok" ) );
+ QMessageBox::information( this, i18n( "Error" ),
+ i18n( "<p>Please select an account.</p>" ),
+ i18n( "Ok" ) );
return;
}
Account *a = ((AccountListItem *) mailList->currentItem())->getAccount();
@@ -252,11 +253,11 @@ void EditAccounts::slotNewNews()
void EditAccounts::slotEditNews()
{
if ( !newsList->currentItem() )
{
- QMessageBox::information( this, tr( "Error" ),
- tr( "<p>Please select an account.</p>" ),
- tr( "Ok" ) );
+ QMessageBox::information( this, i18n( "Error" ),
+ i18n( "<p>Please select an account.</p>" ),
+ i18n( "Ok" ) );
return;
}
Account *a = ((AccountListItem *) newsList->currentItem())->getAccount();
@@ -266,11 +267,11 @@ void EditAccounts::slotEditNews()
void EditAccounts::slotDeleteNews()
{
if ( !newsList->currentItem() )
{
- QMessageBox::information( this, tr( "Error" ),
- tr( "<p>Please select an account.</p>" ),
- tr( "Ok" ) );
+ QMessageBox::information( this, i18n( "Error" ),
+ i18n( "<p>Please select an account.</p>" ),
+ i18n( "Ok" ) );
return;
}
Account *a = ((AccountListItem *) newsList->currentItem())->getAccount();
@@ -554,9 +555,9 @@ void NNTPconfig::slotShowSub()
QCheckListItem *item;
item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox );
item->setOn( true );
}
- topLevelWidget()->setCaption( tr("%1 groups subscribed").arg( subscribedGroups.count()));
+ topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count()));
}
void NNTPconfig::slotShowFilter()
{
save();
@@ -572,18 +573,18 @@ void NNTPconfig::slotShowFilter()
item->setOn( true );
}
}
}
- topLevelWidget()->setCaption( tr("Filter found %1 groups").arg( count));
+ topLevelWidget()->setCaption( i18n("Filter found %1 groups").arg( count));
}
void NNTPconfig::slotGetNG() {
save();
data->save();
- topLevelWidget()->setCaption( tr("Fetching group list..."));
+ topLevelWidget()->setCaption( i18n("Fetching group list..."));
qApp->processEvents();
NNTPwrapper* tmp = new NNTPwrapper( data );
allGroups = tmp->listAllNewsgroups();
- topLevelWidget()->setCaption( tr("Downloaded %1 group names").arg( allGroups.count()));
+ topLevelWidget()->setCaption( i18n("Downloaded %1 group names").arg( allGroups.count()));
ListViewGroups->clear();
for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) {
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
@@ -10,9 +10,9 @@
#include <qprogressbar.h>
#include <qapplication.h>
#include <qmessagebox.h>
-
+#include <klocale.h>
#include <kdecore/kstandarddirs.h>
#include <qfile.h>
#include <qtextstream.h>
#include <stdlib.h>
@@ -146,12 +146,12 @@ void AbstractMail::deleteMailList(const QValueList<RecMailP>&target)
// this is currently re-implemented in pop3wrapper and imapwrapper
int iii = 0;
int count = target.count();
QProgressBar wid ( count );
- wid.setCaption( tr("Deleting ..."));
+ wid.setCaption( i18n("Deleting ..."));
wid.show();
while (iii < count ) {
- Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
+ Global::statusMessage(i18n("Delete message %1 of %2").arg(iii).arg(count));
wid.setProgress( iii );
wid.raise();
qApp->processEvents();
RecMailP mail = (*target.at( iii ));
@@ -171,17 +171,17 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
lfName = acc->getAccountName();
// create local folder
if ( !targetMail->createMbox(lfName))
{
- QMessageBox::critical(0,tr("Error creating new Folder"),
- tr("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName));
+ QMessageBox::critical(0,i18n("Error creating new Folder"),
+ i18n("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName));
return;
}
QValueList<RecMailP> t;
listMessages(fromFolder->getName(),t,acc->getMaxMailSize() );
if ( t.count() == 0 ) {
qDebug("There are no new messages %s", fromFolder->getName().latin1());
- Global::statusMessage(tr("There are no new messages"));
+ Global::statusMessage(i18n("There are no new messages"));
return;
}
QValueList<RecMailP> e;
targetMail->listMessages(lfName,e,acc->getMaxMailSize() );
@@ -209,13 +209,13 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
++iii;
}
qDebug("Downloaded %d messages ",n.count() );
if ( n.count() == 0 ) {
- Global::statusMessage(tr("There are no new messages"));
+ Global::statusMessage(i18n("There are no new messages"));
return;
}
mvcpMailList( n,lfName,targetMail,!acc->getLeaveOnServer());
- Global::statusMessage(tr("Downloaded %1 messages").arg(n.count()));
+ Global::statusMessage(i18n("Downloaded %1 messages").arg(n.count()));
#if 0
QValueList<RecMailP> t;
listMessages(fromFolder->getName(),t, maxSizeInKb);
@@ -239,15 +239,15 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t,
int count = t.count();
if ( count == 0 )
return;
// wel, processevents is qite strange, we need a widget for getting
- // Global::statusMessage(tr("Copy2 message %1").arg(iii)); displaye
+ // Global::statusMessage(i18n("Copy2 message %1").arg(iii)); displaye
QProgressBar wid ( count );
- wid.setCaption( tr("Copying ..."));
+ wid.setCaption( i18n("Copying..."));
wid.show();
while (iii < count ) {
- Global::statusMessage(tr("Copy message %1 of %2").arg(iii).arg(count));
+ Global::statusMessage(i18n("Copy message %1 of %2").arg(iii).arg(count));
wid.setProgress( iii );
wid.raise();
qApp->processEvents();
RecMailP r = (*t.at( iii ));
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
@@ -47,9 +47,9 @@ int IMAPwrapper::selectMbox(const QString&mbox)
void IMAPwrapper::imap_progress( size_t current, size_t maximum )
{
//qDebug("imap progress %d of %d ",current,maximum );
- //Global::statusMessage(tr("Downloading message %1 of %2").arg( current).arg(maximum));
+ //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum));
//qApp->processEvents()
static int last = 0;
if ( last != current )
IMAPwrapper::progress();
@@ -65,10 +65,10 @@ void IMAPwrapper::progress( QString m )
return;
}
QString mess;
//qDebug("progress ");
- if ( mMax ) mess = mProgrMess +tr(" message %1 of %2").arg( mCurrent++).arg(mMax);
- else mess = mProgrMess +tr(" message %1").arg( mCurrent++);
+ if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax);
+ else mess = mProgrMess +i18n(" message %1").arg( mCurrent++);
Global::statusMessage(mess);
//qDebug("Progress %s %s", mess.latin1(), m.latin1());
qApp->processEvents();
}
@@ -99,9 +99,9 @@ bool IMAPwrapper::start_tls(bool force_tls)
}
if (try_tls) {
err = mailimap_starttls(m_imap);
if (err != MAILIMAP_NO_ERROR && force_tls) {
- Global::statusMessage(tr("Server has no TLS support!"));
+ Global::statusMessage(i18n("Server has no TLS support!"));
try_tls = false;
} else {
mailstream_low * low;
mailstream_low * new_low;
@@ -187,9 +187,9 @@ void IMAPwrapper::login()
failure="Connection refused";
} else {
failure="Unknown failure";
}
- Global::statusMessage(tr("error connecting imap server: %1").arg(failure));
+ Global::statusMessage(i18n("error connecting imap server: %1").arg(failure));
mailimap_free( m_imap );
m_imap = 0;
return;
}
@@ -199,9 +199,9 @@ void IMAPwrapper::login()
}
bool ok = true;
if (force_tls && !try_tls) {
- Global::statusMessage(tr("Server has no TLS support!"));
+ Global::statusMessage(i18n("Server has no TLS support!"));
ok = false;
}
@@ -209,9 +209,9 @@ void IMAPwrapper::login()
if (ok) {
err = mailimap_login_simple( m_imap, (char*)user.latin1(), (char*)pass.latin1() );
if ( err != MAILIMAP_NO_ERROR ) {
- Global::statusMessage(tr("error logging in imap server: %1").arg(m_imap->imap_response));
+ Global::statusMessage(i18n("error logging in imap server: %1").arg(m_imap->imap_response));
ok = false;
}
}
if (!ok) {
@@ -255,16 +255,16 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
int last = m_imap->imap_selection_info->sel_exists;
if (last == 0) {
- Global::statusMessage(tr("Mailbox has no mails"));
+ Global::statusMessage(i18n("Mailbox has no mails"));
return;
} else {
}
- progress( tr("Fetch "));
+ progress( i18n("Fetch "));
mMax = last;
//qDebug("last %d ", last);
- Global::statusMessage(tr("Fetching header list"));
+ Global::statusMessage(i18n("Fetching header list"));
qApp->processEvents();
/* the range has to start at 1!!! not with 0!!!! */
//LR the access to web.de imap server is no working with value 1
//qDebug("interval %d - %d ", tryAgain, last-1+tryAgain );
@@ -298,14 +298,14 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
target.append(m);
}
}
}
- Global::statusMessage(tr("Mailbox has %1 mails").arg(target.count()));
+ Global::statusMessage(i18n("Mailbox has %1 mails").arg(target.count()));
} else {
--tryAgain;
--tryAgain;//disabled tryagain by adding this line
if ( tryAgain < 0 )
- Global::statusMessage(tr("Error fetching headers: %1").arg(m_imap->imap_response));
+ Global::statusMessage(i18n("Error fetching headers: %1").arg(m_imap->imap_response));
else
qDebug("try again... ");
}
@@ -332,9 +332,9 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders()
* First we have to check for INBOX 'cause it sometimes it's not inside the path.
* We must not forget to filter them out in next loop!
* it seems like ugly code. and yes - it is ugly code. but the best way.
*/
- Global::statusMessage(tr("Fetching folder list"));
+ Global::statusMessage(i18n("Fetching folder list"));
qApp->processEvents();
QString temp;
mask = "INBOX" ;
mailimap_mailbox_list *list;
@@ -968,15 +968,15 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
// qDebug("imap remove count %d ", count);
mMax = count;
- progress( tr("Delete"));
+ progress( i18n("Delete"));
QProgressBar wid ( count );
- wid.setCaption( tr("Deleting ..."));
+ wid.setCaption( i18n("Deleting ..."));
wid.show();
while (iii < count ) {
- Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
+ Global::statusMessage(i18n("Delete message %1 of %2").arg(iii).arg(count));
wid.setProgress( iii );
wid.raise();
qApp->processEvents();
RecMailP mail = (*target.at( iii ));
@@ -1002,18 +1002,18 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
/* should we realy do that at this moment? */
// err = mailimap_expunge(m_imap);
//if (err != MAILIMAP_NO_ERROR) {
- // Global::statusMessage(tr("Error deleting mails: %s").arg(m_imap->imap_response));
+ // Global::statusMessage(i18n("Error deleting mails: %s").arg(m_imap->imap_response));
// }
//#endif
//deleteMail( mail);
++iii;
}
//qDebug("Deleting imap mails... ");
err = mailimap_expunge(m_imap);
if (err != MAILIMAP_NO_ERROR) {
- Global::statusMessage(tr("Error deleting mails: %s").arg(m_imap->imap_response));
+ Global::statusMessage(i18n("Error deleting mails: %s").arg(m_imap->imap_response));
}
}
void IMAPwrapper::deleteMail(const RecMailP&mail)
{
@@ -1045,9 +1045,9 @@ void IMAPwrapper::deleteMail(const RecMailP&mail)
/* should we realy do that at this moment? */
err = mailimap_expunge(m_imap);
if (err != MAILIMAP_NO_ERROR) {
- Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response));
+ Global::statusMessage(i18n("error deleting mail: %s").arg(m_imap->imap_response));
}
//qDebug("IMAPwrapper::deleteMail 2");
}
@@ -1128,9 +1128,9 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder)
}
int last = m_imap->imap_selection_info->sel_exists;
if (last == 0) {
- Global::statusMessage(tr("Mailbox has no mails!"));
+ Global::statusMessage(i18n("Mailbox has no mails!"));
return 0;
}
flist = mailimap_flag_list_new_empty();
mailimap_flag_list_add(flist,mailimap_flag_new_deleted());
@@ -1139,16 +1139,16 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder)
err = mailimap_store(m_imap,set,store_flags);
mailimap_set_free( set );
mailimap_store_att_flags_free(store_flags);
if (err != MAILIMAP_NO_ERROR) {
- Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response));
+ Global::statusMessage(i18n("error deleting mail: %s").arg(m_imap->imap_response));
return 0;
}
// odebug << "deleting mail: " << m_imap->imap_response << "" << oendl;
/* should we realy do that at this moment? */
err = mailimap_expunge(m_imap);
if (err != MAILIMAP_NO_ERROR) {
- Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response));
+ Global::statusMessage(i18n("error deleting mail: %s").arg(m_imap->imap_response));
return 0;
}
// odebug << "Delete successfull " << m_imap->imap_response << "" << oendl;
return 1;
@@ -1170,16 +1170,16 @@ int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,cons
if (getsubfolder) {
if (delemiter.length()>0) {
pre+=delemiter;
} else {
- Global::statusMessage(tr("Cannot create folder %1 for holding subfolders").arg(pre));
+ Global::statusMessage(i18n("Cannot create folder %1 for holding subfolders").arg(pre));
return 0;
}
}
// odebug << "Creating " << pre.latin1() << "" << oendl;
int res = mailimap_create(m_imap,pre.latin1());
if (res != MAILIMAP_NO_ERROR) {
- Global::statusMessage(tr("%1").arg(m_imap->imap_response));
+ Global::statusMessage(i18n("%1").arg(m_imap->imap_response));
return 0;
}
return 1;
}
@@ -1190,9 +1190,9 @@ int IMAPwrapper::deleteMbox(const FolderP&folder)
login();
if (!m_imap) {return 0;}
int res = mailimap_delete(m_imap,folder->getName());
if (res != MAILIMAP_NO_ERROR) {
- Global::statusMessage(tr("%1").arg(m_imap->imap_response));
+ Global::statusMessage(i18n("%1").arg(m_imap->imap_response));
return 0;
}
return 1;
}
@@ -1273,9 +1273,9 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder,
const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb)
{
if (targetWrapper != this || maxSizeInKb > 0 ) {
mMax = 0;
- progress( tr("Copy"));
+ progress( i18n("Copy"));
AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit, maxSizeInKb);
//qDebug("IMAPwrapper::mvcpAllMails::Using generic");
// odebug << "Using generic" << oendl;
return;
@@ -1288,15 +1288,15 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder,
int err = selectMbox(fromFolder->getName());
if ( err != MAILIMAP_NO_ERROR ) {
return;
}
- Global::statusMessage( tr("Copying mails on server...") );
+ Global::statusMessage( i18n("Copying mails on server...") );
int last = m_imap->imap_selection_info->sel_exists;
set = mailimap_set_new_interval( 1, last );
err = mailimap_copy(m_imap,set,targetFolder.latin1());
mailimap_set_free( set );
if ( err != MAILIMAP_NO_ERROR ) {
- QString error_msg = tr("Error copy mails: %1").arg(m_imap->imap_response);
+ QString error_msg = i18n("Error copy mails: %1").arg(m_imap->imap_response);
Global::statusMessage(error_msg);
// odebug << error_msg << oendl;
return;
}
@@ -1324,9 +1324,9 @@ void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstra
set = mailimap_set_new_single(mail->getNumber());
err = mailimap_copy(m_imap,set,targetFolder.latin1());
mailimap_set_free( set );
if ( err != MAILIMAP_NO_ERROR ) {
- QString error_msg = tr("error copy mail: %1").arg(m_imap->imap_response);
+ QString error_msg = i18n("error copy mail: %1").arg(m_imap->imap_response);
Global::statusMessage(error_msg);
// odebug << error_msg << oendl;
return;
}
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
@@ -3,8 +3,9 @@
#include "mailwrapper.h"
#include <libetpan/libetpan.h>
#include <qdir.h>
#include <stdlib.h>
+#include <klocale.h>
#include <qpe/global.h>
@@ -43,9 +44,9 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta
mailfolder_disconnect(folder);
mailfolder_free(folder);
mailstorage_free(storage);
- Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count()));
+ Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count()));
}
QValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders()
{
@@ -142,14 +143,14 @@ int MBOXwrapper::createMbox(const QString&folder,const FolderP&,const QString&,b
QString p = MBOXPath+"/";
p+=folder;
QFileInfo fi(p);
if (fi.exists()) {
- Global::statusMessage(tr("Mailbox exists."));
+ Global::statusMessage(i18n("Mailbox exists."));
return 0;
}
mailmbox_folder*f = 0;
if (mailmbox_init(p.latin1(),0,1,0,&f) != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error init folder"));
+ Global::statusMessage(i18n("Error init folder"));
return 0;
}
if (f) mailmbox_done(f);
return 1;
@@ -161,14 +162,14 @@ void MBOXwrapper::storeMessage(const char*msg,size_t length, const QString&folde
p+=folder;
mailmbox_folder*f = 0;
int r = mailmbox_init(p.latin1(),0,1,0,&f);
if (r != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error init folder"));
+ Global::statusMessage(i18n("Error init folder"));
return;
}
r = mailmbox_append_message(f,msg,length);
if (r != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error writing to message folder"));
+ Global::statusMessage(i18n("Error writing to message folder"));
}
mailmbox_done(f);
}
@@ -186,23 +187,23 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail)
mailfolder*folder;
folder = mailfolder_new( storage,(char*)p.latin1(),NULL);
r = mailfolder_connect(folder);
if (r != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error initializing mbox"));
+ Global::statusMessage(i18n("Error initializing mbox"));
mailfolder_free(folder);
mailstorage_free(storage);
return 0;
}
r = mailsession_get_message(folder->fld_session, mail->getNumber(), &msg);
if (r != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error fetching mail %i").arg(mail->getNumber()));
+ Global::statusMessage(i18n("Error fetching mail %i").arg(mail->getNumber()));
mailfolder_free(folder);
mailstorage_free(storage);
return 0;
}
r = mailmessage_fetch(msg,&data,&size);
if (r != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error fetching mail %i").arg(mail->getNumber()));
+ Global::statusMessage(i18n("Error fetching mail %i").arg(mail->getNumber()));
mailfolder_free(folder);
mailstorage_free(storage);
mailmessage_free(msg);
return 0;
@@ -256,16 +257,16 @@ int MBOXwrapper::deleteAllMail(const FolderP&tfolder)
mailmessage_list*l=0;
mailstorage*storage = mailstorage_new(NULL);
int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0);
if (r != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error initializing mbox"));
+ Global::statusMessage(i18n("Error initializing mbox"));
res = 0;
}
if (res) {
folder = mailfolder_new( storage,(char*)p.latin1(),NULL);
r = mailfolder_connect(folder);
if (r != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error initializing mbox"));
+ Global::statusMessage(i18n("Error initializing mbox"));
res = 0;
}
}
if (res) {
@@ -277,9 +278,9 @@ int MBOXwrapper::deleteAllMail(const FolderP&tfolder)
}
for(unsigned int i = 0 ; l!= 0 && res==1 && i < carray_count(l->msg_tab) ; ++i) {
r = mailsession_remove_message(folder->fld_session,i+1);
if (r != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error deleting mail %1").arg(i+1));
+ Global::statusMessage(i18n("Error deleting mail %1").arg(i+1));
res = 0;
break;
}
}
@@ -294,13 +295,13 @@ int MBOXwrapper::deleteMbox(const FolderP&tfolder)
if (!tfolder) return 0;
QString p = MBOXPath+"/"+tfolder->getDisplayName();
QFile fi(p);
if (!fi.exists()) {
- Global::statusMessage(tr("Mailbox doesn't exist."));
+ Global::statusMessage(i18n("Mailbox doesn't exist."));
return 0;
}
if (!fi.remove()) {
- Global::statusMessage(tr("Error deleting Mailbox."));
+ Global::statusMessage(i18n("Error deleting Mailbox."));
return 0;
}
return 1;
}
@@ -314,9 +315,9 @@ void MBOXwrapper::statusFolder(folderStat&target_stat,const QString & mailbox)
target_stat.message_recent = 0;
QString p = MBOXPath+"/"+mailbox;
QFile fi(p);
if (!fi.exists()) {
- Global::statusMessage(tr("Mailbox doesn't exist."));
+ Global::statusMessage(i18n("Mailbox doesn't exist."));
return;
}
int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0);
folder = mailfolder_new( storage,(char*)p.latin1(),NULL);
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
@@ -4,8 +4,9 @@
#include "mailtypes.h"
#include "logindialog.h"
#include <libetpan/libetpan.h>
+#include <klocale.h>
#include <qpe/global.h>
#include <qfile.h>
#include <qprogressbar.h>
@@ -106,9 +107,9 @@ void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPoi
return;
uint32_t res_messages,res_recent,res_unseen;
mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen);
parseList(target,m_pop3->sto_session,"INBOX", false, maxSizeInKb);
- Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages));
+ Global::statusMessage( i18n("Mailbox contains %1 mail(s)").arg(res_messages));
}
void POP3wrapper::login()
{
@@ -164,9 +165,9 @@ void POP3wrapper::login()
err = mailstorage_connect(m_pop3);
if (err != MAIL_NO_ERROR) {
; // odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl;
- Global::statusMessage(tr("Error %1 initializing folder").arg( err ));
+ Global::statusMessage(i18n("Error %1 initializing folder").arg( err ));
mailstorage_free(m_pop3);
m_pop3 = 0;
} else {
mailsession * session = m_pop3->sto_session;
@@ -201,20 +202,20 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target)
int iii = 0;
int count = target.count();
QProgressBar wid ( count );
- wid.setCaption( tr("Deleting ..."));
+ wid.setCaption( i18n("Deleting ..."));
wid.show();
while (iii < count ) {
- Global::statusMessage(tr("Delete message %1 of %2").arg(iii).arg(count));
+ Global::statusMessage(i18n("Delete message %1 of %2").arg(iii).arg(count));
wid.setProgress( iii );
wid.raise();
qApp->processEvents();
//qDebug("delete ");
RecMailP mail = (*target.at( iii ));
int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber());
if (err != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error deleting mail"));
+ Global::statusMessage(i18n("Error deleting mail"));
}
++iii;
}
}
@@ -223,9 +224,9 @@ void POP3wrapper::deleteMail(const RecMailP&mail) {
if (!m_pop3)
return;
int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber());
if (err != MAIL_NO_ERROR) {
- Global::statusMessage(tr("error deleting mail"));
+ Global::statusMessage(i18n("error deleting mail"));
}
}
void POP3wrapper::answeredMail(const RecMailP&) {}
@@ -238,26 +239,26 @@ int POP3wrapper::deleteAllMail(const FolderP&) {
uint32_t result = 0;
int err = mailsession_messages_number(m_pop3->sto_session,NULL,&result);
if (err != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error getting folder info"));
+ Global::statusMessage(i18n("Error getting folder info"));
return 0;
}
QProgressBar wid ( result );
- wid.setCaption( tr("Deleting ..."));
+ wid.setCaption( i18n("Deleting ..."));
wid.show();
for (unsigned int i = 0; i < result; ++i) {
- Global::statusMessage(tr("Delete message %1 of %2").arg(i).arg(result));
+ Global::statusMessage(i18n("Delete message %1 of %2").arg(i).arg(result));
wid.setProgress( i );
wid.raise();
qApp->processEvents();
err = mailsession_remove_message(m_pop3->sto_session,i+1);
if (err != MAIL_NO_ERROR) {
- Global::statusMessage(tr("Error deleting mail %1").arg(i+1));
+ Global::statusMessage(i18n("Error deleting mail %1").arg(i+1));
res=0;
}
break;
}
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
@@ -13,8 +13,9 @@
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#include <libetpan/libetpan.h>
+#include <klocale.h>
using namespace Opie::Core;
progressMailSend*SMTPwrapper::sendProgress = 0;
@@ -43,45 +44,45 @@ 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" );
}
}
@@ -151,10 +152,10 @@ void SMTPwrapper::storeFailedMail(const char*data,unsigned int size, const char*
if (data) {
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));
}
}
int SMTPwrapper::start_smtp_tls()
@@ -220,18 +221,18 @@ void SMTPwrapper::connect_server()
err = mailsmtp_socket_connect( m_smtp, server.latin1(), port );
}
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;
}
/* switch to tls after init 'cause there it will send the ehlo */
if (result) {
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));
}
}
if (try_tls) {
@@ -244,9 +245,9 @@ 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() ) {
; // odebug << "smtp with auth" << oendl;
@@ -260,9 +261,9 @@ void SMTPwrapper::connect_server()
user = login.getUser();
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();
pass = m_SmtpAccount->getPassword();
@@ -272,9 +273,9 @@ void SMTPwrapper::connect_server()
err = mailsmtp_auth( m_smtp, (char*)user.latin1(), (char*)pass.latin1() );
if ( err == MAILSMTP_NO_ERROR ) {
; // odebug << "auth ok" << oendl;
} else {
- failuretext = tr("Authentification failed");
+ failuretext = i18n("Authentification failed");
result = 0;
}
}
}
@@ -299,9 +300,9 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size )
result = 1;
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 {
result = 0;
@@ -432,10 +433,10 @@ bool SMTPwrapper::flushOutbox() {
sendProgress->setMaxMails(mailsToSend.count());
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;
}
mailsToRemove.append((*mailsToSend.begin()));
diff --git a/kmicromail/nntpgroupsdlg.cpp b/kmicromail/nntpgroupsdlg.cpp
index c94d9fa..a461bdf 100644
--- a/kmicromail/nntpgroupsdlg.cpp
+++ b/kmicromail/nntpgroupsdlg.cpp
@@ -1,15 +1,16 @@
#include "nntpgroupsdlg.h"
#include "nntpgroups.h"
+#include <klocale.h>
#include <libmailwrapper/settings.h>
#include <qlayout.h>
NNTPGroupsDlg::NNTPGroupsDlg(NNTPaccount *account,QWidget * parent, const char * name)
: QDialog(parent,name,true,WStyle_ContextHelp)
{
- setCaption(tr("Subscribed newsgroups"));
+ setCaption(i18n("Subscribed newsgroups"));
m_Account = account;
QVBoxLayout*dlglayout = new QVBoxLayout(this);
dlglayout->setSpacing(2);
dlglayout->setMargin(1);
diff --git a/kmicromail/selectsmtp.cpp b/kmicromail/selectsmtp.cpp
index 24eced1..ff8b524 100644
--- a/kmicromail/selectsmtp.cpp
+++ b/kmicromail/selectsmtp.cpp
@@ -8,14 +8,15 @@
#include <qlineedit.h>
#include <qlabel.h>
#include <qtabwidget.h>
#include <qlistview.h>
+#include <klocale.h>
selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl)
: selectstoreui(parent,name,modal,fl)
{
//m_smtpList.setAutoDelete(false);
m_smtpList = 0;
- //headlabel->setText(tr("<center>Select SMTP account to use</center>"));
+ //headlabel->setText(i18n("<center>Select SMTP account to use</center>"));
headlabel->hide();
folderSelection->hide();
folderLabel->hide();
accountlabel->setText("<center>SMTP Accounts</center>");
@@ -25,9 +26,9 @@ selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl)
newFolderLabel->hide();
Line2->hide();
selMove->hide();
m_current_smtp = 0;
- setCaption(tr("Select SMTP Account"));
+ setCaption(i18n("Select SMTP Account"));
}
selectsmtp::~selectsmtp()
{
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 32a3b7c..7cf5c8e 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -25,8 +25,9 @@
#include <qpopupmenu.h>
#include <qfile.h>
#include <qlayout.h>
#include "koprefs.h"
+#include <klocale.h>
//using namespace Opie::Ui;
//using namespace Opie::Core;
@@ -217,14 +218,14 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
int ret=0;
if ( item->text( 0 ).left( 5 ) == "text/" || item->text(0)=="message/rfc822" )
{
- menu->insertItem( tr( "Show Text" ), 1 );
+ menu->insertItem( i18n( "Show Text" ), 1 );
}
if (item->text(0).left(6)=="image/") {
- menu->insertItem(tr("Display image preview"),2);
+ menu->insertItem(i18n("Display image preview"),2);
}
- menu->insertItem( tr( "Save Attachment" ), 0 );
+ menu->insertItem( i18n( "Save Attachment" ), 0 );
menu->insertSeparator(1);
ret = menu->exec( point, 0 );
@@ -355,18 +356,18 @@ void ViewMail::setText()
{
bccString += (*it);
}
- setCaption( tr("E-Mail by %1").arg( m_mail[0] ) );
+ setCaption( i18n("E-Mail by %1").arg( m_mail[0] ) );
m_mailHtml = "<html><body>"
"<table width=\"100%\" border=\"0\"><tr bgcolor=\"#FFDD76\"><td>"
"<div align=left><b>" + deHtml( m_mail[1] ) + "</b></div>"
"</td></tr><tr bgcolor=\"#EEEEE6\"><td>"
- "<b>" + tr( "From" ) + ": </b><font color=#6C86C0>" + deHtml( m_mail[0] ) + "</font><br>"
- "<b>" + tr( "To" ) + ": </b><font color=#6C86C0>" + deHtml( toString ) + "</font><br><b>" +
- tr( "Cc" ) + ": </b>" + deHtml( ccString ) + "<br>"
- "<b>" + tr( "Date" ) + ": </b> " + m_mail[3] +
+ "<b>" + i18n( "From" ) + ": </b><font color=#6C86C0>" + deHtml( m_mail[0] ) + "</font><br>"
+ "<b>" + i18n( "To" ) + ": </b><font color=#6C86C0>" + deHtml( toString ) + "</font><br><b>" +
+ i18n( "Cc" ) + ": </b>" + deHtml( ccString ) + "<br>"
+ "<b>" + i18n( "Date" ) + ": </b> " + m_mail[3] +
"</td></tr></table><font>";
if ( !m_showHtml )
{
@@ -425,9 +426,9 @@ QString ViewMail::deHtml(const QString &string)
void ViewMail::slotReply()
{
if (!m_gotBody)
{
- QMessageBox::information(this, tr("Error"), tr("<p>The mail body is not yet downloaded, so you cannot reply yet."), tr("Ok"));
+ QMessageBox::information(this, i18n("Error"), i18n("<p>The mail body is not yet downloaded, so you cannot reply yet."), i18n("Ok"));
return;
}
QString rtext;
@@ -468,9 +469,9 @@ void ViewMail::slotReply()
void ViewMail::slotForward()
{
if (!m_gotBody)
{
- QMessageBox::information(this, tr("Error"), tr("<p>The mail body is not yet downloaded, so you cannot forward yet."), tr("Ok"));
+ QMessageBox::information(this, i18n("Error"), i18n("<p>The mail body is not yet downloaded, so you cannot forward yet."), i18n("Ok"));
return;
}
QString ftext;
@@ -501,9 +502,9 @@ void ViewMail::slotForward()
}
void ViewMail::slotDeleteMail( )
{
- if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
+ if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
{
m_recMail->Wrapper()->deleteMail( m_recMail );
hide();
deleted = true;
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 705b57f..3d7ed42 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -8,8 +8,9 @@
#include <qtoolbar.h>
#include <qmenubar.h>
#include <kiconloader.h>
//#include <qpe/resource.h>
+#include <klocale.h>
#include "viewmailbase.h"
//#include "opendiag.h"
@@ -21,35 +22,35 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
toolbar = new QToolBar(this);
menubar = new QMenuBar( toolbar );
mailmenu = new QPopupMenu( menubar );
- menubar->insertItem( tr( "Mail" ), mailmenu );
+ menubar->insertItem( i18n( "Mail" ), mailmenu );
toolbar->setHorizontalStretchable(true);
addToolBar(toolbar);
- reply = new QAction(tr("Reply"),SmallIcon("reply"), 0, 0, this);
+ reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this);
reply->addTo(toolbar);
reply->addTo(mailmenu);
- forward = new QAction(tr("Forward"),SmallIcon("forward"), 0, 0, this);
+ forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this);
forward->addTo(toolbar);
forward->addTo(mailmenu);
- attachbutton = new QAction(tr("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true);
+ attachbutton = new QAction(i18n("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true);
attachbutton->addTo(toolbar);
attachbutton->addTo(mailmenu);
connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
- showHtml = new QAction( tr( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true );
+ showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true );
showHtml->addTo( toolbar );
showHtml->addTo( mailmenu );
- deleteMail = new QAction(tr("Delete Mail"),SmallIcon("trash"), 0, 0, this);
+ deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this);
deleteMail->addTo(toolbar);
deleteMail->addTo(mailmenu);
- closeMail = new QAction(tr("Close"),SmallIcon("exit"), 0, 0, this);
+ closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
QLabel *spacer = new QLabel(toolbar);
spacer->setBackgroundMode(QWidget::PaletteButton);
toolbar->setStretchableWidget(spacer);
closeMail->addTo(toolbar);
@@ -61,11 +62,11 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
attachments->setMinimumHeight(90);
attachments->setMaximumHeight(90);
attachments->setAllColumnsShowFocus(true);
attachments->addColumn("Mime Type", 60);
- attachments->addColumn(tr("Description"), 100);
- attachments->addColumn(tr("Filename"), 80);
- attachments->addColumn(tr("Size"), 80);
+ attachments->addColumn(i18n("Description"), 100);
+ attachments->addColumn(i18n("Filename"), 80);
+ attachments->addColumn(i18n("Size"), 80);
attachments->setSorting(-1);
attachments->hide();
browser = new QTextBrowser(view);