Opened 8 years ago

Closed 8 years ago

#4281 closed (fixed)

Error in the documentation example

Reported by: Indy Owned by: jacob
Component: Documentation Version: master
Severity: Keywords: blocktrans, count
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The following i18n documentation example doesn't work, because there is no count filter by default:

{% blocktrans count list|count as counter %}
There is only one {{ name }} object.
{% plural %}
There are {{ counter }} {{ name }} objects.
{% endblocktrans %}

The correct version:

{% blocktrans count list|length as counter %}
There is only one {{ name }} object.
{% plural %}
There are {{ counter }} {{ name }} objects.
{% endblocktrans %}

Change History (2)

comment:1 Changed 8 years ago by Gary Wilson <gary.wilson@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [5207]) Fixed #4281 -- Fixed error in docs/i18n.txt example

Note: See TracTickets for help on using tickets.
Back to Top