Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Jinjify; clean up translations
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Aug 31, 2015
1 parent d3b0263 commit 73c8f50
Show file tree
Hide file tree
Showing 99 changed files with 971 additions and 123 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -19,10 +19,13 @@ Features
can be overwritten with ``POSTS_SECTION_COLORS`` option (Issue #1980)
* New ``TAG_PAGES_TITLES`` and ``CATEGORY_PAGES_TITLES`` options
(Issue #1962)
* Add Bosnian and Serbian (Latin) languages, by Saša Savić [bs, sr_latin]
* Add Portuguese (Portugal) language, by jamatos [pt]

Bugfixes
--------

* Clean up translations for third party components
* ``pagekind["main_index"]`` set on the main indexes to differentiate
them from all the other indexes.
* Add dependency on metadata file for 2-file posts (Issue #1968)
Expand Down
43 changes: 43 additions & 0 deletions nikola/data/themes/base-jinja/templates/author.tmpl
@@ -0,0 +1,43 @@
{# -*- coding: utf-8 -*- #}
{% extends 'list_post.tmpl' %}

{% block extra_head %}
{{ super() }}
{% if translations|length > 1 and generate_rss %}
{% for language in translations|sort %}
<link rel="alternate" type="application/rss+xml" type="application/rss+xml" title="RSS for {{ kind }} {{ author }} ({{ language }})" href="{{ _link(kind + "_rss", author, language) }}">
{% endfor %}
{% elif generate_rss %}
<link rel="alternate" type="application/rss+xml" type="application/rss+xml" title="RSS for {{ kind }} {{ author }}" href="{{ _link(kind + "_rss", author) }}">
{% endif %}
{% endblock %}


{% block content %}
<article class="authorpage">
<header>
<h1>{{ title|e }}</h1>
{% if description %}
<p>{{ description }}</p>
{% endif %}
<div class="metadata">
{% if translations|length > 1 and generate_rss %}
{% for language in translations|sort %}
<p class="feedlink">
<a href="{{ _link(kind + "_rss", author, language) }}" hreflang="{{ language }}" type="application/rss+xml">{{ messages('RSS feed', language) }} ({{ language }})</a>&nbsp;
</p>
{% endfor %}
{% elif generate_rss %}
<p class="feedlink"><a href="{{ _link(kind + "_rss", author) }}" type="application/rss+xml">{{ messages('RSS feed') }}</a></p>
{% endif %}
</div>
</header>
{% if posts %}
<ul class="postlist">
{% for post in posts %}
<li><a href="{{ post.permalink() }}" class="listtitle">{{ post.title()|e }}</a><time class="listdate" datetime="{{ post.formatted_date('webiso') }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time></li>
{% endfor %}
</ul>
{% endif %}
</article>
{% endblock %}
13 changes: 13 additions & 0 deletions nikola/data/themes/base-jinja/templates/authorindex.tmpl
@@ -0,0 +1,13 @@
{# -*- coding: utf-8 -*- #}
{% extends 'index.tmpl' %}

{% block extra_head %}
{{ super() }}
{% if tranlations|length > 1 and generate_atom %}
{% for language in translations|sort %}
<link rel="alternate" type="application/atom+xml" title="Atom for the {{ author }} section ({{ language }})" href="{{ _link(kind + "_atom", author, language) }}">
{% endfor %}
{% elif generate_atom %}
<link rel="alternate" type="application/atom+xml" title="Atom for the {{ author }} section" href="{{ _link("author" + "_atom", author) }}">
{% endif %}
{% endblock %}
17 changes: 17 additions & 0 deletions nikola/data/themes/base-jinja/templates/authors.tmpl
@@ -0,0 +1,17 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}

{% block content %}
<article class="authorindex">
{% if items %}
<h2>{{ messages("Authors") }}</h2>
<ul class="postlist">
{% for text, link in items %}
{% if text not in hidden_authors %}
<li><a class="reference listtitle" href="{{ link }}">{{ text }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</article>
{% endblock %}
2 changes: 1 addition & 1 deletion nikola/data/themes/base-jinja/templates/index.tmpl
Expand Up @@ -20,7 +20,7 @@
<div class="metadata">
<p class="byline author vcard"><span class="byline-name fn">
{% if author_pages_generated %}
<a href="{{_link('author', post.author())}}">{{ post.author() }}</a>
<a href="{{ _link('author', post.author()) }}">{{ post.author() }}</a>
{% else %}
{{ post.author() }}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base-jinja/templates/post_header.tmpl
Expand Up @@ -33,7 +33,7 @@
<div class="metadata">
<p class="byline author vcard"><span class="byline-name fn">
{% if author_pages_generated %}
<a href="{{_link('author', post.author())}}">{{ post.author() }}</a>
<a href="{{ _link('author', post.author()) }}">{{ post.author() }}</a>
{% else %}
{{ post.author() }}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base-jinja/templates/sectionindex.tmpl
Expand Up @@ -4,7 +4,7 @@
{% block extra_head %}
{{ super() }}
{% if generate_atom %}
<link rel="alternate" type="application/atom+xml" title="Atom for the {{ posts[0].section_name() }} section" href="${_link('section_index_atom', posts[0].section_slug())}">
<link rel="alternate" type="application/atom+xml" title="Atom for the {{ posts[0].section_name() }} section" href="{{ _link('section_index_atom', posts[0].section_slug()) }}">
{% endif %}
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base-jinja/templates/tag.tmpl
Expand Up @@ -43,7 +43,7 @@
{% if posts %}
<ul class="postlist">
{% for post in posts %}
<li><a href="{{ post.permalink() }}" class="listtitle">{{ post.title()|e }}</a> <time class="listdate" datetime="{{ post.formatted_date('webiso') }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time></li>
<li><time class="listdate" datetime="{{ post.formatted_date('webiso') }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time><a href="{{ post.permalink() }}" class="listtitle">{{ post.title()|e }}<a></li>
{% endfor %}
</ul>
{% endif %}
Expand Down
4 changes: 4 additions & 0 deletions nikola/data/themes/base/messages/messages_ar.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "",
"Also available in:": "أيضا متوفر في:",
"Archive": "الأرشيف",
"Authors": "",
"Categories": "فئات",
"Comments": "التّعليقات",
"LANGUAGE": "العربيّة",
Expand All @@ -19,6 +20,7 @@
"Original site": "الموقع الأصلي",
"Posted:": "نشر:",
"Posts about %s": "مقالات عن s%",
"Posts by %s": "",
"Posts for year %s": "مقالات سنة s%",
"Posts for {month} {day}, {year}": "",
"Posts for {month} {year}": "",
Expand All @@ -32,6 +34,8 @@
"Subcategories:": "",
"Tags and Categories": "تصنيفات و فئات",
"Tags": "تصنيفات",
"Uncategorized": "",
"Updates": "",
"Write your page here.": "",
"Write your post here.": "",
"old posts, page %d": "مقالات قديمة, صفحة d%",
Expand Down
4 changes: 4 additions & 0 deletions nikola/data/themes/base/messages/messages_az.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "",
"Also available in:": "Həmçinin mövcuddur:",
"Archive": "Arxiv",
"Authors": "",
"Categories": "Kateqoriyalar",
"Comments": "Şərhlər",
"LANGUAGE": "Azərbaycan dili",
Expand All @@ -19,6 +20,7 @@
"Original site": "Original sayt",
"Posted:": "yazılma tarixi:",
"Posts about %s": "%s ilə bağlı yazılar",
"Posts by %s": "",
"Posts for year %s": "%s ilindəki yazılar",
"Posts for {month} {day}, {year}": "{month} {day}, {year} üçün yazılar",
"Posts for {month} {year}": "{month} {year} üçün yazılar",
Expand All @@ -32,6 +34,8 @@
"Subcategories:": "",
"Tags and Categories": "Teqlər və Kateqoriyalar",
"Tags": "Teqlər",
"Uncategorized": "",
"Updates": "",
"Write your page here.": "",
"Write your post here.": "",
"old posts, page %d": "köhnə yazılar, səhifə %s",
Expand Down
4 changes: 4 additions & 0 deletions nikola/data/themes/base/messages/messages_bg.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "",
"Also available in:": "Също достъпно в:",
"Archive": "Архив",
"Authors": "",
"Categories": "Категории",
"Comments": "",
"LANGUAGE": "Български",
Expand All @@ -19,6 +20,7 @@
"Original site": "Оригиналния сайт",
"Posted:": "Публиковано:",
"Posts about %s": "Публикации относно %s",
"Posts by %s": "",
"Posts for year %s": "Публикации за %s година",
"Posts for {month} {day}, {year}": "",
"Posts for {month} {year}": "Публикации за {month} {year}",
Expand All @@ -32,6 +34,8 @@
"Subcategories:": "",
"Tags and Categories": "Тагове и Категории",
"Tags": "Тагове",
"Uncategorized": "",
"Updates": "",
"Write your page here.": "",
"Write your post here.": "",
"old posts, page %d": "стари публикации, страница %d",
Expand Down
4 changes: 4 additions & 0 deletions nikola/data/themes/base/messages/messages_bs.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "(aktivno)",
"Also available in:": "Takođe dostupan u:",
"Archive": "Arhiva",
"Authors": "",
"Categories": "Kategorije",
"Comments": "Komentari",
"LANGUAGE": "Bosanski",
Expand All @@ -19,6 +20,7 @@
"Original site": "Izvorni sajt",
"Posted:": "Objavljeno:",
"Posts about %s": "Objave o %s",
"Posts by %s": "",
"Posts for year %s": "Objave u godini %s",
"Posts for {month} {day}, {year}": "Objave za {month} {day}, {year}",
"Posts for {month} {year}": "Objave za {month} {year}",
Expand All @@ -32,6 +34,8 @@
"Subcategories:": "Podkategorije:",
"Tags and Categories": "Oznake i kategorije",
"Tags": "Oznake",
"Uncategorized": "",
"Updates": "",
"Write your page here.": "Vašu stranicu napišite ovdje.",
"Write your post here.": "Vašu objavu napišite ovdje.",
"old posts, page %d": "stare objave, strana %d",
Expand Down
4 changes: 4 additions & 0 deletions nikola/data/themes/base/messages/messages_ca.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "",
"Also available in:": "També disponibles en:",
"Archive": "Arxiu",
"Authors": "",
"Categories": "Categories",
"Comments": "Comentaris",
"LANGUAGE": "Català",
Expand All @@ -19,6 +20,7 @@
"Original site": "Lloc original",
"Posted:": "Publicat:",
"Posts about %s": "Entrades sobre %s",
"Posts by %s": "",
"Posts for year %s": "Entrades de l'any %s",
"Posts for {month} {day}, {year}": "",
"Posts for {month} {year}": "Publicat en {month} {year}",
Expand All @@ -32,6 +34,8 @@
"Subcategories:": "",
"Tags and Categories": "Etiquetes i Categories",
"Tags": "Etiquetes",
"Uncategorized": "",
"Updates": "",
"Write your page here.": "",
"Write your post here.": "",
"old posts, page %d": "entrades antigues, pàgina %d",
Expand Down
4 changes: 4 additions & 0 deletions nikola/data/themes/base/messages/messages_cs.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "",
"Also available in:": "Dostupné také v",
"Archive": "Archiv",
"Authors": "",
"Categories": "Kategorie",
"Comments": "Komentáře",
"LANGUAGE": "Čeština",
Expand All @@ -19,6 +20,7 @@
"Original site": "Původní stránka",
"Posted:": "Zveřejněno:",
"Posts about %s": "Příspěvky o %s",
"Posts by %s": "",
"Posts for year %s": "Příspěvky v roce %s",
"Posts for {month} {day}, {year}": "Příspěvky v {month} {day}, {year}",
"Posts for {month} {year}": "Příspěvky v {month} {year}",
Expand All @@ -32,6 +34,8 @@
"Subcategories:": "",
"Tags and Categories": "Štítky a kategorie",
"Tags": "Štítky",
"Uncategorized": "",
"Updates": "",
"Write your page here.": "",
"Write your post here.": "",
"old posts, page %d": "staré příspěvky, strana %d",
Expand Down
4 changes: 4 additions & 0 deletions nikola/data/themes/base/messages/messages_da.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "",
"Also available in:": "Fås også i:",
"Archive": "Arkiv",
"Authors": "",
"Categories": "Kategorier",
"Comments": "Kommentarer",
"LANGUAGE": "Dansk",
Expand All @@ -19,6 +20,7 @@
"Original site": "Oprindeligt hjemmeside",
"Posted:": "Opslået:",
"Posts about %s": "Indlæg om %s",
"Posts by %s": "",
"Posts for year %s": "Indlæg for %s",
"Posts for {month} {day}, {year}": "Indlæs for {month} {day}, {year}",
"Posts for {month} {year}": "Indlæg for {month} {year}",
Expand All @@ -32,6 +34,8 @@
"Subcategories:": "",
"Tags and Categories": "Nøgleord og kategorier",
"Tags": "Nøgleord",
"Uncategorized": "",
"Updates": "",
"Write your page here.": "",
"Write your post here.": "",
"old posts, page %d": "gamle indlæg, side %d",
Expand Down
4 changes: 4 additions & 0 deletions nikola/data/themes/base/messages/messages_de.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "",
"Also available in:": "Auch verfügbar in:",
"Archive": "Archiv",
"Authors": "",
"Categories": "Kategorien",
"Comments": "Kommentare",
"LANGUAGE": "Deutsch",
Expand All @@ -19,6 +20,7 @@
"Original site": "Original-Seite",
"Posted:": "Veröffentlicht:",
"Posts about %s": "Einträge über %s",
"Posts by %s": "",
"Posts for year %s": "Einträge aus dem Jahr %s",
"Posts for {month} {day}, {year}": "Einträge vom {day}. {month} {year}",
"Posts for {month} {year}": "Einträge aus {month} {year}",
Expand All @@ -32,6 +34,8 @@
"Subcategories:": "Unterkategorien:",
"Tags and Categories": "Tags und Kategorien",
"Tags": "Tags",
"Uncategorized": "",
"Updates": "",
"Write your page here.": "",
"Write your post here.": "",
"old posts, page %d": "Ältere Einträge, Seite %d",
Expand Down
4 changes: 4 additions & 0 deletions nikola/data/themes/base/messages/messages_el.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "",
"Also available in:": "Διαθέσιμο και στα:",
"Archive": "Αρχείο",
"Authors": "",
"Categories": "Κατηγορίες",
"Comments": "Σχόλια",
"LANGUAGE": "Ελληνικά",
Expand All @@ -19,6 +20,7 @@
"Original site": "Ιστοσελίδα αρχικής ανάρτησης",
"Posted:": "Αναρτήθηκε:",
"Posts about %s": "Αναρτήσεις για %s",
"Posts by %s": "",
"Posts for year %s": "Αναρτήσεις για το έτος %s",
"Posts for {month} {day}, {year}": "Αναρτήσεις στις {day} {month}, {year}",
"Posts for {month} {year}": "Αναρτήσεις για τον {month} του {year}",
Expand All @@ -32,6 +34,8 @@
"Subcategories:": "",
"Tags and Categories": "Ετικέτες και κατηγορίες",
"Tags": "Ετικέτες",
"Uncategorized": "",
"Updates": "",
"Write your page here.": "",
"Write your post here.": "",
"old posts, page %d": "σελίδα παλαιότερων αναρτήσεων %d",
Expand Down
8 changes: 4 additions & 4 deletions nikola/data/themes/base/messages/messages_en.py
Expand Up @@ -6,6 +6,7 @@
"(active)": "(active)",
"Also available in:": "Also available in:",
"Archive": "Archive",
"Authors": "Authors",
"Categories": "Categories",
"Comments": "Comments",
"LANGUAGE": "English",
Expand All @@ -19,6 +20,7 @@
"Original site": "Original site",
"Posted:": "Posted:",
"Posts about %s": "Posts about %s",
"Posts by %s": "Posts by %s",
"Posts for year %s": "Posts for year %s",
"Posts for {month} {day}, {year}": "Posts for {month} {day}, {year}",
"Posts for {month} {year}": "Posts for {month} {year}",
Expand All @@ -32,12 +34,10 @@
"Subcategories:": "Subcategories:",
"Tags and Categories": "Tags and Categories",
"Tags": "Tags",
"Uncategorized": "Uncategorized",
"Updates": "Updates",
"Write your page here.": "Write your page here.",
"Write your post here.": "Write your post here.",
"old posts, page %d": "old posts, page %d",
"page %d": "page %d",
"Uncategorized": "Uncategorized",
"Updates": "Updates",
"Authors": "Authors",
"Posts by %s": "Posts by %s"
}

0 comments on commit 73c8f50

Please sign in to comment.