]> source.dussan.org Git - nextcloud-server.git/commitdiff
Correclty use plural for share exception
authorJoas Schilling <coding@schilljs.com>
Wed, 31 Mar 2021 07:56:36 +0000 (09:56 +0200)
committerJoas Schilling <coding@schilljs.com>
Tue, 20 Apr 2021 14:43:40 +0000 (16:43 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Share20/Manager.php

index 7211a4eb1e824d08af555dceb6b9977cc1db3824..00020c3a8f68486c764f3db9ff50750ab5d40f78 100644 (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('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);
                        }
                }