[Pkg-owncloud-commits] [owncloud-client] 240/470: ActivityWidget: Handle plural properly in translations.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:25:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 885f8b382fbe99cc9c03a9bc9b67b71b2296b3f0
Author: Klaas Freitag <freitag at owncloud.com>
Date: Tue Mar 29 17:18:53 2016 +0200
ActivityWidget: Handle plural properly in translations.
Even for the case where the number is fixed.
Also fix the translators comments.
---
src/gui/activitywidget.cpp | 10 +++++-----
src/gui/notificationwidget.cpp | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp
index 59219e8..eeb4dd1 100644
--- a/src/gui/activitywidget.cpp
+++ b/src/gui/activitywidget.cpp
@@ -340,18 +340,18 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list)
QString acc2 = accNotified.keys().at(1);
if( newGuiLogCount == 2 ) {
int notiCount = accNotified[ acc1 ] + accNotified[ acc2 ];
- msg = tr("You received %1 new notifications from %2 and %3.").arg(notiCount).arg(acc1).arg(acc2);
+ msg = tr("You received %n new notification(s) from %1 and %2.", "", notiCount).arg(acc1, acc2);
} else {
- msg = tr("You received new notifications from %1, %2 and other accounts.").arg(acc1).arg(acc2);
+ msg = tr("You received new notifications from %1, %2 and other accounts.").arg(acc1, acc2);
}
}
- emit guiLog(Theme::instance()->appNameGUI() + QLatin1String(" ") + tr("Notifications - Action Required"),
- msg);
+ const QString log = tr("%1 Notifications - Action Required").arg(Theme::instance()->appNameGUI());
+ emit guiLog( log, msg);
}
}
-void ActivityWidget::slotSendNotificationRequest(const QString& accountName, const QString& link, const QString& verb)
+void ActivityWidget::slotSendNotificationRequest(const QString& accountName, const QString& link, const QByteArray& verb)
{
qDebug() << Q_FUNC_INFO << "Server Notification Request " << verb << link << "on account" << accountName;
NotificationWidget *theSender = qobject_cast<NotificationWidget*>(sender());
diff --git a/src/gui/notificationwidget.cpp b/src/gui/notificationwidget.cpp
index 15dd7fc..33961e5 100644
--- a/src/gui/notificationwidget.cpp
+++ b/src/gui/notificationwidget.cpp
@@ -129,14 +129,14 @@ void NotificationWidget::slotNotificationRequestFinished(int statusCode)
for( i = 0; i < _buttons.count(); i++ ) {
_buttons.at(i)->setEnabled(true);
}
- //* The second parameter is a time, such as 'failed at 09:58pm'
- doneText = tr("%1 request failed at %2").arg(_actionLabel).arg(timeStr);
+ //: The second parameter is a time, such as 'failed at 09:58pm'
+ doneText = tr("%1 request failed at %2").arg(_actionLabel, timeStr);
} else {
// the call to the ocs API succeeded.
_ui._buttonBox->hide();
- //* The second parameter is a time, such as 'selected at 09:58pm'
- doneText = tr("'%1' selected at %2").arg(_actionLabel).arg(timeStr);
+ //: The second parameter is a time, such as 'selected at 09:58pm'
+ doneText = tr("'%1' selected at %2").arg(_actionLabel, timeStr);
}
_ui._timeLabel->setText( doneText );
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list