<commit_before>Managing flash messages
=======================

By default the resource bundle generate default messages for each action. They use the following translation key pattern
`sylius.resource.actionName` (`actionName` can be `create`, `update` and `delete`).

You can manage flash messages by resource, the following pattern `appName.resource.actionName` is used to translate them.
+ *appName:* the name of your application (its default value is sylius)
+ *resource:* the name of your resource
+ *actionName:* the current action (`create`, `update` or `delete`)

Example:

.. code-block:: yaml

    sylius_resource:
        resources:
            my_app.entity_key:
                driver: doctrine/orm
                templates: App:User
                classes:
                    model: MyApp\Entity\EntityName
                    interface: MyApp\Entity\EntityKeyInterface
                    controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
                    repository: Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository

For the current this resource, you can use `my_app.entity_key.create`, `my_app.entity_key.update` and `my_app.entity_key.delete` in your translation files.

.. note::

    Cauton: The domain used for translating flash messages is flashes. You need to create your own flashes.local.yml.<commit_msg>Typo and rst syntax fixes<commit_after>Managing flash messages
=======================

By default the resource bundle generate default messages for each action. They use the following translation key pattern
**sylius.resource.actionName** (``actionName`` can be ``create``, ``update`` and ``delete``).

You can manage flash messages by resource, the following pattern **appName.resource.actionName** is used to translate them.

+ **appName:** the name of your application (its default value is sylius)
+ **resource:** the name of your resource
+ **actionName:** the current action (``create``, ``update`` or ``delete``)

Example:

.. code-block:: yaml

    sylius_resource:
        resources:
            my_app.entity_key:
                driver: doctrine/orm
                templates: App:User
                classes:
                    model: MyApp\Entity\EntityName
                    interface: MyApp\Entity\EntityKeyInterface
                    controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
                    repository: Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository

For the current this resource, you can use ``my_app.entity_key.create``, ``my_app.entity_key.update`` and ``my_app.entity_key.delete`` in your translation files.

.. note::

    Caution: The domain used for translating flash messages is flashes. You need to create your own flashes.local.yml.
{'fraction_non_alphanumeric': 0.10287769784172662, 'fraction_numerical': 0.0, 'mean_word_length': 3.175675675675676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1870182', 'n_tokens_mistral': 718, 'n_tokens_neox': 681, 'n_words': 249}