From 37e093939160b11c59202b964e45ae4f74fece90 Mon Sep 17 00:00:00 2001 From: daudix Date: Thu, 20 Jun 2024 09:03:46 +0300 Subject: [PATCH] Continue previous commit --- i18n/ar.toml | 8 +++----- i18n/en.toml | 12 ++++++------ i18n/ru.toml | 16 ++++++++++------ templates/partials/comments.html | 3 ++- templates/taxonomy_list.html | 4 ++-- templates/taxonomy_single.html | 2 +- 6 files changed, 24 insertions(+), 21 deletions(-) diff --git a/i18n/ar.toml b/i18n/ar.toml index 7273858..e96b515 100644 --- a/i18n/ar.toml +++ b/i18n/ar.toml @@ -4,8 +4,7 @@ # front of each translation that refers to the person and the other word that refers to the organization language_name = "العربية" # Shown in language picker for multi-language sites. -date_locale = "ar_SA" # The locale code for time and date formatting. -full_stop = "." # Used at the end of a sentence. +date_locale = "ar-SA" # The locale code for time and date formatting. # Menu items. # Should match the names in config.extra.nav.links and config.extra.footer.links. @@ -13,7 +12,6 @@ Blog = "المدونة" Demo = "العرض" Repo = "المستودع" -anchor_link = "رابط الارتباط لـ" archived = "الأرشيف" author = "الكاتب" blog_post_author = "كاتب منشور المدونة" @@ -39,13 +37,13 @@ newest_to_oldest = "من الأحدث إلى الأقدم" open_post = "افتح المنشور" page_next = "التالي" page_previous = "السابق" -posts_in_total = "الوظائف في المجموع" +posts = "الوظائف في المجموع" posts_with_tag = "المنشورات ذات العلامة" see_all_tags = "انظر جميع العلامات" skip_to_content = "تخطي إلى المحتوى الرئيسي" table_of_contents = "جدول المحتويات" +tags_title = "العلامات" tags = "العلامات" -tags_in_total = "العلامات في المجموع" trigger_warning = "تحذير الزناد" view_comment = "عرض التعليق على" view_profile = "عرض الملف الشخصي على" diff --git a/i18n/en.toml b/i18n/en.toml index 61b117b..51f6cef 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -1,6 +1,5 @@ language_name = "English" # Shown in language picker for multi-language sites. -date_locale = "en_GB" -full_stop = "." # Used at the end of a sentence. +date_locale = "en-GB" # Menu items. # Should match the names in config.extra.nav.links and config.extra.footer.links. @@ -8,7 +7,6 @@ Blog = "Blog" Demo = "Demo" Repo = "Repo" -anchor_link = "Anchor link for" archived = "Archived" author = "Author" blog_post_author = "Blog post author" @@ -34,13 +32,15 @@ newest_to_oldest = "From newest to oldest" open_post = "Open Post" page_next = "Next" page_previous = "Previous" -posts_in_total = "posts in total" +posts = "$NUMBER posts" +one_posts = "$NUMBER post" +many_posts = "$NUMBER posts" posts_with_tag = "Posts with tag" see_all_tags = "See all tags" skip_to_content = "Skip to main content" table_of_contents = "Table of Contents" -tags = "Tags" -tags_in_total = "tags in total" +tags_title = "Tags" +tags = "tags" trigger_warning = "Trigger Warning" view_comment = "View comment at" view_profile = "View profile at" diff --git a/i18n/ru.toml b/i18n/ru.toml index c064b05..06c33f1 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -1,6 +1,5 @@ language_name = "Русский" # Shown in language picker for multi-language sites. -date_locale = "ru_RU" -full-stop = "." # Used at the end of a sentence. +date_locale = "ru-RU" # Note on pluralization prefixes: # - few_: for numbers ending in 2-4, except 12-14, in genitive singular. @@ -12,7 +11,6 @@ Blog = "Блог" Demo = "Блог" Repo = "Репо" -anchor_link = "Якорная ссылка для" archived = "Архивировано" author = "Автор" blog_post_author = "Автор блог-поста" @@ -38,13 +36,19 @@ newest_to_oldest = "От новейшего к старейшему" open_post = "Открыть Пост" page_next = "Следующий" page_previous = "Предыдущий" -posts_in_total = "всего постов" +posts = "$NUMBER постов" +one_posts = "$NUMBER пост" +few_posts = "$NUMBER поста" +many_posts = "$NUMBER постов" posts_with_tag = "Посты с тегом" see_all_tags = "Показать все теги" skip_to_content = "Перейти к основному содержанию" table_of_contents = "Оглавление" -tags = "Теги" -tags_in_total = "тегов в общем" +tags_title = "Теги" +tags = "$NUMBER тегов" +one_tags = "$NUMBER тег" +few_tags = "$NUMBER тега" +many_tags = "$NUMBER тегов" trigger_warning = "Предупреждение о Тревоге" view_comment = "Показать комментарий на" view_profile = "Показать профиль на" diff --git a/templates/partials/comments.html b/templates/partials/comments.html index 04c0c87..9a05c15 100644 --- a/templates/partials/comments.html +++ b/templates/partials/comments.html @@ -13,6 +13,7 @@ {% endif %} {% set id = page.extra.comments.id %} +{% set date_locale = macros_translate::translate(key="date_locale", default="en-GB", language_strings=language_strings) %}
{% if config.extra.comments.show_qr %} @@ -185,7 +186,7 @@ permalink.setAttribute("rel", "external nofollow"); permalink.textContent = new Date( status.created_at - ).toLocaleString("{{ config.extra.comments.locale | default(value='en-IE') }}", { + ).toLocaleString("{{ date_locale }}", { dateStyle: "long", timeStyle: "short", }); diff --git a/templates/taxonomy_list.html b/templates/taxonomy_list.html index 41cc59b..0963899 100644 --- a/templates/taxonomy_list.html +++ b/templates/taxonomy_list.html @@ -2,8 +2,8 @@ {% block content %} {% set number_of_tags = terms | length %} -

{{ macros_translate::translate(key="tags", default="Tags", language_strings=language_strings) }}

-{{ terms | length }} {{ macros_translate::translate(key="tags_in_total", number=number_of_tags, default="$NUMBER tags in total", language_strings=language_strings) }} +

{{ macros_translate::translate(key="tags_title", default="Tags", language_strings=language_strings) }}

+{{ macros_translate::translate(key="tags", number=number_of_tags, default="$NUMBER tags in total", language_strings=language_strings) }}