make this translatable

This commit is contained in:
Plailect 2019-04-16 21:02:05 -04:00
parent 5f96469a27
commit 25c13b1662
No known key found for this signature in database
GPG Key ID: F8A415C5EA602A41
2 changed files with 13 additions and 1 deletions

View File

@ -21,6 +21,9 @@ main:
-
title: Site Navigation
url: site-navigation
top:
-
title: This website uses cookies to display the current guide progress on the sidebar and otherwise enhance the site.
bottom:
-
title: This guide is currently outdated (and has been for some time) as I am extremely busy with classes these days. It will be updated as soon as I am able, but until then see <a href="https://nh-server.github.io/switch-guide/">NH Switch Guide</a> for more up-to-date information.

View File

@ -18,6 +18,15 @@
<meta name="theme-color" content="#2E3440">
<meta name="theme-color" content="#2E3440">
{% assign split_path = page.path | split: "/" %}
{% assign locale = split_path[1] %}
{% if locale == 'en_US' %}
{% assign locale_var = '/' %}
{% else %}
{% assign locale_var = locale | prepend:'/' | append:'/' %}
{% endif %}
{% assign top = site.data.navigation[locale].top %}
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
<script>
@ -35,7 +44,7 @@ window.cookieconsent.initialise({
"position": "top",
"static": true,
"content": {
"message": "This website uses cookies to display the current guide progress on the sidebar."
"message": "{{ top[0].title }}"
}
})});
</script>