Opened 19 years ago
Closed 19 years ago
#4281 closed (fixed)
Error in the documentation example
| Reported by: | Indy | Owned by: | Jacob |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| 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: | no | UI/UX: | no |
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 by , 19 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:2 by , 19 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [5207]) Fixed #4281 -- Fixed error in docs/i18n.txt example