Skip to content

Commit 59a8b76

Browse files
committed
Tweaks and improvements
1 parent 8234465 commit 59a8b76

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

contributing/translations/index.rst

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Contributing Translations
33

44
Some Symfony Components include certain messages that must be translated to
55
different languages. For example, if a user submits a form with a wrong value in
6-
a :doc:`TimezoneType </reference/forms/types/timezone>` field, Symfony shows by
7-
default the following error message: "This value is not a valid timezone."
6+
a :doc:`TimezoneType </reference/forms/types/timezone>` field, Symfony shows the
7+
following error message by default: "This value is not a valid timezone."
88

99
These messages are translated into tens of languages thanks to the Symfony
1010
community. Symfony adds new messages on a regular basis, so this is an ongoing
@@ -21,22 +21,23 @@ Symfony repository. Visit the `Symfony Releases`_ page to find out which is the
2121
current oldest maintained branch.
2222

2323
If you know Git well, clone the Symfony repository and check out that branch.
24-
Otherwise, visit https://github.com/symfony/symfony and switch to that branch.
24+
Otherwise, visit `https://github.com/symfony/symfony <https://github.com/symfony/symfony>`_
25+
and switch to that branch.
2526

26-
**Step 2.** Check out if there's some missing translation in your language.
27-
You only have to check these directories:
27+
**Step 2.** Check out if there's some missing translation in your language by
28+
checking these directories:
2829

2930
* ``src/Symfony/Component/Form/Resources/translations/``
3031
* ``src/Symfony/Component/Security/Core/Resources/translations/``
3132
* ``src/Symfony/Component/Validator/Resources/translations/``
3233

3334
Symfony uses the :ref:`XLIFF format <best-practice-internationalization>` to
3435
store translations. In this example, you are looking for missing Swedish
35-
translations, so you should look for files called ``*.se.xlf``.
36+
translations, so you should look for files called ``*.sv.xlf``.
3637

3738
.. note::
3839

39-
If there's no XLIFF file yet for your language, create it yourself
40+
If there's no XLIFF file for your language yet, create it yourself
4041
duplicating the original English file (e.g. ``validators.en.xlf``).
4142

4243
**Step 3.** Contribute the missing translations. To do that, compare the file
@@ -46,6 +47,8 @@ Imagine that you open the ``validators.sv.xlf`` and see this at the end of the f
4647

4748
.. code-block:: xml
4849
50+
<!-- src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf -->
51+
4952
<!-- ... -->
5053
<trans-unit id="91">
5154
<source>This value should be either negative or zero.</source>
@@ -61,6 +64,8 @@ English file has more messages to translate:
6164

6265
.. code-block:: xml
6366
67+
<!-- src/Symfony/Component/Validator/Resources/translations/validators.en.xlf -->
68+
6469
<!-- ... -->
6570
<trans-unit id="91">
6671
<source>This value should be either negative or zero.</source>
@@ -79,12 +84,14 @@ English file has more messages to translate:
7984
<target>This value should be between {{ min }} and {{ max }}.</target>
8085
</trans-unit>
8186
82-
The messages with ``id = 93`` and ``id = 94`` are missing in the Swedish file.
87+
The messages with ``id=93`` and ``id=94`` are missing in the Swedish file.
8388
Copy and paste the messages from the English file, translate the content
8489
inside the ``<target>`` tag and save the changes.
8590

86-
**Step 4.** Make the pull request against the Symfony GitHub repository. If you
87-
need help, check the other Symfony guides about :doc:`contributing code or docs </contributing/index>`
88-
because the process is the same.
91+
**Step 4.** Make the pull request against the
92+
`https://github.com/symfony/symfony <https://github.com/symfony/symfony>`_ repository.
93+
If you need help, check the other Symfony guides about
94+
:doc:`contributing code or docs </contributing/index>` because the process is
95+
the same.
8996

9097
.. _`Symfony Releases`: https://symfony.com/releases

0 commit comments

Comments
 (0)