Fixed localization of post cards (#821)

* Fixed date localization on post card

* fixed also labeling localization for post card

* adressed change request by using the hugo feature of singular/plural automagic for translation

* Fix reading time translation

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

---------

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
Co-authored-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
Augusto Pace 2023-10-30 05:27:14 +01:00 committed by GitHub
parent fbbef3b2c5
commit e61d6b796b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 12 deletions

View file

@ -39,7 +39,7 @@
<div class="author-profile ml-auto align-self-lg-center">
<img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}' alt="Author Image">
<h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
<p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} minute{{ if (ne .ReadingTime 1) }}s{{ end }}{{ end }}</p>
<p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}</p>
</div>
<div class="title">

View file

@ -12,12 +12,12 @@
{{ end }}
</div>
<div class="card-footer">
<span class="float-left">{{ .Date.Format "January 2, 2006" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} minute{{ if (ne .ReadingTime 1) }}s{{ end }}{{ end }}</span>
<span class="float-left">
{{ .Date | time.Format ":date_full" }}
{{ if site.Params.features.readingTime }} | {{.ReadingTime}} {{ i18n "minute" .ReadingTime }} {{ end }}</span>
<a
href="{{ .RelPermalink | relLangURL }}"
class="float-right btn btn-outline-info btn-sm"
>{{ i18n "read" }}</a
>
class="float-right btn btn-outline-info btn-sm">{{ i18n "read" }}</a>
</div>
</div>
</a>