Skip to content

Commit b0bba0a

Browse files
committed
[Translation] Document the lint:translations command
1 parent 8133ba0 commit b0bba0a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

translation.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ Symfony processes all the application translation files as part of the process
13431343
that compiles the application code before executing it. If there's an error in
13441344
any translation file, you'll see an error message explaining the problem.
13451345

1346-
If you prefer, you can also validate the contents of any YAML and XLIFF
1346+
If you prefer, you can also validate the syntax of any YAML and XLIFF
13471347
translation file using the ``lint:yaml`` and ``lint:xliff`` commands:
13481348

13491349
.. code-block:: terminal
@@ -1384,6 +1384,22 @@ adapted to the format required by GitHub, but you can force that format too:
13841384
13851385
$ php vendor/bin/yaml-lint translations/
13861386
1387+
The ``lint:yaml`` and ``lint:xliff`` commands validate the YAML and XML syntax
1388+
of the translation files, but not their contents. Use the the following command
1389+
to check that the translation contents are also correct:
1390+
1391+
.. code-block:: terminal
1392+
1393+
# checks the contents of all the translation catalogues in all locales
1394+
$ php bin/console lint:translations
1395+
1396+
# checks the contents of the translation catalogues for Italian (it) and Japanese (ja) locales
1397+
$ php bin/console lint:translations --locales=it --locales=ja
1398+
1399+
.. versionadded:: 7.2
1400+
1401+
The ``lint:translations`` command was introduced in Symfony 7.2.
1402+
13871403
Pseudo-localization translator
13881404
------------------------------
13891405

0 commit comments

Comments
 (0)