You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation of translation:pull is indeed using lots of options with InputOption::VALUE_OPTIONAL without actually handling this properly (options where the value is optional are much harder to use to support them properly as you need to distinguish the case where they are not passed from the case where they are passed with no value).
Most of those options should not even use that flag but InputOption::VALUE_REQUIRED instead (for instance, passing --format without a value makes no sense).
Note that TranslationUpdateCommand suffers from the same issue about allowing --as-tree with no value but not supporting that case properly.
Symfony version(s) affected
6.4.4
Description
Hello,
I configured crowdin to import my translations but the as-tree is not working properly
php bin/console translation:pull crowdin --as-tree
I have to specify the following command to force the tree structure
php bin/console translation:pull loco --force --as-tree 1
How to reproduce
use the following console command
php bin/console translation:pull crowdin --as-tree
--as-tree is not taken in account
Possible Solution
I have to specify the following command to force the tree structure
php bin/console translation:pull loco --force --as-tree 1
Additional Context
in the file Symfony\Component\Translation\Command\TranslationPullCommand
The option is converted to an int
$asTree = (int) $input->getOption('as-tree');
but if the value is not an int it will not be taken in account
The text was updated successfully, but these errors were encountered: