minor #28829 Translation commands should not tell about the old app/ directory (e-moe)
This PR was merged into the 3.4 branch.
Discussion
----------
Translation commands should not tell about the old app/ directory
Fixes #28816 Translation commands should not talk about the old "app/" directory since 3.4
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28816
| License | MIT
| Doc PR | n/a
Commits
-------
5fcc0b4d8d
Fixes 28816 Translation commands should not talk about the old app/ directory since 3.4
This commit is contained in:
commit
fdc9e0993f
@ -76,7 +76,7 @@ class TranslationDebugCommand extends ContainerAwareCommand
|
|||||||
$this
|
$this
|
||||||
->setDefinition(array(
|
->setDefinition(array(
|
||||||
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
|
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
|
||||||
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages, defaults to app/Resources folder'),
|
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'),
|
||||||
new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'The messages domain'),
|
new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'The messages domain'),
|
||||||
new InputOption('only-missing', null, InputOption::VALUE_NONE, 'Displays only missing messages'),
|
new InputOption('only-missing', null, InputOption::VALUE_NONE, 'Displays only missing messages'),
|
||||||
new InputOption('only-unused', null, InputOption::VALUE_NONE, 'Displays only unused messages'),
|
new InputOption('only-unused', null, InputOption::VALUE_NONE, 'Displays only unused messages'),
|
||||||
@ -86,7 +86,7 @@ class TranslationDebugCommand extends ContainerAwareCommand
|
|||||||
->setHelp(<<<'EOF'
|
->setHelp(<<<'EOF'
|
||||||
The <info>%command.name%</info> command helps finding unused or missing translation
|
The <info>%command.name%</info> command helps finding unused or missing translation
|
||||||
messages and comparing them with the fallback ones by inspecting the
|
messages and comparing them with the fallback ones by inspecting the
|
||||||
templates and translation files of a given bundle or the app folder.
|
templates and translation files of a given bundle or the default translations directory.
|
||||||
|
|
||||||
You can display information about bundle translations in a specific locale:
|
You can display information about bundle translations in a specific locale:
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ You can only display unused messages:
|
|||||||
|
|
||||||
<info>php %command.full_name% --only-unused en AcmeDemoBundle</info>
|
<info>php %command.full_name% --only-unused en AcmeDemoBundle</info>
|
||||||
|
|
||||||
You can display information about app translations in a specific locale:
|
You can display information about application translations in a specific locale:
|
||||||
|
|
||||||
<info>php %command.full_name% en</info>
|
<info>php %command.full_name% en</info>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class TranslationUpdateCommand extends ContainerAwareCommand
|
|||||||
$this
|
$this
|
||||||
->setDefinition(array(
|
->setDefinition(array(
|
||||||
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
|
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
|
||||||
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages, defaults to app/Resources folder'),
|
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'),
|
||||||
new InputOption('prefix', null, InputOption::VALUE_OPTIONAL, 'Override the default prefix', '__'),
|
new InputOption('prefix', null, InputOption::VALUE_OPTIONAL, 'Override the default prefix', '__'),
|
||||||
new InputOption('no-prefix', null, InputOption::VALUE_NONE, '[DEPRECATED] If set, no prefix is added to the translations'),
|
new InputOption('no-prefix', null, InputOption::VALUE_NONE, '[DEPRECATED] If set, no prefix is added to the translations'),
|
||||||
new InputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'yml'),
|
new InputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'yml'),
|
||||||
@ -93,7 +93,7 @@ class TranslationUpdateCommand extends ContainerAwareCommand
|
|||||||
->setDescription('Updates the translation file')
|
->setDescription('Updates the translation file')
|
||||||
->setHelp(<<<'EOF'
|
->setHelp(<<<'EOF'
|
||||||
The <info>%command.name%</info> command extracts translation strings from templates
|
The <info>%command.name%</info> command extracts translation strings from templates
|
||||||
of a given bundle or the app folder. It can display them or merge the new ones into the translation files.
|
of a given bundle or the default translations directory. It can display them or merge the new ones into the translation files.
|
||||||
|
|
||||||
When new translation strings are found it can automatically add a prefix to the translation
|
When new translation strings are found it can automatically add a prefix to the translation
|
||||||
message.
|
message.
|
||||||
@ -102,7 +102,7 @@ Example running against a Bundle (AcmeBundle)
|
|||||||
<info>php %command.full_name% --dump-messages en AcmeBundle</info>
|
<info>php %command.full_name% --dump-messages en AcmeBundle</info>
|
||||||
<info>php %command.full_name% --force --prefix="new_" fr AcmeBundle</info>
|
<info>php %command.full_name% --force --prefix="new_" fr AcmeBundle</info>
|
||||||
|
|
||||||
Example running against app messages (app/Resources folder)
|
Example running against default messages directory
|
||||||
<info>php %command.full_name% --dump-messages en</info>
|
<info>php %command.full_name% --dump-messages en</info>
|
||||||
<info>php %command.full_name% --force --prefix="new_" fr</info>
|
<info>php %command.full_name% --force --prefix="new_" fr</info>
|
||||||
EOF
|
EOF
|
||||||
@ -171,7 +171,7 @@ EOF
|
|||||||
if ($this->defaultViewsPath) {
|
if ($this->defaultViewsPath) {
|
||||||
$viewsPaths[] = $this->defaultViewsPath;
|
$viewsPaths[] = $this->defaultViewsPath;
|
||||||
}
|
}
|
||||||
$currentName = 'app folder';
|
$currentName = 'default directory';
|
||||||
|
|
||||||
// Override with provided Bundle info
|
// Override with provided Bundle info
|
||||||
if (null !== $input->getArgument('bundle')) {
|
if (null !== $input->getArgument('bundle')) {
|
||||||
|
Reference in New Issue
Block a user