Skip to content

Commit

Permalink
minor #5267 fix infinity upper bound (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

fix infinity upper bound

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | #4994

Commits
-------

3d19643 fix infinity upper bound
  • Loading branch information
wouterj committed May 23, 2015
2 parents 2314cfe + 3d19643 commit 43e5c7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions book/translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions components/translation/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand All @@ -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%
Expand Down

0 comments on commit 43e5c7b

Please sign in to comment.