Skip to content

Commit 5300f16

Browse files
[FrameworkBundle] Improve documentation about translation:extract --sort option
The `--sort` option only works with `--dump-messages` (i.e. not with `--force`). It took me some time to realize that, and the documentation didn't help me since it was showing an example that didn't work. Contribute to #37918
1 parent 22a2729 commit 5300f16

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function configure()
8787
new InputOption('force', null, InputOption::VALUE_NONE, 'Should the extract be done'),
8888
new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'),
8989
new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'Specify the domain to extract'),
90-
new InputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically', 'asc'),
90+
new InputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically (only works with --dump-messages)', 'asc'),
9191
new InputOption('as-tree', null, InputOption::VALUE_OPTIONAL, 'Dump the messages as a tree-like structure: The given value defines the level where to switch to inline YAML'),
9292
])
9393
->setHelp(<<<'EOF'
@@ -116,7 +116,6 @@ protected function configure()
116116
You can dump a tree-like structure using the yaml format with <comment>--as-tree</> flag:
117117
118118
<info>php %command.full_name% --force --format=yaml --as-tree=3 en AcmeBundle</info>
119-
<info>php %command.full_name% --force --format=yaml --sort=asc --as-tree=3 fr</info>
120119

121120
EOF
122121
)

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