okfn / opendataday

Open Data Day website
http://opendataday.org
Creative Commons Zero v1.0 Universal
86 stars 112 forks source link

Cookie consent translation #315

Open loleg opened 3 years ago

loleg commented 3 years ago

The cookie pop-up banner is currently in English only, and loaded from an external static dependency which does not make it possible to translate the text. This is not only important messaging, we should also offer a no tracking choice. I would suggest switching to a more robust consent plugin.

pyrog commented 3 years ago

Both the script and the privacy policy should be translated:

loleg commented 3 years ago

Ah, good! But that's not the script currently used on the opendataday.org site.

pyrog commented 3 years ago

Sure ? 😉

When exploring the code of the online page https://opendataday.org one could read:

<head>
  <meta charset="utf-8">
  <title>You are invited — Open Data Day</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700" rel="stylesheet">
  <link rel="stylesheet" href="css/style.css">
  <link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.0/mapbox-gl.css" rel="stylesheet">
  <script id="cookieconsent-core" async="" type="text/javascript"
    src="https://a.okfn.org/html/oki/consent/assets/js/cookieconsent.min.js">
  </script>
  <script>
    var okiConsent = {
      analyticsTrackingID: 'UA-33874954-12',
    };
  </script>
  <script src="https://a.okfn.org/html/oki/consent/assets/js/consent.js"></script>
  <link id="cookieconsent-css" rel="stylesheet" type="text/css"
    href="https://a.okfn.org/html/oki/consent/assets/css/cookieconsent.min.css" media="screen">
  <style></style>
</head>

But you are right, the line calling cookieconsent.min.js is not in the source code 🤔 https://github.com/okfn/opendataday/blob/c0d021b16e9608b6596c48350848364de7944bef/templates/layout.html#L3-L16

Anyway, the following message is hardcoded in https://github.com/okfn/a/blob/master/a/html/oki/consent/assets/js/consent.js#L98-L104

Cookie consent message