From 281610b90b463801cb399e24c371a5d514e59065 Mon Sep 17 00:00:00 2001 From: hantang <34468720+hantang@users.noreply.github.com> Date: Tue, 7 Oct 2025 16:32:24 +0800 Subject: [PATCH 1/2] Support taxomony i18n --- i18n/en.toml | 20 + i18n/zh-cn.toml | 20 + i18n/zh-tw.toml | 20 + layouts/_partials/taxonomy_terms_article.html | 3 +- layouts/_partials/taxonomy_terms_clouds.html | 19 +- layouts/_partials/taxonomy_title.html | 14 + layouts/taxonomy.html | 2 +- layouts/term.html | 8 +- pnpm-lock.yaml | 8380 +++++++++++++++++ 9 files changed, 8477 insertions(+), 9 deletions(-) create mode 100644 layouts/_partials/taxonomy_title.html create mode 100644 pnpm-lock.yaml diff --git a/i18n/en.toml b/i18n/en.toml index dcb78102c9..d1c3ee05ac 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -88,3 +88,23 @@ other = "Was this page helpful?" other = "Yes" [feedback_negative] other = "No" + +# Taxonomy +[taxonomy_category] +other = "Category" +[taxonomy_categories] +other = "Categories" +[taxonomy_collection] +other = "Collection" +[taxonomy_collections] +other = "Collections" +[taxonomy_tag] +other = "Tag" +[taxonomy_tags] +other = "Tags" +[taxonomy_project] +other = "Project" +[taxonomy_projects] +other = "Projects" +[taxonomy_series] +other = "Series" diff --git a/i18n/zh-cn.toml b/i18n/zh-cn.toml index bbae7803d6..5fc04e6191 100644 --- a/i18n/zh-cn.toml +++ b/i18n/zh-cn.toml @@ -89,3 +89,23 @@ other = "这个页面对您有帮助吗?" other = "有帮助" [feedback_negative] other = "没帮助" + +# Taxonomy +[taxonomy_category] +other = "分类" +[taxonomy_categories] +other = "分类" +[taxonomy_collection] +other = "合集" +[taxonomy_collections] +other = "合集" +[taxonomy_tag] +other = "标签" +[taxonomy_tags] +other = "标签" +[taxonomy_project] +other = "项目" +[taxonomy_projects] +other = "项目" +[taxonomy_series] +other = "系列" diff --git a/i18n/zh-tw.toml b/i18n/zh-tw.toml index 8211a019f1..8d71b54104 100644 --- a/i18n/zh-tw.toml +++ b/i18n/zh-tw.toml @@ -89,3 +89,23 @@ other = "這個頁面對您有幫助嗎?" other = "有幫助" [feedback_negative] other = "沒幫助" + +# Taxonomy +[taxonomy_category] +other = "分類" +[taxonomy_categories] +other = "分類" +[taxonomy_collection] +other = "合集" +[taxonomy_collections] +other = "合集" +[taxonomy_tag] +other = "標籤" +[taxonomy_tags] +other = "標籤" +[taxonomy_project] +other = "專案" +[taxonomy_projects] +other = "專案" +[taxonomy_series] +other = "系列" diff --git a/layouts/_partials/taxonomy_terms_article.html b/layouts/_partials/taxonomy_terms_article.html index 79ef364f74..39a8900d3d 100644 --- a/layouts/_partials/taxonomy_terms_article.html +++ b/layouts/_partials/taxonomy_terms_article.html @@ -2,7 +2,8 @@ {{ $taxo := .taxo -}} {{ if (gt (len ($context.GetTerms $taxo)) 0) -}}
-
{{ humanize $taxo }}:
+ {{ $title := partial "taxonomy_title.html" (dict "context" $context "taxo" $taxo) }} +
{{ $title }}: