Commit efac2711 authored by rgaudin's avatar rgaudin
Browse files

Aflatoun lite doesn't require manual language selection anymore

parent 3836b955
2.0.5
* Added raspberryPi version to version.<fqdn> page
* Fixed KAlite installation not working (regression)
* KA lite doesn't require manual language selection
* KA lite doesn't require manual language selection anymore
* Aflatoun lite doesn't require manual language selection anymore
2.0.4
* Speed up improvements for Wikifundi
......
......@@ -36,6 +36,16 @@ server {
empty_gif;
}
location /go/fr {
add_header Content-Type "text/html; charset=UTF-8";
return 200 "<html><head><title>Aflatoun en français</title></head><body><p>Veuillez patienter…</p><script>var xhr = new XMLHttpRequest(); xhr.onload = function () { window.location = '/'; }; xhr.open('POST', '/api/i18n/set_default_language/', true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send('{\"lang\": \"fr\"}');</script><noscript><p><a href='/'>Cliquez ici</a> pour accèder à Aflatoun</p></noscript></body></html>";
}
location /go/en {
add_header Content-Type "text/html; charset=UTF-8";
return 200 "<html><head><title>Aflatoun in english</title></head><body><p>please wait…</p><script>var xhr = new XMLHttpRequest(); xhr.onload = function () { window.location = '/'; }; xhr.open('POST', '/api/i18n/set_default_language/', true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send('{\"lang\": \"en\"}');</script><noscript><p><a href='/'>Click here</a> to access Aflatoun</p></noscript></body></html>";
}
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Scheme $scheme;
......
......@@ -37,12 +37,12 @@ server {
location /go/fr {
add_header Content-Type "text/html; charset=UTF-8";
return 200 "<html><head><title>KA Lite en français</title></head><body><p>Veuillez patienter…</p><iframe style='display: none;' src='http://{{ kalite_fqdn }}/api/i18n/set_default_language/?lang=fr' onload=\"window.location = 'http://{{ kalite_fqdn }}/';\"><p><a href='http://{{ kalite_fqdn }}/'>Cliquez ici</a> pour accèder à Khan Academy</p></iframe></body></html>";
return 200 "<html><head><title>KA Lite en français</title></head><body><p>Veuillez patienter…</p><iframe style='display: none;' src='/api/i18n/set_default_language/?lang=fr' onload=\"window.location = '/';\"><p><a href='/'>Cliquez ici</a> pour accèder à Khan Academy</p></iframe></body></html>";
}
location /go/en {
add_header Content-Type "text/html; charset=UTF-8";
return 200 "<html><head><title>KA Lite in english</title></head><body><p>please wait…</p><iframe style='display: none;' src='http://{{ kalite_fqdn }}/api/i18n/set_default_language/?lang=fr' onload=\"window.location = 'http://{{ kalite_fqdn }}/';\"><p><a href='http://{{ kalite_fqdn }}/'>Click here</a> to access Khan Academy</p></iframe></body></html>";
return 200 "<html><head><title>KA Lite in english</title></head><body><p>please wait…</p><iframe style='display: none;' src='/api/i18n/set_default_language/?lang=fr' onload=\"window.location = '/';\"><p><a href='/'>Click here</a> to access Khan Academy</p></iframe></body></html>";
}
......
......@@ -109,7 +109,7 @@ def generate_homepage(logger, options):
category = "Learn"
cards.append(
{
"url": "http://{}".format(aflatoun_fqdn),
"url": "http://{}/go/{}".format(aflatoun_fqdn, options["language"]),
"css_class": "",
"category_class": "learn",
"category": category,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment