Fix wrong translations and add font for Persian

This commit is contained in:
Hamid R. K. Pishghadam
2021-01-03 20:53:29 +03:30
parent 478b4cb808
commit fad609f744
3 changed files with 10 additions and 28 deletions

View File

@@ -37,12 +37,8 @@ author = { name = "Philipp Oppermann" }
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.)"
@@ -50,12 +46,8 @@ not_translated = "(This post is not translated yet.)"
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.)"
@@ -63,12 +55,8 @@ not_translated = "(This post is not translated yet.)"
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.)"
@@ -76,12 +64,8 @@ not_translated = "(This post is not translated yet.)"
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.)"
@@ -89,11 +73,7 @@ not_translated = "(This post is not translated yet.)"
lang_name = "Persian"
toc = "فهرست مطالب"
all_posts = "« همه پست‌ها"
support_me = "مرا پشتیبانی کنید"
comments = "نظرات"
comments_notice = "لطفا نظرات خود را در صورت امکان به انگلیسی بنویسید."
other_languages = "زبان های دیگر"
about_me = "درباره من"
about_me_text_1 = "من یک فریلنسر Rust با مدرک ارشد علوم کامپیوتر هستم. من عاشق برنامه نویسی سیستمی، نرم افزار متن باز و چالش های جدید هستم."
readmore = "ادامه‌مطلب»"
not_translated = "(این پست هنوز ترجمه نشده است.)"

View File

@@ -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;
}

View File

@@ -17,7 +17,7 @@
{%- endblock description %}
{% block toc_aside %}
<aside id="toc-aside">
<aside id="toc-aside" class="{% if page.extra.rtl %}right-to-left{% endif %}">
<h2>{{ trans(key="toc", lang=lang) }}</h2>
<ol>
{% for h2 in page.toc %}<li>
@@ -49,6 +49,7 @@
</div>
{% endif %}
{%- if page.lang != "en" %}
<div class="warning">
{% set translations = page.translations | filter(attribute="lang", value="en") %}
@@ -75,7 +76,7 @@
</div>
<div class="post-footer-support{% if page.extra.rtl %} right-to-left{% endif %}">
<h2>{{ trans(key="support_me", lang=lang) }}</h2>
<h2>Support Me</h2>
{{ snippets::support() }}
</div>
@@ -102,10 +103,10 @@
{{ snippets::utterances() }}
</section>
<aside class="page-aside-right{% if page.extra.rtl %} right-to-left{% endif %}">
<aside class="page-aside-right">
{% if page.translations -%}
<div class="block" id="language-selector">
<h2>{{ trans(key="other_languages", lang=lang) }}</h2>
<h2>Other Languages</h2>
<ul>{%- for translation in page.translations | sort(attribute="lang") %}
<li data-lang-switch-to="{{ translation.lang }}" class=""><a href="{{ translation.permalink | safe }}">
{%- if translation.lang == "en" -%}
@@ -118,10 +119,10 @@
</div>
{%- endif %}
<div class="block">
<h2>{{ trans(key="about_me", lang=lang) }}</h2>
<div class="block{% if page.extra.rtl %} left-to-right{% endif %}">
<h2>About Me</h2>
<p>
{{ trans(key="about_me_text_1", lang=lang) }}
I'm a Rust freelancer with a master's degree in computer science. I love systems programming, open source software, and new challenges.
</p><p>
If you want to work with me, reach out on <a href = \"https://www.linkedin.com/in/phil-opp/\">LinkedIn</a> or write me at <a href=\"mailto:job@phil-opp.com\">job@phil-opp.com</a>.
</p>