Commit 3836b955 authored by rgaudin's avatar rgaudin
Browse files

KA lite doesn't require manual language selection anymore

parent 3421e311
Pipeline #140585 passed with stage
in 388 minutes and 20 seconds
2.0.5
* Added raspberryPi version to version.<fqdn> page
* Fixed KAlite installation not working (regression)
* KA lite doesn't require manual language selection
2.0.4
* Speed up improvements for Wikifundi
......
......@@ -35,6 +35,17 @@ server {
empty_gif;
}
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>";
}
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>";
}
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Scheme $scheme;
......
......@@ -124,7 +124,7 @@ def generate_homepage(logger, options):
if "fr" in options["kalite_languages"]:
cards.append(
{
"url": "http://fr.{}".format(kalite_fqdn),
"url": "http://{}/go/fr".format(kalite_fqdn),
"css_class": "khanacademy",
"category_class": "learn",
"category": "Appendre",
......@@ -135,7 +135,7 @@ def generate_homepage(logger, options):
if "en" in options["kalite_languages"]:
cards.append(
{
"url": "http://en.{}".format(kalite_fqdn),
"url": "http://{}/go/en".format(kalite_fqdn),
"css_class": "khanacademy",
"category_class": "learn",
"category": "Learn",
......
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