diff --git a/data/even/default.toml b/data/even/default.toml deleted file mode 100644 index e87bd7c..0000000 --- a/data/even/default.toml +++ /dev/null @@ -1,47 +0,0 @@ -archive = "归档" -tags = "标签" -categories = "分类" - -[footer] - powered = "由 %s 强力驱动" - theme = "主题" - -[posts] - prev = "上一页" - next = "下一页" - prev_post = "上一篇" - next_post = "下一篇" - toc = "文章目录" - readmore = "阅读更多" - reward = "赞赏支持" - rewardAlipay = "支付宝打赏" - rewardWechat = "微信打赏" - seeMarkDown = "查看本文 Markdown 版本 »" - - [posts.header] - wordCount = "约 %d 字" - readingTime = "预计阅读 %d 分钟" - -[copyright] - author = "文章作者" - lastMod = "上次更新" - markdown = "原始文档" - license = "许可协议" - -[counter] - [counter.archives] - zero = "暂无文章" - other = "共计 %d 篇文章" - - [counter.tagcloud] - zero = "暂无标签" - other = "共计 %d 个标签" - - [counter.categories] - zero = "暂无分类" - other = "共计 %d 个分类" - -[traffic] - siteUV = "本站总访客数 %s 人" - sitePV = "本站总访问量 %s 次" - pagePV = "%s 次阅读" diff --git a/data/even/en.toml b/data/even/en.toml deleted file mode 100644 index 09cb578..0000000 --- a/data/even/en.toml +++ /dev/null @@ -1,47 +0,0 @@ -archive = "Archive" -tags = "Tags" -categories = "Categories" - -[footer] - powered = "Powered by %s" - theme = "Theme" - -[posts] - prev = "Prev" - next = "Next" - prev_post = "Prev" - next_post = "Next" - toc = "Contents" - readmore = "Read more.." - reward = "Reward" - rewardAlipay = "alipay" - rewardWechat = "wechat" - seeMarkDown = "The Markdown version »" - - [posts.header] - wordCount = "%d word" - readingTime = "%d min read" - -[copyright] - author = "Author" - lastMod = "LastMod" - markdown = "Markdown" - license = "License" - -[counter] - [counter.archives] - zero = "No Posts" - other = "%d Posts In Total" - - [counter.tagcloud] - zero = "No tags" - other = "%d Tags In Total" - - [counter.categories] - zero = "No Categories" - other = "%d Categories In Total" - -[traffic] - siteUV = "site uv: %s" - sitePV = "site pv: %s" - pagePV = "%s times read" diff --git a/data/even/zh-CN.toml b/data/even/zh-CN.toml deleted file mode 100644 index e87bd7c..0000000 --- a/data/even/zh-CN.toml +++ /dev/null @@ -1,47 +0,0 @@ -archive = "归档" -tags = "标签" -categories = "分类" - -[footer] - powered = "由 %s 强力驱动" - theme = "主题" - -[posts] - prev = "上一页" - next = "下一页" - prev_post = "上一篇" - next_post = "下一篇" - toc = "文章目录" - readmore = "阅读更多" - reward = "赞赏支持" - rewardAlipay = "支付宝打赏" - rewardWechat = "微信打赏" - seeMarkDown = "查看本文 Markdown 版本 »" - - [posts.header] - wordCount = "约 %d 字" - readingTime = "预计阅读 %d 分钟" - -[copyright] - author = "文章作者" - lastMod = "上次更新" - markdown = "原始文档" - license = "许可协议" - -[counter] - [counter.archives] - zero = "暂无文章" - other = "共计 %d 篇文章" - - [counter.tagcloud] - zero = "暂无标签" - other = "共计 %d 个标签" - - [counter.categories] - zero = "暂无分类" - other = "共计 %d 个分类" - -[traffic] - siteUV = "本站总访客数 %s 人" - sitePV = "本站总访问量 %s 次" - pagePV = "%s 次阅读" diff --git a/exampleSite/data/even/default.toml b/exampleSite/data/even/default.toml deleted file mode 100644 index 09cb578..0000000 --- a/exampleSite/data/even/default.toml +++ /dev/null @@ -1,47 +0,0 @@ -archive = "Archive" -tags = "Tags" -categories = "Categories" - -[footer] - powered = "Powered by %s" - theme = "Theme" - -[posts] - prev = "Prev" - next = "Next" - prev_post = "Prev" - next_post = "Next" - toc = "Contents" - readmore = "Read more.." - reward = "Reward" - rewardAlipay = "alipay" - rewardWechat = "wechat" - seeMarkDown = "The Markdown version »" - - [posts.header] - wordCount = "%d word" - readingTime = "%d min read" - -[copyright] - author = "Author" - lastMod = "LastMod" - markdown = "Markdown" - license = "License" - -[counter] - [counter.archives] - zero = "No Posts" - other = "%d Posts In Total" - - [counter.tagcloud] - zero = "No tags" - other = "%d Tags In Total" - - [counter.categories] - zero = "No Categories" - other = "%d Categories In Total" - -[traffic] - siteUV = "site uv: %s" - sitePV = "site pv: %s" - pagePV = "%s times read" diff --git a/i18n/en.yaml b/i18n/en.yaml new file mode 100644 index 0000000..7420827 --- /dev/null +++ b/i18n/en.yaml @@ -0,0 +1,96 @@ +# ===== title ===== +archive: + other: "Archive" + +tags: + other: "Tags" + +categories: + other: "Categories" + +# ===== footer ===== +powered: + other: "Powered by %s" + +theme: + other: "Theme" + +siteUV: + other: "site uv: %s" + +sitePV: + other: "site pv: %s" + +pagePV: + other: "%s times read" + +# ===== post ===== +prevPage: + other: "Prev" + +nextPage: + other: "Next" + +prevPost: + other: "Prev" + +nextPost: + other: "Next" + +toc: + other: "Contents" + +readMore: + other: "Read more.." + +reward: + other: "Reward" + +rewardAlipay: + other: "alipay" + +rewardWechat: + other: "wechat" + +wordCount: + one: "{{ .Count }} word" + other: "{{ .Count }} words" + +readingTime: + one: "{{ .Count }} min read" + other: "{{ .Count }} mins read" + +# ===== content license ===== +author: + other: "Author" + +lastMod: + other: "LastMod" + +markdown: + other: "Markdown" + +seeMarkDown: + other: "The Markdown version »" + +license: + other: "License" + +# ===== counter ===== +archiveCounter: + one: "{{ .Count }} Post In Total" + other: "{{ .Count }} Posts In Total" + +tagCounter: + one: "{{ .Count }} Tag In Total" + other: "{{ .Count }} Tags In Total" + +zeroTagCounter: + other: "No tags" + +categoryCounter: + one: "{{ .Count }} Category In Total" + other: "{{ .Count }} Categories In Total" + +zeroCategoryCounter: + other: "No categories" diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml new file mode 100644 index 0000000..2d064f0 --- /dev/null +++ b/i18n/zh-CN.yaml @@ -0,0 +1,96 @@ +# ===== title ===== +archive: + other: "归档" + +tags: + other: "标签" + +categories: + other: "分类" + +# ===== footer ===== +powered: + other: "由 %s 强力驱动" + +theme: + other: "主题" + +siteUV: + other: "本站总访客数 %s 人" + +sitePV: + other: "本站总访问量 %s 次" + +pagePV: + other: "%s 次阅读" + +# ===== post ===== +prevPage: + other: "上一页" + +nextPage: + other: "下一页" + +prevPost: + other: "上一篇" + +nextPost: + other: "下一篇" + +toc: + other: "文章目录" + +readMore: + other: "阅读更多" + +reward: + other: "赞赏支持" + +rewardAlipay: + other: "支付宝打赏" + +rewardWechat: + other: "微信打赏" + +wordCount: + one: "约 {{ .Count }} 字" + other: "约 {{ .Count }} 字" + +readingTime: + one: "预计阅读 {{ .Count }} 分钟" + other: "预计阅读 {{ .Count }} 分钟" + +# ===== content license ===== +author: + other: "文章作者" + +lastMod: + other: "上次更新" + +markdown: + other: "原始文档" + +seeMarkDown: + other: "查看本文 Markdown 版本 »" + +license: + other: "许可协议" + +# ===== counter ===== +archiveCounter: + one: "共计 {{ .Count }} 篇文章" + other: "共计 {{ .Count }} 篇文章" + +tagCounter: + one: "共计 {{ .Count }} 个标签" + other: "共计 {{ .Count }} 个标签" + +zeroTagCounter: + other: "暂无标签" + +categoryCounter: + one: "共计 {{ .Count }} 个分类" + other: "共计 {{ .Count }} 个分类" + +zeroCategoryCounter: + other: "暂无分类" diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 029226c..8e5edf1 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,18 +1,12 @@ -{{ define "title" }}{{ .Site.Data.even.default.archive }} - {{ .Site.Title }}{{ end }} +{{ define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end }} {{ define "content"}} -{{- $lang := .Site.Data.even.default }} {{- $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate") }}
{{- if not $paginator.HasPrev }}
- {{- $length := len .Data.Pages }} - {{- if eq $length 0 }} - {{ $lang.counter.archives.zero }} - {{ else }} - {{ printf $lang.counter.archives.other $length }} - {{ end -}} + {{ T "archiveCounter" (len .Data.Pages) }}
{{- end -}} @@ -43,12 +37,12 @@ {{ with $paginator.Prev -}} {{- end }} {{ with $paginator.Next -}} {{- end }} diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index ec8a266..b373c7a 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -30,16 +30,15 @@