From fd143fede2afd3c902f0a47102d49fbb0bbaa8c4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 22 Sep 2020 12:40:40 +0530 Subject: [PATCH] i18n: read_time improvements --- layouts/_default/list.html | 3 ++- layouts/_default/single.html | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c0016be1..0dd7286b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -51,7 +51,8 @@ diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 27c79d0d..b104c5f1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,7 +10,9 @@
{{ if or .Params.author .Site.Params.author }} . {{ .Params.author | default .Site.Params.author }}{{ end }} - {{ if $.Site.Params.ShowReadingTime }} . {{ .ReadingTime }}{{ i18n "read_time" | default "min read" }}{{ end }} + {{ if $.Site.Params.ShowReadingTime }} . + {{ $default_txt := print .ReadingTime " " "min" }} + {{ i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
{{end}}