From 4d8ecee158a99a102d50611bac78958b93c34541 Mon Sep 17 00:00:00 2001 From: Plailect Date: Tue, 16 Apr 2019 20:40:52 -0400 Subject: [PATCH] make this translatable wow why does inserting liquid variables directly into inline js even work, that is horrifying and highly convenient --- _data/navigation/en_US.yml | 3 +++ _includes/head/custom.html | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/_data/navigation/en_US.yml b/_data/navigation/en_US.yml index e82ca3c3e3..300949b03b 100644 --- a/_data/navigation/en_US.yml +++ b/_data/navigation/en_US.yml @@ -33,6 +33,9 @@ main: - title: Uninstall CFW url: uninstall-cfw +top: + - + title: This website uses cookies to display the current guide progress on the sidebar and otherwise enhance the site. bottom: - title: For support in English, ask for help at Nintendo Homebrew on Discord. diff --git a/_includes/head/custom.html b/_includes/head/custom.html index a5a592ffed..0a86e5175d 100644 --- a/_includes/head/custom.html +++ b/_includes/head/custom.html @@ -17,6 +17,16 @@ + +{% 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 %} +