Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FrameworkBundle] Rename translation:update to translation:extract #16024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 reference/dic_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ translation.extractor
**Purpose**: To register a custom service that extracts messages from a
file

When executing the ``translation:update`` command, it uses extractors to
When executing the ``translation:extract`` command, it uses extractors to
extract translation messages from a file. By default, the Symfony Framework
has a :class:`Symfony\\Bridge\\Twig\\Translation\\TwigExtractor` and a
:class:`Symfony\\Component\\Translation\\Extractor\\PhpExtractor`, which
Expand Down
15 changes: 10 additions & 5 deletions 15 translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -466,21 +466,26 @@ Extracting Translation Contents and Updating Catalogs Automatically

The most time-consuming tasks when translating an application is to extract all
the template contents to be translated and to keep all the translation files in
sync. Symfony includes a command called ``translation:update`` that helps you
sync. Symfony includes a command called ``translation:extract`` that helps you
with these tasks:

.. code-block:: terminal

# shows all the messages that should be translated for the French language
$ php bin/console translation:update --dump-messages fr
$ php bin/console translation:extract --dump-messages fr

# updates the French translation files with the missing strings for that locale
$ php bin/console translation:update --force fr
$ php bin/console translation:extract --force fr

# check out the command help to see its options (prefix, output format, domain, sorting, etc.)
$ php bin/console translation:update --help
$ php bin/console translation:extract --help

The ``translation:update`` command looks for missing translations in:
.. deprecated:: 5.4

Support for ``translation:update`` was deprecated in Symfony 5.4
and it will be removed in Symfony 6.0.

The ``translation:extract`` command looks for missing translations in:

* Templates stored in the ``templates/`` directory (or any other directory
defined in the :ref:`twig.default_path <config-twig-default-path>` and
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.