Unverified Commit 2dbcf8c8 authored by Maarten de Waard's avatar Maarten de Waard 🤘🏻
Browse files

debug print in js

parent bf9754d7
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^/[^aef].*$ [NC]
# Don't rewrite if English has been chosen
RewriteCond %{HTTP_COOKIE} ^openedx-language-preference=en$ [NC]
RewriteRule ^(.*)$ $1 [L]
RewriteRule ^/?(terms.html|privacy.html)?$ $1 [L]
RewriteCond %{REQUEST_URI} ^/[^aef].*$ [NC]
# Rewrite to language from cookie
RewriteCond %{HTTP_COOKIE} ^openedx-language-preference=(ar|es|fa|fr)$ [NC]
RewriteRule ^(.*)$ /%1/$1 [L]
RewriteRule ^/?(terms.html|privacy.html)?$ /%1/$1 [L]
# Simple way to exclude /ar, /es, /fa and /fr for now
RewriteCond %{REQUEST_URI} ^/[^aef].*$ [NC]
# Rewrite non-English supported languages
RewriteCond %{HTTP:Accept-Language} ^.*(ar|es|fa|fr).*$ [NC]
RewriteRule ^(.*)$ /%1/$1 [L]
RewriteRule ^/?(terms.html|privacy.html)?$ /%1/$1 [L]
......@@ -184,9 +184,10 @@ end
# https://middlemanapp.com/advanced/configuration/#environment-specific-settings
configure :build do
activate :minify_css
activate :minify_javascript
activate :gzip
# TODO: Re-enable all this stuff
# activate :minify_css
# activate :minify_javascript
# bactivate :gzip
end
configure :development do
require "middleman-livereload"
......
......@@ -75,6 +75,7 @@
cookieParams += "secure=true;"
}
document.cookie = "openedx-language-preference=" + lang + ";expires=" + expiryDate + ";" + cookieParams;
console.log("Saved document cookie" + document.cookie);
};
})(jQuery, window, document);
......
Supports Markdown
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