-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | no |
Symfony version | 3.4.4 |
According to the documentation and the translation:update
description, php bin/console translation:update --force --dump-messages en
is supposed to store translations in app/Resources
by default.
However, in #25065 the defaultTransPath constructor argument was set to %kernel.project_dir%/translations
instead of %kernel.project_dir%/app/Resources
:
public function __construct($writer = null, TranslationReaderInterface $reader = null, ExtractorInterface $extractor = null, $defaultLocale = null, $defaultTransPath = null, $defaultViewsPath = null) |
<service id="console.command.translation_update" class="Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand"> | |
<argument type="service" id="translation.writer" /> | |
<argument type="service" id="translation.reader" /> | |
<argument type="service" id="translation.extractor" /> | |
<argument>%kernel.default_locale%</argument> | |
<argument>%translator.default_path%</argument> | |
<argument /> <!-- %twig.default_path% --> | |
<tag name="console.command" command="translation:update" /> | |
</service> |
symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Line 1141 in 8dadff2
$container->setParameter('translator.default_path', $config['default_path']); |
symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Lines 688 to 691 in 8dadff2
->scalarNode('default_path') | |
->info('The default path used to load translations') | |
->defaultValue('%kernel.project_dir%/translations') | |
->end() |
The former is indeed correct for sf4 projects, but directly contradicts the description of the command (and probably some documentation) in 3.4:
Usage:
translation:update [options] [--] <locale> [<bundle>]
Arguments:
locale The locale
bundle The bundle name or directory where to load the messages, defaults to >>> app/Resources <<< folder
php bin/console translation:update --force --dump-messages en app
does store the translations in app/Resources/translations
.
I really don't mind typing the 3 extra letters, but I thought I'd mention it either way :)
Also, not really sure if I missed anything here.