diff --git a/blog/config.toml b/blog/config.toml index 2fe016b4..b1a0028e 100644 --- a/blog/config.toml +++ b/blog/config.toml @@ -35,15 +35,65 @@ author = { name = "Philipp Oppermann" } [translations.en] lang_name = "English" +toc = "Table Of Contents" +all_posts = "« All Posts" +support_me = "Support Me" +comments = "Comments" +comments_notice = "Please leave your comments in English if possible." +other_languages = "Other Languages" +about_me = "About Me" +about_me_text_1 = "I'm a Rust freelancer with a master's degree in computer science. I love systems programming, open source software, and new challenges." +readmore = "read more »" +not_translated = "(This post is not translated yet.)" [translations.zh-CN] lang_name = "Chinese (simplified)" +toc = "Table Of Contents" +all_posts = "« All Posts" +support_me = "Support Me" +comments = "Comments" +comments_notice = "Please leave your comments in English if possible." +other_languages = "Other Languages" +about_me = "About Me" +about_me_text_1 = "I'm a Rust freelancer with a master's degree in computer science. I love systems programming, open source software, and new challenges." +readmore = "read more »" +not_translated = "(This post is not translated yet.)" [translations.zh-TW] lang_name = "Chinese (traditional)" +toc = "Table Of Contents" +all_posts = "« All Posts" +support_me = "Support Me" +comments = "Comments" +comments_notice = "Please leave your comments in English if possible." +other_languages = "Other Languages" +about_me = "About Me" +about_me_text_1 = "I'm a Rust freelancer with a master's degree in computer science. I love systems programming, open source software, and new challenges." +readmore = "read more »" +not_translated = "(This post is not translated yet.)" [translations.ja] lang_name = "Japanese" +toc = "Table Of Contents" +all_posts = "« All Posts" +support_me = "Support Me" +comments = "Comments" +comments_notice = "Please leave your comments in English if possible." +other_languages = "Other Languages" +about_me = "About Me" +about_me_text_1 = "I'm a Rust freelancer with a master's degree in computer science. I love systems programming, open source software, and new challenges." +readmore = "read more »" +not_translated = "(This post is not translated yet.)" [translations.fa] lang_name = "Persian" +toc = "فهرست مطالب" +all_posts = "« همه پست‌ها" +support_me = "مرا پشتیبانی کنید" +comments = "نظرات" +comments_notice = "لطفا نظرات خود را در صورت امکان به انگلیسی بنویسید." +other_languages = "زبان های دیگر" +about_me = "درباره من" +about_me_text_1 = "من یک فریلنسر Rust با مدرک ارشد علوم کامپیوتر هستم. من عاشق برنامه نویسی سیستمی، نرم افزار متن باز و چالش های جدید هستم." +readmore = "ادامه‌مطلب»" +not_translated = "(این پست هنوز ترجمه نشده است.)" diff --git a/blog/templates/edition-2/macros.html b/blog/templates/edition-2/macros.html index a28a44bb..686add07 100644 --- a/blog/templates/edition-2/macros.html +++ b/blog/templates/edition-2/macros.html @@ -15,11 +15,11 @@

{{ post.title }}

{{ post.summary | safe }} - read more » + {{ trans(key="readmore", lang=lang) }} {%- if lang and not_translated and lang != config.default_language -%} {%- endif -%}
@@ -28,7 +28,7 @@ {% macro toc(toc) %}
- Table of Contents + {{ trans(key="toc", lang=lang) }} {% endif %} {% endfor %} - +
{% endmacro toc %} diff --git a/blog/templates/edition-2/page.html b/blog/templates/edition-2/page.html index 13a70d79..cf28a0f8 100644 --- a/blog/templates/edition-2/page.html +++ b/blog/templates/edition-2/page.html @@ -6,9 +6,9 @@ {% block title %}{{ page.title }} | {{ config.title }}{% endblock title %} {% block header %} {% if lang != "en" -%} - + {%- else -%} - + {%- endif %} {% endblock header %} @@ -18,7 +18,7 @@ {% block toc_aside %} {% endblock toc_aside %} @@ -74,8 +74,8 @@ {{ page.content | replace(from="", to=macros::toc(toc=page.toc)) | safe }} -
-

Support Me

+
+

{{ trans(key="support_me", lang=lang) }}

{{ snippets::support() }}
@@ -91,21 +91,21 @@
-

Comments

+

{{ trans(key="comments", lang=lang) }}

{%- if page.lang != "en" %} -

- Please leave your comments in English if possible. +

+ {{ trans(key="comments_notice", lang=lang) }}

{% endif %} {{ snippets::utterances() }}
-