From 4aa0bf5598f29de8e33d94a6851eaf24bcb14284 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Tue, 23 May 2023 16:36:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=92=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/lang/en-US.js | 5 ++++- lib/lang/zh-CN.js | 4 +++- themes/hexo/components/HeaderArticle.js | 6 +++--- themes/matery/components/ArticleInfo.js | 4 ++-- themes/matery/components/HeaderArticle.js | 14 ++++++++------ themes/matery/components/WordCount.js | 8 +++++--- 6 files changed, 25 insertions(+), 16 deletions(-) diff --git a/lib/lang/en-US.js b/lib/lang/en-US.js index 58bec1e5..de277434 100644 --- a/lib/lang/en-US.js +++ b/lib/lang/en-US.js @@ -40,7 +40,10 @@ export default { DEBUG_CLOSE: 'Close', THEME_SWITCH: 'Theme Switch', ANNOUNCEMENT: 'Announcement', - START_READING: 'Start Reading' + START_READING: 'Start Reading', + MINUTE: 'min', + WORD_COUNT: 'W.C.' + }, PAGINATION: { PREV: 'Prev', diff --git a/lib/lang/zh-CN.js b/lib/lang/zh-CN.js index 511bb3bf..559afb91 100644 --- a/lib/lang/zh-CN.js +++ b/lib/lang/zh-CN.js @@ -42,7 +42,9 @@ export default { DEBUG_CLOSE: '关闭调试', THEME_SWITCH: '切换主题', ANNOUNCEMENT: '公告', - START_READING: '开始阅读' + START_READING: '开始阅读', + MINUTE: '分钟', + WORD_COUNT: '字数' }, PAGINATION: { PREV: '上一页', diff --git a/themes/hexo/components/HeaderArticle.js b/themes/hexo/components/HeaderArticle.js index c4b33a6d..7741644d 100644 --- a/themes/hexo/components/HeaderArticle.js +++ b/themes/hexo/components/HeaderArticle.js @@ -41,7 +41,7 @@ export default function HeaderArticle({ post, siteInfo }) { } - + {/* 文章Title */}
{post.title} @@ -66,13 +66,13 @@ export default function HeaderArticle({ post, siteInfo }) { {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime}
- + {BLOG.ANALYTICS_BUSUANZI_ENABLE &&
{locale.COMMON.VIEWS}
} - +
{post.tagItems && (
diff --git a/themes/matery/components/ArticleInfo.js b/themes/matery/components/ArticleInfo.js index da62ac81..09c6e3ec 100644 --- a/themes/matery/components/ArticleInfo.js +++ b/themes/matery/components/ArticleInfo.js @@ -29,11 +29,11 @@ export const ArticleInfo = (props) => { passHref className="cursor-pointer whitespace-nowrap"> - 发布日期:{date} + {locale.COMMON.POST_TIME}:{date} - 更新日期: {post.lastEditedTime} + {locale.COMMON.LAST_EDITED_TIME}:{post.lastEditedTime} diff --git a/themes/matery/components/HeaderArticle.js b/themes/matery/components/HeaderArticle.js index 1f2fe89e..004d76d1 100644 --- a/themes/matery/components/HeaderArticle.js +++ b/themes/matery/components/HeaderArticle.js @@ -16,12 +16,14 @@ export default function HeaderArticle({ post, siteInfo }) { alt={title} className="opacity-50 dark:opacity-40 h-full w-full object-cover" /> */} - {title} - {title} + {title} +
+ {title} +
) } diff --git a/themes/matery/components/WordCount.js b/themes/matery/components/WordCount.js index be39bff6..8e4af32a 100644 --- a/themes/matery/components/WordCount.js +++ b/themes/matery/components/WordCount.js @@ -1,3 +1,4 @@ +import { useGlobal } from '@/lib/global' import { useEffect } from 'react' /** @@ -5,6 +6,7 @@ import { useEffect } from 'react' * @returns */ export default function WordCount() { + const { locale } = useGlobal() useEffect(() => { countWords() }) @@ -12,13 +14,13 @@ export default function WordCount() { return - 文章字数  + {locale.COMMON.WORD_COUNT}  0 - 阅读时长: - 0分钟 + + 0 {locale.COMMON.MINUTE} }