Skip to content

Commit

Permalink
Merge branch '4.2' into 4.3
Browse files Browse the repository at this point in the history
* 4.2:
  [Translation] Fixed issue with new vs old TranslatorInterface in TranslationDataCollector
  [FrameworkBundle] improve cs
  • Loading branch information
fabpot committed May 26, 2019
2 parents 74225d7 + 451b440 commit a423bad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
$definition = new ChildDefinition($pool['adapter']);

if ($pool['tags']) {
if ($config['pools'][$pool['tags']]['tags'] ?? false) {
if (true !== $pool['tags'] && ($config['pools'][$pool['tags']]['tags'] ?? false)) {
$pool['tags'] = '.'.$pool['tags'].'.inner';
}
$container->register($name, TagAwareAdapter::class)
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Translation/DataCollectorTranslator.php
Original file line number Diff line number Diff line change
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 a423bad

Please sign in to comment.