Skip to content

Commit b852370

Browse files
committed
Rebase fix
1 parent 1a577da commit b852370

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ class TranslationDebugCommand extends ContainerAwareCommand
4141
const MESSAGE_EQUALS_FALLBACK = 2;
4242

4343
private $translator;
44-
private $loader;
44+
private $reader;
4545
private $extractor;
4646

4747
/**
48-
* @param TranslatorInterface $translator
49-
* @param TranslationLoader $loader
50-
* @param ExtractorInterface $extractor
48+
* @param TranslatorInterface $translator
49+
* @param TranslationReaderInterface $reader
50+
* @param ExtractorInterface $extractor
5151
*/
52-
public function __construct($translator = null, TranslationLoader $loader = null, ExtractorInterface $extractor = null)
52+
public function __construct($translator = null, TranslationReaderInterface $reader = null, ExtractorInterface $extractor = null)
5353
{
5454
if (!$translator instanceof TranslatorInterface) {
5555
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
@@ -62,7 +62,7 @@ public function __construct($translator = null, TranslationLoader $loader = null
6262
parent::__construct();
6363

6464
$this->translator = $translator;
65-
$this->loader = $loader;
65+
$this->reader = $reader;
6666
$this->extractor = $extractor;
6767
}
6868

@@ -141,7 +141,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
141141
// BC to be removed in 4.0
142142
if (null === $this->translator) {
143143
$this->translator = $this->getContainer()->get('translator');
144-
$this->loader = $this->getContainer()->get('translation.loader');
144+
$this->reader = $this->getContainer()->get('translation.loader');
145145
$this->extractor = $this->getContainer()->get('translation.extractor');
146146
}
147147

@@ -332,7 +332,7 @@ private function loadCurrentMessages($locale, $transPaths)
332332
foreach ($transPaths as $path) {
333333
$path = $path.'translations';
334334
if (is_dir($path)) {
335-
$this->loader->loadMessages($path, $currentCatalogue);
335+
$this->reader->read($path, $currentCatalogue);
336336
}
337337
}
338338

@@ -358,7 +358,7 @@ private function loadFallbackCatalogues($locale, $transPaths)
358358
foreach ($transPaths as $path) {
359359
$path = $path.'translations';
360360
if (is_dir($path)) {
361-
$this->loader->loadMessages($path, $fallbackCatalogue);
361+
$this->reader->read($path, $fallbackCatalogue);
362362
}
363363
}
364364
$fallbackCatalogues[] = $fallbackCatalogue;

src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Symfony\Component\Console\Input\InputOption;
2222
use Symfony\Component\Translation\Extractor\ExtractorInterface;
2323
use Symfony\Component\Translation\MessageCatalogue;
24+
use Symfony\Component\Translation\Reader\TranslationReaderInterface;
2425
use Symfony\Component\Translation\Writer\TranslationWriter;
2526

2627
/**
@@ -34,17 +35,17 @@
3435
class TranslationUpdateCommand extends ContainerAwareCommand
3536
{
3637
private $writer;
37-
private $loader;
38+
private $reader;
3839
private $extractor;
3940
private $defaultLocale;
4041

4142
/**
42-
* @param TranslationWriter $writer
43-
* @param TranslationLoader $loader
44-
* @param ExtractorInterface $extractor
45-
* @param string $defaultLocale
43+
* @param TranslationWriter $writer
44+
* @param TranslationReaderInterface $reader
45+
* @param ExtractorInterface $extractor
46+
* @param string $defaultLocale
4647
*/
47-
public function __construct($writer = null, TranslationLoader $loader = null, ExtractorInterface $extractor = null, $defaultLocale = null)
48+
public function __construct($writer = null, TranslationReaderInterface $reader = null, ExtractorInterface $extractor = null, $defaultLocale = null)
4849
{
4950
if (!$writer instanceof TranslationWriter) {
5051
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
@@ -57,7 +58,7 @@ public function __construct($writer = null, TranslationLoader $loader = null, Ex
5758
parent::__construct();
5859

5960
$this->writer = $writer;
60-
$this->loader = $loader;
61+
$this->reader = $reader;
6162
$this->extractor = $extractor;
6263
$this->defaultLocale = $defaultLocale;
6364
}
@@ -126,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
126127
// BC to be removed in 4.0
127128
if (null === $this->writer) {
128129
$this->writer = $this->getContainer()->get('translation.writer');
129-
$this->loader = $this->getContainer()->get('translation.loader');
130+
$this->reader = $this->getContainer()->get('translation.reader');
130131
$this->extractor = $this->getContainer()->get('translation.extractor');
131132
$this->defaultLocale = $this->getContainer()->getParameter('kernel.default_locale');
132133
}
@@ -200,7 +201,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
200201
foreach ($transPaths as $path) {
201202
$path .= 'translations';
202203
if (is_dir($path)) {
203-
$this->loader->loadMessages($path, $currentCatalogue);
204+
$this->reader->read($path, $currentCatalogue);
204205
}
205206
}
206207

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy