Skip to content

Commit

Permalink
fixup! Show results table only when data exists
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed Sep 18, 2023
1 parent b4d20ae commit c15f952
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 55 deletions.
76 changes: 45 additions & 31 deletions locale/cy/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-13 14:36+0100\n"
"POT-Creation-Date: 2023-09-18 18:19+0100\n"
"PO-Revision-Date: 2022-03-24 09:04+0000\n"
"Last-Translator: Sym Roe <[email protected]>, 2022\n"
"Language-Team: Welsh (https://www.transifex.com/democracy-club/teams/61326/"
Expand All @@ -29,21 +29,21 @@ msgstr ""
msgid "Enter your postcode"
msgstr "Rhowch eich cod post"

#: wcivf/apps/elections/models.py:660
#: wcivf/apps/elections/models.py:672
msgid "First-past-the-post"
msgstr "Y Cyntaf i’r Felin"

#: wcivf/apps/elections/models.py:662
#: wcivf/apps/elections/models.py:674
#, fuzzy
#| msgid "The Additional Member System"
msgid "Additional Member System"
msgstr "Y System Aelodau Ychwanegol"

#: wcivf/apps/elections/models.py:664
#: wcivf/apps/elections/models.py:676
msgid "Supplementary Vote"
msgstr "Pleidlais Atodol"

#: wcivf/apps/elections/models.py:666
#: wcivf/apps/elections/models.py:678
msgid "Single Transferable Vote"
msgstr "Pleidlais Sengl Drosglwyddadwy"

Expand Down Expand Up @@ -752,60 +752,58 @@ msgstr ""
"helpu i wella'r dudalen hon: <a href=\"%(ynr_link)s\"> ychwanegwch wybodaeth "
"am ymgeiswyr i'n cronfa ddata</a>."

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:138
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:130
#, fuzzy
#| msgid "Elected (vote count not available)"
msgid "Electorate not available"
msgstr "Etholwyr ddim ar gael"
#| msgid "Elected"
msgid "Electorate"
msgstr "Etholwyd"

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:144
#, fuzzy
#| msgid "Elected (vote count not available)"
msgid "Turnout not available"
msgstr "Nid yw'r cyfrif pleidleisiau ar gael"
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:133
msgid "Turnout"
msgstr "Canran y Pleidleiswyr"

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:150
msgid "Number of ballot papers issued not available"
msgstr "Nid yw nifer y papurau pleidleisio a roddwyd ar gael"
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:136
msgid "Ballot Papers Issued"
msgstr "Nifer y Papurau Pleidleisio a Gyhoeddwyd"

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:156
msgid "Number of spoilt ballots not available"
msgstr "Nifer y pleidleisiau a ddifethwyd ddim ar gael"
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:139
msgid "Spoilt Ballots"
msgstr "Pleidleisiau Difetha"

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:175
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:174
#, python-format
msgid ""
"The <a href=\"%(sopn_url)s\">official candidate list</a> has been published."
msgstr ""
"Mae'r <a href=\"%(sopn_url)s\">rhestr swyddogol o ymgeiswyr</a> wedi'i "
"chyhoeddi."

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:180
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:179
msgid "The official candidate list should have been published on"
msgstr "Dylai'r rhestr swyddogol o ymgeiswyr fod wedi'i chyhoeddi ar "

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:182
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:181
msgid "The official candidate list should be published on"
msgstr "Dylai'r rhestr swyddogol o ymgeiswyr gael ei chyhoeddi ar"

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:190
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:189
msgid "Read the official candidate booklet for this election."
msgstr "Darllenwch y llyfryn ymgeiswyr swyddogol ar gyfer yr etholiad hwn."

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:194
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:193
#, python-format
msgid " %(description)s "
msgstr " %(description)s "

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:202
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:201
msgid "Can you vote in this election?"
msgstr "A allwch chi bleidleisio yn yr etholiad hwn?"

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:203
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:202
msgid "Age"
msgstr "Oedran"

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:205
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:204
#, python-format
msgid ""
"You need to be over %(voter_age)s on the %(voter_age_date)s of "
Expand All @@ -814,16 +812,16 @@ msgstr ""
"Mae angen i chi fod dros %(voter_age)s ar %(voter_age_date)s "
"%(election_date)s i bleidleisio yn yr etholiad hwn."

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:210
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:209
msgid "Citizenship"
msgstr "Dinasyddiaeth"

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:230
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:229
#: wcivf/apps/people/templates/people/includes/_person_about_card.html:9
msgid "Wikipedia"
msgstr "Wikipedia"

#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:232
#: wcivf/apps/elections/templates/elections/includes/_single_ballot.html:231
#: wcivf/apps/people/templates/people/includes/_person_about_card.html:11
msgid "Read more on Wikipedia"
msgstr "Darllenwch fwy ar Wikipedia"
Expand Down Expand Up @@ -2188,6 +2186,22 @@ msgstr "Etholiadau i ddod"
msgid "Join our mailing list"
msgstr "Ymunwch â'n rhestr bostio"

#, fuzzy
#~| msgid "Elected (vote count not available)"
#~ msgid "Electorate not available"
#~ msgstr "Etholwyr ddim ar gael"

#, fuzzy
#~| msgid "Elected (vote count not available)"
#~ msgid "Turnout not available"
#~ msgstr "Nid yw'r cyfrif pleidleisiau ar gael"

#~ msgid "Number of ballot papers issued not available"
#~ msgstr "Nid yw nifer y papurau pleidleisio a roddwyd ar gael"

#~ msgid "Number of spoilt ballots not available"
#~ msgstr "Nifer y pleidleisiau a ddifethwyd ddim ar gael"

#, python-format
#~ msgid "%(post_label)s: %(election)s"
#~ msgstr "%(post_label)s: %(election)s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,36 +126,35 @@ <h3>{% if postelection.is_london_assembly_additional %}{% trans "Additional memb
<div class="ds-table">
<table>
<tr>
<th>Electorate</th>
<th>Turnout</th>
<th>Ballot Papers Issued</th>
<th>Spoilt Ballots</th>
{% if postelection.election.electorate %}
<th>{% trans "Electorate" %}</th>
{% endif %}
{% if postelection.election.turnout %}
<th>{% trans "Turnout" %} </th>
{% endif %}
{% if postelection.election.ballot_papers_issued %}
<th>{% trans "Ballot Papers Issued" %}</th>
{% endif %}
{% if postelection.election.spoilt_ballots %}
<th>{% trans "Spoilt Ballots" %}</th>
{% endif %}
</tr>
<tr>
<td>{% if postelection.election.electorate %}
{{ postelection.election.electorate }}
{% else %}
{% trans "None" %}
{% if postelection.election.electorate %}
<td>{{ postelection.election.electorate }}</td>
{% endif %}
</td>
<td>{% if postelection.election.turnout %}
{{ postelection.election.turnout|stringformat:"d%%" }}
{% else %}
{% trans "None" %}

{% if postelection.election.turnout %}
<td>{{ postelection.election.turnout|stringformat:"d%%" }}</td>
{% endif %}
</td>
<td>{% if postelection.election.ballot_papers_issued %}
{{ postelection.election.ballot_papers_issued }}
{% else %}
{% trans "None" %}

{% if postelection.election.ballot_papers_issued %}
<td>{{ postelection.election.ballot_papers_issued }}</td>
{% endif %}
</td>
<td>{% if postelection.election.spoilt_ballots %}
{{ postelection.election.spoilt_ballots }}
{% else %}
{% trans "None" %}

{% if postelection.election.spoilt_ballots %}
<td>{{ postelection.election.spoilt_ballots }}</td>
{% endif %}
</td>
</tr>
</table>
</div>
Expand Down

0 comments on commit c15f952

Please sign in to comment.