From c2fe5c6c46ddeab1a9c27eb694db31d610669cdd Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 29 Nov 2022 15:06:58 +0545 Subject: [PATCH] Avoid deprecated PluralizationRules --- lib/private/L10N/L10N.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/private/L10N/L10N.php b/lib/private/L10N/L10N.php index 18c0bd5b9dc2..2de30f56f29b 100644 --- a/lib/private/L10N/L10N.php +++ b/lib/private/L10N/L10N.php @@ -25,9 +25,11 @@ use OCP\IL10N; use OCP\L10N\IFactory; use Punic\Calendar; -use Symfony\Component\Translation\PluralizationRules; +use Symfony\Contracts\Translation\TranslatorTrait; class L10N implements IL10N { + use TranslatorTrait; + /** @var IFactory */ protected $factory; @@ -200,6 +202,6 @@ protected function load($translationFile) { * @return int */ public function computePlural($number) { - return PluralizationRules::get($number, $this->lang); + return $this->getPluralizationRule($number, $this->lang); } }