diff --git a/book/translation.rst b/book/translation.rst index a4955b05801..7f0c91ff8fb 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -235,7 +235,7 @@ help with message translation of *static blocks of text*: {% trans %}Hello %name%{% endtrans %} {% transchoice count %} - {0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples + {0} There are no apples|{1} There is one apple|]1,Inf[ There are %count% apples {% endtranschoice %} The ``transchoice`` tag automatically gets the ``%count%`` variable from @@ -261,7 +261,7 @@ You can also specify the message domain and pass some additional variables: {% trans with {'%name%': 'Fabien'} from "app" into "fr" %}Hello %name%{% endtrans %} {% transchoice count with {'%name%': 'Fabien'} from "app" %} - {0} %name%, there are no apples|{1} %name%, there is one apple|]1,Inf] %name%, there are %count% apples + {0} %name%, there are no apples|{1} %name%, there is one apple|]1,Inf[ %name%, there are %count% apples {% endtranschoice %} .. _book-translation-filters: diff --git a/components/translation/usage.rst b/components/translation/usage.rst index 16899a1d25c..c76c5753799 100644 --- a/components/translation/usage.rst +++ b/components/translation/usage.rst @@ -311,7 +311,7 @@ use explicit math intervals: .. code-block:: text - '{0} There are no apples|{1} There is one apple|]1,19] There are %count% apples|[20,Inf] There are many apples' + '{0} There are no apples|{1} There is one apple|]1,19[ There are %count% apples|[20,Inf] There are many apples' The intervals follow the `ISO 31-11`_ notation. The above string specifies four different intervals: exactly ``0``, exactly ``1``, ``2-19``, and ``20`` @@ -323,7 +323,7 @@ effect after removing the explicit rules: .. code-block:: text - '{0} There are no apples|[20,Inf] There are many apples|There is one apple|a_few: There are %count% apples' + '{0} There are no apples|[20,Inf[ There are many apples|There is one apple|a_few: There are %count% apples' For example, for ``1`` apple, the standard rule ``There is one apple`` will be used. For ``2-19`` apples, the second standard rule ``There are %count%