From efe7e2f3dc8d675cb2083d458129a02466d0a677 Mon Sep 17 00:00:00 2001
From: Bertjan Broeksema
Date: Mon, 29 Sep 2008 11:09:28 +0000
Subject: [PATCH] EBN Fixes: validity of i18n calls.
svn path=/trunk/KDE/kdepim/; revision=865867
---
distributionlistdialog.cpp | 20 +++++++++--------
favoritefolderview.cpp | 9 +++++---
folderviewtooltip.h | 4 ++--
headeritem.cpp | 4 ++--
kmailicalifaceimpl.cpp | 8 ++++---
kmcommands.cpp | 2 +-
kmcomposewin.cpp | 20 +++++++++++------
kmfolderdialog.cpp | 16 +++++++------
kmmainwidget.cpp | 46 +++++++++++++++++++++++---------------
kmreadermainwin.cpp | 3 ++-
kmsearchpatternedit.cpp | 4 ++--
templatesconfiguration.cpp | 3 +--
12 files changed, 82 insertions(+), 57 deletions(-)
diff --git a/distributionlistdialog.cpp b/distributionlistdialog.cpp
index 4687444b2..4cf3f8d9f 100644
--- a/distributionlistdialog.cpp
+++ b/distributionlistdialog.cpp
@@ -100,11 +100,11 @@ DistributionListDialog::DistributionListDialog( QWidget *parent )
{
QFrame *topFrame = new QFrame( this );
setMainWidget( topFrame );
- setCaption( i18n("Save Distribution List") );
+ setCaption( i18nc("@title:window", "Save Distribution List") );
setButtons( User1 | Cancel );
setDefaultButton( User1 );
setModal( false );
- setButtonText( User1, i18n("Save List") );
+ setButtonText( User1, i18nc("@action:button","Save List") );
QBoxLayout *topLayout = new QVBoxLayout( topFrame );
topLayout->setSpacing( spacingHint() );
@@ -113,7 +113,8 @@ DistributionListDialog::DistributionListDialog( QWidget *parent )
titleLayout->setSpacing( spacingHint() );
topLayout->addItem( titleLayout );
- QLabel *label = new QLabel( i18n("&Name:"), topFrame );
+ QLabel *label = new QLabel(
+ i18nc("@label:textbox Name of the distribution list.", "&Name:"), topFrame );
titleLayout->addWidget( label );
mTitleEdit = new KLineEdit( topFrame );
@@ -124,7 +125,8 @@ DistributionListDialog::DistributionListDialog( QWidget *parent )
mRecipientsList = new QTreeWidget( topFrame );
mRecipientsList->setHeaderLabels(
- QStringList() << i18n( "Name" ) << i18n( "Email" )
+ QStringList() << i18nc( "@title:column Name of the recipient","Name" )
+ << i18nc( "@title:column Email of the recipient", "Email" )
);
mRecipientsList->setRootIsDecorated( false );
topLayout->addWidget( mRecipientsList );
@@ -181,7 +183,7 @@ void DistributionListDialog::slotUser1()
if ( isEmpty ) {
KMessageBox::information( this,
- i18n("There are no recipients in your list. "
+ i18nc("@info", "There are no recipients in your list. "
"First select some recipients, "
"then try again.") );
return;
@@ -191,8 +193,8 @@ void DistributionListDialog::slotUser1()
if ( name.isEmpty() ) {
bool ok = false;
- name = KInputDialog::getText( i18n("New Distribution List"),
- i18n("Please enter name:"), QString(), &ok, this );
+ name = KInputDialog::getText( i18nc("@title:window","New Distribution List"),
+ i18nc("@label:textbox","Please enter name:"), QString(), &ok, this );
if ( !ok || name.isEmpty() )
return;
}
@@ -203,8 +205,8 @@ void DistributionListDialog::slotUser1()
if ( ab->findDistributionListByName( name ) ) {
#endif
KMessageBox::information( this,
- i18n( "Distribution list with the given name %1 "
- "already exists. Please select a different name.", name ) );
+ i18nc( "@info", "Distribution list with the given name %1 "
+ "already exists. Please select a different name.", name ) );
return;
}
diff --git a/favoritefolderview.cpp b/favoritefolderview.cpp
index 69811bdcb..2b1faeded 100644
--- a/favoritefolderview.cpp
+++ b/favoritefolderview.cpp
@@ -386,7 +386,9 @@ void FavoriteFolderView::renameFolder()
if ( !mContextMenuItem )
return;
bool ok;
- QString name = KInputDialog::getText( i18n("Rename Favorite"), i18n("Name:"), mContextMenuItem->text( 0 ), &ok, this );
+ QString name = KInputDialog::getText( i18n("Rename Favorite")
+ , i18nc( "@label:textbox New name of the folder.", "Name:")
+ , mContextMenuItem->text( 0 ), &ok, this );
if ( !ok )
return;
mContextMenuItem->setText( 0, name );
@@ -409,9 +411,10 @@ QString FavoriteFolderView::prettyName(KMFolderTreeItem * fti)
}
} else {
if ( fti->protocol() != KFolderTreeItem::Local && fti->protocol() != KFolderTreeItem::NONE ) {
- name = i18n( "%1 on %2", fti->text( 0 ), accountFti->text( 0 ) );
+ name = i18nc( "@item {FOLDER} on {MAIL ACCOUNT}", "%1 on %2", fti->text( 0 )
+ , accountFti->text( 0 ) );
} else {
- name = i18n( "%1 (local)", fti->text( 0 ) );
+ name = i18nc( "@item Local folder.", "%1 (local)", fti->text( 0 ) );
}
}
return name;
diff --git a/folderviewtooltip.h b/folderviewtooltip.h
index f5150be07..e0e2f33ac 100644
--- a/folderviewtooltip.h
+++ b/folderviewtooltip.h
@@ -43,7 +43,7 @@ class FolderViewToolTip : public QObject
}
item->updateCount();
- QString tipText = i18n( "%1
Total: %2
Unread: %3
Size: %4",
+ QString tipText = i18n( "%1
Total: %2
Unread: %3
Size: %4",
item->folder()->prettyUrl().replace( " ", " " ),
item->totalCount() < 0 ? "-" : QString::number( item->totalCount() ),
item->unreadCount() < 0 ? "-" : QString::number( item->unreadCount() ),
@@ -52,7 +52,7 @@ class FolderViewToolTip : public QObject
if ( KMFolderCachedImap* imap = dynamic_cast( item->folder()->storage() ) ) {
QuotaInfo info = imap->quotaInfo();
if ( info.isValid() && !info.isEmpty() )
- tipText += i18n("
Quota: %1", info.toString() );
+ tipText += i18n("
Quota: %1", info.toString() );
}
QToolTip::showText( mListView->viewport()->mapToGlobal( point ), tipText, mListView );
diff --git a/headeritem.cpp b/headeritem.cpp
index b6aba23f6..dd24881ba 100644
--- a/headeritem.cpp
+++ b/headeritem.cpp
@@ -159,14 +159,14 @@ QString HeaderItem::text( int col) const
else
tmp = mMsgBase->fromStrip();
if (tmp.isEmpty())
- tmp = i18n("Unknown");
+ tmp = i18nc("Unknown mail header.","Unknown");
else
tmp = tmp.simplified();
} else if ( col == headers->paintInfo()->receiverCol ) {
tmp = mMsgBase->toStrip();
if (tmp.isEmpty())
- tmp = i18n("Unknown");
+ tmp = i18nc("Unknown mail header.","Unknown");
else
tmp = tmp.simplified();
diff --git a/kmailicalifaceimpl.cpp b/kmailicalifaceimpl.cpp
index 158a4029e..76fbc0b0a 100644
--- a/kmailicalifaceimpl.cpp
+++ b/kmailicalifaceimpl.cpp
@@ -1750,9 +1750,11 @@ void KMailICalIfaceImpl::readConfig()
}
operations += "";
- msg = i18n("KMail found the following groupware folders in %1 and needs to perform the following operations: %2"
- "
If you do not want this, cancel"
- " and the IMAP resource will be disabled", parentFolderName, operations);
+ msg = i18n( "KMail found the following groupware folders in %1 and"
+ "needs to perform the following operations: %2"
+ "If you do not want this, cancel"
+ " and the IMAP resource will be disabled"
+ , parentFolderName, operations );
}
diff --git a/kmcommands.cpp b/kmcommands.cpp
index 032a05638..7f34110af 100644
--- a/kmcommands.cpp
+++ b/kmcommands.cpp
@@ -2326,7 +2326,7 @@ KMCommand::Result KMUrlClickedCommand::execute()
mime->name() == "application/x-ms-dos-executable" ||
mime->name() == "application/x-shellscript" )
{
- if (KMessageBox::warningYesNo( 0, i18nc( "@info", "Do you really want to execute %1?",
+ if (KMessageBox::warningYesNo( 0, i18nc( "@info", "Do you really want to execute %1?",
mUrl.pathOrUrl() ), QString(), KGuiItem(i18n("Execute")), KStandardGuiItem::cancel() ) != KMessageBox::Yes)
return Canceled;
}
diff --git a/kmcomposewin.cpp b/kmcomposewin.cpp
index 2097fa17a..5d2bf6513 100644
--- a/kmcomposewin.cpp
+++ b/kmcomposewin.cpp
@@ -214,8 +214,8 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
mLblTransport = new QLabel( i18n("&Mail transport:"), mHeadersArea );
mLblFrom = new QLabel( i18nc("sender address field", "&From:"), mHeadersArea );
mLblReplyTo = new QLabel( i18n("&Reply to:"), mHeadersArea );
- mLblSubject = new QLabel( i18n("S&ubject:"), mHeadersArea );
- QString sticky = i18n("Sticky");
+ mLblSubject = new QLabel( i18nc("@label:textbox Subject of email.", "S&ubject:"), mHeadersArea );
+ QString sticky = i18nc("@option:check Sticky identity.", "Sticky");
mBtnIdentity = new QCheckBox( sticky, mHeadersArea );
mBtnFcc = new QCheckBox( sticky, mHeadersArea );
mBtnTransport = new QCheckBox( sticky, mHeadersArea );
@@ -1149,7 +1149,8 @@ void KMComposeWin::setupActions( void )
mFixedFontAction->setChecked( GlobalSettings::self()->useFixedFont() );
//these are checkable!!!
- mUrgentAction = new KToggleAction( i18n("&Urgent"), this );
+ mUrgentAction = new KToggleAction(
+ i18nc("@action:inmenu Mark the email as urgent.","&Urgent"), this );
actionCollection()->addAction( "urgent", mUrgentAction );
mRequestMDNAction = new KToggleAction( i18n("&Request Disposition Notification"), this );
actionCollection()->addAction("options_request_mdn", mRequestMDNAction );
@@ -1218,7 +1219,8 @@ void KMComposeWin::setupActions( void )
mReplyToAction = new KToggleAction(i18n("&Reply To"), this);
actionCollection()->addAction("show_reply_to", mReplyToAction );
connect( mReplyToAction, SIGNAL(triggered(bool) ), SLOT(slotView()));
- mSubjectAction = new KToggleAction(i18n("S&ubject"), this);
+ mSubjectAction = new KToggleAction(
+ i18nc("@action:inmenu Show the subject in the composer window.", "S&ubject"), this);
actionCollection()->addAction("show_subject", mSubjectAction );
connect(mSubjectAction, SIGNAL(triggered(bool) ), SLOT(slotView()));
//end of checkable
@@ -1367,7 +1369,9 @@ void KMComposeWin::setupStatusBar( void )
statusBar()->insertPermanentItem( i18n(" Spellcheck: %1 ", QString( " " )), 3, 0) ;
statusBar()->insertPermanentItem( i18n(" Column: %1 ", QString( " " ) ), 2, 0 );
- statusBar()->insertPermanentItem( i18n(" Line: %1 ", QString( " " ) ), 1, 0 );
+ statusBar()->insertPermanentItem(
+ i18nc("Shows the linenumber of the cursor position.", " Line: %1 "
+ , QString( " " ) ), 1, 0 );
}
//-----------------------------------------------------------------------------
@@ -2024,7 +2028,9 @@ bool KMComposeWin::addAttach( const KUrl &aUrl )
const int maxAttachmentSize = GlobalSettings::maximumAttachmentSize();
if ( aUrl.isLocalFile() && maxAttachmentSize >= 0 && QFileInfo( aUrl.pathOrUrl() ).size() > (maxAttachmentSize*1024*1024 /*in bytes*/ ) ) {
- KMessageBox::sorry( this, i18n( "Your administrator has disallowed attaching files bigger than %1 MB.
", maxAttachmentSize ) );
+ KMessageBox::sorry( this,
+ i18n( "Your administrator has disallowed attaching files bigger than %1 MB.
"
+ , maxAttachmentSize ) );
return false;
}
@@ -4105,7 +4111,7 @@ void KMComposeWin::slotCursorPositionChanged()
QString temp;
line = mEditor->linePosition();
col = mEditor->columnNumber();
- temp = i18n( " Line: %1 ", line + 1 );
+ temp = i18nc("Shows the linenumber of the cursor position.", " Line: %1 ", line + 1 );
statusBar()->changeItem( temp, 1 );
temp = i18n( " Column: %1 ", col + 1 );
statusBar()->changeItem( temp, 2 );
diff --git a/kmfolderdialog.cpp b/kmfolderdialog.cpp
index b1ca3c7c5..fac32cf85 100644
--- a/kmfolderdialog.cpp
+++ b/kmfolderdialog.cpp
@@ -119,7 +119,7 @@ KMFolderDialog::KMFolderDialog( KMFolder *aFolder, KMFolderDir *aFolderDir,
QFrame *box;
box = new KVBox;
- addPage( box, i18n("General") );
+ addPage( box, i18nc("@title:tab General settings for a folder.", "General") );
tab = new FolderDialogGeneralTab( this, aName, box );
addTab( tab );
@@ -284,7 +284,7 @@ KMail::FolderDialogGeneralTab::FolderDialogGeneralTab( KMFolderDialog* dlg,
topLayout->addItem( hl );
hl->setSpacing( KDialog::spacingHint() );
- label = new QLabel( i18n("&Name:"), this );
+ label = new QLabel( i18nc("@label:textbox Name of the folder.","&Name:"), this );
hl->addWidget( label );
mNameEdit = new KLineEdit( this );
@@ -322,7 +322,8 @@ KMail::FolderDialogGeneralTab::FolderDialogGeneralTab( KMFolderDialog* dlg,
ihl->addWidget( mIconsCheckBox );
ihl->addStretch( 2 );
- mNormalIconLabel = new QLabel( i18n("&Normal:"), this );
+ mNormalIconLabel = new QLabel(
+ i18nc("Icon used for folders with no unread messages.", "&Normal:"), this );
mNormalIconLabel->setEnabled( false );
ihl->addWidget( mNormalIconLabel );
@@ -337,7 +338,8 @@ KMail::FolderDialogGeneralTab::FolderDialogGeneralTab( KMFolderDialog* dlg,
mNormalIconButton->setEnabled( false );
ihl->addWidget( mNormalIconButton );
- mUnreadIconLabel = new QLabel( i18n("&Unread:"), this );
+ mUnreadIconLabel = new QLabel(
+ i18nc("Icon used for folders which do have unread messages.","&Unread:"), this );
mUnreadIconLabel->setEnabled( false );
ihl->addWidget( mUnreadIconLabel );
@@ -455,9 +457,9 @@ KMail::FolderDialogGeneralTab::FolderDialogGeneralTab( KMFolderDialog* dlg,
mShowSenderReceiverComboBox->setToolTip( tip );
sender_label->setBuddy(mShowSenderReceiverComboBox);
gl->addWidget( mShowSenderReceiverComboBox, row, 1 );
- mShowSenderReceiverComboBox->insertItem(0, i18n("Default"));
- mShowSenderReceiverComboBox->insertItem(1, i18n("Sender"));
- mShowSenderReceiverComboBox->insertItem(2, i18n("Receiver"));
+ mShowSenderReceiverComboBox->insertItem(0, i18nc("@item:inlistbox Show default value.", "Default"));
+ mShowSenderReceiverComboBox->insertItem(1, i18nc("@item:inlistbox Show sender.", "Sender"));
+ mShowSenderReceiverComboBox->insertItem(2, i18nc("@item:inlistbox Show receiver.", "Receiver"));
QString whoField;
if (mDlg->folder()) whoField = mDlg->folder()->userWhoField();
diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp
index a17111a6f..15f4759a6 100644
--- a/kmmainwidget.cpp
+++ b/kmmainwidget.cpp
@@ -576,25 +576,34 @@ void KMMainWidget::readConfig()
* but otherwise the restoreLayout from KMFolderTree
* doesn't know that to do */
if ( unreadColumn == 1 )
- mFolderTree->addUnreadColumn( i18n("Unread"), 70 );
+ mFolderTree->addUnreadColumn(
+ i18nc("@title:column Number of unread messages.", "Unread"), 70 );
else if ( totalColumn == 1 )
- mFolderTree->addTotalColumn( i18n("Total"), 70 );
+ mFolderTree->addTotalColumn(
+ i18nc("@title:column Total number of messages.", "Total"), 70 );
else if ( sizeColumn == 1 )
- mFolderTree->addSizeColumn( i18n("Size"), 70 );
+ mFolderTree->addSizeColumn(
+ i18nc("@title:column Size of the messages.", "Size"), 70 );
if ( unreadColumn == 2 )
- mFolderTree->addUnreadColumn( i18n("Unread"), 70 );
+ mFolderTree->addUnreadColumn(
+ i18nc("@title:column Number of unread messages.", "Unread"), 70 );
else if ( totalColumn == 2 )
- mFolderTree->addTotalColumn( i18n("Total"), 70 );
+ mFolderTree->addTotalColumn(
+ i18nc("@title:column Total number of messages.", "Total"), 70 );
else if ( sizeColumn == 2 )
- mFolderTree->addSizeColumn( i18n("Size"), 70 );
+ mFolderTree->addSizeColumn(
+ i18nc("@title:column Size of the messages.", "Size"), 70 );
if ( unreadColumn == 3 )
- mFolderTree->addUnreadColumn( i18n("Unread"), 70 );
+ mFolderTree->addUnreadColumn(
+ i18nc("@title:column Number of unread messages.", "Unread"), 70 );
else if ( totalColumn == 3 )
- mFolderTree->addTotalColumn( i18n("Total"), 70 );
+ mFolderTree->addTotalColumn(
+ i18nc("@title:column Total number of messages.", "Total"), 70 );
else if ( sizeColumn == 3 )
- mFolderTree->addSizeColumn( i18n("Size"), 70 );
+ mFolderTree->addSizeColumn(
+ i18nc("@title:column Size of the messages.", "Size"), 70 );
slotFolderTreeColumnsChanged();
mFolderTree->updatePopup();
@@ -1348,25 +1357,25 @@ void KMMainWidget::slotRemoveFolder()
}
else {
str = i18n("Are you sure you want to delete the empty folder "
- "%1 and all its subfolders? Those subfolders might "
+ "%1 and all its subfolders? Those subfolders might "
"not be empty and their contents will be discarded as well. "
"Beware that discarded messages are not saved "
- "into your Trash folder and are permanently deleted.
",
+ "into your Trash folder and are permanently deleted.
",
Qt::escape( mFolder->label() ) );
}
} else {
if ( !mFolder->child() || mFolder->child()->isEmpty() ) {
str = i18n("Are you sure you want to delete the folder "
- "%1, discarding its contents? "
+ "%1, discarding its contents? "
"Beware that discarded messages are not saved "
- "into your Trash folder and are permanently deleted.
",
+ "into your Trash folder and are permanently deleted.",
Qt::escape( mFolder->label() ) );
}
else {
- str = i18n("Are you sure you want to delete the folder %1 "
+ str = i18n("Are you sure you want to delete the folder %1 "
"and all its subfolders, discarding their contents? "
"Beware that discarded messages are not saved "
- "into your Trash folder and are permanently deleted.
",
+ "into your Trash folder and are permanently deleted.",
Qt::escape( mFolder->label() ) );
}
}
@@ -2979,7 +2988,8 @@ void KMMainWidget::setupActions()
mForwardAttachedAction->setShortcut(QKeySequence(Qt::Key_F));
connect(mForwardAttachedAction, SIGNAL(triggered(bool) ), SLOT(slotForwardAttachedMsg()));
mForwardActionMenu->addAction( forwardAttachedAction() );
- mForwardAction = new KAction(KIcon("mail-forward"), i18n("&Inline..."), this);
+ mForwardAction = new KAction(KIcon("mail-forward"),
+ i18nc("@action:inmenu Message->Forward->", "&Inline..."), this);
actionCollection()->addAction("message_forward_inline", mForwardAction );
connect(mForwardAction, SIGNAL(triggered(bool) ), SLOT(slotForwardMsg()));
mForwardAction->setShortcut(QKeySequence(Qt::SHIFT+Qt::Key_F));
@@ -3189,7 +3199,7 @@ void KMMainWidget::setupActions()
} else {
action->setIcon( KIcon( "go-next" ) );
}
- action->setIconText( i18n( "Next" ) );
+ action->setIconText( i18nc( "@action:inmenu Goto next unread message", "Next" ) );
action->setToolTip(i18n("Go to the next unread message"));
connect(action, SIGNAL(triggered(bool) ), SLOT(slotNextUnreadMessage()));
}
@@ -3209,7 +3219,7 @@ void KMMainWidget::setupActions()
} else {
action->setIcon( KIcon( "go-previous" ) );
}
- action->setIconText( i18n( "Previous" ) );
+ action->setIconText( i18nc( "@action:inmenu Goto previous unread message.","Previous" ) );
action->setToolTip(i18n("Go to the previous unread message"));
connect(action, SIGNAL(triggered(bool) ), SLOT(slotPrevUnreadMessage()));
}
diff --git a/kmreadermainwin.cpp b/kmreadermainwin.cpp
index 9545b6fa5..2d1f39116 100644
--- a/kmreadermainwin.cpp
+++ b/kmreadermainwin.cpp
@@ -303,7 +303,8 @@ void KMReaderMainWin::setupAccel()
connect(mForwardAttachedAction, SIGNAL(triggered(bool) ), SLOT(slotForwardAttachedMsg()));
mForwardActionMenu->addAction( mForwardAttachedAction );
- mForwardAction = new KAction(KIcon("mail-forward"), i18n("&Inline..."), this);
+ mForwardAction = new KAction(KIcon("mail-forward")
+ , i18nc("@action:inmenu Forward current message inline.", "&Inline..."), this);
actionCollection()->addAction("message_forward_inline", mForwardAction );
connect(mForwardAction, SIGNAL(triggered(bool) ), SLOT(slotForwardMsg()));
mForwardAction->setShortcut(QKeySequence(Qt::SHIFT+Qt::Key_F));
diff --git a/kmsearchpatternedit.cpp b/kmsearchpatternedit.cpp
index 82ce2e4c3..e13d7b79f 100644
--- a/kmsearchpatternedit.cpp
+++ b/kmsearchpatternedit.cpp
@@ -52,9 +52,9 @@ static const struct {
{ "", I18N_NOOP( "Size in Bytes" ) },
{ "", I18N_NOOP( "Age in Days" ) },
{ "", I18N_NOOP( "Message Status" ) },
- { "Subject", I18N_NOOP( "Subject" ) },
+ { "Subject", I18N_NOOP2( "Subject of an email.", "Subject" ) },
{ "From", I18N_NOOP( "From" ) },
- { "To", I18N_NOOP( "To" ) },
+ { "To", I18N_NOOP2( "Receiver of an email.", "To" ) },
{ "CC", I18N_NOOP( "CC" ) }
};
static const int SpecialRuleFieldsCount =
diff --git a/templatesconfiguration.cpp b/templatesconfiguration.cpp
index 298076cf8..ecf2a78bf 100644
--- a/templatesconfiguration.cpp
+++ b/templatesconfiguration.cpp
@@ -64,8 +64,7 @@ TemplatesConfiguration::TemplatesConfiguration( QWidget *parent, const char *nam
this, SLOT( slotInsertCommand(const QString &, int) ) );
mHelpString =
- i18n( ""
- "Here you can create and manage templates to use when "
+ i18n( "
Here you can create and manage templates to use when "
"composing new messages, replies or forwarded messages.
"
"The message templates support substitution commands, "
"either simply type them or select them from "