mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
i18n made WordCount and ReadingTime singular/plural aware
This commit is contained in:
parent
056246eb62
commit
99a0bfa099
10
i18n/de.toml
10
i18n/de.toml
@ -32,4 +32,12 @@ other = "Eine Email Adresse wird benötigt."
|
|||||||
other = "Senden"
|
other = "Senden"
|
||||||
|
|
||||||
[taxonomyPageList]
|
[taxonomyPageList]
|
||||||
other = "Below you will find pages that utilize the taxonomy term “{{ .Title }}”"
|
other = "Below you will find pages that utilize the taxonomy term “{{ .Title }}”"
|
||||||
|
|
||||||
|
[readingTime]
|
||||||
|
one = "Eine Minute"
|
||||||
|
other = "{{ .Count }} Minuten"
|
||||||
|
|
||||||
|
[wordCount]
|
||||||
|
one = "Ein Wort"
|
||||||
|
other = "{{ .Count }} Wörter"
|
||||||
|
10
i18n/en.toml
10
i18n/en.toml
@ -32,4 +32,12 @@ other = "An email address is required."
|
|||||||
other = "Send"
|
other = "Send"
|
||||||
|
|
||||||
[taxonomyPageList]
|
[taxonomyPageList]
|
||||||
other = "Below you will find pages that utilize the taxonomy term “{{ .Title }}”"
|
other = "Below you will find pages that utilize the taxonomy term “{{ .Title }}”"
|
||||||
|
|
||||||
|
[readingTime]
|
||||||
|
one = "One minute read"
|
||||||
|
other = "{{ .Count }} minutes read"
|
||||||
|
|
||||||
|
[wordCount]
|
||||||
|
one = "One word"
|
||||||
|
other = "{{ .Count }} words"
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
3) A page front matter value is set `show_reading_time = true`
|
3) A page front matter value is set `show_reading_time = true`
|
||||||
*/}}
|
*/}}
|
||||||
{{ if (or (eq (.Param "show_reading_time") true) (eq $section.Params.show_reading_time true) )}}
|
{{ if (or (eq (.Param "show_reading_time") true) (eq $section.Params.show_reading_time true) )}}
|
||||||
<span class="f6 mv4 dib tracked"> - {{ .ReadingTime}} minutes read</span>
|
<span class="f6 mv4 dib tracked"> - {{ i18n "readingTime" .ReadingTime }} </span>
|
||||||
<span class="f6 mv4 dib tracked"> - {{ .WordCount}} words</span>
|
<span class="f6 mv4 dib tracked"> - {{ i18n "wordCount" .WordCount }} </span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</header>
|
</header>
|
||||||
<div class="nested-copy-line-height lh-copy {{ $.Param "post_content_classes" | default "serif"}} f4 nested-links nested-img mid-gray pr4-l w-two-thirds-l">
|
<div class="nested-copy-line-height lh-copy {{ $.Param "post_content_classes" | default "serif"}} f4 nested-links nested-img mid-gray pr4-l w-two-thirds-l">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user