Skip to content

Commit 37e7cdd

Browse files
committed
Handle plurals for Sponsor titles
1 parent f453647 commit 37e7cdd

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

pmaweb/templates/_sponsors.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
<h2><a href="{% url 'sponsors' %}">Sponsors</a></h2>
55

6-
<h3>Diamond sponsor</h3>
6+
<h3>Diamond sponsor{% if sponsors.diamond|length > 1 %}s{% endif %}</h3>
77

88
<div class="sp diamond">
9-
{% if sponsors.platinum|length == 0 %}
9+
{% if sponsors.diamond|length == 0 %}
1010
This space is available &mdash; contact us to get listed here.
1111
{% endif %}
1212

@@ -18,8 +18,7 @@ <h3>Diamond sponsor</h3>
1818
</div>
1919

2020
{% if sponsors.platinum|length > 0 %}
21-
<h3>Platinum sponsor</h3>
22-
<!--<h3>Platinum sponsors</h3>-->
21+
<h3>Platinum sponsor{% if sponsors.platinum|length > 1 %}s{% endif %}</h3>
2322
{% endif %}
2423

2524
{% for sponsor in sponsors.platinum %}
@@ -29,7 +28,7 @@ <h3>Platinum sponsor</h3>
2928
{% endfor %}
3029

3130
{% if sponsors.gold|length > 0 %}
32-
<h3>Gold sponsors</h3>
31+
<h3>Gold sponsor{% if sponsors.gold|length > 1 %}s{% endif %}</h3>
3332
{% endif %}
3433

3534
{% for sponsor in sponsors.gold %}

pmaweb/templates/sponsors.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,30 @@ <h3>Diamond sponsor</h3>
2020
{% endfor %}
2121

2222
{% if sponsors.platinum|length > 0 %}
23-
<h3>Platinum sponsor</h3>
24-
<!--<h3>Platinum sponsors</h3>-->
23+
<h3>Platinum sponsor{% if sponsors.platinum|length > 1 %}s{% endif %}</h3>
2524
{% endif %}
2625

2726
{% for sponsor in sponsors.platinum %}
2827
{% include '_sponsor.html' %}
2928
{% endfor %}
3029

3130
{% if sponsors.gold|length > 0 %}
32-
<h3>Gold sponsors</h3>
31+
<h3>Gold sponsor{% if sponsors.gold|length > 1 %}s{% endif %}</h3>
3332
{% endif %}
3433

3534
{% for sponsor in sponsors.gold %}
3635
{% include '_sponsor.html' %}
3736
{% endfor %}
3837

39-
<h3>Silver sponsors</h3>
38+
<h3>Silver sponsor{% if sponsors.silver|length > 1 %}s{% endif %}</h3>
4039

4140
<div class="logos">
4241
{% for sponsor in sponsors.silver %}
4342
{% include '_sponsor.html' %}
4443
{% endfor %}
4544
</div>
4645

47-
<h3>Bronze sponsors</h3>
46+
<h3>Bronze sponsor{% if sponsors.bronze|length > 1 %}s{% endif %}</h3>
4847

4948
<div class="logos">
5049
{% for sponsor in sponsors.bronze %}

0 commit comments

Comments
 (0)