Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie consent translation #315

Open
loleg opened this issue Feb 17, 2021 · 3 comments
Open

Cookie consent translation #315

loleg opened this issue Feb 17, 2021 · 3 comments

Comments

@loleg
Copy link
Contributor

loleg commented Feb 17, 2021

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
Copy link

pyrog commented Feb 18, 2021

Both the script and the privacy policy should be translated:

@loleg
Copy link
Contributor Author

loleg commented Feb 18, 2021

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

@pyrog
Copy link

pyrog commented Feb 23, 2021

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 🤔

<head>
<meta charset="utf-8">
<title>{% block title %}Welcome{% endblock %} — 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'|url }}">
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.0/mapbox-gl.css" rel="stylesheet" />
<script>
var okiConsent = {
analyticsTrackingID: 'UA-33874954-12',
};
</script>
<script src="https://a.okfn.org/html/oki/consent/assets/js/consent.js"></script>
</head>

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants