From 1724fc82d093de59a9bc28e0abe4a3085f2e95ad Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 08:33:58 +0100 Subject: [PATCH 01/12] Misc translation fixes - replace footer translations - improve election timetables tags for translation - add missing punctuation --- locale/cy/LC_MESSAGES/django.po | 80 ++++++++++++------- locale/en/LC_MESSAGES/django.po | 46 +++++------ .../elections/includes/_polling_place.html | 2 +- .../ppc_2024/templates/ppc_2024/home.html | 9 ++- 4 files changed, 77 insertions(+), 60 deletions(-) diff --git a/locale/cy/LC_MESSAGES/django.po b/locale/cy/LC_MESSAGES/django.po index 930f65ac3..004f7744b 100644 --- a/locale/cy/LC_MESSAGES/django.po +++ b/locale/cy/LC_MESSAGES/django.po @@ -29,19 +29,46 @@ msgstr "" msgid "Enter your postcode" msgstr "Rhowch eich cod post" -#: wcivf/apps/elections/models.py:735 +#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:53 +msgid "Join our mailing list" +msgstr "Ymunwch â'n rhestr bostio" + +#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:64 +msgid "democracy" +msgstr "democratiaeth" + +#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:64 +msgid "club" +msgstr "clwb" + +#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:69 +msgid "Copyright" +msgstr "Hawlfraint" + +#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:70 +msgid "Democracy Club Community Interest Company" +msgstr "Cwmni Buddiannau Cymunedol y Clwb Democratiaeth" + +#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:71 +msgid "Company No: " +msgstr "Rhif y Cwmni: " + +#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:73 +msgid "Building digital infrastructure for a 21st century democracy." +msgstr "Adeiladu seilwaith digidol ar gyfer democratiaeth yn yr 21ain ganrif." + msgid "First-past-the-post" msgstr "Y Cyntaf i’r Felin" -#: wcivf/apps/elections/models.py:737 +#: wcivf/apps/elections/models.py:743 msgid "Additional Member System" msgstr "Y System Aelodau Ychwanegol" -#: wcivf/apps/elections/models.py:739 +#: wcivf/apps/elections/models.py:745 msgid "Supplementary Vote" msgstr "Pleidlais Atodol" -#: wcivf/apps/elections/models.py:741 +#: wcivf/apps/elections/models.py:747 msgid "Single Transferable Vote" msgstr "Pleidlais Sengl Drosglwyddadwy" @@ -511,7 +538,7 @@ msgid "
%(polling_station_address)s
" msgstr "" #: wcivf/apps/elections/templates/elections/includes/_polling_place.html:57 -msgid "It will be open from 7am to 10pm" +msgid "It will be open from 7am to 10pm." msgstr "Bydd ar agor o 7am tan 10pm." #: wcivf/apps/elections/templates/elections/includes/_polling_place.html:63 @@ -1116,8 +1143,8 @@ msgid "Tweets by" msgstr "Trydariadau gan" #: wcivf/apps/elections/templates/elections/party_list_view.html:71 -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:66 -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:91 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:67 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:92 msgid "Candidates" msgstr "Ymgeiswyr" @@ -2035,7 +2062,7 @@ msgid "Election" msgstr "Etholiad" #: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:11 -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:90 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:91 #: wcivf/apps/ppc_2024/templates/ppc_2024/ppcperson_list.html:45 msgid "Party" msgstr "Plaid" @@ -2350,24 +2377,19 @@ msgid "Timetable" msgstr "Amserlen" #: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:43 -#, fuzzy -#| msgid "About Democracy Club" -msgid "Democracy Club's" -msgstr "Ynglŷn â'r Clwb Democratiaeth" - -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:44 -msgid "general election timetable generator" -msgstr "cynhyrchydd amserlen etholiad cyffredinol" - -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:44 -msgid "provides an election timetable for any given date" -msgstr "yn darparu amserlen etholiad ar gyfer unrhyw ddyddiad penodol" +msgid "" +"Democracy Club's general election " +"timetable generator provides an election timetable for any given date" +msgstr "" +"Etholiad cyffredinol Clwb " +"Democratiaeth Mae cynhyrchydd amserlen yn darparu amserlen etholiad ar " +"gyfer unrhyw ddyddiad penodol" -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:50 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:51 msgid "The data" msgstr "Y data" -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:54 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:55 #, python-format msgid "" "The full list of prospective parliamentary candidates is available as a %(polling_station_address)s" msgstr "" #: wcivf/apps/elections/templates/elections/includes/_polling_place.html:57 -msgid "It will be open from 7am to 10pm" +msgid "It will be open from 7am to 10pm." msgstr "" #: wcivf/apps/elections/templates/elections/includes/_polling_place.html:63 @@ -936,8 +936,8 @@ msgid "Tweets by" msgstr "" #: wcivf/apps/elections/templates/elections/party_list_view.html:71 -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:66 -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:91 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:67 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:92 msgid "Candidates" msgstr "" @@ -1352,7 +1352,6 @@ msgid "" "\">their role in elections on the parliament.uk website." msgstr "" - #: wcivf/apps/people/models.py:78 msgid "Elected unopposed" msgstr "Etholwyd yn ddiwrthwynebiad" @@ -1725,7 +1724,7 @@ msgid "Election" msgstr "" #: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:11 -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:90 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:91 #: wcivf/apps/ppc_2024/templates/ppc_2024/ppcperson_list.html:45 msgid "Party" msgstr "" @@ -1979,22 +1978,17 @@ msgid "Timetable" msgstr "" #: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:43 -msgid "Democracy Club's" -msgstr "" - -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:44 -msgid "general election timetable generator" -msgstr "" - -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:44 -msgid "provides an election timetable for any given date" +#, python-format +msgid "" +"Democracy Club's general election " +"timetable generator provides an election timetable for any given date" msgstr "" -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:50 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:51 msgid "The data" msgstr "" -#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:54 +#: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:55 #, python-format msgid "" "The full list of prospective parliamentary candidates is available as a {% trans "Vote on polling day" %}
{{ polling_station_address }}
{% endblocktrans %}

- {% blocktrans trimmed %}It will be open from 7am to 10pm{% endblocktrans %} + {% blocktrans trimmed %}It will be open from 7am to 10pm.{% endblocktrans %} {% for election in elections_by_date %} {{ election.grouper|naturalday:"\o\n l j F Y" }} diff --git a/wcivf/apps/ppc_2024/templates/ppc_2024/home.html b/wcivf/apps/ppc_2024/templates/ppc_2024/home.html index 921a0270e..f21a1fce6 100644 --- a/wcivf/apps/ppc_2024/templates/ppc_2024/home.html +++ b/wcivf/apps/ppc_2024/templates/ppc_2024/home.html @@ -40,10 +40,11 @@

{% trans "MPs standing down" %}

{% trans "Visit the website of the Institute for Government for a full list" %}
.

{% trans "Timetable" %}

-

{% trans "Democracy Club's" %} - {% trans "general election timetable generator" %} {% trans "provides an election timetable for any given date" %}.

- - +

{% blocktrans trimmed with election_timetable_url="https://election-timetable.democracyclub.org.uk/" %} + Democracy Club's general election timetable generator + provides an election timetable for any given date + {% endblocktrans %} +

From c3c3146bc374badf1b287b861c19b66f0a3c8546 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 10:50:43 +0100 Subject: [PATCH 02/12] Add photo ID link to voter id section --- locale/cy/LC_MESSAGES/django.po | 9 ++++++--- locale/en/LC_MESSAGES/django.po | 6 ++++-- .../templates/elections/includes/_voter_id.html | 5 ++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/locale/cy/LC_MESSAGES/django.po b/locale/cy/LC_MESSAGES/django.po index 004f7744b..19a7c177d 100644 --- a/locale/cy/LC_MESSAGES/django.po +++ b/locale/cy/LC_MESSAGES/django.po @@ -999,13 +999,16 @@ msgstr "" #: wcivf/apps/elections/templates/elections/includes/_voter_id.html:15 msgid "" "You do not need your poll card to vote. You must vote at your assigned " -"polling station. Read more about voting in Great Britain." +"polling station. " msgstr "" "Nid oes angen eich cerdyn pleidleisio arnoch i bleidleisio. Rhaid i chi " "bleidleisio yn yr un a neilltuwyd i chiorsaf bleidleisio. Darllenwch fwy am " "pleidleisio ym Mhrydain Fawr." +"stations\">pleidleisio ym Mhrydain Fawr.
  • Darllenwch fwy am ID llun.
  • " #: wcivf/apps/elections/templates/elections/includes/eu_results.html:7 #: wcivf/apps/elections/templates/elections/includes/eu_results.html:15 diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 3b873f4ae..5def341b7 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -810,8 +810,10 @@ msgstr "" #: wcivf/apps/elections/templates/elections/includes/_voter_id.html:15 msgid "" "You do not need your poll card to vote. You must vote at your assigned " -"polling station. Read more about voting in Great Britain." +"polling station. " msgstr "" #: wcivf/apps/elections/templates/elections/includes/eu_results.html:7 diff --git a/wcivf/apps/elections/templates/elections/includes/_voter_id.html b/wcivf/apps/elections/templates/elections/includes/_voter_id.html index fd4763b5a..62f53cbb1 100644 --- a/wcivf/apps/elections/templates/elections/includes/_voter_id.html +++ b/wcivf/apps/elections/templates/elections/includes/_voter_id.html @@ -13,7 +13,10 @@

    {% blocktrans trimmed %}You do not need your poll card to vote. You must vote at your assigned polling station. - Read more about voting in Great Britain. +

    {% endblocktrans %}

    From fa977e39920a5776a955a0591628dd6d4763a255 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 11:00:59 +0100 Subject: [PATCH 03/12] Format date as DD MM YYYY --- wcivf/apps/elections/templates/elections/election_view.html | 4 ++-- .../templates/elections/includes/_election_list.html | 4 +++- .../templates/elections/includes/_post_meta_description.html | 2 +- .../templates/elections/includes/_registration_details.html | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/wcivf/apps/elections/templates/elections/election_view.html b/wcivf/apps/elections/templates/elections/election_view.html index f88e7cd96..ecf442b2b 100644 --- a/wcivf/apps/elections/templates/elections/election_view.html +++ b/wcivf/apps/elections/templates/elections/election_view.html @@ -5,9 +5,9 @@ {% block page_title %}{{ object.name }}{% endblock page_title %} {% block og_title_content %}{{ object.name }}{% endblock og_title_content %} {% block og_description_content %} - {% blocktrans trimmed with was_or_will_be=object.in_past|yesno:"was, will be" election=object.name date=object.election_date %}The {{ election }} {{ was_or_will_be }} held on {{ date }}.{% endblocktrans %}{% endblock og_description_content %} + {% blocktrans trimmed with was_or_will_be=object.in_past|yesno:"was, will be" election=object.name date=object.election_date|date:"j M Y" %}The {{ election }} {{ was_or_will_be }} held on {{ date }}.{% endblocktrans %}{% endblock og_description_content %} {% block twitter_title_content %}{{ object.name }}{% endblock twitter_title_content %}> -{% block twitter_description_content %}{% blocktrans trimmed with was_or_will_be=object.in_past|yesno:"was, will be" election=object.name date=object.election_date %}The {{ election }} {{ was_or_will_be }} held on {{ date }}.{% endblocktrans %}{% endblock twitter_description_content %}/> +{% block twitter_description_content %}{% blocktrans trimmed with was_or_will_be=object.in_past|yesno:"was, will be" election=object.name date=object.election_date|date:"j M Y" %}The {{ election }} {{ was_or_will_be }} held on {{ date }}.{% endblocktrans %}{% endblock twitter_description_content %}/> {% block content %} diff --git a/wcivf/apps/elections/templates/elections/includes/_election_list.html b/wcivf/apps/elections/templates/elections/includes/_election_list.html index ee02c559d..3a30a8044 100644 --- a/wcivf/apps/elections/templates/elections/includes/_election_list.html +++ b/wcivf/apps/elections/templates/elections/includes/_election_list.html @@ -1,8 +1,10 @@ {% load i18n %} + {% regroup elections by election_date as elections_by_type %} {% for election_group in elections_by_type %}

    - {{ election_group.grouper }} + {{ election_group.grouper|date:"j F Y" }} +

    {% for election in election_group.list %} diff --git a/wcivf/apps/elections/templates/elections/includes/_post_meta_description.html b/wcivf/apps/elections/templates/elections/includes/_post_meta_description.html index 1a7c7e10f..544fcf6e5 100644 --- a/wcivf/apps/elections/templates/elections/includes/_post_meta_description.html +++ b/wcivf/apps/elections/templates/elections/includes/_post_meta_description.html @@ -4,7 +4,7 @@ {% blocktrans with election_name=object.election.name %}{{ election_name }}: This election has been cancelled. {% endblocktrans %} {% elif postelection.people|length %} {% autoescape off %} - {% blocktrans trimmed with election_name=object.election.name num_candidates=postelection.people|length election_date=object.election.election_date %} + {% blocktrans trimmed with election_name=object.election.name num_candidates=postelection.people|length election_date=object.election.election_date|date:"j M Y" %} See all {{ num_candidates }} candidates in the {{ election_name }} on {{ election_date }}:{% endblocktrans %} {% for pp in postelection.people %} {{ pp.person.name|safe }} ({{ pp.party_name }}) diff --git a/wcivf/apps/elections/templates/elections/includes/_registration_details.html b/wcivf/apps/elections/templates/elections/includes/_registration_details.html index 14bb7be4e..65db904ca 100644 --- a/wcivf/apps/elections/templates/elections/includes/_registration_details.html +++ b/wcivf/apps/elections/templates/elections/includes/_registration_details.html @@ -22,7 +22,7 @@

    {% if postelection %}

    - {% blocktrans trimmed with registration_deadline=postelection.registration_deadline election_date=postelection.election.election_date%} + {% blocktrans trimmed with registration_deadline=postelection.registration_deadline election_date=postelection.election.election_date|date:"j M Y" %} Register before midnight on {{ registration_deadline }} to vote on {{ election_date }}. {% endblocktrans %}

    From 340b088f6c7f5ad222534e0ff63351b810e4c49a Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 16:19:24 +0100 Subject: [PATCH 04/12] Differentiate election names Relevant when there are two types in the same ward --- .../people/includes/_person_previous_elections_card.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html b/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html index 55172e3ae..7f69d528e 100644 --- a/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html +++ b/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html @@ -21,7 +21,7 @@

    {% blocktrans trimmed with person_name=object.name %}{{ person {{ person_post.election.election_date|date:"Y" }} - {{ person_post.post.label }}: {{ person_post.election }} + {{ person_post.post.label }}: {{ person_post.election.nice_election_name }} {{ person_post.party_name }} From 9c65c1377cedf604831961b78323aa0a3d186f53 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 16:33:27 +0100 Subject: [PATCH 05/12] Elections database only goes back to 2016 This also reformats the table header as a table caption --- locale/cy/LC_MESSAGES/django.po | 132 +++++++++++++----- locale/en/LC_MESSAGES/django.po | 53 +++---- .../_person_previous_elections_card.html | 3 +- 3 files changed, 113 insertions(+), 75 deletions(-) diff --git a/locale/cy/LC_MESSAGES/django.po b/locale/cy/LC_MESSAGES/django.po index 19a7c177d..1e3088ea4 100644 --- a/locale/cy/LC_MESSAGES/django.po +++ b/locale/cy/LC_MESSAGES/django.po @@ -29,34 +29,7 @@ msgstr "" msgid "Enter your postcode" msgstr "Rhowch eich cod post" -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:53 -msgid "Join our mailing list" -msgstr "Ymunwch â'n rhestr bostio" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:64 -msgid "democracy" -msgstr "democratiaeth" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:64 -msgid "club" -msgstr "clwb" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:69 -msgid "Copyright" -msgstr "Hawlfraint" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:70 -msgid "Democracy Club Community Interest Company" -msgstr "Cwmni Buddiannau Cymunedol y Clwb Democratiaeth" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:71 -msgid "Company No: " -msgstr "Rhif y Cwmni: " - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:73 -msgid "Building digital infrastructure for a 21st century democracy." -msgstr "Adeiladu seilwaith digidol ar gyfer democratiaeth yn yr 21ain ganrif." - +#: wcivf/apps/elections/models.py:741 msgid "First-past-the-post" msgstr "Y Cyntaf i’r Felin" @@ -144,7 +117,7 @@ msgid "All Elections in the UK" msgstr "Pob Etholiad yn y DU" #: wcivf/apps/elections/templates/elections/elections_view.html:16 -#: wcivf/templates/base.html:106 +#: wcivf/templates/base.html:102 msgid "All Elections" msgstr "Pob Etholiad" @@ -366,7 +339,7 @@ msgstr "Rydych chi yma" #: wcivf/apps/parties/templates/parties/party_detail.html:17 #: wcivf/apps/parties/templates/parties/speaker_seeking_reelection.html:17 #: wcivf/apps/people/templates/people/person_detail.html:31 -#: wcivf/templates/base.html:105 +#: wcivf/templates/base.html:101 msgid "Home" msgstr "Cartref" @@ -433,10 +406,15 @@ msgid "Read the instructions at the top of your ballot paper carefully." msgstr "Darllenwch y cyfarwyddiadau ar frig eich papur pleidleisio yn ofalus." #: wcivf/apps/elections/templates/elections/includes/_how-to-vote.html:84 +#, fuzzy +#| msgid "" +#| "For more information, visit The Electoral Commission's website or ask an official at your polling station." msgid "" "For more information, visit The Electoral Commission's website or " -"ask an official at your polling station." +"i-am-a/voter\">The Electoral Commission's website or ask an official at " +"your polling station." msgstr "" "Am fwy o wybodaeth, ewch i Wefan y Comisiwn Etholiadol neu " @@ -1051,8 +1029,8 @@ msgid "" "Commission website." msgstr "" "Am fwy o wybodaeth, ewch i Wefan y Comisiwn Etholiadol neu " -"gofynnwch i swyddog yn eich gorsaf bleidleisio." +"am-a/voter/\">Wefan y Comisiwn Etholiadol neu gofynnwch i swyddog yn " +"eich gorsaf bleidleisio." #: wcivf/apps/elections/templates/elections/includes/inline_elections_nav_list.html:11 msgid "Select your address" @@ -1719,7 +1697,7 @@ msgid "%(person_name)s's Facebook page" msgstr "Tudalen Facebook %(person_name)s" #: wcivf/apps/people/templates/people/includes/_person_contact_card.html:33 -#: wcivf/templates/base.html:115 +#: wcivf/templates/base.html:111 msgid "Twitter" msgstr "Trydar" @@ -1754,7 +1732,7 @@ msgid "%(person_name)s's home page" msgstr "Hafan %(person_name)s" #: wcivf/apps/people/templates/people/includes/_person_contact_card.html:77 -#: wcivf/templates/base.html:114 +#: wcivf/templates/base.html:110 msgid "Blog" msgstr "Blog" @@ -2055,7 +2033,7 @@ msgstr "ar TheyWorkForYou" msgid "their speeches, voting history and more" msgstr "eu hareithiau, eu hanes pleidleisio a mwy" -#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:6 +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:7 #, python-format msgid "%(person_name)s's elections" msgstr "Etholiadau %(person_name)s" @@ -2082,10 +2060,25 @@ msgstr "" msgid "Position" msgstr "Sefyllfa" -#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:42 +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:30 +msgid "We do not collect voting data for Supplementary Vote elections." +msgstr "" +"Nid ydym yn casglu data pleidleisio ar gyfer etholiadau Pleidlais Atodol." + +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:32 +msgid "We do not collect voting data for Single Transferable Vote elections." +msgstr "" +"Nid ydym yn casglu data pleidleisio ar gyfer etholiad Pleidlais Sengl " +"Drosglwyddadwy." + +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:48 msgid "Position not available" msgstr "Nid yw'r cyfrif pleidleisiau ar gael" +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:54 +msgid "Please note our local elections database only goes back to 2016." +msgstr "Sylwch fod ein cronfa ddata etholiadau lleol yn mynd yn ôl i 2016 yn unig." + #: wcivf/apps/people/templates/people/includes/intros/_constituency.html:5 #, python-format msgid "" @@ -2380,6 +2373,7 @@ msgid "Timetable" msgstr "Amserlen" #: wcivf/apps/ppc_2024/templates/ppc_2024/home.html:43 +#, python-format msgid "" "Democracy Club's general election " "timetable generator provides an election timetable for any given date" @@ -2592,6 +2586,46 @@ msgstr "Iaith:" #: wcivf/templates/base.html:87 msgid "" +"We're collecting results as they are published. Please check back later." +msgstr "" +"Rydym yn casglu canlyniadau wrth iddynt gael eu cyhoeddi. Gwiriwch yn ôl yn " +"nes ymlaen." + +#: wcivf/templates/base.html:103 +msgid "All Parties" +msgstr "Pob plaid" + +#: wcivf/templates/base.html:104 +msgid "Standing as a candidate?" +msgstr "Sefyll fel ymgeisydd?" + +#: wcivf/templates/base.html:105 +#, python-format +msgid "About %(SITE_TITLE)s" +msgstr "Ynglŷn %(SITE_TITLE)s" + +#: wcivf/templates/base.html:106 +msgid "Privacy" +msgstr "Preifatrwydd" + +#: wcivf/templates/base.html:107 +msgid "Source code" +msgstr "Cod ffynhonnell" + +#: wcivf/templates/base.html:108 +msgid "About Democracy Club" +msgstr "Ynglŷn â'r Clwb Democratiaeth" + +#: wcivf/templates/base.html:109 +msgid "Contact Us" +msgstr "Cysylltwch â Ni" + +#: wcivf/templates/base.html:112 +msgid "GitHub" +msgstr "GitHub" + +#: wcivf/templates/base.html:113 +msgid "" "Browse the list of people and parties standing in the next general election" msgstr "" "Porwch y rhestr o bobl a phleidiau sy'n sefyll yn yr etholiad cyffredinol " @@ -2687,3 +2721,25 @@ msgstr "" #: wcivf/templates/home.html:48 msgid "Upcoming Elections" msgstr "Etholiadau i ddod" + +#~ msgid "Join our mailing list" +#~ msgstr "Ymunwch â'n rhestr bostio" + +#~ msgid "democracy" +#~ msgstr "democratiaeth" + +#~ msgid "club" +#~ msgstr "clwb" + +#~ msgid "Copyright" +#~ msgstr "Hawlfraint" + +#~ msgid "Democracy Club Community Interest Company" +#~ msgstr "Cwmni Buddiannau Cymunedol y Clwb Democratiaeth" + +#~ msgid "Company No: " +#~ msgstr "Rhif y Cwmni: " + +#~ msgid "Building digital infrastructure for a 21st century democracy." +#~ msgstr "" +#~ "Adeiladu seilwaith digidol ar gyfer democratiaeth yn yr 21ain ganrif." diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 5def341b7..01b3f0b4f 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -22,35 +22,7 @@ msgstr "" msgid "Enter your postcode" msgstr "" -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:53 -msgid "Join our mailing list" -msgstr "" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:64 -msgid "democracy" -msgstr "" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:64 -msgid "club" -msgstr "" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:69 -msgid "Copyright" -msgstr "" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:70 -msgid "Democracy Club Community Interest Company" -msgstr "" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:71 -msgid "Company No: " -msgstr "" - -#: env/lib/python3.10/site-packages/dc_utils/templates/dc_base.html:73 -msgid "Building digital infrastructure for a 21st century democracy." -msgstr "" - -#: wcivf/apps/elections/models.py:735 +#: wcivf/apps/elections/models.py:741 msgid "First-past-the-post" msgstr "" @@ -131,7 +103,7 @@ msgid "All Elections in the UK" msgstr "" #: wcivf/apps/elections/templates/elections/elections_view.html:16 -#: wcivf/templates/base.html:106 +#: wcivf/templates/base.html:102 msgid "All Elections" msgstr "" @@ -280,7 +252,7 @@ msgstr "" #: wcivf/apps/parties/templates/parties/party_detail.html:17 #: wcivf/apps/parties/templates/parties/speaker_seeking_reelection.html:17 #: wcivf/apps/people/templates/people/person_detail.html:31 -#: wcivf/templates/base.html:105 +#: wcivf/templates/base.html:101 msgid "Home" msgstr "" @@ -343,8 +315,8 @@ msgstr "" #: wcivf/apps/elections/templates/elections/includes/_how-to-vote.html:84 msgid "" "For more information, visit The Electoral Commission's website or " -"ask an official at your polling station." +"i-am-a/voter\">The Electoral Commission's website or ask an official at " +"your polling station." msgstr "" #: wcivf/apps/elections/templates/elections/includes/_people_list_with_lists.html:15 @@ -1414,7 +1386,7 @@ msgid "%(person_name)s's Facebook page" msgstr "" #: wcivf/apps/people/templates/people/includes/_person_contact_card.html:33 -#: wcivf/templates/base.html:115 +#: wcivf/templates/base.html:111 msgid "Twitter" msgstr "" @@ -1447,7 +1419,7 @@ msgid "%(person_name)s's home page" msgstr "" #: wcivf/apps/people/templates/people/includes/_person_contact_card.html:77 -#: wcivf/templates/base.html:114 +#: wcivf/templates/base.html:110 msgid "Blog" msgstr "" @@ -1716,7 +1688,7 @@ msgstr "" msgid "their speeches, voting history and more" msgstr "" -#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:6 +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:7 #, python-format msgid "%(person_name)s's elections" msgstr "" @@ -1747,6 +1719,10 @@ msgstr "" msgid "Position not available" msgstr "" +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:54 +msgid "Please note our local elections database only goes back to 2016." +msgstr "" + #: wcivf/apps/people/templates/people/includes/intros/_constituency.html:5 #, python-format msgid "" @@ -2198,6 +2174,11 @@ msgstr "" msgid "GitHub" msgstr "" +#: wcivf/templates/base.html:113 +msgid "" +"Browse the list of people and parties standing in the next general election" +msgstr "" + #: wcivf/templates/home.html:5 wcivf/templates/home.html:6 msgid "Who Can I Vote For?" msgstr "" diff --git a/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html b/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html index 7f69d528e..966a5f26c 100644 --- a/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html +++ b/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html @@ -3,8 +3,8 @@ {% if object.personpost_set.exists %}
    -

    {% blocktrans trimmed with person_name=object.name %}{{ person_name }}'s elections{% endblocktrans %}

    + @@ -45,5 +45,6 @@

    {% blocktrans trimmed with person_name=object.name %}{{ person

    {% endfor %}

    {% blocktrans trimmed with person_name=object.name %}{{ person_name }}'s elections{% endblocktrans %}

    {% trans "Date" %} {% trans "Election" %}
    + {% trans "Please note our local elections database only goes back to 2016." %}
    {% endif %} From 5726cb59a753aff124addf83138b0453320d80ad Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 16:33:48 +0100 Subject: [PATCH 06/12] Clarify candidate deselection text --- locale/cy/LC_MESSAGES/django.po | 6 ++++-- locale/en/LC_MESSAGES/django.po | 14 +++++++++++--- .../templates/elections/includes/_person_card.html | 2 +- .../people/includes/_person_intro_card.html | 2 +- wcivf/apps/people/tests/test_person_views.py | 4 ++-- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/locale/cy/LC_MESSAGES/django.po b/locale/cy/LC_MESSAGES/django.po index 1e3088ea4..9dfbfc8d2 100644 --- a/locale/cy/LC_MESSAGES/django.po +++ b/locale/cy/LC_MESSAGES/django.po @@ -445,9 +445,11 @@ msgstr "Etholwyd" #: wcivf/apps/elections/templates/elections/includes/_person_card.html:23 #: wcivf/apps/people/templates/people/includes/_person_intro_card.html:42 msgid "" -"This candidate has been deselected by their party, but will remain on the " -"ballot paper." +"This candidate has been deselected by their party, but their original party " +"description will remain on the ballot paper." msgstr "" +"Mae’r ymgeisydd hwn wedi’i ddad-ddewis gan ei blaid, ond ei blaid wreiddiol " +"bydd y disgrifiad yn aros ar y papur pleidleisio." #: wcivf/apps/elections/templates/elections/includes/_person_card.html:24 #: wcivf/apps/people/templates/people/includes/_person_intro_card.html:43 diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 01b3f0b4f..c62f1e860 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -344,8 +344,8 @@ msgstr "" #: wcivf/apps/elections/templates/elections/includes/_person_card.html:23 #: wcivf/apps/people/templates/people/includes/_person_intro_card.html:42 msgid "" -"This candidate has been deselected by their party, but will remain on the " -"ballot paper." +"This candidate has been deselected by their party, but their original party " +"description will remain on the ballot paper." msgstr "" #: wcivf/apps/elections/templates/elections/includes/_person_card.html:24 @@ -1715,7 +1715,15 @@ msgstr "" msgid "Position" msgstr "" -#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:42 +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:43 +msgid "We do not collect voting data for Supplementary Vote elections." +msgstr "" + +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:45 +msgid "We do not collect voting data for Single Transferable Vote election" +msgstr "" + +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:47 msgid "Position not available" msgstr "" diff --git a/wcivf/apps/elections/templates/elections/includes/_person_card.html b/wcivf/apps/elections/templates/elections/includes/_person_card.html index ec2d7671c..59eaedd97 100644 --- a/wcivf/apps/elections/templates/elections/includes/_person_card.html +++ b/wcivf/apps/elections/templates/elections/includes/_person_card.html @@ -20,7 +20,7 @@
    {% endif %} {% if person_post.deselected %}

    - {% trans "This candidate has been deselected by their party, but will remain on the ballot paper." %} + {% trans "This candidate has been deselected by their party, but their original party description will remain on the ballot paper." %} {% trans "Learn more" %}.

    {% endif %} diff --git a/wcivf/apps/people/templates/people/includes/_person_intro_card.html b/wcivf/apps/people/templates/people/includes/_person_intro_card.html index c5fc5497a..386e3ba78 100644 --- a/wcivf/apps/people/templates/people/includes/_person_intro_card.html +++ b/wcivf/apps/people/templates/people/includes/_person_intro_card.html @@ -37,7 +37,7 @@
    {{ object.name }} {% for candidacy in object.future_candidacies %} {% if candidacy.deselected %}

    - {% trans "This candidate has been deselected by their party, but will remain on the ballot paper." %} + {% trans "This candidate has been deselected by their party, but their original party description will remain on the ballot paper." %} {% trans "Learn more" %}.

    {% endif %} diff --git a/wcivf/apps/people/tests/test_person_views.py b/wcivf/apps/people/tests/test_person_views.py index 23be57d45..54e908b1b 100644 --- a/wcivf/apps/people/tests/test_person_views.py +++ b/wcivf/apps/people/tests/test_person_views.py @@ -681,7 +681,7 @@ def test_deselected(self): response = self.client.get(self.person_url, follow=True) self.assertContains( response, - "This candidate has been deselected by their party, but will remain on the ballot paper.", + "This candidate has been deselected by their party, but their original party description will remain on the ballot paper.", ) self.assertContains(response, "www.candidate-party-page.co.uk") @@ -690,7 +690,7 @@ def test_deselected(self): ) self.assertContains( response, - "This candidate has been deselected by their party, but will remain on the ballot paper.", + "This candidate has been deselected by their party, but their original party description will remain on the ballot paper.", ) self.assertContains(response, "www.candidate-party-page.co.uk") From 21822ead6e6a9cac3e65d93d15a23362ba1e3fff Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 16:57:10 +0100 Subject: [PATCH 07/12] No results data for STV or SV --- locale/en/LC_MESSAGES/django.po | 8 +- wcivf/apps/people/models.py | 5 +- .../_person_previous_elections_card.html | 8 +- wcivf/apps/people/tests/test_person_views.py | 125 +++++++++++++++--- 4 files changed, 123 insertions(+), 23 deletions(-) diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index c62f1e860..0251bf30d 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -1715,15 +1715,15 @@ msgstr "" msgid "Position" msgstr "" -#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:43 +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:30 msgid "We do not collect voting data for Supplementary Vote elections." msgstr "" -#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:45 -msgid "We do not collect voting data for Single Transferable Vote election" +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:32 +msgid "We do not collect voting data for Single Transferable Vote elections." msgstr "" -#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:47 +#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:48 msgid "Position not available" msgstr "" diff --git a/wcivf/apps/people/models.py b/wcivf/apps/people/models.py index 8940f093d..fdccc5c96 100644 --- a/wcivf/apps/people/models.py +++ b/wcivf/apps/people/models.py @@ -138,9 +138,10 @@ def get_results_rank(self): ].votes_cast ): return f"Joint {ordinal(candidate.rank)} / {candidate_count} candidates" - + if candidate_count > 1: + return f"{ordinal(candidate.rank)} / {candidate_count} candidates" return ( - f"{ordinal(candidate.rank)} / {candidate_count} candidates" + f"{ordinal(candidate.rank)} / {candidate_count} candidate" ) return None diff --git a/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html b/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html index 966a5f26c..803e8b615 100644 --- a/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html +++ b/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html @@ -26,7 +26,13 @@ {{ person_post.party_name }} - {{ person_post.get_results_text }} + {% if person_post.election.voting_system.slug == "sv" %} + {% trans "We do not collect voting data for Supplementary Vote elections." %} + {% elif person_post.election.voting_system.slug == "STV" %} + {% trans "We do not collect voting data for Single Transferable Vote elections." %} + {% else %} + {{ person_post.get_results_text }} + {% endif %} {% if object.previous_party_count %} diff --git a/wcivf/apps/people/tests/test_person_views.py b/wcivf/apps/people/tests/test_person_views.py index 54e908b1b..5dfd6cb4e 100644 --- a/wcivf/apps/people/tests/test_person_views.py +++ b/wcivf/apps/people/tests/test_person_views.py @@ -4,9 +4,9 @@ from django.test import TestCase from django.test.utils import override_settings from django.utils.html import strip_tags +from elections.models import VotingSystem from elections.tests.factories import ( ElectionFactory, - ElectionFactoryLazySlug, ElectionWithPostFactory, PostElectionFactory, PostFactory, @@ -319,6 +319,114 @@ def test_no_previous_party_affiliations(self): "has declared their affiliation with the following parties in the past 12 months", ) + def test_previous_elections_card(self): + """Test that the postcode search results have a + table of previous elections. In that table, the + election name, date and slug should be displayed + as well as vote count, position and party for each + ballot for the candidate + """ + past_election = ElectionFactory( + name="Welsh Assembly Election", + current=False, + election_date="2021-05-01", + slug="local.welsh.assembly.2021-05-01", + ) + past_post_election = PostElectionFactory( + election=past_election, + post=PostFactory(label="Welsh Assembly", territory="WLS"), + ballot_paper_id="local.welsh.assembly.2021-05-01", + voting_system=VotingSystem(slug="FPTP"), + ) + party = PartyFactory( + party_name="Conservative and Unionist Party", + party_id="party:52", + ) + PersonPostFactory( + person=self.person, + post_election=past_post_election, + election=past_election, + party=party, + votes_cast=1000, + ) + response = self.client.get(self.person_url, follow=True) + self.assertTemplateUsed( + "people/includes/_person_previous_elections_card.html" + ) + self.assertContains(response, "2021") + self.assertContains(response, "Welsh Assembly: Welsh Assembly Election") + self.assertContains(response, "1,000 votes (not elected)") + self.assertContains(response, """1st / 1 candidate""") + + def test_previous_elections_card_for_STV(self): + """Test that the postcode search results have a + table of previous elections with the text: + 'We do not collect voting data for + Single Transferable Vote election.'""" + past_election = ElectionFactory( + name="Welsh Assembly Election", + current=False, + election_date="2021-05-01", + slug="local.welsh.assembly.2021-05-01", + voting_system=VotingSystem(slug="STV"), + ) + + past_post_election = PostElectionFactory( + election=past_election, + post=PostFactory(label="Welsh Assembly", territory="WLS"), + ballot_paper_id="local.welsh.assembly.2021-05-01", + ) + party = PartyFactory(party_name="Liberal Democrat", party_id="foo") + PersonPostFactory( + person=self.person, + post_election=past_post_election, + election=past_election, + party=party, + ) + response = self.client.get(self.person_url, follow=True) + self.assertTemplateUsed( + "people/includes/_person_previous_elections_card.html" + ) + self.assertContains( + response, + """We do not collect voting data for Single Transferable Vote elections.""", + html=True, + ) + + def test_previous_elections_card_for_sv(self): + """Test that the postcode search results have a + table of previous elections with the text: + "We do not collect voting data for Supplementary Vote elections." + """ + past_election = ElectionFactory( + name="Welsh Assembly Election", + current=False, + election_date="2021-05-01", + slug="local.welsh.assembly.2021-05-01", + voting_system=VotingSystem(slug="sv"), + ) + past_post_election = PostElectionFactory( + election=past_election, + post=PostFactory(label="Welsh Assembly", territory="WLS"), + ballot_paper_id="local.welsh.assembly.2021-05-01", + ) + party = PartyFactory(party_name="Liberal Democrat", party_id="foo") + PersonPostFactory( + person=self.person, + post_election=past_post_election, + election=past_election, + party=party, + ) + response = self.client.get(self.person_url, follow=True) + self.assertTemplateUsed( + "people/includes/_person_previous_elections_card.html" + ) + self.assertContains( + response, + """We do not collect voting data for Supplementary Vote elections.""", + html=True, + ) + def test_previous_party_affiliations_in_past_elections_table(self): """This is a test for current previous party affiliations in the previous elections table""" @@ -362,21 +470,6 @@ def test_previous_party_affiliations_in_past_elections_table(self): ) self.assertContains(response, "Conservative, Labour", html=True) - def test_previous_elections(self): - past_election = ElectionFactoryLazySlug( - election_date="2019-05-02", current=False - ) - party = PartyFactory(party_name="Liberal Democrat", party_id="foo") - PersonPostFactory( - person=self.person, - post_election__election=past_election, - election=past_election, - party=party, - votes_cast=1000, - ) - response = self.client.get(self.person_url, follow=True) - self.assertContains(response, f"{self.person.name}'s elections") - def test_no_statement_to_voters(self): PersonPostWithPartyFactory( person=self.person, election=ElectionFactory() From ad3575812e747e91920f008f2f75569bff268181 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 18:03:07 +0100 Subject: [PATCH 08/12] Keep details open by default --- wcivf/apps/elections/templates/elections/ams.html | 6 ++++-- .../templates/elections/includes/_registration_details.html | 2 +- .../elections/templates/elections/includes/_voter_id.html | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wcivf/apps/elections/templates/elections/ams.html b/wcivf/apps/elections/templates/elections/ams.html index 25e5b4865..c77b15f9e 100644 --- a/wcivf/apps/elections/templates/elections/ams.html +++ b/wcivf/apps/elections/templates/elections/ams.html @@ -30,7 +30,8 @@

    The Additional Member System

    want them elected, and voters get no choice over this order (this is known as a 'closed list').

    - +

    +

    Seat allocation

    The overall number of constituency seats that a party wins will have an effect on how many regional representatives it is allocated. @@ -49,6 +50,8 @@

    Seat allocation

    after the above formula has been applied.

    +
    +

    Example election

    In the 2016 West Scotland region, the result for the major parties was @@ -171,7 +174,6 @@

    15,091.

    - {% endblock content %} diff --git a/wcivf/apps/elections/templates/elections/includes/_registration_details.html b/wcivf/apps/elections/templates/elections/includes/_registration_details.html index 65db904ca..d14d798c8 100644 --- a/wcivf/apps/elections/templates/elections/includes/_registration_details.html +++ b/wcivf/apps/elections/templates/elections/includes/_registration_details.html @@ -3,7 +3,7 @@ {% load humanize %}
  • -
    +

    diff --git a/wcivf/apps/elections/templates/elections/includes/_voter_id.html b/wcivf/apps/elections/templates/elections/includes/_voter_id.html index 62f53cbb1..340dfb37e 100644 --- a/wcivf/apps/elections/templates/elections/includes/_voter_id.html +++ b/wcivf/apps/elections/templates/elections/includes/_voter_id.html @@ -4,7 +4,7 @@ {% load i18n %}
  • -
    +

    ️ From 6ae917d64e17445b715a7db10f2df5773b3dad3f Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 18:33:31 +0100 Subject: [PATCH 09/12] Clean up formatting on voting system pages - Add page titles - Fix breadcrumbs - Separate sections with more spacing --- .../elections/templates/elections/ams.html | 8 +- .../elections/templates/elections/ams_cy.html | 199 ++++++++++-------- .../elections/templates/elections/fptp.html | 8 +- .../templates/elections/fptp_cy.html | 14 +- .../elections/templates/elections/stv.html | 7 + .../elections/templates/elections/stv_cy.html | 8 +- .../elections/templates/elections/sv.html | 8 +- .../elections/templates/elections/sv_cy.html | 15 +- 8 files changed, 170 insertions(+), 97 deletions(-) diff --git a/wcivf/apps/elections/templates/elections/ams.html b/wcivf/apps/elections/templates/elections/ams.html index c77b15f9e..9dbc90358 100644 --- a/wcivf/apps/elections/templates/elections/ams.html +++ b/wcivf/apps/elections/templates/elections/ams.html @@ -2,10 +2,16 @@ {% load markdown_filter %} {% load humanize %} {% load i18n %} +{% block page_title %}The Additional Member System{% endblock page_title %} +{% block og_title_content %}The Additional Member System{% endblock og_title_content %} +{% block og_description_content %} + The Additional Member System{% endblock og_description_content %} +{% block twitter_title_content %}The Additional Member System{% endblock twitter_title_content %} +{% block twitter_description_content %}The Additional Member System{% endblock twitter_description_content %} {% block content %} - {% include "elections/includes/_voting_system_breadcrumbs.html" %} + {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="The Additional Member System" %}
    diff --git a/wcivf/apps/elections/templates/elections/ams_cy.html b/wcivf/apps/elections/templates/elections/ams_cy.html index cb8612962..32d3e79a8 100755 --- a/wcivf/apps/elections/templates/elections/ams_cy.html +++ b/wcivf/apps/elections/templates/elections/ams_cy.html @@ -1,4 +1,16 @@ -{% extends "base.html" %}{% load markdown_filter %}{% load humanize %}{% load i18n %}{% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %} +{% extends "base.html" %} +{% load markdown_filter %} +{% load humanize %} +{% load i18n %} + +{% block page_title %}Y System Aelodau Ychwanegol{% endblock page_title %} +{% block og_title_content %}Y System Aelodau Ychwanegol{% endblock og_title_content %} +{% block og_description_content %}Y System Aelodau Ychwanegol{% endblock og_description_content %} +{% block twitter_title_content %}Y System Aelodau Ychwanegol{% endblock twitter_title_content %} +{% block twitter_description_content %}Y System Aelodau Ychwanegol{% endblock twitter_description_content %} + +{% block content %} + {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Y System Aelodau Ychwanegol" %}
    @@ -12,7 +24,8 @@

    Y System Aelodau Ychwanegol

    Er enghraifft, bydd pleidleisiwr yn Paisley yn yr Alban yn derbyn papur pleidleisio sy'n rhestru'r holl ymgeiswyr sydd am gynrychioli Paisley yn Senedd yr Alban. Byddan nhw hefyd yn cael papur pleidleisio sy'n rhestru'r pleidiau a/neu ymgeiswyr annibynnol sy'n sefyll am y saith sedd ar gyfer Gorllewin yr Alban. Mae'r ymgeiswyr ar y papur pleidleisio rhanbarthol yn cael eu rhestru yn y drefn y mae eu pleidiau gwleidyddol am iddyn nhw gael eu hethol, ac nid yw pleidleiswyr yn cael unrhyw ddewis dros y drefn hon (gelwir hyn yn 'restr gaeedig').

    - +
    +

    Dyrannu seddau

    Bydd nifer cyffredinol y seddi etholaethol y mae plaid yn eu hennill yn cael effaith ar faint o gynrychiolwyr rhanbarthol a ddyrennir i’r blaid honno. Bwriad hyn yw dod â nifer y seddi a enillir gan blaid yn nes at y ganran o’r bleidlais gyffredinol a dderbyniwyd ganddyn nhw yn y rhanbarth. @@ -24,100 +37,104 @@

    Dyrannu seddau

    Dyrennir seddi ar ôl rowndiau cyfrif. Y pleidiau sydd â’r nifer uchaf o bleidleisiau ar ôl cymhwyso’r fformiwla uchod sy’n ennill y seddau rhanbarthol.

    +
    +

    Enghraifft o etholiad

    Yn rhanbarth Gorllewin yr Alban 2016, roedd canlyniadau’r prif bleidiau oedd fel a ganlyn (gyda chyfanswm y cwota pleidleisio ar gyfer rowndiau dilynol mewn cromfachau):

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    +
    -

    - Rhanbarth Gorllewin yr Alban, etholiadau Senedd yr Alban 2016 -

    -
    PlaidSeddi etholaethol a enillwyd (cyfanswm o 10)Pleidleisiau a enillwydCwota rownd gyntafCwota'r ail rowndCwota'r drydedd rowndCwota'r bedwaredd rowndCwota'r bumed rowndCwota'r chweched rowndCwota'r seithfed rowndSeddi Rhanbarthol a Enillwyd
    SNP8135,82715,091Dim newidDim newidDim newidDim newidDim newidDim newid0
    Llafur172,54436,272 (etholwyd)24,18118,136Dim newid (etholwyd)Dim newidDim newid (etholwyd)Dim newi3
    Ceidwadwyr171,52835,764Dim newid (etholwyd)23,842 (etholwyd)17,882Dim newid (etholwyd)3,576Dim newid3
    Y Blaid Werdd017,218Dim newidDim newidDim newidDim newidDim newidDim newidDim newid (etholwyd)1
    Dem. Rhydd.012,097Dim newidDim newidDim newidDim newidDim newidDim newidDim newid0
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - -
    +

    + Rhanbarth Gorllewin yr Alban, etholiadau Senedd yr Alban 2016 +

    +
    PlaidSeddi etholaethol a enillwyd (cyfanswm o 10)Pleidleisiau a enillwydCwota rownd gyntafCwota'r ail rowndCwota'r drydedd rowndCwota'r bedwaredd rowndCwota'r bumed rowndCwota'r chweched rowndCwota'r seithfed rowndSeddi Rhanbarthol a Enillwyd
    SNP8135,82715,091Dim newidDim newidDim newidDim newidDim newidDim newid0
    Llafur172,54436,272 (etholwyd)24,18118,136Dim newid (etholwyd)Dim newidDim newid (etholwyd)Dim newi3
    Ceidwadwyr171,52835,764Dim newid (etholwyd)23,842 (etholwyd)17,882Dim newid (etholwyd)3,576Dim newid3
    Y Blaid Werdd017,218Dim newidDim newidDim newidDim newidDim newidDim newidDim newid (etholwyd)1
    Dem. Rhydd.012,097Dim newidDim newidDim newidDim newidDim newidDim newidDim newid0
    -
    + + +
    +

    Er mai'r SNP enillodd y nifer fwyaf o bleidleisiau, gan eu bod wedi ennill wyth allan o'r deg sedd etholaethol, roedd eu cwota o 15,092, yn is na bron pob un o'r pleidiau eraill. O ganlyniad, ni chawson nhw unrhyw seddi rhanbarthol. diff --git a/wcivf/apps/elections/templates/elections/fptp.html b/wcivf/apps/elections/templates/elections/fptp.html index 476bd3a39..7db22ee9b 100644 --- a/wcivf/apps/elections/templates/elections/fptp.html +++ b/wcivf/apps/elections/templates/elections/fptp.html @@ -3,9 +3,15 @@ {% load humanize %} {% load i18n %} +{% block page_title %}First-past-the-post (FPTP){% endblock page_title %} +{% block og_title_content %}YFirst-past-the-post (FPTP){% endblock og_title_content %} +{% block og_description_content %}YFirst-past-the-post (FPTP){% endblock og_description_content %} +{% block twitter_title_content %}YFirst-past-the-post (FPTP){% endblock twitter_title_content %} +{% block twitter_description_content %}YFirst-past-the-post (FPTP){% endblock twitter_description_content %} + {% block content %} - {% include "elections/includes/_voting_system_breadcrumbs.html" %} + {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="First-past-the-post (FPTP)"%}

    diff --git a/wcivf/apps/elections/templates/elections/fptp_cy.html b/wcivf/apps/elections/templates/elections/fptp_cy.html index caba4c341..fd4722550 100755 --- a/wcivf/apps/elections/templates/elections/fptp_cy.html +++ b/wcivf/apps/elections/templates/elections/fptp_cy.html @@ -1,4 +1,16 @@ -{% extends "base.html" %}{% load markdown_filter %}{% load humanize %}{% load i18n %}{% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %} +{% extends "base.html" %} +{% load markdown_filter %} +{% load humanize %} +{% load i18n %} + +{% block page_title %}Cyntaf i'r felin (FPTP){% endblock page_title %} +{% block og_title_content %}Cyntaf i'r felin (FPTP){% endblock og_title_content %} +{% block og_description_content %}Cyntaf i'r felin (FPTP){% endblock og_description_content %} +{% block twitter_title_content %}Cyntaf i'r felin (FPTP){% endblock twitter_title_content %} +{% block twitter_description_content %}Cyntaf i'r felin (FPTP){% endblock twitter_description_content %} + +{% block content %} + {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Cyntaf i'r felin (FPTP)"%}
    diff --git a/wcivf/apps/elections/templates/elections/stv.html b/wcivf/apps/elections/templates/elections/stv.html index 45669cab9..1f6b0148d 100644 --- a/wcivf/apps/elections/templates/elections/stv.html +++ b/wcivf/apps/elections/templates/elections/stv.html @@ -3,6 +3,13 @@ {% load humanize %} {% load i18n %} +{% block page_title %}Single Transferable Vote (STV){% endblock page_title %} +{% block og_title_content %}Single Transferable Vote (STV){% endblock og_title_content %} +{% block og_description_content %}Single Transferable Vote (STV){% endblock og_description_content %} +{% block twitter_title_content %}Single Transferable Vote (STV){% endblock twitter_title_content %} +{% block twitter_description_content %}Single Transferable Vote (STV){% endblock twitter_description_content %} + + {% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %} diff --git a/wcivf/apps/elections/templates/elections/stv_cy.html b/wcivf/apps/elections/templates/elections/stv_cy.html index d45e3d2df..bdb8aa922 100644 --- a/wcivf/apps/elections/templates/elections/stv_cy.html +++ b/wcivf/apps/elections/templates/elections/stv_cy.html @@ -3,8 +3,14 @@ {% load humanize %} {% load i18n %} +{% block page_title %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock page_title %} +{% block og_title_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock og_title_content %} +{% block og_description_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock og_description_content %} +{% block twitter_title_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock twitter_title_content %} +{% block twitter_description_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock twitter_description_content %} + {% block content %} - {% include "elections/includes/_voting_system_breadcrumbs.html" %} + {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Pleidlais Sengl Drosglwyddadwy (PSD)"%}
    diff --git a/wcivf/apps/elections/templates/elections/sv.html b/wcivf/apps/elections/templates/elections/sv.html index 148c33f0a..687afcade 100644 --- a/wcivf/apps/elections/templates/elections/sv.html +++ b/wcivf/apps/elections/templates/elections/sv.html @@ -3,9 +3,15 @@ {% load humanize %} {% load i18n %} +{% block page_title %}Supplementary Vote{% endblock page_title %} +{% block og_title_content %}Supplementary Vote{% endblock og_title_content %} +{% block og_description_content %}Supplementary Vote{% endblock og_description_content %} +{% block twitter_title_content %}Supplementary Vote{% endblock twitter_title_content %} +{% block twitter_description_content %}Supplementary Vote{% endblock twitter_description_content %} + {% block content %} - {% include "elections/includes/_voting_system_breadcrumbs.html" %} + {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Supplementary Vote" %}
    diff --git a/wcivf/apps/elections/templates/elections/sv_cy.html b/wcivf/apps/elections/templates/elections/sv_cy.html index a9c670527..beb1cdccc 100755 --- a/wcivf/apps/elections/templates/elections/sv_cy.html +++ b/wcivf/apps/elections/templates/elections/sv_cy.html @@ -1,4 +1,17 @@ -{% extends "base.html" %}{% load markdown_filter %}{% load humanize %}{% load i18n %}{% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %} +{% extends "base.html" %} +{% load markdown_filter %} +{% load humanize %} +{% load i18n %} + +{% block page_title %}Pleidlais Atodol{% endblock page_title %} +{% block og_title_content %}Pleidlais Atodol{% endblock og_title_content %} +{% block og_description_content %}Pleidlais Atodol{% endblock og_description_content %} +{% block twitter_title_content %}Pleidlais Atodol{% endblock twitter_title_content %} +{% block twitter_description_content %}Pleidlais Atodol{% endblock twitter_description_content %} + + +{% block content %} + {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Pleidlais Atodol" %}
    From 44ad2f0bc7ea7f8c73dafe47912280db5b354af8 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 2 May 2024 20:00:07 +0100 Subject: [PATCH 10/12] Update EC link to learn about elections --- locale/cy/LC_MESSAGES/django.po | 10 +++------- locale/en/LC_MESSAGES/django.po | 4 ++-- .../templates/elections/includes/_how-to-vote.html | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/locale/cy/LC_MESSAGES/django.po b/locale/cy/LC_MESSAGES/django.po index 9dfbfc8d2..747bb9ac2 100644 --- a/locale/cy/LC_MESSAGES/django.po +++ b/locale/cy/LC_MESSAGES/django.po @@ -1021,18 +1021,14 @@ msgstr "" #: wcivf/apps/elections/templates/elections/includes/inline_elections_nav_list.html:7 #, fuzzy -#| msgid "" -#| "For more information, visit The Electoral Commission's website or ask an official at your polling station." msgid "" "Learn more about elections in the UK on the Electoral " +"electoralcommission.org.uk/i-am-a/voter/\">on the Electoral " "Commission website." msgstr "" "Am fwy o wybodaeth, ewch i Wefan y Comisiwn Etholiadol neu gofynnwch i swyddog yn " -"eich gorsaf bleidleisio." +"am-a/voter/\">Wefan y Comisiwn Etholiadol neu " +"gofynnwch i swyddog yn eich gorsaf bleidleisio." #: wcivf/apps/elections/templates/elections/includes/inline_elections_nav_list.html:11 msgid "Select your address" diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 0251bf30d..162efc8e6 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -315,8 +315,8 @@ msgstr "" #: wcivf/apps/elections/templates/elections/includes/_how-to-vote.html:84 msgid "" "For more information, visit The Electoral Commission's website or ask an official at " -"your polling station." +"i-am-a/voter/\">The Electoral Commission's website or " +"ask an official at your polling station." msgstr "" #: wcivf/apps/elections/templates/elections/includes/_people_list_with_lists.html:15 diff --git a/wcivf/apps/elections/templates/elections/includes/_how-to-vote.html b/wcivf/apps/elections/templates/elections/includes/_how-to-vote.html index 5cf273187..803f622a6 100644 --- a/wcivf/apps/elections/templates/elections/includes/_how-to-vote.html +++ b/wcivf/apps/elections/templates/elections/includes/_how-to-vote.html @@ -81,7 +81,7 @@

    {% endif %}

    {% blocktrans trimmed %}Read the instructions at the top of your ballot paper carefully.{% endblocktrans %}

    -

    {% blocktrans trimmed %}For more information, visit The Electoral Commission's website or ask an official at your polling station.{% endblocktrans %}

    +

    {% blocktrans trimmed %}For more information, visit The Electoral Commission's website or ask an official at your polling station.{% endblocktrans %}

  • From d262cd35d914b93390a7616f2c369c1073c57101 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Wed, 8 May 2024 14:53:06 +0100 Subject: [PATCH 11/12] Customise Dummy PostElection --- wcivf/apps/elections/dummy_models.py | 21 ++++++++++--- wcivf/apps/elections/views/postcode_view.py | 33 +++++++++++++++++++-- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/wcivf/apps/elections/dummy_models.py b/wcivf/apps/elections/dummy_models.py index bb2d056d6..4bf83b778 100644 --- a/wcivf/apps/elections/dummy_models.py +++ b/wcivf/apps/elections/dummy_models.py @@ -1,21 +1,32 @@ from datetime import date from random import randint -from elections.models import Election, Post, PostElection +from elections.models import Election, Post, PostElection, VotingSystem from people.dummy_models import DummyCandidacy, DummyPerson class DummyPostElection(PostElection): party_ballot_count = 5 display_as_party_list = False + locked = True + voting_system_id = "FPTP" + ballot_paper_id = "local.faketown.made-up-ward.2024-07-04" + cancelled = False + show_polling_card = True + contested = True + requires_voter_id = "EA-2022" election = Election( name="Llantalbot local election", - election_date=date(2022, 5, 5), + election_date=date(2024, 7, 4), any_non_by_elections=True, - slug="local.faketown.2022-05-05", + slug="local.faketown.2024-07-04", + voting_system=VotingSystem(slug="FPTP"), + current=True, ) + post = Post(label="Made-Up-Ward") + post.territory = "ENG" pk = randint(1, 100000) class Meta: @@ -23,7 +34,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.ballot_paper_id = "local.faketown.made-up-ward.2022-05-05" + self.ballot_paper_id = "local.faketown.made-up-ward.2024-07-04" self.election.get_absolute_url = self.election_get_absolute_url def election_get_absolute_url(self): @@ -37,6 +48,8 @@ def people(self): ), election=self.election, party_name="Yellow Party", + deselected=True, + deselected_source="www.google.com", ), DummyCandidacy( person=DummyPerson( diff --git a/wcivf/apps/elections/views/postcode_view.py b/wcivf/apps/elections/views/postcode_view.py index bf7fc1650..13286da01 100644 --- a/wcivf/apps/elections/views/postcode_view.py +++ b/wcivf/apps/elections/views/postcode_view.py @@ -319,6 +319,7 @@ def get(self, request, *args, **kwargs): class DummyPostcodeView(PostcodeView): postcode = None + uprn = None def get(self, request, *args, **kwargs): kwargs["postcode"] = self.postcode @@ -329,12 +330,40 @@ def get_context_data(self, **kwargs): context = kwargs self.postcode = clean_postcode(kwargs["postcode"]) context["postcode"] = self.postcode + self.uprn = self.kwargs.get("uprn") + context["uprn"] = self.uprn + context["postelections"] = self.get_ballot_dict() context["show_polling_card"] = True - context["polling_station"] = {} + context["polling_station"] = self.get_polling_station() + context["requires_voter_id"] = "EA-2022" context["num_ballots"] = 1 - return context def get_ballot_dict(self): return [DummyPostElection()] + + def get_polling_station(self): + return { + "polling_station_known": True, + "custom_finder": False, + "report_problem_url": "http://wheredoivote.co.uk/report_problem/?source=testing&source_url=testing", + "station": { + "id": "w06000015.QK", + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-3.119229, 51.510885], + }, + "properties": { + "address": "1 Made Up Street\nMade Up Town\nMade Up County", + "postcode": "MA1 1AA", + }, + }, + "geometry": { + "coordinates": [-0.127758, 51.507351], + }, + "properties": { + "address": "1 Made Up Street\nMade Up Town\nMade Up County", + }, + } From d2d38231ca4fdf0c86c8de3b8b58d60f12f65944 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Tue, 21 May 2024 13:02:48 +0100 Subject: [PATCH 12/12] Remove duplicate translations --- locale/cy/LC_MESSAGES/django.po | 33 --------------------------------- locale/en/LC_MESSAGES/django.po | 5 ----- 2 files changed, 38 deletions(-) diff --git a/locale/cy/LC_MESSAGES/django.po b/locale/cy/LC_MESSAGES/django.po index 747bb9ac2..06bc1fb53 100644 --- a/locale/cy/LC_MESSAGES/django.po +++ b/locale/cy/LC_MESSAGES/django.po @@ -2589,14 +2589,6 @@ msgstr "" "Rydym yn casglu canlyniadau wrth iddynt gael eu cyhoeddi. Gwiriwch yn ôl yn " "nes ymlaen." -#: wcivf/templates/base.html:103 -msgid "All Parties" -msgstr "Pob plaid" - -#: wcivf/templates/base.html:104 -msgid "Standing as a candidate?" -msgstr "Sefyll fel ymgeisydd?" - #: wcivf/templates/base.html:105 #, python-format msgid "About %(SITE_TITLE)s" @@ -2637,31 +2629,6 @@ msgstr "Pob plaid" msgid "Standing as a candidate?" msgstr "Sefyll fel ymgeisydd?" -#: wcivf/templates/base.html:105 -#, python-format -msgid "About %(SITE_TITLE)s" -msgstr "Ynglŷn %(SITE_TITLE)s" - -#: wcivf/templates/base.html:106 -msgid "Privacy" -msgstr "Preifatrwydd" - -#: wcivf/templates/base.html:107 -msgid "Source code" -msgstr "Cod ffynhonnell" - -#: wcivf/templates/base.html:108 -msgid "About Democracy Club" -msgstr "Ynglŷn â'r Clwb Democratiaeth" - -#: wcivf/templates/base.html:109 -msgid "Contact Us" -msgstr "Cysylltwch â Ni" - -#: wcivf/templates/base.html:112 -msgid "GitHub" -msgstr "GitHub" - #: wcivf/templates/home.html:5 wcivf/templates/home.html:6 msgid "Who Can I Vote For?" msgstr "Pwy alla i bleidleisio ar gyfer?" diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 162efc8e6..a26a5863d 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -2182,11 +2182,6 @@ msgstr "" msgid "GitHub" msgstr "" -#: wcivf/templates/base.html:113 -msgid "" -"Browse the list of people and parties standing in the next general election" -msgstr "" - #: wcivf/templates/home.html:5 wcivf/templates/home.html:6 msgid "Who Can I Vote For?" msgstr ""