Skip to content
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

fix infinity upper bound #5267

Merged
merged 1 commit into from
May 23, 2015
Merged
Show file tree
Hide file tree
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
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