Skip to content

[Translation] TransChoice invalide plural translation #11425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,18 @@ method or the ``transchoice`` tag/filter in your :ref:`template <translation-tag
For much more information, see :ref:`component-translation-pluralization`
in the Translation component documentation.


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This blank line should be removed

.. deprecated:: 4.2

In Symfony 4.2 the ``Translator::transChoice()`` method was deprecated in
favor of using ``Translator::trans()`` with ``%count%`` as the parameter
driving plurals.


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This blank line should be removed

.. tip::

Since Symfony 4.3 you can pass the ``kernel.debug`` parameter to the last parameter of ``Translator::trans()``
to avoid getting an exception when trying to translate a pluralized content with missing parts.

Translations in Templates
-------------------------
Expand Down