From 8956561220e419bf4eca863341202f535f008fc3 Mon Sep 17 00:00:00 2001 From: Oleg Lavrovsky Date: Mon, 28 May 2018 18:51:02 +0200 Subject: [PATCH] Privacy notice in French --- ansible/roles/web/templates/nginx.conf.j2 | 1 + publichealth/static/js/main.js | 15 +++++++++++---- publichealth/templates/footer.html | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ansible/roles/web/templates/nginx.conf.j2 b/ansible/roles/web/templates/nginx.conf.j2 index d3c0548..b624c50 100644 --- a/ansible/roles/web/templates/nginx.conf.j2 +++ b/ansible/roles/web/templates/nginx.conf.j2 @@ -46,6 +46,7 @@ server { # Disable English home page (for now) location ^/en$ { return 301 $scheme://$host/de/; } + location ^/privacy$ { return 301 $scheme://$host/de/privacy; } location / { proxy_set_header X-Real-IP $remote_addr; diff --git a/publichealth/static/js/main.js b/publichealth/static/js/main.js index fdfab37..9b37e59 100644 --- a/publichealth/static/js/main.js +++ b/publichealth/static/js/main.js @@ -69,6 +69,7 @@ $(document).ready(function() { }); // Cookie notice via insites.com + var langbase = $('.language-nav a.active').text().toLowerCase(); window.cookieconsent.initialise({ "palette": { "popup": { @@ -81,10 +82,16 @@ $(document).ready(function() { }, "theme": "edgeless", "content": { - "message": "Diese Website verwendet Cookies, um Ihnen eine optimale Nutzung unserer Website zu ermöglichen.", - "dismiss": "Zustimmen", - "link": "Weitere informationen", - "href": "/privacy/" + "message": langbase == 'fr' ? + "Ce site Web utilise des cookies pour vous permettre une utilisation optimale de notre site Web." + : "Diese Website verwendet Cookies, um Ihnen eine optimale Nutzung unserer Website zu ermöglichen.", + "dismiss": langbase == 'fr' ? + "D'accord" + : "Zustimmen", + "link": langbase == 'fr' ? + "Pour plus d'informations" + : "Weitere informationen", + "href": "/" + langbase + "/privacy/" } }); diff --git a/publichealth/templates/footer.html b/publichealth/templates/footer.html index 06f66a1..da18d65 100644 --- a/publichealth/templates/footer.html +++ b/publichealth/templates/footer.html @@ -31,7 +31,7 @@