Skip to content

Commit

Permalink
Correctly pluralse "man"/"woman" in progress bars
Browse files Browse the repository at this point in the history
  • Loading branch information
zarino authored and chrismytton committed Jun 30, 2016
1 parent d4211c7 commit 3e23974
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions views/country_partial.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@
<p class="country__progress__intro">Known gender balance for <%= country.name %>:</p>
<div class="progress-bar progress-bar--gendered progress-bar--labelled">
<div class="progress-bar__males" style="width: <%= country.gender_percentage(:male) %>%">
<span class="progress-bar__label"><%= country.total_male %> men</span>
<span class="progress-bar__label">
<%= country.total_male %>
<%= country.total_male == 1 ? 'man' : 'men' %>
</span>
</div>
<div class="progress-bar__females" style="width: <%= country.gender_percentage(:female) %>%">
<span class="progress-bar__label"><%= country.total_female %> women</span>
<span class="progress-bar__label">
<%= country.total_female %>
<%= country.total_female == 1 ? 'woman' : 'women' %>
</span>
</div>
</div>
<% else %>
Expand Down

0 comments on commit 3e23974

Please sign in to comment.