From f79f9609c97aaeabdfd84f340cc5fb20fe4f590c Mon Sep 17 00:00:00 2001
From: Chusslove Illich
Date: Sat, 10 Feb 2007 14:38:10 +0000
Subject: [PATCH] i18n fixes. Note: although sometimes a message with a number
argument is never called for case n == 1, it still should be made plural,
because plural forms accross languages are more complicated than just n == 1
and n > 1.
svn path=/trunk/KDE/kdepim/; revision=632290
---
configuredialog.cpp | 2 +-
customtemplates.cpp | 2 +-
folderdiaquotatab.cpp | 6 +++---
folderdiaquotatab_p.cpp | 4 ++--
kmcomposewin.cpp | 4 ++--
popaccount.cpp | 2 +-
quotajobs.h | 4 ++--
templateparser.cpp | 38 +++++++++++++++++++-------------------
templatesconfiguration.cpp | 14 +++++++-------
9 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/configuredialog.cpp b/configuredialog.cpp
index 88171f0ea..693c18133 100644
--- a/configuredialog.cpp
+++ b/configuredialog.cpp
@@ -918,7 +918,7 @@ void AccountsPage::SendingTab::slotModifySelectedTransport()
if ( !changedIdents.isEmpty() ) {
QString information =
- i18nc( "This identity has been changed to use the modified transport:",
+ i18np( "This identity has been changed to use the modified transport:",
"These %n identities have been changed to use the modified transport:",
changedIdents.count() );
KMessageBox::informationList( this, information, changedIdents );
diff --git a/customtemplates.cpp b/customtemplates.cpp
index 365c6db99..da872a561 100644
--- a/customtemplates.cpp
+++ b/customtemplates.cpp
@@ -107,7 +107,7 @@ CustomTemplates::CustomTemplates( QWidget *parent, const char *name )
"You cannot bind a keyboard shortcut to Universal templates.
"
"" );
- mHelp->setText( i18n( "How does this work?" ).arg( help ) );
+ mHelp->setText( i18n( "How does this work?", help ) );
mHelp->setOpenExternalLinks(true);
mHelp->setTextInteractionFlags(Qt::LinksAccessibleByMouse|Qt::LinksAccessibleByKeyboard);
}
diff --git a/folderdiaquotatab.cpp b/folderdiaquotatab.cpp
index 0569b8301..cafec86e2 100644
--- a/folderdiaquotatab.cpp
+++ b/folderdiaquotatab.cpp
@@ -118,7 +118,7 @@ void KMail::FolderDiaQuotaTab::load()
KMFolder* folder = mDlg->folder() ? mDlg->folder() : mDlg->parentFolder();
if ( folder && folder->storage() == mImapAccount->rootFolder() )
return; // nothing to be done for the (virtual) account folder
- mLabel->setText( i18n( "Connecting to server %1, please wait..." ).arg( mImapAccount->host() ) );
+ mLabel->setText( i18n( "Connecting to server %1, please wait...", mImapAccount->host() ) );
ImapAccountBase::ConnectionState state = mImapAccount->makeConnection();
if ( state == ImapAccountBase::Error ) { // Cancelled by user, or slave can't start
slotConnectionResult( -1, QString::null );
@@ -137,7 +137,7 @@ void KMail::FolderDiaQuotaTab::slotConnectionResult( int errorCode, const QStrin
this, SLOT( slotConnectionResult(int, const QString&) ) );
if ( errorCode ) {
if ( errorCode == -1 ) // unspecified error
- mLabel->setText( i18n( "Error connecting to server %1" ).arg( mImapAccount->host() ) );
+ mLabel->setText( i18n( "Error connecting to server %1", mImapAccount->host() ) );
else
// Connection error (error message box already shown by the account)
mLabel->setText( KIO::buildErrorString( errorCode, errorMsg ) );
@@ -163,7 +163,7 @@ void KMail::FolderDiaQuotaTab::slotReceivedQuotaInfo( KMFolder* folder,
if ( job->error() == KIO::ERR_UNSUPPORTED_ACTION )
mLabel->setText( i18n( "This account does not have support for quota information." ) );
else
- mLabel->setText( i18n( "Error retrieving quota information from server\n%1" ).arg( job->errorString() ) );
+ mLabel->setText( i18n( "Error retrieving quota information from server\n%1", job->errorString() ) );
} else {
mQuotaInfo = info;
}
diff --git a/folderdiaquotatab_p.cpp b/folderdiaquotatab_p.cpp
index d56329754..6af6da75a 100644
--- a/folderdiaquotatab_p.cpp
+++ b/folderdiaquotatab_p.cpp
@@ -84,8 +84,8 @@ void QuotaWidget::setQuotaInfo( const QuotaInfo& info )
int factor = static_cast ( pow( 1000, mFactor ) );
mProgressBar->setMaximum( max );
mProgressBar->setValue( current );
- mInfoLabel->setText( i18n("%1 of %2 %3 used").arg( current/factor )
- .arg( max/factor ).arg( mUnits ) );
+ mInfoLabel->setText( i18n("%1 of %2 %3 used", current/factor,
+ max/factor, mUnits ) );
mRootLabel->setText( info.root() );
}
diff --git a/kmcomposewin.cpp b/kmcomposewin.cpp
index 49c68eaba..ad2bc6075 100644
--- a/kmcomposewin.cpp
+++ b/kmcomposewin.cpp
@@ -3892,8 +3892,8 @@ bool KMComposeWin::saveDraftOrTemplate( const QString &folderName,
i18n("The custom drafts or templates folder for "
"identify \"%1\" does not exist (anymore); "
"therefore, the default drafts or templates "
- "folder will be used.")
- .arg( id.identityName() ) );
+ "folder will be used.",
+ id.identityName() ) );
}
}
if ( imapTheFolder && imapTheFolder->noContent() )
diff --git a/popaccount.cpp b/popaccount.cpp
index 14c8ee686..bbf94a83f 100644
--- a/popaccount.cpp
+++ b/popaccount.cpp
@@ -475,7 +475,7 @@ void PopAccount::slotJobFinished() {
"the UIDL command: this command is required to determine, in a reliable way, "
"which of the mails on the server KMail has already seen before;\n"
"the feature to leave the mails on the server will therefore not "
- "work properly.").arg(NetworkAccount::name()) );
+ "work properly.", NetworkAccount::name()) );
// An attempt to work around buggy pop servers, these seem to be popular.
mUidsOfNextSeenMsgsDict = mUidsOfSeenMsgsDict;
}
diff --git a/quotajobs.h b/quotajobs.h
index 2de6f453f..d60ca2cec 100644
--- a/quotajobs.h
+++ b/quotajobs.h
@@ -67,8 +67,8 @@ class QuotaInfo {
if ( isValid() && !isEmpty() ) {
readConfig();
int factor = static_cast ( pow( 1000, mFactor ) );
- return i18n("%1 of %2 %3 used").arg( mCurrent.toInt() / factor )
- .arg( mMax.toInt() / factor ).arg( mUnits );
+ return i18n("%1 of %2 %3 used", mCurrent.toInt() / factor,
+ mMax.toInt() / factor, mUnits );
}
return QString();
}
diff --git a/templateparser.cpp b/templateparser.cpp
index cef34e4c3..7c60598cb 100644
--- a/templateparser.cpp
+++ b/templateparser.cpp
@@ -234,8 +234,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
body.append( str );
} else if ( mDebug ) {
KMessageBox::error( 0,
- i18n( "Cannot insert content from file %1: %2" ).
- arg( path ).arg( file.errorString() ) );
+ i18n( "Cannot insert content from file %1: %2",
+ path, file.errorString() ) );
}
} else if ( cmd.startsWith( "SYSTEM=" ) ) {
@@ -267,8 +267,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
body.append( QString::fromLocal8Bit( content, content.size() ) );
} else if ( mDebug ) {
KMessageBox::error( 0,
- i18n( "Cannot insert content from file %1: %2").
- arg( path ).arg(file.errorString() ));
+ i18n( "Cannot insert content from file %1: %2",
+ path, file.errorString() ));
}
} else if ( cmd.startsWith( "QUOTEPIPE=" ) ) {
@@ -1005,12 +1005,12 @@ QString TemplateParser::pipe( const QString &cmd, const QString &buf )
if ( mPipeRc != 0 && mDebug ) {
if ( mPipeErr.isEmpty() ) {
KMessageBox::error( 0,
- i18n( "Pipe command exit with status %1: %2").
- arg( mPipeRc ).arg( cmd ) );
+ i18n( "Pipe command exit with status %1: %2",
+ mPipeRc, cmd ) );
} else {
KMessageBox::detailedError( 0,
- i18n( "Pipe command exit with status %1: %2" ).
- arg( mPipeRc ).arg( cmd ), mPipeErr );
+ i18n( "Pipe command exit with status %1: %2",
+ mPipeRc, cmd ), mPipeErr );
}
}
@@ -1020,12 +1020,12 @@ QString TemplateParser::pipe( const QString &cmd, const QString &buf )
if ( mPipeRc != 0 && mDebug ) {
if ( mPipeErr.isEmpty() ) {
KMessageBox::error( 0,
- i18n( "Pipe command killed by signal %1: %2" ).
- arg( -(mPipeRc) ).arg( cmd ) );
+ i18n( "Pipe command killed by signal %1: %2",
+ -(mPipeRc), cmd ) );
} else {
KMessageBox::detailedError( 0,
- i18n( "Pipe command killed by signal %1: %2" ).
- arg( -(mPipeRc) ).arg( cmd ), mPipeErr );
+ i18n( "Pipe command killed by signal %1: %2",
+ -(mPipeRc), cmd ), mPipeErr );
}
}
}
@@ -1036,8 +1036,8 @@ QString TemplateParser::pipe( const QString &cmd, const QString &buf )
proc.detach();
if ( mDebug ) {
KMessageBox::error( 0,
- i18n( "Pipe command did not finish within %1 seconds: %2" ).
- arg( PipeTimeout ).arg( cmd ) );
+ i18n( "Pipe command did not finish within %1 seconds: %2",
+ PipeTimeout, cmd ) );
}
}
@@ -1048,19 +1048,19 @@ QString TemplateParser::pipe( const QString &cmd, const QString &buf )
if ( mDebug ) {
if ( mPipeErr.isEmpty() ) {
KMessageBox::error( 0,
- i18n( "Cannot write to process stdin: %1" ).arg( cmd ) );
+ i18n( "Cannot write to process stdin: %1", cmd ) );
} else {
KMessageBox::detailedError( 0,
- i18n( "Cannot write to process stdin: %1" ).
- arg( cmd ), mPipeErr );
+ i18n( "Cannot write to process stdin: %1",
+ cmd ), mPipeErr );
}
}
}
} else if ( mDebug ) {
KMessageBox::error( 0,
- i18n( "Cannot start pipe command from template: %1" ).
- arg( cmd ) );
+ i18n( "Cannot start pipe command from template: %1",
+ cmd ) );
}
return mPipeOut;
diff --git a/templatesconfiguration.cpp b/templatesconfiguration.cpp
index eb98d8a00..b30b81809 100644
--- a/templatesconfiguration.cpp
+++ b/templatesconfiguration.cpp
@@ -104,7 +104,7 @@ TemplatesConfiguration::TemplatesConfiguration( QWidget *parent, const char *nam
"" );
}
- mHelp->setText( i18n( "How does this work?" ).arg( help ) );
+ mHelp->setText( i18n( "How does this work?", help ) );
mHelp->setOpenExternalLinks(true);
mHelp->setTextInteractionFlags(Qt::LinksAccessibleByMouse|Qt::LinksAccessibleByKeyboard);
}
@@ -343,12 +343,12 @@ void TemplatesConfiguration::loadFromPhrases()
str = replyPhrases.phraseForward();
if ( !str.isEmpty() ) {
- textEdit_forward->setText( QString( i18n(
+ textEdit_forward->setText( i18n(
"%REM=\"Default forward template\"%-\n"
"---------- %1 ----------\n"
"%TEXT\n"
- "-------------------------------------------------------\n"
- ) ).arg( convertPhrases( str ) ) );
+ "-------------------------------------------------------\n",
+ convertPhrases( str ) ) );
}
else {
textEdit_forward->setText( defaultForward() );
@@ -392,7 +392,7 @@ void TemplatesConfiguration::importFromPhrases()
str = replyPhrases.phraseForward();
if ( !str.isEmpty() ) {
- GlobalSettings::self()->setTemplateForward( QString( i18n(
+ GlobalSettings::self()->setTemplateForward( i18n(
"%REM=\"Default forward template\"%-\n"
"\n"
"---------- %1 ----------\n"
@@ -403,8 +403,8 @@ void TemplatesConfiguration::importFromPhrases()
"To: %OTOADDR\n"
"\n"
"%TEXT\n"
- "-------------------------------------------------------\n"
- ) ).arg( convertPhrases( str ) ) );
+ "-------------------------------------------------------\n",
+ convertPhrases( str ) ) );
}
else {
GlobalSettings::self()->setTemplateForward( defaultForward() );