🌐 Pass .WordCount to i18n function

pull/57/head
wizardbyron 2021-12-17 09:20:47 +08:00 committed by James Panther
parent 65a7228bfc
commit b4cbe9122b
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
3 changed files with 7 additions and 3 deletions

View File

@ -6,7 +6,9 @@ article:
one: "{{ .Count }} min" one: "{{ .Count }} min"
other: "{{ .Count }} mins" other: "{{ .Count }} mins"
reading_time_title: "Reading time" reading_time_title: "Reading time"
word_count_unit: "Words" word_count:
one: "{{ .Count }} word"
other: "{{ .Count }} words"
author: author:
byline_title: "Author" byline_title: "Author"

View File

@ -5,7 +5,9 @@ article:
reading_time: reading_time:
other: "{{ .Count }} 分钟" other: "{{ .Count }} 分钟"
reading_time_title: "预计阅读" reading_time_title: "预计阅读"
word_count_unit: "字" word_count:
one: "{{ .Count }} 字"
other: "{{ .Count }} 字"
author: author:
byline_title: "作者" byline_title: "作者"

View File

@ -1,5 +1,5 @@
<span> <span>
{{ .WordCount }} {{- i18n "article.word_count_unit" -}} {{- i18n "article.word_count" .WordCount | emojify -}}
</span> </span>
{{- /* Trim EOF */ -}} {{- /* Trim EOF */ -}}