diff --git a/pelican_theme_teckids/pelicanconf.py b/pelican_theme_teckids/pelicanconf.py index fd6759432862f8adca48bad9821744f3a73a3efc..a54fc247ba0c3152a044a328f15aff0807f2ce8a 100644 --- a/pelican_theme_teckids/pelicanconf.py +++ b/pelican_theme_teckids/pelicanconf.py @@ -42,6 +42,9 @@ MARKDOWN = { "markdown.extensions.md_in_html": {} } } +JINJA_ENVIRONMENT = { + "extensions": ["jinja2.ext.i18n"] +} MENUITEMS = [ ("Startseite", "index.html"), diff --git a/pelican_theme_teckids/templates/archives.html b/pelican_theme_teckids/templates/archives.html index 78387742a5b02af39dfdf73d731a59b3ecc04224..d41ae5a7fbab39bb0a116d3e927701556ee69b99 100644 --- a/pelican_theme_teckids/templates/archives.html +++ b/pelican_theme_teckids/templates/archives.html @@ -1,11 +1,11 @@ {% extends "base.html" %} -{% block title %}{{ SITENAME }} — Archives{% endblock %} +{% block title %}{% trans %}Artikel{% endtrans %}{% endblock %} {% block template_content_head %} <div class="container"> <div class="row"> <div class="col-sm-12"> - <h1>News</h1> + <h1>{% trans %}Artikel{% endtrans %}</h1> {% for article in (articles|list + webring_articles|list)|sort(reverse=True, attribute="date") %} {% if article.source_link %} {# This is a webring article #} diff --git a/pelican_theme_teckids/templates/article.html b/pelican_theme_teckids/templates/article.html index aece2f697a5da47d9b43fd146b0049ec987fd3b3..a528668dfb0bf6bd12716d4631ef4df0885800ff 100644 --- a/pelican_theme_teckids/templates/article.html +++ b/pelican_theme_teckids/templates/article.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}{{ article.title|striptags }} - {{ SITETITLE }}{% endblock %} +{% block title %}{{ article.title|striptags }}{% endblock %} {% block head %} {{ super() }} diff --git a/pelican_theme_teckids/templates/author.html b/pelican_theme_teckids/templates/author.html index 187399b7a3977009c03d465aaf1eff21d4ce1c7c..40accb0b323ecfeaf4f6185fc3065a7bd8237ae7 100644 --- a/pelican_theme_teckids/templates/author.html +++ b/pelican_theme_teckids/templates/author.html @@ -1,6 +1,6 @@ {% extends "page.html" %} -{% block title %}{{ SITENAME }} — Articles by {{ author }}{% endblock %} +{% block title %}{% trans %}Artikel von {{ author }}{% endtrans %}{% endblock %} {% block content_title %} -<h2>Articles by {{ author }}</h2> +<h2>{% trans %}Artikel von {{ author }}{% endtrans %}</h2> {% endblock %} diff --git a/pelican_theme_teckids/templates/base.html b/pelican_theme_teckids/templates/base.html index 14ce9a15aed9338fcf6b54bbd714b462fd73b4f5..fc1f95e188c293734963a6289f1003497f27b6be 100644 --- a/pelican_theme_teckids/templates/base.html +++ b/pelican_theme_teckids/templates/base.html @@ -16,7 +16,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="description" content="{{ DESCRIPTION }}" /> - <meta name="author" content="Teckids e.V." /> + <meta name="author" content="{{ AUTHOR }}" /> <style> :root { --teckids-primary-light: {{ PRIMARY_LIGHT }}ff; @@ -44,7 +44,7 @@ <link rel="shortcut icon" href="{{ FAVICON }}" /> <title> - {{ SITENAME }} + {{ SITENAME }} – {% block title %}{% endblock %} </title> </head> @@ -106,7 +106,7 @@ <div class="container"> <div class="row"> <div class="col s12 m6" id="sponsors-box"> - <h3 class="black-text sponsorheading">Sponsoren</h3> + <h3 class="black-text sponsorheading">{% trans %}Sponsoren{% endtrans %}</h3> {% for alt, image, url, before in SPONSORS %} {% if before >= TODAY %} <a href="{{ url }}"><img src="{{ image }}" href="{{ url }}" alt="{{ alt }}" title="{{ alt }}" class="sponsorslogo" /></a> @@ -142,19 +142,24 @@ {{ FOOTERTEXT }} </p> <p class="licence"> + {% trans %}Dieser Inhalt ist lizenziert unter{% endtrans %} {% if article is defined %} - {{ LICENCETEXTS[article.lang|default(DEFAULT_LANG)] }} {{ article.metadata.licence|default(LICENCE_DEFAULT) }} + {{ article.metadata.licence|default(LICENCE_DEFAULT) }} {% elif page is defined %} - {{ LICENCETEXTS[DEFAULT_LANG] }} {{ page.metadata.licence|default(LICENCE_DEFAULT) }} + {{ page.metadata.licence|default(LICENCE_DEFAULT) }} + {% else %} + {{ LICENCE_DEFAULT }} {% endif %} <br/> {% if article is defined %} - <a href="{{ GITWEB_BASE }}/content/{{ article.relative_source_path }}">Edit in source repository</a> + <a href="{{ GITWEB_BASE }}/content/{{ article.relative_source_path }}"> {% elif page is defined %} - <a href="{{ GITWEB_BASE }}/content/{{ page.relative_source_path }}">Edit in source repository</a> + <a href="{{ GITWEB_BASE }}/content/{{ page.relative_source_path }}"> {% else %} - <a href="{{ GITWEB_BASE }}/content">Edit in source repository</a> + <a href="{{ GITWEB_BASE }}/content"> {% endif %} + {% trans %}Im Quell-Repository editieren{% endtrans %} + </a> </p> </div> diff --git a/pelican_theme_teckids/templates/page.html b/pelican_theme_teckids/templates/page.html index a5086ceb97580fd21791cb78fb74814486e97424..2bded047ff34a8afe036761feb98b9e97c365418 100644 --- a/pelican_theme_teckids/templates/page.html +++ b/pelican_theme_teckids/templates/page.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}{{ page.title|striptags }}{% endblock %} + {% block head %} {{ super() }} <link rel='stylesheet' type='text/css' href="/theme/css/page.css" /> diff --git a/pelican_theme_teckids/templates/page_text.html b/pelican_theme_teckids/templates/page_text.html index 66161a2a8c5689c9d660aeec1225188ec2f10db7..16eb9f7fbe9dd896fb4bfd6f9af7a26298f65905 100644 --- a/pelican_theme_teckids/templates/page_text.html +++ b/pelican_theme_teckids/templates/page_text.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}{{ page.title|striptags }}{% endblock %} + {% block content %} <section class='page_content'> <div class="container">