🌐 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: likes:
one: "{{ .Count }} বার পছন্দ করা হয়েছে" one: "{{ .Count }} বার পছন্দ করা হয়েছে"
other: "{{ .Count }} বার পছন্দ করা হয়েছে" other: "{{ .Count }} বার পছন্দ করা হয়েছে"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author: author:
byline_title: "লেখক" byline_title: "লেখক"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -18,6 +18,9 @@ article:
likes: likes:
one: "{{ .Count }} sviđa se" one: "{{ .Count }} sviđa se"
other: "{{ .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: author:
byline_title: "Autor" byline_title: "Autor"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -11,6 +11,9 @@ article:
word_count: word_count:
one: "{{ .Count }} 字" one: "{{ .Count }} 字"
other: "{{ .Count }} 字" other: "{{ .Count }} 字"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author: author:
byline_title: "作者" 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"> <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 <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"> 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> </summary>
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }} {{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }} {{ if eq $post.Permalink $.Page.Permalink }}
<div <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"> 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> </div>
{{ else }} {{ else }}
<div <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"> 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}}"> <a href="{{$post.Permalink}}">
Part {{ $post.Params.series_order }}: {{ $post.Params.title}} {{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}}
</a> </a>
</div> </div>
{{end}} {{end}}

View file

@ -1,20 +1,21 @@
{{ if .Params.series }} {{ 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 <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"> 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> </summary>
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }} {{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }} {{ if eq $post.Permalink $.Page.Permalink }}
<div <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"> 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> </div>
{{ else }} {{ else }}
<div <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"> 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}}"> <a href="{{$post.Permalink}}">
Part {{ $post.Params.series_order }}: {{ $post.Params.title}} {{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}}
</a> </a>
</div> </div>
{{end}} {{end}}