Commit 5939914c authored by catch's avatar catch
Browse files

Issue #3248809 by daffie, larowlan: [Symfony 6] The...

Issue #3248809 by daffie, larowlan: [Symfony 6] The Drupal\Tests\file\Kernel\FileItemValidationTest fails with Symfony 5

(cherry picked from commit f4d355a2)
parent 71b89659
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -33,9 +33,8 @@ public function trans($id, array $parameters = [], $domain = NULL, $locale = NUL
    // Symfony violation messages may separate singular and plural versions
    // with "|".
    $ids = explode('|', $id);
    if (count($ids) > 1) {
      $number = $parameters['%count%'] ?? 1;
      return \Drupal::translation()->formatPlural($number, $ids[0], $ids[1], $this->processParameters($parameters), $this->getOptions($domain, $locale));
    if ((count($ids) > 1) && isset($parameters['%count%'])) {
      return \Drupal::translation()->formatPlural($parameters['%count%'], $ids[0], $ids[1], $this->processParameters($parameters), $this->getOptions($domain, $locale));
    }

    return new TranslatableMarkup($id, $this->processParameters($parameters), $this->getOptions($domain, $locale));