Skip to content

Commit ad92626

Browse files
committed
Reword
1 parent 5d29c31 commit ad92626

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

translation.rst

+7-4
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,15 @@ The ``translation:extract`` command looks for missing translations in:
462462
The support of PHP files/classes that use constraint attributes was
463463
introduced in Symfony 6.2.
464464

465-
To read PHP files, is used the new ``PhpAstExtractor`` service supports all kinds of ``trans()`` function calls, usages of :class:`Symfony\\Component\\Translation\\TranslatableMessage` class, messages defined in validation constraints, etc...
465+
.. tip::
466466

467-
To use the new translation extractor, install the ``nikic/php-parser`` package using Composer, before using `translation:extract`.
467+
Install the ``nikic/php-parser`` package in your project to improve the
468+
results of the ``translation:extract`` command. This package enables an
469+
`AST`_ parser that can find many more translatable items:
468470

469-
.. code-block:: terminal
471+
.. code-block:: terminal
470472
471-
$ composer require nikic/php-parser
473+
$ composer require nikic/php-parser
472474
473475
.. _translation-resource-locations:
474476

@@ -1594,3 +1596,4 @@ Learn more
15941596
.. _`Loco (localise.biz)`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Translation/Bridge/Loco/README.md
15951597
.. _`Lokalise`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Translation/Bridge/Lokalise/README.md
15961598
.. _`Phrase`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Translation/Bridge/Phrase/README.md
1599+
.. _`AST`: https://en.wikipedia.org/wiki/Abstract_syntax_tree

0 commit comments

Comments
 (0)