Skip to content

Commit

Permalink
[Translation] Document the lint:translations command
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Jun 13, 2024
1 parent 8133ba0 commit b0bba0a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ Symfony processes all the application translation files as part of the process
that compiles the application code before executing it. If there's an error in
any translation file, you'll see an error message explaining the problem.

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

.. code-block:: terminal
Expand Down Expand Up @@ -1384,6 +1384,22 @@ adapted to the format required by GitHub, but you can force that format too:
$ php vendor/bin/yaml-lint translations/
The ``lint:yaml`` and ``lint:xliff`` commands validate the YAML and XML syntax
of the translation files, but not their contents. Use the the following command

Check failure on line 1388 in translation.rst

View workflow job for this annotation

GitHub Actions / Lint (DOCtor-RST)

The word "the" is used more times in a row.
to check that the translation contents are also correct:

.. code-block:: terminal
# checks the contents of all the translation catalogues in all locales
$ php bin/console lint:translations
# checks the contents of the translation catalogues for Italian (it) and Japanese (ja) locales
$ php bin/console lint:translations --locales=it --locales=ja
.. versionadded:: 7.2

The ``lint:translations`` command was introduced in Symfony 7.2.

Pseudo-localization translator
------------------------------

Expand Down

0 comments on commit b0bba0a

Please sign in to comment.