From a0ecfa685da806ec23e3d49830934d6cd48aff41 Mon Sep 17 00:00:00 2001 From: Sergey Blazhko Date: Sun, 2 May 2021 18:01:03 +0300 Subject: [PATCH] Fix i18n-ru warnings after hugo v0.83: `Failed to get translated string for language "ru" and ID "...": message "article.back" has no plural form "many"` Add i18n for `Back` button (vertical view) --- exampleSite/config.yaml | 2 +- i18n/en.yaml | 2 ++ i18n/ru.yaml | 20 ++++++++++++++++++++ layouts/post/single.html | 4 ++-- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 2910cbb..cb20857 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -11,7 +11,7 @@ disqusShortname: hugo-theme-stack googleAnalytics: # Theme i18n support -# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl +# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl, ru DefaultContentLanguage: en permalinks: diff --git a/i18n/en.yaml b/i18n/en.yaml index 99d34ce..2f930bc 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -17,6 +17,8 @@ list: other: Subsections article: + back: + other: Back relatedContents: other: Related contents lastUpdatedOn: diff --git a/i18n/ru.yaml b/i18n/ru.yaml index f0c562f..9114289 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -1,7 +1,9 @@ toggleMenu: + many: Показать/скрыть меню other: Показать/скрыть меню darkMode: + many: Тёмный режим other: Тёмный режим list: @@ -12,6 +14,7 @@ list: other: "{{ .Count }} страниц" section: + many: Раздел other: Раздел subsection: @@ -21,37 +24,54 @@ list: other: Подразделы article: + back: + many: Назад + other: Назад relatedContents: + many: Также рекомендуем other: Также рекомендуем lastUpdatedOn: + many: Обновлено other: Обновлено notFound: title: + many: Не найдено other: Не найдено subtitle: + many: Запрашиваемая страница не существует other: Запрашиваемая страница не существует widget: archives: title: + many: Архивы other: Архивы more: + many: Ещё other: Ещё tagCloud: title: + many: Теги other: Теги search: title: + many: Поиск other: Поиск placeholder: + many: Введите что-нибудь... other: Введите что-нибудь... resultTitle: + one: "Найдено #PAGES_COUNT страница (за #TIME_SECONDS с.)" + few: "Найдено #PAGES_COUNT страницы (за #TIME_SECONDS с.)" + many: "Найдено #PAGES_COUNT страниц (за #TIME_SECONDS с.)" other: "Найдено #PAGES_COUNT страниц (за #TIME_SECONDS с.)" footer: builtWith: + many: Создано при помощи {{ .Generator }} other: Создано при помощи {{ .Generator }} designedBy: + many: Тема {{ .Theme }}, дизайн {{ .DesignedBy }} other: Тема {{ .Theme }}, дизайн {{ .DesignedBy }} diff --git a/layouts/post/single.html b/layouts/post/single.html index 8cd32de..0310ea4 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -3,7 +3,7 @@
{{ (resources.Get "icons/back.svg").Content | safeHTML }} - Back + {{ T "article.back" }}
@@ -18,4 +18,4 @@ {{ partialCached "footer/footer" . }} {{- partialCached "article/components/photoswipe.html" . -}} -{{ end }} \ No newline at end of file +{{ end }}