summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-04-01 11:00:10 +0800
committerEltrac <hi@guhub.cn>2025-04-01 11:00:10 +0800
commitcc0748ec87f5cb7419f73b84fb710ee79570c038 (patch)
tree502dc6c45040f65e1d2f9075b3835d836e895705
parent8dce78ec6ab20779b777c87c2fb15ab53a41ff84 (diff)
chore: translate post nav
Former-commit-id: c582880e3b11d86fc6943455570b805c88037bbb
-rw-r--r--i18n/en.yml3
-rw-r--r--i18n/zh.yml3
-rw-r--r--layouts/partials/components/postnav.html6
3 files changed, 10 insertions, 2 deletions
diff --git a/i18n/en.yml b/i18n/en.yml
index 4391c91a..a62b972a 100644
--- a/i18n/en.yml
+++ b/i18n/en.yml
@@ -10,3 +10,6 @@ footer:
wordCount: '🪦 {{ . }} words are buried here'
licenseStatement: 'Licensed under {{ . }}'
searchInstruction: '⌘+K to search anywhere'
+postNav:
+ latest: 'Latest'
+ categories: 'Categories'
diff --git a/i18n/zh.yml b/i18n/zh.yml
index 38c576e1..6273feb8 100644
--- a/i18n/zh.yml
+++ b/i18n/zh.yml
@@ -10,3 +10,6 @@ footer:
wordCount: '🪦 {{ . }} 字在这里死去'
licenseStatement: '以 {{ . }} 协议授权'
searchInstruction: '⌘+K 在任何地方搜索'
+postNav:
+ latest: '最新'
+ categories: '分类'
diff --git a/layouts/partials/components/postnav.html b/layouts/partials/components/postnav.html
index 207ea99c..0d36d5b1 100644
--- a/layouts/partials/components/postnav.html
+++ b/layouts/partials/components/postnav.html
@@ -1,11 +1,13 @@
<div id="posts-list-navigation">
<ul>
<li class="{{ if eq "/" $.Page.RelPermalink }}active{{ end }}">
- <a href="/">最新</a>
+ <a href="{{ .Site.LanguagePrefix }}/">{{ T "postNav.latest" }}</a>
</li>
+ {{ if eq .Site.Language.Lang "zh" }}
<li class="{{ if eq "/categories/" $.Page.RelPermalink }}active{{ end }}">
- <a href="/categories">分类</a>
+ <a href="{{ .Site.LanguagePrefix }}/categories">{{ T "postNav.categories" }}</a>
</li>
+ {{ end }}
<li id="search-instruction">
<span>{{ T "searchInstruction" }}</span>
</li>