Correclty use plural for share exception

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-03-31 09:56:36 +02:00
parent 5a514a9a41
commit 2b8e47dcac
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 2 additions and 2 deletions

View File

@ -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('Cant set expiration date more than %s days in the future', [$defaultExpireDays]);
$message = $this->l->n('Cant set expiration date more than %n day in the future', 'Cant 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('Cant set expiration date more than %s days in the future', [$this->shareApiLinkDefaultExpireDays()]);
$message = $this->l->n('Cant set expiration date more than %n day in the future', 'Cant set expiration date more than %n days in the future', $this->shareApiLinkDefaultExpireDays());
throw new GenericShareException($message, $message, 404);
}
}