From cdf2bceb404a5788cbf85850766c2269e97e4c16 Mon Sep 17 00:00:00 2001 From: shenyu <448766534@qq.com> Date: Sat, 4 Apr 2020 14:38:01 +0800 Subject: [PATCH] :globe_with_meridians: en support --- languages/default.yml | 20 +------------------- languages/en.yml | 28 ++++++++++++++++++++++++++++ languages/zh-CN.yml | 11 ++++++++++- layout/_partial/article.ejs | 7 +++---- layout/_partial/post/topping.ejs | 2 +- layout/_partial/post/word.ejs | 8 ++++---- 6 files changed, 47 insertions(+), 29 deletions(-) create mode 100644 languages/en.yml diff --git a/languages/default.yml b/languages/default.yml index 3ef7e92..7fcfc3b 100644 --- a/languages/default.yml +++ b/languages/default.yml @@ -1,19 +1 @@ -categories: Categories -search: Search -tags: Tags -tagcloud: Tag Cloud -tweets: Tweets -prev: Prev -next: Next -comment: Comments -archive_a: Archives -archive_b: "Archives: %s" -page: Page %d -recent_posts: Recent Posts -newer: Newer -older: Older -share: Share -powered_by: Powered by -rss_feed: RSS Feed -category: Category -tag: Tag \ No newline at end of file +en.yml \ No newline at end of file diff --git a/languages/en.yml b/languages/en.yml new file mode 100644 index 0000000..2a78fb7 --- /dev/null +++ b/languages/en.yml @@ -0,0 +1,28 @@ +categories: Categories +search: Search +tags: Tags +tagcloud: Tag Cloud +tweets: Tweets +prev: Prev +next: Next +comment: Comments +archive_a: Archives +archive_b: "Archives: %s" +page: Page %d +recent_posts: Recent Posts +newer: Newer +older: Older +share: Share +powered_by: Powered by +rss_feed: RSS Feed +category: Category +tag: Tag + +post: + word_count: Word count + read_time: Reading time + minutes: min + reward: Reward + sticky: Sticky + copyright_title: Copyright + copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source. \ No newline at end of file diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index e298b77..3bac094 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -16,4 +16,13 @@ share: 分享 powered_by: Powered by rss_feed: RSS Feed category: Category -tag: Tag \ No newline at end of file +tag: Tag + +post: + word_count: 字数统计 + read_time: 阅读时长 + minutes: 分钟 + reward: 打赏 + sticky: 置顶 + copyright_title: 版权声明 + copyright_content: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处! \ No newline at end of file diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index e31e74f..5d0dfcc 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -38,7 +38,7 @@ <% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index && !post.no_reward){ %>
- 打赏 + <%= __('post.reward') %>
<% } %> @@ -50,9 +50,8 @@ diff --git a/layout/_partial/post/topping.ejs b/layout/_partial/post/topping.ejs index a00dc0b..af6db43 100644 --- a/layout/_partial/post/topping.ejs +++ b/layout/_partial/post/topping.ejs @@ -1,3 +1,3 @@ <% if (is_home() && post.top) { %> - 置顶 + <%= __('post.sticky') %> <% } %> \ No newline at end of file diff --git a/layout/_partial/post/word.ejs b/layout/_partial/post/word.ejs index ca5a1e4..11b64ad 100644 --- a/layout/_partial/post/word.ejs +++ b/layout/_partial/post/word.ejs @@ -3,8 +3,8 @@ - - <%= wordcount(post.content) %>字 + + <%= wordcount(post.content) %> @@ -12,8 +12,8 @@   |   - 阅读时长≈ - <%= min2read(post.content) %>分钟 + <%= __('post.read_time') %>≈ + <%= min2read(post.content) %> <%= __('post.minutes') %>