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" %} {% extends "base.html" %}
{% block title %} – Archives{% endblock %} {% block title %} – {% trans %}Archives{% endtrans %}{% endblock %}
{% block content %} {% block content %}
<article> <article>
<header> <header>
<h1>Archives</h1> <h1>{% trans %}Archives{% endtrans %}</h1>
</header> </header>
<div> <div>
<dl> <dl>

View file

@ -13,7 +13,7 @@
<article> <article>
<header> <header>
<h1 id="{{ article.slug }}">{{ article.title }}</h1> <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> </header>
<div> <div>
{{ article.content }} {{ article.content }}
@ -29,14 +29,14 @@
</div> </div>
{% if ADD_THIS_ID %} {% if ADD_THIS_ID %}
<div class="center social-share"> <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_native_toolbox"></div>
<div class="addthis_sharing_toolbox"></div> <div class="addthis_sharing_toolbox"></div>
</div> </div>
{% endif %} {% endif %}
{% if article.related_posts %} {% if article.related_posts %}
<div class="related-posts"> <div class="related-posts">
<h4>Related posts:</h4> <h4>{% trans %}Related posts{% endtrans %}:</h4>
<ul> <ul>
{% for related_post in article.related_posts %} {% for related_post in article.related_posts %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></li> <li><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></li>

View file

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

View file

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

View file

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

View file

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

View file

@ -6,22 +6,22 @@
<header> <header>
<h2><a href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{{ article.title }}</a></h2> <h2><a href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{{ article.title }}</a></h2>
<p> <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 %} {% if article.tags %}
&#8226; Tagged with &#8226; {% trans %}Tagged with{% endtrans %}
{% for tag in article.tags %} {% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %} <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if DISQUS_SITENAME %} {% 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 %} {% endif %}
</p> </p>
</header> </header>
<div> <div>
{% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %} {% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %}
{{ article.summary }} {{ 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 %} {% else %}
{{ article.content }} {{ article.content }}
{% endif %} {% endif %}

View file

@ -8,5 +8,5 @@
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})(); })();
</script> </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 %} {% 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"> <div class="pagination">
{% if articles_page.has_next() %} {% if articles_page.has_next() %}
<a class="btn" href="{{ SITEURL }}/{{ articles_next_page.url }}"> <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> </a>
{% endif %} {% endif %}
{% if articles_page.has_previous() %} {% if articles_page.has_previous() %}
<a class="btn float-right" href="{{ SITEURL }}/{{ articles_previous_page.url }}"> <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> </a>
{% endif %} {% endif %}
</div> </div>

View file

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

View file

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