diff --git a/blog/config.toml b/blog/config.toml index 2fe016b4..39b4f507 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" +comments = "Comments" +comments_notice = "Please leave your comments in English if possible." +readmore = "read more »" +not_translated = "(This post is not translated yet.)" +translated_content = "Translated Content:" +translated_content_notice = "This is a community translation of the _original.title_ post. It might be incomplete, outdated or contain errors. Please report any issues!" +translated_by = "Translation By" +word_separator = "and" [translations.zh-CN] lang_name = "Chinese (simplified)" +toc = "Table Of Contents" +all_posts = "« All Posts" +comments = "Comments" +comments_notice = "Please leave your comments in English if possible." +readmore = "read more »" +not_translated = "(This post is not translated yet.)" +translated_content = "Translated Content:" +translated_content_notice = "This is a community translation of the _original.title_ post. It might be incomplete, outdated or contain errors. Please report any issues!" +translated_by = "Translation By" +word_separator = "and" [translations.zh-TW] lang_name = "Chinese (traditional)" +toc = "Table Of Contents" +all_posts = "« All Posts" +comments = "Comments" +comments_notice = "Please leave your comments in English if possible." +readmore = "read more »" +not_translated = "(This post is not translated yet.)" +translated_content = "Translated Content:" +translated_content_notice = "This is a community translation of the _original.title_ post. It might be incomplete, outdated or contain errors. Please report any issues!" +translated_by = "Translation By" +word_separator = "and" [translations.ja] lang_name = "Japanese" +toc = "Table Of Contents" +all_posts = "« All Posts" +comments = "Comments" +comments_notice = "Please leave your comments in English if possible." +readmore = "read more »" +not_translated = "(This post is not translated yet.)" +translated_content = "Translated Content:" +translated_content_notice = "This is a community translation of the _original.title_ post. It might be incomplete, outdated or contain errors. Please report any issues!" +translated_by = "Translation By" +word_separator = "and" [translations.fa] lang_name = "Persian" +toc = "فهرست مطالب" +all_posts = "« همه پست‌ها" +comments = "نظرات" +comments_notice = "لطفا نظرات خود را در صورت امکان به انگلیسی بنویسید." +readmore = "ادامه‌مطلب»" +not_translated = "(این پست هنوز ترجمه نشده است.)" +translated_content = "محتوای ترجمه شده:" +translated_content_notice = "این یک ترجمه از جامعه کاربران برای پست _original.title_ است. ممکن است ناقص ، منسوخ شده یا دارای خطا باشد. لطفا هر گونه مشکل را گزارش دهید!" +translated_by = "ترجمه توسط" +word_separator = "و" diff --git a/blog/content/_index.fa.md b/blog/content/_index.fa.md index 493e0c96..5e1e57b1 100644 --- a/blog/content/_index.fa.md +++ b/blog/content/_index.fa.md @@ -2,12 +2,12 @@ template = "edition-2/index.html" +++ -

Writing an OS in Rust

+

نوشتن یک سیستم عامل با راست

-
+
-This blog series creates a small operating system in the [Rust programming language](https://www.rust-lang.org/). Each post is a small tutorial and includes all needed code, so you can follow along if you like. The source code is also available in the corresponding [Github repository](https://github.com/phil-opp/blog_os). +این مجموعه بلاگ یک سیستم عامل کوچک در [زبان برنامه نویسی Rust](https://www.rust-lang.org/) ایجاد می کند. هر پست یک آموزش کوچک است و شامل تمام کدهای مورد نیاز است ، بنابراین اگر دوست دارید می توانید آن را دنبال کنید. کد منبع نیز در [مخزن گیت‌هاب](https://github.com/phil-opp/blog_os) مربوطه موجود است. -Latest post: +اخرین پست:
diff --git a/blog/static/css/edition-2/main.css b/blog/static/css/edition-2/main.css index 4a5c693e..b1d77ac1 100644 --- a/blog/static/css/edition-2/main.css +++ b/blog/static/css/edition-2/main.css @@ -452,8 +452,9 @@ a strong { .right-to-left { direction: rtl; + font-family: Vazir; } -.left-to-right, .right-to-left pre, .right-to-left table { +.left-to-right, .right-to-left pre, .right-to-left table, .right-to-left[id="toc-aside"] { direction: ltr; } diff --git a/blog/templates/edition-2/macros.html b/blog/templates/edition-2/macros.html index a28a44bb..abfca9e9 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) | safe }} {%- 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..799110f1 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 %} @@ -17,8 +17,8 @@ {%- endblock description %} {% block toc_aside %} -
{% endif %} + {%- if page.lang != "en" %} -
+
{% set translations = page.translations | filter(attribute="lang", value="en") %} {% set original = translations.0 %}

- Translated Content: - This is a community translation of the {{ original.title }} post. It might be incomplete, outdated or contain errors. Please report any issues! + {{ trans(key="translated_content", lang=lang) }} + {{ trans(key="translated_content_notice", lang=lang) | + replace(from="_original.permalink_", to=original.permalink) | + replace(from="_original.title_", to=original.title) | safe }}

{%- if page.extra.translators %}

- Translation by {% for user in page.extra.translators -%} + {{ trans(key="translated_by", lang=lang) }} {% for user in page.extra.translators -%} {%- if not loop.first -%} - {%- if loop.last %}, and {% else %}, {% endif -%} + {%- if loop.last %} {{ trans(key="word_separator", lang=lang) }} {% else %}, {% endif -%} {%- endif -%} @{{user}} {%- endfor %}. @@ -70,11 +73,11 @@

{% endif %} -
+
{{ page.content | replace(from="", to=macros::toc(toc=page.toc)) | safe }}
- {%- endif %} -
+

About Me

I'm a Rust freelancer with a master's degree in computer science. I love systems programming, open source software, and new challenges.

- If you want to work with me, reach out on LinkedIn or write me at job@phil-opp.com. + If you want to work with me, reach out on LinkedIn or write me at job@phil-opp.com.