Added the template files for localization

This commit is contained in:
Marcel Huth 2016-07-30 14:34:54 +02:00
parent 8bb4192598
commit bda626352c
12 changed files with 22 additions and 22 deletions

View file

@ -1,10 +1,10 @@
{% extends "base.html" %}
{% block title %} – Archives{% endblock %}
{% block title %} – {% trans %}Archives{% endtrans %}{% endblock %}
{% block content %}
<article>
<header>
<h1>Archives</h1>
<h1>{% trans %}Archives{% endtrans %}</h1>
</header>
<div>
<dl>

View file

@ -13,7 +13,7 @@
<article>
<header>
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
<p>Posted on {{ article.locale_date }} in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></p>
<p>{% trans %}Posted on{% endtrans %} {{ article.locale_date }} {% trans %}in{% endtrans %} <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></p>
</header>
<div>
{{ article.content }}
@ -29,14 +29,14 @@
</div>
{% if ADD_THIS_ID %}
<div class="center social-share">
<p>Like this article? Share it with your friends!</p>
<p>{% trans %}Like this article? Share it with your friends!{% endtrans %}</p>
<div class="addthis_native_toolbox"></div>
<div class="addthis_sharing_toolbox"></div>
</div>
{% endif %}
{% if article.related_posts %}
<div class="related-posts">
<h4>Related posts:</h4>
<h4>{% trans %}Related posts{% endtrans %}:</h4>
<ul>
{% for related_post in article.related_posts %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></li>

View file

@ -1,3 +1,3 @@
{% extends "index.html" %}
{% block title %} &ndash; Posts by: {{ author }}{% endblock %}
{% block title %} &ndash; {% trans %}Posts by{% endtrans %}: {{ author }}{% endblock %}
{% set summarise = True %}

View file

@ -1,10 +1,10 @@
{% extends "base.html" %}
{% block title %} &ndash; Authors{% endblock %}
{% block title %} &ndash; {% trans %}Authors{% endtrans %}{% endblock %}
{% block content %}
<article>
<header>
<h1>Authors</h1>
<h1>{% trans %}Authors{% endtrans %}</h1>
</header>
<div>
<ul class="list">

View file

@ -1,10 +1,10 @@
{% extends "base.html" %}
{% block title %} &ndash; Categories{% endblock %}
{% block title %} &ndash; {% trans %}Categories{% endtrans %}{% endblock %}
{% block content %}
<article>
<header>
<h1>Categories</h1>
<h1>{% trans %}Categories{% endtrans %}</h1>
</header>
<div>
<ul class="list">

View file

@ -1,3 +1,3 @@
{% extends "index.html" %}
{% block title %} &ndash; Category: {{ category }}{% endblock %}
{% block title %} &ndash; {% trans %}Category{% endtrans %}: {{ category }}{% endblock %}
{% set summarise = True %}

View file

@ -6,22 +6,22 @@
<header>
<h2><a href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{{ article.title }}</a></h2>
<p>
Posted on {{ article.locale_date }} in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
{% trans %}Posted on{% endtrans %} {{ article.locale_date }} {% trans %}in{% endtrans %} <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
{% if article.tags %}
&#8226; Tagged with
&#8226; {% trans %}Tagged with{% endtrans %}
{% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
{% if DISQUS_SITENAME %}
&#8226; <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">Leave a comment</a>
&#8226; <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">{% trans %}Leave a comment{% endtrans %}</a>
{% endif %}
</p>
</header>
<div>
{% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %}
{{ article.summary }}
<a class="btn" href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">Continue reading</a>
<a class="btn" href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{% trans %}Continue reading{% endtrans %}</a>
{% else %}
{{ article.content }}
{% endif %}

View file

@ -8,5 +8,5 @@
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
<noscript>{% trans %}Please enable JavaScript to view the{% endtrans %} <a href="https://disqus.com/?ref_noscript" rel="nofollow">{% trans %}comments powered by Disqus{% endtrans %}.</a></noscript>
{% endif %}

View file

@ -1 +1 @@
<p>Built using <a href="http://getpelican.com" target="_blank">Pelican</a> - <a href="https://github.com/alexandrevicenzi/flex" target="_blank">Flex</a> theme by <a href="http://alexandrevicenzi.com" target="_blank">Alexandre Vicenzi</a></p>
<p>{% trans %}Built using{% endtrans %} <a href="http://getpelican.com" target="_blank">Pelican</a> - <a href="https://github.com/alexandrevicenzi/flex" target="_blank">Flex</a> {% trans %}theme by{% endtrans %} <a href="http://alexandrevicenzi.com" target="_blank">Alexandre Vicenzi</a></p>

View file

@ -2,12 +2,12 @@
<div class="pagination">
{% if articles_page.has_next() %}
<a class="btn" href="{{ SITEURL }}/{{ articles_next_page.url }}">
<i class="fa fa-angle-left"></i> Older Posts
<i class="fa fa-angle-left"></i> {% trans %}Older Posts{% endtrans %}
</a>
{% endif %}
{% if articles_page.has_previous() %}
<a class="btn float-right" href="{{ SITEURL }}/{{ articles_previous_page.url }}">
Newer Posts <i class="fa fa-angle-right"></i>
{% trans %}Newer Posts{% endtrans %} <i class="fa fa-angle-right"></i>
</a>
{% endif %}
</div>

View file

@ -1,3 +1,3 @@
{% extends "index.html" %}
{% block title %} &ndash; Tag: {{ tag }}{% endblock %}
{% block title %} &ndash; {% trans %}Tag{% endtrans %}: {{ tag }}{% endblock %}
{% set summarise = True %}

View file

@ -1,10 +1,10 @@
{% extends "base.html" %}
{% block title %} &ndash; Tags{% endblock %}
{% block title %} &ndash; {% trans %}Tags{% endtrans %}{% endblock %}
{% block content %}
<article>
<header>
<h1>Tags</h1>
<h1>{% trans %}Tags{% endtrans %}</h1>
</header>
<div>
<ul class="list">