Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
totem
website
Commits
2dbcf8c8
Unverified
Commit
2dbcf8c8
authored
Dec 16, 2020
by
Maarten de Waard
🤘🏻
Browse files
debug print in js
parent
bf9754d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
.htaccess
View file @
2dbcf8c8
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]
config.rb
View file @
2dbcf8c8
...
...
@@ -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"
...
...
source/javascripts/index.js
View file @
2dbcf8c8
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment