Skip to content

Commit 7a76a1a

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: [Translation] fix: add nikic/php-parser requirement for translation:extract in tran…
2 parents e1b953a + 73084d8 commit 7a76a1a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

translation.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,16 @@ The ``translation:extract`` command looks for missing translations in:
457457
* Any PHP file/class stored in the ``src/`` directory that uses
458458
:ref:`Constraints Attributes <validation-constraints>` with ``*message`` named argument(s).
459459

460+
.. tip::
461+
462+
Install the ``nikic/php-parser`` package in your project to improve the
463+
results of the ``translation:extract`` command. This package enables an
464+
`AST`_ parser that can find many more translatable items:
465+
466+
.. code-block:: terminal
467+
468+
$ composer require nikic/php-parser
469+
460470
.. _translation-resource-locations:
461471

462472
Translation Resource/File Names and Locations
@@ -1579,3 +1589,4 @@ Learn more
15791589
.. _`Loco (localise.biz)`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Translation/Bridge/Loco/README.md
15801590
.. _`Lokalise`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Translation/Bridge/Lokalise/README.md
15811591
.. _`Phrase`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Translation/Bridge/Phrase/README.md
1592+
.. _`AST`: https://en.wikipedia.org/wiki/Abstract_syntax_tree

0 commit comments

Comments
 (0)