From kde-i18n-doc Sat Jan 29 12:23:47 2011 From: Andrew Coles Date: Sat, 29 Jan 2011 12:23:47 +0000 To: kde-i18n-doc Subject: =?utf-8?q?=5Bkdevplatform/1=2E2=5D_plugins/grepview=3A_Backporte?= Message-Id: <20110129122347.6F432A6094 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-i18n-doc&m=129630464007139 Git commit 05a12eb791022ca895dfbc85be645fe72f2923b7 by Andrew Coles. Pushed by coles into branch '1.2'. Backported i18n fix (missing usage of plural form) to 1.2 branch. CCMAIL: kde-i18n-doc@kde.org M +5 -1 plugins/grepview/grepoutputmodel.cpp http://commits.kde.org/1419bb81/05a12eb791022ca895dfbc85be645fe72f2923b7 diff --git a/plugins/grepview/grepoutputmodel.cpp b/plugins/grepview/grepoutputmodel.cpp index 3afa47d..4f52b12 100644 --- a/plugins/grepview/grepoutputmodel.cpp +++ b/plugins/grepview/grepoutputmodel.cpp @@ -312,7 +312,11 @@ void GrepOutputModel::appendOutputs( const QString &filename, const GrepOutputIt m_fileCount += 1; m_matchCount += items.length(); - m_rootItem->setText(i18n("%1 matches in %2 files", m_matchCount, m_fileCount)); + + const QString matchText = i18np("1 match", "%1 matches", m_matchCount); + const QString fileText = i18np("1 file", "%1 files", m_fileCount); + + m_rootItem->setText(i18nc("%1 is e.g. '4 matches', %2 is e.g. '1 file'", "%1 in %2", matchText, fileText)); QString fnString = i18np("%2 (one match)", "%2 (%1 matches)", items.length(), ICore::self()->projectController()->prettyFileName(filename));