diff --git a/app/main/routes.py b/app/main/routes.py index d57ad2f68..ab25a9f53 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -153,7 +153,12 @@ def cookies(): @bp.route("/privacy", methods=["GET"]) def privacy(): - return render_template("privacy.html") + return render_template("main/privacy.html") + + +@bp.route("/online-safety") +def online_safety(): + return render_template("main/online-safety.html") @bp.route("/session-expired", methods=["GET"]) diff --git a/app/templates/base.html b/app/templates/base.html index ec353198e..88e966466 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -162,6 +162,10 @@ 'href': language.switch.href, 'text': language.switch.text, 'attributes': {'x-data': 'language-switcher'}, + }, + { + 'href': url_for('main.online_safety'), + 'text': _("Staying safe online") }, { 'href': url_for('main.accessibility'), diff --git a/app/templates/main/online-safety.html b/app/templates/main/online-safety.html new file mode 100644 index 000000000..5168782f7 --- /dev/null +++ b/app/templates/main/online-safety.html @@ -0,0 +1,70 @@ +{% extends "base.html" %} +{%- from 'components/back_link.html' import govukBackLink -%} + +{% block page_title %}{{ _('Staying safe online') }} - {{ super() }}{% endblock %} + +{% block beforeContent %} + {{ super() }} + {{ govukBackLink({ 'text': _('Back') }) }} +{% endblock %} + +{% block content %} +
+
+

{{ _('Stay safe when you use this website') }}

+ +

{{ _('If you need to hide what you’re doing on this website, or protect yourself from someone, it can be safer not to use your home computer or your own mobile phone.') }}

+

{{ _('For example, use a computer at the library, or borrow a phone from someone you trust.') }}

+ + +

{{ _('What this website saves to your device') }}

+

{{ _('When you use this website, and every time you use the internet, your device saves a record of:') }}

+ + +

{{ _('How to delete cookies and your browsing history') }}

+

{{ _('Be careful because:') }}

+ +

{{ _('Try to only remove information about the websites you want to keep private.') }}

+

{{ _('Find out how to do that on:') }}

+ + + +

{{ _('How the ‘Exit this page’ button works on this website') }}

+

+ {{ _('There is an ‘Exit this page’ button on some pages. If you click this button, all the information you’ve entered will be deleted. This website will close.')}} +

+

+ {{ _('You’ll automatically go to the BBC Weather homepage:') }} {{ _('https://www.bbc.co.uk/weather/') }} +

+ +

{{ _('Cookies and browsing history will still be saved to your device.') }}

+

{{ _('On any page where you see the ‘Exit this page’ button, pressing the ‘Shift’ key 3 times will work the same way.') }}

+

{{ _('To find this website again, search ‘Check if you can get legal aid’.') }}

+ +

{{ _('How to use this website without storing cookies and browser history') }}

+

{{ _('Use the ‘private browsing’ settings. Go to the menu on your browser, click on ‘File’ and turn on:') }}

+ +

{{ _('On Samsung internet, you need to turn on') }} {{ _('Secret mode.') }}

+ +

{{ _('Get help to stay safe online') }}

+

{{ _('There are other ways someone can track you online, for example by using spying or tracking programmes. See the Refuge website') }} {{ _('Secure your tech.') }}

+
+
+{% endblock %} diff --git a/app/translations/cy/LC_MESSAGES/messages.mo b/app/translations/cy/LC_MESSAGES/messages.mo index 1edaf8c71..95773f263 100644 Binary files a/app/translations/cy/LC_MESSAGES/messages.mo and b/app/translations/cy/LC_MESSAGES/messages.mo differ diff --git a/app/translations/cy/LC_MESSAGES/messages.po b/app/translations/cy/LC_MESSAGES/messages.po index e94a3240e..61fe63455 100644 --- a/app/translations/cy/LC_MESSAGES/messages.po +++ b/app/translations/cy/LC_MESSAGES/messages.po @@ -1716,6 +1716,9 @@ msgstr "Rhowch 0 os nad oes gennych eitemau gwerthfawr sy’n werth dros £500 y msgid "Exit this page" msgstr "Gadael y dudalen hon" +msgid "Staying safe online" +msgstr "Cadw’n ddiogel ar-lein" + msgid "Sorry, you’re not likely to get legal aid" msgstr "" @@ -2452,6 +2455,134 @@ msgstr "Ymestyn y terfyn amser" msgid "Exit service" msgstr "Gadael y gwasanaeth" +msgid "Stay safe when you use this website" +msgstr "Cadwch yn ddiogel wrth ddefnyddio’r wefan hon" + +msgid "" +"If you need to hide what you’re doing on this website, or protect " +"yourself from someone, it can be safer not to use your home computer or " +"your own mobile phone." +msgstr "Os oes angen i chi guddio’r hyn rydych chi’n ei wneud ar y wefan hon, neu ddiogelu eich hun rhag rhywun, gall fod yn fwy diogel peidio â defnyddio eich cyfrifiadur gartref na’ch ffôn symudol eich hun." + +msgid "" +"For example, use a computer at the library, or borrow a phone from " +"someone you trust." +msgstr "Er enghraifft, defnyddiwch gyfrifiadur yn y llyfrgell, neu fenthyg ffôn gan rywun rydych chi’n ymddiried ynddo." + +msgid "What this website saves to your device" +msgstr "Beth mae'r wefan hon yn ei gadw ar eich dyfais" + +msgid "" +"When you use this website, and every time you use the internet, your " +"device saves a record of:" +msgstr "Pan fyddwch chi’n defnyddio’r wefan hon, a phob tro y byddwch chi’n defnyddio’r rhyngrwyd, bydd eich dyfais yn cadw cofnod o’r canlynol:" + +msgid "" +"the pages you’ve looked at and the files you’ve downloaded - this is " +"called your ‘browsing history’" +msgstr "y tudalennau rydych chi wedi edrych arnyn nhw a'r ffeiliau rydych chi wedi'u llwytho i lawr – gelwir hyn yn 'hanes pori'" + +msgid "small files called ‘cookies’" +msgstr "ffeiliau bach o’r enw ‘cwcis’" + +msgid "How to delete cookies and your browsing history" +msgstr "Sut mae dileu cwcis a'ch hanes pori" + +msgid "Be careful because:" +msgstr "Byddwch yn ofalus oherwydd:" + +msgid "deleting cookies will also delete stored passwords for online accounts" +msgstr "bydd dileu cwcis hefyd yn dileu cyfrineiriau sydd wedi’u storio ar gyfer cyfrifon ar-lein" + +msgid "clearing your history could make someone more suspicious" +msgstr "gallai clirio eich hanes wneud rhywun yn fwy amheus" + +msgid "" +"Try to only remove information about the websites you want to keep " +"private." +msgstr "Ceisiwch ddileu’r wybodaeth am y gwefannau rydych chi am eu cadw'n breifat yn unig." + +msgid "Find out how to do that on:" +msgstr "Dysgwch sut mae gwneud hynny ar:" + +msgid "Google Chrome" +msgstr "" + +msgid "Internet Explorer" +msgstr "" + +msgid "Mozilla Firefox" +msgstr "" + +msgid "Safari" +msgstr "" + +msgid "Samsung internet" +msgstr "" + +msgid "How the ‘Exit this page’ button works on this website" +msgstr "Sut mae’r botwm ‘Gadael y dudalen hon’ yn gweithio ar y wefan hon" + +msgid "" +"There is an ‘Exit this page’ button on some pages. If you click this " +"button, all the information you’ve entered will be deleted. This website " +"will close." +msgstr "Mae botwm ‘Gadael y dudalen hon’ ar rai tudalennau. Os byddwch chi’n clicio’r botwm hwn, bydd yr holl wybodaeth rydych chi wedi’i rhoi yn cael ei dileu. Bydd y wefan hon yn cau." + +msgid "You’ll automatically go to the BBC Weather homepage:" +msgstr "Byddwch yn mynd yn awtomatig i dudalen hafan BBC Weather:" + +msgid "https://www.bbc.co.uk/weather/" +msgstr "" + +msgid "Cookies and browsing history will still be saved to your device." +msgstr "Bydd y cwcis a’r hanes pori yn dal i gael eu cadw ar eich dyfais." + +msgid "" +"On any page where you see the ‘Exit this page’ button, pressing the " +"‘Shift’ key 3 times will work the same way." +msgstr "Ar unrhyw dudalen lle gwelwch y botwm ‘Gadael y dudalen hon’, bydd pwyso’r fysell ‘Shift’ 3 gwaith yn gwneud yr un peth." + +msgid "To find this website again, search ‘Check if you can get legal aid’." +msgstr "I ddod o hyd i’r wefan hon eto, chwiliwch am ‘Gwirio a ydych yn gymwys i gael cymorth cyfreithiol’." + +msgid "How to use this website without storing cookies and browser history" +msgstr "Sut mae defnyddio'r wefan hon heb storio cwcis a hanes pori" + +msgid "" +"Use the ‘private browsing’ settings. Go to the menu on your browser, " +"click on ‘File’ and turn on:" +msgstr "Defnyddiwch y gosodiadau ‘pori’n breifat’. Ewch i’r ddewislen ar eich porwr, cliciwch ‘Ffeil’ a rhoi’r canlynol ar waith:" + +msgid "Incognito on Google Chrome" +msgstr "Incognito ar Google Chrome" + +msgid "Private Window on Safari" +msgstr "Private Window ar Safari" + +msgid "InPrivate on Internet Explorer" +msgstr "InPrivate ar Internet Explorer" + +msgid "Private Browsing on Mozilla Firefox" +msgstr "Private Browsing ar Mozilla Firefox" + +msgid "On Samsung internet, you need to turn on" +msgstr "Ar Samsung Internet, mae angen i chi roi" + +msgid "Secret mode." +msgstr "Secret mode ar waith." + +msgid "Get help to stay safe online" +msgstr "Cael help i gadw’n ddiogel ar-lein" + +msgid "" +"There are other ways someone can track you online, for example by using " +"spying or tracking programmes. See the Refuge website" +msgstr "Mae ffyrdd eraill y gall rhywun eich tracio ar-lein, er enghraifft drwy ddefnyddio rhaglenni tracio neu ysbïo. Ewch i’r dudalen" + +msgid "Secure your tech." +msgstr "Secure your tech ar wefan Refuge." + msgid "Privacy notice" msgstr "Welsh Privacy notice" diff --git a/app/translations/en/LC_MESSAGES/messages.pot b/app/translations/en/LC_MESSAGES/messages.pot index bc4bc046b..3f0d8af67 100644 --- a/app/translations/en/LC_MESSAGES/messages.pot +++ b/app/translations/en/LC_MESSAGES/messages.pot @@ -2153,6 +2153,134 @@ msgstr "" msgid "Exit service" msgstr "" +msgid "Stay safe when you use this website" +msgstr "" + +msgid "" +"If you need to hide what you’re doing on this website, or protect " +"yourself from someone, it can be safer not to use your home computer or " +"your own mobile phone." +msgstr "" + +msgid "" +"For example, use a computer at the library, or borrow a phone from " +"someone you trust." +msgstr "" + +msgid "What this website saves to your device" +msgstr "" + +msgid "" +"When you use this website, and every time you use the internet, your " +"device saves a record of:" +msgstr "" + +msgid "" +"the pages you’ve looked at and the files you’ve downloaded - this is " +"called your ‘browsing history’" +msgstr "" + +msgid "small files called ‘cookies’" +msgstr "" + +msgid "How to delete cookies and your browsing history" +msgstr "" + +msgid "Be careful because:" +msgstr "" + +msgid "deleting cookies will also delete stored passwords for online accounts" +msgstr "" + +msgid "clearing your history could make someone more suspicious" +msgstr "" + +msgid "" +"Try to only remove information about the websites you want to keep " +"private." +msgstr "" + +msgid "Find out how to do that on:" +msgstr "" + +msgid "Google Chrome" +msgstr "" + +msgid "Internet Explorer" +msgstr "" + +msgid "Mozilla Firefox" +msgstr "" + +msgid "Safari" +msgstr "" + +msgid "Samsung internet" +msgstr "" + +msgid "How the ‘Exit this page’ button works on this website" +msgstr "" + +msgid "" +"There is an ‘Exit this page’ button on some pages. If you click this " +"button, all the information you’ve entered will be deleted. This website " +"will close." +msgstr "" + +msgid "You’ll automatically go to the BBC Weather homepage:" +msgstr "" + +msgid "https://www.bbc.co.uk/weather/" +msgstr "" + +msgid "Cookies and browsing history will still be saved to your device." +msgstr "" + +msgid "" +"On any page where you see the ‘Exit this page’ button, pressing the " +"‘Shift’ key 3 times will work the same way." +msgstr "" + +msgid "To find this website again, search ‘Check if you can get legal aid’." +msgstr "" + +msgid "How to use this website without storing cookies and browser history" +msgstr "" + +msgid "" +"Use the ‘private browsing’ settings. Go to the menu on your browser, " +"click on ‘File’ and turn on:" +msgstr "" + +msgid "Incognito on Google Chrome" +msgstr "" + +msgid "Private Window on Safari" +msgstr "" + +msgid "InPrivate on Internet Explorer" +msgstr "" + +msgid "Private Browsing on Mozilla Firefox" +msgstr "" + +msgid "On Samsung internet, you need to turn on" +msgstr "" + +msgid "Secret mode." +msgstr "" + +msgid "Get help to stay safe online" +msgstr "" + +msgid "" +"There are other ways someone can track you online, for example by using " +"spying or tracking programmes. See the Refuge website" +msgstr "" + +msgid "Secure your tech." +msgstr "" + msgid "Privacy notice" msgstr "" diff --git a/tests/unit_tests/test_pages.py b/tests/unit_tests/test_pages.py index db122f8c9..09b23ba27 100644 --- a/tests/unit_tests/test_pages.py +++ b/tests/unit_tests/test_pages.py @@ -1,3 +1,5 @@ +from unittest.mock import patch + import pytest @@ -54,3 +56,17 @@ def test_header_link_clears_session(app, client): with client.session_transaction() as session: assert "test" not in session + + +@patch("app.main.routes.render_template") +def test_privacy_template(mock_render_template, client): + response = client.get("/privacy") + assert response.status_code == 200 + mock_render_template.assert_called_once_with("main/privacy.html") + + +@patch("app.main.routes.render_template") +def test_online_safety_template(mock_render_template, client): + response = client.get("/online-safety") + assert response.status_code == 200 + mock_render_template.assert_called_once_with("main/online-safety.html")