From 942396b31b6dd1bb251c2027e0b093dc5c1a9b3f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 29 Oct 2024 16:47:41 +0100 Subject: [PATCH] document the translation:extract command's --prefix option --- translation.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/translation.rst b/translation.rst index 15c34460d86..3004c68d991 100644 --- a/translation.rst +++ b/translation.rst @@ -460,6 +460,15 @@ The ``translation:extract`` command looks for missing translations in: Support for extracting Translatable objects has been introduced in Symfony 5.3. +By default, when the ``translation:extract`` command creates new entries in the +translation file, it uses the same content as both the source and the pending +translation. The only difference is that the pending translation is prefixed by +``__``. You can customize this prefix using the ``--prefix`` option: + +.. code-block:: terminal + + $ php bin/console translation:extract --force --prefix="NEW_" fr + .. _translation-resource-locations: Translation Resource/File Names and Locations