🌐 Pass .WordCount to i18n function

This commit is contained in:
wizardbyron
2021-12-17 09:20:47 +08:00
committed by James Panther
parent 65a7228bfc
commit b4cbe9122b
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -6,7 +6,9 @@ article:
one: "{{ .Count }} min"
other: "{{ .Count }} mins"
reading_time_title: "Reading time"
word_count_unit: "Words"
word_count:
one: "{{ .Count }} word"
other: "{{ .Count }} words"
author:
byline_title: "Author"
+3 -1
View File
@@ -5,7 +5,9 @@ article:
reading_time:
other: "{{ .Count }} 分钟"
reading_time_title: "预计阅读"
word_count_unit: "字"
word_count:
one: "{{ .Count }} 字"
other: "{{ .Count }} 字"
author:
byline_title: "作者"
+1 -1
View File
@@ -1,5 +1,5 @@
<span>
{{ .WordCount }} {{- i18n "article.word_count_unit" -}}
{{- i18n "article.word_count" .WordCount | emojify -}}
</span>
{{- /* Trim EOF */ -}}