Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
fix(templates/contests): pluralize the word problem correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
bitterteriyaki committed Oct 5, 2023
1 parent 6b27a6c commit cdd8cb6
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions templates/contests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ <h3>Upcoming Contests</h3>
<li>
Duration: {{ contest.start_time|timesince:contest.end_time }}
</li>
<li>
{{ contest.problems.all|length }} problems
</li>
{% if contest.problems.all.count > 0 %}
<li>
{{ contest.problems.all.count }}
problem{{ contest.problems.all.count|pluralize:"s" }}
</li>
{% endif %}
</ul>
</div>
</div>
Expand Down Expand Up @@ -94,9 +97,12 @@ <h3>Past Contests</h3>
<li>
Duration: {{ contest.start_time|timesince:contest.end_time }}
</li>
<li>
{{ contest.problems.all|length }} problems
</li>
{% if contest.problems.all.count > 0 %}
<li>
{{ contest.problems.all.count }}
problem{{ contest.problems.all.count|pluralize:"s" }}
</li>
{% endif %}
</ul>
</div>
</div>
Expand Down

0 comments on commit cdd8cb6

Please sign in to comment.