8000 bug #49189 [FrameworkBundle] Improve documentation about translation:… · symfony/symfony@618f920 · GitHub
[go: up one dir, main page]

Skip to content

Commit 618f920

Browse files
committed
bug #49189 [FrameworkBundle] Improve documentation about translation:extract --sort option (marien-probesys)
This PR was submitted for the 6.3 branch but it was merged into the 5.4 branch instead. Discussion ---------- [FrameworkBundle] Improve documentation about translation:extract --sort option | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Contribute to #37918 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT | Doc PR | N/A <!-- Replace this notice by a short README for your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> 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. It would have been better to also apply the `--sort` option to `--force` as requested in #37918, but I don't have that much time to understand how to do it. At least it could save some time to people ;) It's my first PR for Symfony, so let me know if I forget something or did something wrong! Commits ------- 1dbf13e [FrameworkBundle] Improve documentation about translation:extract --sort option
2 parents 0550259 + 1dbf13e commit 618f920

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
@@ -93,7 +93,7 @@ protected function configure()
9393
new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'),
9494
new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'Specify the domain to extract'),
9595
new InputOption('xliff-version', null, InputOption::VALUE_OPTIONAL, 'Override the default xliff version (deprecated)'),
96-
new InputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically', 'asc'),
96+
new InputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically (only works with --dump-messages)', 'asc'),
9797
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'),
9898
])
9999
->setDescription(self::$defaultDescription)
@@ -123,7 +123,6 @@ protected function configure()
123123
You can dump a tree-like structure using the yaml format with <comment>--as-tree</> flag:
124124
125125
<info>php %command.full_name% --force --format=yaml --as-tree=3 en AcmeBundle</info>
126-
<info>php %command.full_name% --force --format=yaml --sort=asc --as-tree=3 fr</info>
127126

128127
EOF
129128
)

0 commit comments

Comments
 (0)
0