diff --git a/Makefile b/Makefile deleted file mode 100644 index 6174f19..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -help: - @echo 'Makefile for localization' - @echo '' - @echo 'Usage:' - @echo ' make extract Extract translatable strings from templates' - @echo ' make init lang=lang Initialize the message catalogs with a new language (e.g make init lang=ja)' - @echo ' make compile Compile the message catalogs' - @echo ' make update Update the catalogs when templates change' - -extract: - pybabel extract --mapping babel.cfg --output messages.pot ./ - -init: - pybabel init --input-file messages.pot --output-dir translations/ --locale $$lang --domain messages - -compile: - pybabel compile --directory translations/ --domain messages - -update: - pybabel update --input-file messages.pot --output-dir translations/ --domain messages - diff --git a/babel.cfg b/babel.cfg deleted file mode 100644 index 2274808..0000000 --- a/babel.cfg +++ /dev/null @@ -1 +0,0 @@ -[jinja2: templates/**.html] diff --git a/messages.pot b/messages.pot deleted file mode 100644 index 191ff8e..0000000 --- a/messages.pot +++ /dev/null @@ -1,95 +0,0 @@ -# Translations template for PROJECT. -# Copyright (C) 2017 ORGANIZATION -# This file is distributed under the same license as the PROJECT project. -# FIRST AUTHOR , 2017. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2017-04-06 06:29+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -#: templates/archives.html:3 -msgid "Archives" -msgstr "" - -#: templates/archives.html:18 -#, python-format -msgid "Archives for %(name)s" -msgstr "" - -#: templates/article.html:108 templates/index.html:61 -msgid "Posted by" -msgstr "" - -#: templates/article.html:112 templates/index.html:65 -msgid "on" -msgstr "" - -#: templates/article.html:115 -#, python-format -msgid "Updated on %(moddate)s" -msgstr "" - -#: templates/article.html:134 -msgid "tags" -msgstr "" - -#: templates/article.html:155 -msgid "Please enable JavaScript to view the comments." -msgstr "" - -#: templates/author.html:3 templates/author.html:7 templates/author.html:27 -#: templates/authors.html:18 -#, python-format -msgid "Articles by %(name)s" -msgstr "" - -#: templates/authors.html:3 -msgid "Authors" -msgstr "" - -#: templates/categories.html:3 templates/categories.html:18 -msgid "Categories" -msgstr "" - -#: templates/category.html:3 templates/category.html:18 -#, python-format -msgid "Articles in the %(category)s category" -msgstr "" - -#: templates/pagination.html:7 -msgid "Older Posts" -msgstr "" - -#: templates/pagination.html:10 -msgid "Newest Posts" -msgstr "" - -#: templates/period_archives.html:3 templates/period_archives.html:18 -#, python-format -msgid "Archives for %(period)s" -msgstr "" - -#: templates/tag.html:2 -#, python-format -msgid "Tag %(tag)s" -msgstr "" - -#: templates/tags.html:3 templates/tags.html:18 -msgid "Tags" -msgstr "" - -#: templates/tags.html:27 -#, python-format -msgid "Tags for %(sitename)s" -msgstr "" - diff --git a/templates/archives.html b/templates/archives.html index 071835d..15149cb 100644 --- a/templates/archives.html +++ b/templates/archives.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}{{ SITENAME }} - {{ gettext('Archives') }} {% endblock %} +{% block title %}{{ SITENAME }} - Archives{% endblock %} {% block header %} @@ -15,7 +15,7 @@
-

{{ gettext('Archives for %(name)s', name=SITENAME) }}

+

Archives for {{ SITENAME }}

diff --git a/templates/article.html b/templates/article.html index e7f6086..c5dc9dc 100644 --- a/templates/article.html +++ b/templates/article.html @@ -105,14 +105,14 @@ {% if article.headline %}

{{ article.headline }}

{% endif %} - {{ gettext('Posted by') }} + Posted by {% for author in article.authors %} {{ author }} {% endfor %} - {{ gettext('on') }} {{ article.locale_date }} + on {{ article.locale_date }} {% if article.modified %} - {{ gettext('Updated on %(moddate)s', moddate=article.locale_modified) }} + Updated on {{ article.locale_modified }} {% endif %} {% import 'translations.html' as translations with context %} {{ translations.translations_for(article) }} @@ -131,7 +131,7 @@ {% if article.tags %}
-

{{ gettext('tags') }} : {% for tag in article.tags %}{{ tag | escape }}{% if not loop.last %}, {% endif %}{% endfor %}

+

tags: {% for tag in article.tags %}{{ tag | escape }}{% if not loop.last %}, {% endif %}{% endfor %}

{% endif %} @@ -152,7 +152,7 @@ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); - + {% endif %} {% endblock content %} diff --git a/templates/author.html b/templates/author.html index f526ad5..65aff95 100644 --- a/templates/author.html +++ b/templates/author.html @@ -1,10 +1,10 @@ {% extends "index.html" %} -{% block title %}{{ SITENAME }} - {{ gettext('Articles by %(name)s', name=author) }}{% endblock %} +{% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %} {% block opengraph %} {{ super() }} - + @@ -24,7 +24,7 @@
-

{{ gettext('Articles by %(name)s', name=author) }}

+

Articles by {{ author }}

diff --git a/templates/authors.html b/templates/authors.html index 73c9df9..74917a8 100644 --- a/templates/authors.html +++ b/templates/authors.html @@ -1,6 +1,6 @@ {% extends "index.html" %} -{% block title %}{{ SITENAME }} - {{ gettext('Authors') }}{% endblock title %} +{% block title %}{{ SITENAME }} - Authors{% endblock title %} {% block header %} @@ -15,7 +15,7 @@
-

{{ gettext('Articles by %(name)s', name=author) }}

+

Articles by {{ author }}

diff --git a/templates/categories.html b/templates/categories.html index 0883d7b..7af5236 100644 --- a/templates/categories.html +++ b/templates/categories.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}{{ SITENAME }} - {{ gettext('Categories') }}{% endblock %} +{% block title %}{{ SITENAME }} - Categories{% endblock %} {% block header %} @@ -15,7 +15,7 @@
-

{{ SITENAME }} - {{ gettext('Categories') }}

+

{{ SITENAME }} - Categories

diff --git a/templates/category.html b/templates/category.html index 443b208..53b8879 100644 --- a/templates/category.html +++ b/templates/category.html @@ -1,6 +1,6 @@ {% extends "index.html" %} -{% block title %}{{ SITENAME }} - {{ gettext('Articles in the %(category)s category', category=category) }}{% endblock %} +{% block title %}{{ SITENAME }} - Articles in the {{ category }} category{% endblock %} {% block header %} @@ -15,7 +15,7 @@
-

{{ gettext('Articles in the %(category)s category', category=category) }}

+

Articles in the {{ category }} category

diff --git a/templates/index.html b/templates/index.html index 168742a..6eeba7a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -58,11 +58,11 @@ {% endif %}

{% endif %} - {% include 'comments.html' %} diff --git a/templates/pagination.html b/templates/pagination.html index 1cc50c8..22b7e54 100644 --- a/templates/pagination.html +++ b/templates/pagination.html @@ -4,10 +4,10 @@ diff --git a/templates/period_archives.html b/templates/period_archives.html index 8c6b6aa..19fdaa9 100644 --- a/templates/period_archives.html +++ b/templates/period_archives.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}{{ SITENAME }} - {{ gettext('Archives for %(period)s', period=period | reverse | join (' ')) }}{% endblock %} +{% block title %}{{ SITENAME }} - Archives for {{ period | reverse | join (' ') }}{% endblock %} {% block header %} @@ -15,7 +15,7 @@
-

{{ gettext('Archives for %(period)s', period=period | reverse | join (' ')) }}

+

Archives for {{ period | reverse | join (' ') }}

diff --git a/templates/tag.html b/templates/tag.html index 9a8ad78..108d5be 100644 --- a/templates/tag.html +++ b/templates/tag.html @@ -1,5 +1,5 @@ {% extends "index.html" %} -{% block title %}{{ SITENAME }} - {{ gettext('Tag %(tag)s', tag=tag) }}{% endblock %} +{% block title %}{{ SITENAME }} - Tag {{ tag }}{% endblock %} {% block header %} {% if HEADER_COVER %}
diff --git a/templates/tags.html b/templates/tags.html index 48ef873..bab699f 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}{{ SITENAME }} - {{ gettext('Tags') }}{% endblock %} +{% block title %}{{ SITENAME }} - Tags{% endblock %} {% block header %} @@ -15,7 +15,7 @@
-

{{ SITENAME }} - {{ gettext('Tags') }}

+

{{ SITENAME }} - Tags

@@ -24,7 +24,7 @@ {% endblock header %} {% block content %} -

{{ gettext('Tags for %(sitename)s', sitename=SITENAME) }}

+

Tags for {{ SITENAME }}

{%- for tag, articles in tags|sort %}
  • {{ tag }} ({{ articles|count }})
  • {% endfor %} diff --git a/translations/ja/LC_MESSAGES/messages.mo b/translations/ja/LC_MESSAGES/messages.mo deleted file mode 100644 index effb290..0000000 Binary files a/translations/ja/LC_MESSAGES/messages.mo and /dev/null differ diff --git a/translations/ja/LC_MESSAGES/messages.po b/translations/ja/LC_MESSAGES/messages.po deleted file mode 100644 index 02ff265..0000000 --- a/translations/ja/LC_MESSAGES/messages.po +++ /dev/null @@ -1,95 +0,0 @@ -# Japanese translations for PROJECT. -# Copyright (C) 2017 ORGANIZATION -# This file is distributed under the same license as the PROJECT project. -# FIRST AUTHOR , 2017. -# -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2017-04-06 06:29+0100\n" -"PO-Revision-Date: 2017-04-06 05:18+0100\n" -"Last-Translator: Tobenna Peter, Igwe\n" -"Language: ja\n" -"Language-Team: ja \n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -#: templates/archives.html:3 -msgid "Archives" -msgstr "アーカイブ" - -#: templates/archives.html:18 -#, python-format -msgid "Archives for %(name)s" -msgstr "%(name)s のアーカイブ" - -#: templates/article.html:108 templates/index.html:61 -msgid "Posted by" -msgstr "投稿者" - -#: templates/article.html:112 templates/index.html:65 -msgid "on" -msgstr "日付" - -#: templates/article.html:115 -#, python-format -msgid "Updated on %(moddate)s" -msgstr "更新日 %(moddate)s" - -#: templates/article.html:134 -msgid "tags" -msgstr "タグ" - -#: templates/article.html:155 -msgid "Please enable JavaScript to view the comments." -msgstr "コメントを読み書きのため、JavaScriptを有効にしてください。" - -#: templates/author.html:3 templates/author.html:7 templates/author.html:27 -#: templates/authors.html:18 -#, python-format -msgid "Articles by %(name)s" -msgstr "%(name)s の記事" - -#: templates/authors.html:3 -msgid "Authors" -msgstr "作者" - -#: templates/categories.html:3 templates/categories.html:18 -msgid "Categories" -msgstr "カテゴリー" - -#: templates/category.html:3 templates/category.html:18 -#, python-format -msgid "Articles in the %(category)s category" -msgstr "%(category)s カテゴリーの記事" - -#: templates/pagination.html:7 -msgid "Older Posts" -msgstr "古い" - -#: templates/pagination.html:10 -msgid "Newest Posts" -msgstr "新しい" - -#: templates/period_archives.html:3 templates/period_archives.html:18 -#, python-format -msgid "Archives for %(period)s" -msgstr "%(period)s のアーカイブ" - -#: templates/tag.html:2 -#, python-format -msgid "Tag %(tag)s" -msgstr "%(tag)s タグ" - -#: templates/tags.html:3 templates/tags.html:18 -msgid "Tags" -msgstr "タグ" - -#: templates/tags.html:27 -#, python-format -msgid "Tags for %(sitename)s" -msgstr "%(sitename)s のタグ"