8000 [Translation] Fixed issue with new vs old TranslatorInterface in Tran… · symfony/symfony@a1677c7 · GitHub
[go: up one dir, main page]

Skip to content

Commit a1677c7

Browse files
althausnicolas-grekas
authored andcommitted
[Translation] Fixed issue with new vs old TranslatorInterface in TranslationDataCollector
1 parent 19741a4 commit a1677c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Translation/DataCollectorTranslator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public function transChoice($id, $number, array $parameters = [], $domain = null
6868
{
6969
if ($this->translator instanceof TranslatorInterface) {
7070
$trans = $this->translator->trans($id, ['%count%' => $number] + $parameters, $domain, $locale);
71+
} else {
72+
$trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale);
7173
}
7274

73-
$trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale);
74-
7575
$this->collectMessage($locale, $domain, $id, $trans, ['%count%' => $number] + $parameters);
7676

7777
return $trans;

0 commit comments

Comments
 (0)
0