Cleaning translation commands
This commit is contained in:
parent
8d277ce3e5
commit
3cbefd838f
@ -165,7 +165,7 @@ EOF
|
|||||||
if (is_dir($dir = sprintf('%s/Resources/%s/translations', $rootDir, $bundle->getName()))) {
|
if (is_dir($dir = sprintf('%s/Resources/%s/translations', $rootDir, $bundle->getName()))) {
|
||||||
$transPaths[] = $dir;
|
$transPaths[] = $dir;
|
||||||
$notice = sprintf('Storing translations files for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $dir, $bundle->getName());
|
$notice = sprintf('Storing translations files for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $dir, $bundle->getName());
|
||||||
@trigger_error($notice.($this->defaultTransPath ? sprintf('use the "%s" directory instead.', $this->defaultTransPath) : sprintf('configure and use "framework.translator.default_path" instead.', $bundle->getName())), E_USER_DEPRECATED);
|
@trigger_error($notice.($this->defaultTransPath ? sprintf('use the "%s" directory instead.', $this->defaultTransPath) : 'configure and use "framework.translator.default_path" instead.'), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
$viewsPaths = array($bundle->getPath().'/Resources/views');
|
$viewsPaths = array($bundle->getPath().'/Resources/views');
|
||||||
if ($this->defaultViewsPath) {
|
if ($this->defaultViewsPath) {
|
||||||
@ -174,7 +174,7 @@ EOF
|
|||||||
if (is_dir($dir = sprintf('%s/Resources/%s/views', $rootDir, $bundle->getName()))) {
|
if (is_dir($dir = sprintf('%s/Resources/%s/views', $rootDir, $bundle->getName()))) {
|
||||||
$viewsPaths[] = $dir;
|
$viewsPaths[] = $dir;
|
||||||
$notice = sprintf('Storing templates for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $bundle->getName(), $dir);
|
$notice = sprintf('Storing templates for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $bundle->getName(), $dir);
|
||||||
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : sprintf('configure and use "twig.default_path" instead.', $bundle->getName())), E_USER_DEPRECATED);
|
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : 'configure and use "twig.default_path" instead.'), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
// such a bundle does not exist, so treat the argument as path
|
// such a bundle does not exist, so treat the argument as path
|
||||||
@ -212,7 +212,7 @@ EOF
|
|||||||
if (is_dir($deprecatedPath = sprintf('%s/Resources/%s/views', $rootDir, $bundle->getName()))) {
|
if (is_dir($deprecatedPath = sprintf('%s/Resources/%s/views', $rootDir, $bundle->getName()))) {
|
||||||
$viewsPaths[] = $deprecatedPath;
|
$viewsPaths[] = $deprecatedPath;
|
||||||
$notice = sprintf('Storing templates for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $bundle->getName(), $deprecatedPath);
|
$notice = sprintf('Storing templates for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $bundle->getName(), $deprecatedPath);
|
||||||
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : sprintf('configure and use "twig.default_path" instead.', $bundle->getName())), E_USER_DEPRECATED);
|
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : 'configure and use "twig.default_path" instead.'), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ EOF
|
|||||||
|
|
||||||
// check format
|
// check format
|
||||||
$supportedFormats = $this->writer->getFormats();
|
$supportedFormats = $this->writer->getFormats();
|
||||||
if (!\in_array($input->getOption('output-format'), $supportedFormats)) {
|
if (!\in_array($input->getOption('output-format'), $supportedFormats, true)) {
|
||||||
$errorIo->error(array('Wrong output format', 'Supported formats are: '.implode(', ', $supportedFormats).'.'));
|
$errorIo->error(array('Wrong output format', 'Supported formats are: '.implode(', ', $supportedFormats).'.'));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -165,7 +165,7 @@ EOF
|
|||||||
if (is_dir($dir = sprintf('%s/Resources/%s/views', $rootDir, $foundBundle->getName()))) {
|
if (is_dir($dir = sprintf('%s/Resources/%s/views', $rootDir, $foundBundle->getName()))) {
|
||||||
$viewsPaths[] = $dir;
|
$viewsPaths[] = $dir;
|
||||||
$notice = sprintf('Storing templates for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $foundBundle->getName(), $dir);
|
$notice = sprintf('Storing templates for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $foundBundle->getName(), $dir);
|
||||||
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : sprintf('configure and use "twig.default_path" instead.', $foundBundle->getName())), E_USER_DEPRECATED);
|
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : 'configure and use "twig.default_path" instead.'), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
$currentName = $foundBundle->getName();
|
$currentName = $foundBundle->getName();
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
@ -261,7 +261,7 @@ EOF
|
|||||||
$extractedMessagesCount += $domainMessagesCount;
|
$extractedMessagesCount += $domainMessagesCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('xlf' == $input->getOption('output-format')) {
|
if ('xlf' === $input->getOption('output-format')) {
|
||||||
$errorIo->comment('Xliff output version is <info>1.2</info>');
|
$errorIo->comment('Xliff output version is <info>1.2</info>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user