Skip to content

Commit

Permalink
[Translation] Fixed issue with new vs old TranslatorInterface in Tran…
Browse files Browse the repository at this point in the history
…slationDataCollector
  • Loading branch information
althaus authored and nicolas-grekas committed May 23, 2019
1 parent 19741a4 commit a1677c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Translation/DataCollectorTranslator.php
Expand Up @@ -68,10 +68,10 @@ public function transChoice($id, $number, array $parameters = [], $domain = null
{
if ($this->translator instanceof TranslatorInterface) {
$trans = $this->translator->trans($id, ['%count%' => $number] + $parameters, $domain, $locale);
} else {
$trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale);
}

$trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale);

$this->collectMessage($locale, $domain, $id, $trans, ['%count%' => $number] + $parameters);

return $trans;
Expand Down

0 comments on commit a1677c7

Please sign in to comment.