From 6b0c32a3a7d6e75d038ca5451619fedace4959ee Mon Sep 17 00:00:00 2001
From: magicfelix <felix@felix-zauberer.de>
Date: Sun, 4 Oct 2020 14:28:39 +0200
Subject: [PATCH] Internationalize sponsors text, closes #10

---
 templates/article.html                   | 5 +++++
 templates/base.html                      | 2 +-
 templates/page.html                      | 5 +++++
 templates/page_with_button.html          | 5 +++++
 templates/page_with_carousel.html        | 5 +++++
 templates/page_with_carousel_button.html | 5 +++++
 6 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/templates/article.html b/templates/article.html
index 9f5e366..1b1d13f 100644
--- a/templates/article.html
+++ b/templates/article.html
@@ -86,6 +86,11 @@
 </section>
 
 {% endblock content %}
+
+{% block sponsorstext %}
+{{ SPONSORSTEXTS[article.lang] }}
+{% endblock %}
+
 {% block languagefooter %}
 {% import 'translations.html' as translations with context %}
 {{ translations.translations_for(article) }}
diff --git a/templates/base.html b/templates/base.html
index c34a597..9e25cc8 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -111,7 +111,7 @@
             <div class="row">
                 <div class="col s12">
                     <h3 id='sponsorheading' class="black-text">Sponsoren</h3>
-                    <p id="sponsortext" class="black-text">Wir bedanken uns bei unseren Sponsoren für die Unterstützung unserer Vereinsarbeit. Außerdem freuen wir uns immer über weitere Sponsoren, die ihr Engagement mit ihrem Logo hier bewerben möchten!</p>
+		    <p id="sponsortext" class="black-text">{% block sponsorstext %}{{ SPONSORSTEXTS["de"] }}{% endblock %}</p>
                     {% for image, url in SPONSOR_LOGOS %}
                         <a href="{{ url }}"><img src="{{ image }}" href="{{ url }}" alt="{{ url }}" class="sponsorslogo" /></a>
                     {% endfor %}
diff --git a/templates/page.html b/templates/page.html
index eac7ece..3563739 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -100,6 +100,11 @@
 
 
 {% endblock content %}
+
+{% block sponsorstext %}
+{{ SPONSORSTEXTS[page.lang] }}
+{% endblock %}
+
 {% block languagefooter %}
 {% import 'translations.html' as translations with context %}
 {{ translations.translations_for(page) }}
diff --git a/templates/page_with_button.html b/templates/page_with_button.html
index f37b36f..e8d050a 100644
--- a/templates/page_with_button.html
+++ b/templates/page_with_button.html
@@ -74,6 +74,11 @@
 </div>
 
 {% endblock %}
+
+{% block sponsorstext %}
+{{ SPONSORSTEXTS[page.lang] }}
+{% endblock %}
+
 {% block languagefooter %}
 {% import 'translations.html' as translations with context %}
 {{ translations.translations_for(page) }}
diff --git a/templates/page_with_carousel.html b/templates/page_with_carousel.html
index 6df9d2d..6e49f6b 100644
--- a/templates/page_with_carousel.html
+++ b/templates/page_with_carousel.html
@@ -90,6 +90,11 @@
     </div>
     {% endif %}
 {% endblock %}
+
+{% block sponsorstext %}
+{{ SPONSORSTEXTS[page.lang] }}
+{% endblock %}
+
 {% block languagefooter %}
 {% import 'translations.html' as translations with context %}
 {{ translations.translations_for(page) }}
diff --git a/templates/page_with_carousel_button.html b/templates/page_with_carousel_button.html
index 2e5fdcc..e22c3a7 100644
--- a/templates/page_with_carousel_button.html
+++ b/templates/page_with_carousel_button.html
@@ -26,6 +26,11 @@
     </div>
 
 {% endblock %}
+
+{% block sponsorstext %}
+{{ SPONSORSTEXTS[page.lang] }}
+{% endblock %}
+
 {% block languagefooter %}
 {% import 'translations.html' as translations with context %}
 {{ translations.translations_for(page) }}
-- 
GitLab