Skip to content

Commit

Permalink
Avoid deprecated PluralizationRules
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Dec 1, 2022
1 parent 6de9a0d commit c2fe5c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/private/L10N/L10N.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}

0 comments on commit c2fe5c6

Please sign in to comment.