Skip to content

Commit

Permalink
minor #20571 Update translation.rst (nassimlnd)
Browse files Browse the repository at this point in the history
This PR was submitted for the 7.1 branch but it was merged into the 6.4 branch instead.

Discussion
----------

Update translation.rst

The translation is incorrect. “Symfony is great” in French is correctly translated as “Symfony est génial.”

Commits
-------

cc4f5c5 Update translations
  • Loading branch information
javiereguiluz committed Jan 23, 2025
2 parents 09328e7 + cc4f5c5 commit 8dfe867
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ different formats:
.. code-block:: yaml
# translations/messages.fr.yaml
Symfony is great: J'aime Symfony
Symfony is great: Symfony est génial
.. code-block:: xml
Expand All @@ -156,7 +156,7 @@ different formats:
<body>
<trans-unit id="symfony_is_great">
<source>Symfony is great</source>
<target>J'aime Symfony</target>
<target>Symfony est génial</target>
</trans-unit>
</body>
</file>
Expand All @@ -166,14 +166,14 @@ different formats:
// translations/messages.fr.php
return [
'Symfony is great' => "J'aime Symfony",
'Symfony is great' => 'Symfony est génial',
];
You can find more information on where these files
:ref:`should be located <translation-resource-locations>`.

Now, if the language of the user's locale is French (e.g. ``fr_FR`` or ``fr_BE``),
the message will be translated into ``J'aime Symfony``. You can also translate
the message will be translated into ``Symfony est génial``. You can also translate
the message inside your :ref:`templates <translation-in-templates>`.

.. _translation-real-vs-keyword-messages:
Expand Down Expand Up @@ -1219,7 +1219,7 @@ for the ``fr`` locale:
<body>
<trans-unit id="1">
<source>Symfony is great</source>
<target>J'aime Symfony</target>
<target>Symfony est génial</target>
</trans-unit>
</body>
</file>
Expand All @@ -1228,13 +1228,13 @@ for the ``fr`` locale:
.. code-block:: yaml
# translations/messages.fr.yaml
Symfony is great: J'aime Symfony
Symfony is great: Symfony est génial
.. code-block:: php
// translations/messages.fr.php
return [
'Symfony is great' => 'J\'aime Symfony',
'Symfony is great' => 'Symfony est génial',
];
and for the ``en`` locale:
Expand Down Expand Up @@ -1277,7 +1277,7 @@ To inspect all messages in the ``fr`` locale for the application, run:
--------- ------------------ ---------------------- -------------------------------
State Id Message Preview (fr) Fallback Message Preview (en)
--------- ------------------ ---------------------- -------------------------------
unused Symfony is great J'aime Symfony Symfony is great
unused Symfony is great Symfony est génial Symfony is great
--------- ------------------ ---------------------- -------------------------------
It shows you a table with the result when translating the message in the ``fr``
Expand All @@ -1297,7 +1297,7 @@ output:
--------- ------------------ ---------------------- -------------------------------
State Id Message Preview (fr) Fallback Message Preview (en)
--------- ------------------ ---------------------- -------------------------------
Symfony is great J'aime Symfony Symfony is great
Symfony is great Symfony est génial Symfony is great
--------- ------------------ ---------------------- -------------------------------
The state is empty which means the message is translated in the ``fr`` locale
Expand Down

0 comments on commit 8dfe867

Please sign in to comment.