🌐 add i18n for article series

This commit is contained in:
Sergio Diaz 2022-12-16 13:28:40 -06:00
parent 5f1efb9946
commit 1337a8fff4
22 changed files with 69 additions and 8 deletions

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} বার পছন্দ করা হয়েছে"
other: "{{ .Count }} বার পছন্দ করা হয়েছে"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "লেখক"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} Wort"
other: "{{ .Count }} Wörter"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} like"
other: "{{ .Count }} likes"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Author"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} palabra"
other: "{{ .Count }} palabras"
part_of_series: "Este artículo es parte de una serie."
part: "Parte"
this_article: "Este artículo"
author:
byline_title: "Autor"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} sana"
other: "{{ .Count }} sanaa"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Kirjoittaja"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} mot"
other: "{{ .Count }} mots"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Auteur"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} מילה"
other: "{{ .Count }} מילים"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "מחבר"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} sviđa se"
other: "{{ .Count }} sviđa se"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} szó"
other: "{{ .Count }} szó"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Szerző"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} disukai"
other: "{{ .Count }} disukai"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Penulis"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} parola"
other: "{{ .Count }} parole"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autore"

View file

@ -12,7 +12,10 @@ article:
word_count:
one: "{{ .Count }} 文字"
other: "{{ .Count }} 文字"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "著者"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} polubienie"
other: "{{ .Count }} polubień"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -15,6 +15,9 @@ article:
views:
one: "{{ .Count }} visualização"
other: "{{ .Count }} visualizaçōes"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -15,6 +15,9 @@ article:
views:
one: "{{ .Count }} visualização"
other: "{{ .Count }} visualizaçōes"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} cuvânt"
other: "{{ .Count }} cuvinte"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} нравится"
other: "{{ .Count }} нравится"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Автор"

View file

@ -11,6 +11,9 @@ article:
word_count:
one: "{{ .Count }} kelime"
other: "{{ .Count }} kelime"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Yazar"

View file

@ -11,6 +11,9 @@ article:
word_count:
one: "{{ .Count }} 字"
other: "{{ .Count }} 字"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "作者"

View file

@ -11,6 +11,9 @@ article:
word_count:
one: "{{ .Count }} 字"
other: "{{ .Count }} 字"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "作者"

View file

@ -2,19 +2,19 @@
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5">
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - This article is part of a series.
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
</summary>
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
Part {{ $post.Params.series_order }}: This Article
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ i18n "article.this_article" }}
</div>
{{ else }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="{{$post.Permalink}}">
Part {{ $post.Params.series_order }}: {{ $post.Params.title}}
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}}
</a>
</div>
{{end}}

View file

@ -1,20 +1,21 @@
{{ if .Params.series }}
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5" {{ if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5" {{
if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - This article is part of a series.
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
</summary>
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
Part {{ $post.Params.series_order }}: This Article
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ i18n "article.this_article" }}
</div>
{{ else }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="{{$post.Permalink}}">
Part {{ $post.Params.series_order }}: {{ $post.Params.title}}
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}}
</a>
</div>
{{end}}