Skip to content

Commit 2bd7f86

Browse files
committed
Removed further usage of transchoice in the docs
1 parent 0d29e3a commit 2bd7f86

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

reference/twig_reference.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,12 @@ Translates the text into the current language. More information in
359359
transchoice
360360
~~~~~~~~~~~
361361

362+
.. deprecated:: 4.2
363+
364+
The ``transchoice`` filter is deprecated since Symfony 4.2 and will be
365+
removed in 5.0. Use the :doc:`ICU MessageFormat </translation/message_format>` with
366+
the ``trans`` filter instead.
367+
362368
.. code-block:: twig
363369
364370
{{ message|transchoice(count, arguments = [], domain = null, locale = null) }}
@@ -588,6 +594,12 @@ Renders the translation of the content. More information in :ref:`translation-ta
588594
transchoice
589595
~~~~~~~~~~~
590596

597+
.. deprecated:: 4.2
598+
599+
The ``transchoice`` tag is deprecated since Symfony 4.2 and will be
600+
removed in 5.0. Use the :doc:`ICU MessageFormat </translation/message_format>` with
601+
the ``trans`` tag instead.
602+
591603
.. code-block:: twig
592604
593605
{% transchoice count with vars from domain into locale %}{% endtranschoice %}

translation/debug.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@ command helps you to find these missing or unused translation messages templates
1212

1313
.. code-block:: twig
1414
15-
{# messages can be found when using the trans/transchoice filters and tags #}
15+
{# messages can be found when using the trans filter and tag #}
1616
{% trans %}Symfony is great{% endtrans %}
1717
1818
{{ 'Symfony is great'|trans }}
1919
20-
{{ 'Symfony is great'|transchoice(1) }}
21-
22-
{% transchoice 1 %}Symfony is great{% endtranschoice %}
23-
2420
.. caution::
2521

2622
The extractors can't find messages translated outside templates, like form

translation/templates.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ The ``transchoice`` tag automatically gets the ``%count%`` variable from
2424
the current context and passes it to the translator. This mechanism only
2525
works when you use a placeholder following the ``%var%`` pattern.
2626

27+
.. deprecated:: 4.2
28+
29+
The ``transchoice`` tag is deprecated since Symfony 4.2 and will be
30+
removed in 5.0. Use the :doc:`ICU MessageFormat </translation/message_format>` with
31+
the ``trans`` tag instead.
32+
2733
.. caution::
2834

2935
The ``%var%`` notation of placeholders is required when translating in
@@ -64,6 +70,12 @@ texts* and complex expressions:
6470
6571
{{ message|transchoice(5, {'%name%': 'Fabien'}, 'app') }}
6672
73+
.. deprecated:: 4.2
74+
75+
The ``transchoice`` filter is deprecated since Symfony 4.2 and will be
76+
removed in 5.0. Use the :doc:`ICU MessageFormat </translation/message_format>` with
77+
the ``trans`` filter instead.
78+
6779
.. tip::
6880

6981
Using the translation tags or filters have the same effect, but with

0 commit comments

Comments
 (0)