From 2b8e47dcace5d329a874c0dfa9a30cfbc551ca80 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 31 Mar 2021 09:56:36 +0200 Subject: [PATCH] Correclty use plural for share exception Signed-off-by: Joas Schilling --- lib/private/Share20/Manager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 7211a4eb1e8..00020c3a8f6 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -441,7 +441,7 @@ class Manager implements IManager { $date->setTime(0, 0, 0); $date->add(new \DateInterval('P' . $defaultExpireDays . 'D')); if ($date < $expirationDate) { - $message = $this->l->t('Can’t set expiration date more than %s days in the future', [$defaultExpireDays]); + $message = $this->l->n('Can’t set expiration date more than %n day in the future', 'Can’t set expiration date more than %n days in the future', $defaultExpireDays); throw new GenericShareException($message, $message, 404); } } @@ -517,7 +517,7 @@ class Manager implements IManager { $date->setTime(0, 0, 0); $date->add(new \DateInterval('P' . $this->shareApiLinkDefaultExpireDays() . 'D')); if ($date < $expirationDate) { - $message = $this->l->t('Can’t set expiration date more than %s days in the future', [$this->shareApiLinkDefaultExpireDays()]); + $message = $this->l->n('Can’t set expiration date more than %n day in the future', 'Can’t set expiration date more than %n days in the future', $this->shareApiLinkDefaultExpireDays()); throw new GenericShareException($message, $message, 404); } } -- 2.39.5