diff options
author | Sorin Sbarnea <ssbarnea@redhat.com> | 2019-12-31 13:41:29 +0300 |
---|---|---|
committer | Sorin Sbarnea <ssbarnea@redhat.com> | 2019-12-31 13:41:40 +0300 |
commit | ad0c418ab9c8f5b1dcc8af0508a7f165b025f42a (patch) | |
tree | 3a201744abfbfc5208c4a47dd42e11cf00bc0ad3 | |
parent | 546fb9345bd722cf46bd1b705b22ae839d9684e2 (diff) |
Allow full text customization for counters
Includes the suffix ": " in the language string in order to allow us to
customize it.
This also enables us to define an override as an empty string.
That change should not affect users that did not customize that strings.
-rw-r--r-- | i18n/en.yaml | 4 | ||||
-rw-r--r-- | i18n/zh.yaml | 4 | ||||
-rw-r--r-- | layouts/partials/post/wc.html | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/i18n/en.yaml b/i18n/en.yaml index 1a90540..a9d3d0c 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -84,9 +84,9 @@ unit_time: other: minutes article_wordcount: - other: Word Count + other: "Word Count: " article_readcount: - other: Read Count + other: "Read Count: " article_more: other: Read More article_comments: diff --git a/i18n/zh.yaml b/i18n/zh.yaml index 755094a..8794876 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -88,9 +88,9 @@ unit_time: other: 分 article_wordcount: - other: 字数统计 + other: "字数统计: " article_readcount: - other: 阅读时长 + other: "阅读时长: " article_more: other: 查看更多 article_comments: diff --git a/layouts/partials/post/wc.html b/layouts/partials/post/wc.html index 4f5a66f..f582be6 100644 --- a/layouts/partials/post/wc.html +++ b/layouts/partials/post/wc.html @@ -2,9 +2,9 @@ {{- $page := .Page}} {{- with $postCount.enable }} {{- with $postCount.wordcount }} - <span class="post-wordcount hidden-xs" itemprop="wordCount">{{ T "article_wordcount" -}}: {{- $page.WordCount }}{{ T "unit_word" }}</span> + <span class="post-wordcount hidden-xs" itemprop="wordCount">{{ T "article_wordcount" -}}{{- $page.WordCount }}{{ T "unit_word" }}</span> {{- end }} {{- with $postCount.min2read }} - <span class="post-readcount hidden-xs" itemprop="timeRequired">{{ T "article_readcount" }}: {{- $page.ReadingTime }}{{ T "unit_time" }} </span> + <span class="post-readcount hidden-xs" itemprop="timeRequired">{{ T "article_readcount" }}{{- $page.ReadingTime }}{{ T "unit_time" }} </span> {{- end }} {{- end }}
\ No newline at end of file |