From e85ea490003870c5a6c004bb2e6bd6d76769a2ce Mon Sep 17 00:00:00 2001
From: KylinDC <solder-hulls.06@icloud.com>
Date: Mon, 19 Feb 2024 18:31:09 +0000
Subject: [PATCH] feat(i18n): add Simplified Chinese (#896)

---
 quartz/i18n/locales/zh-CN.ts |   81 ++++++++++++++++++++++++++++++++++++++++
 quartz/i18n/index.ts         |    2 +
 2 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/quartz/i18n/index.ts b/quartz/i18n/index.ts
index 3861bf7..38d3562 100644
--- a/quartz/i18n/index.ts
+++ b/quartz/i18n/index.ts
@@ -11,6 +11,7 @@
 import uk from "./locales/uk-UA"
 import ru from "./locales/ru-RU"
 import ko from "./locales/ko-KR"
+import zh from "./locales/zh-CN"
 
 export const TRANSLATIONS = {
   "en-US": en,
@@ -46,6 +47,7 @@
   "uk-UA": uk,
   "ru-RU": ru,
   "ko-KR": ko,
+  "zh-CN": zh,
 } as const
 
 export const defaultTranslation = "en-US"
diff --git a/quartz/i18n/locales/zh-CN.ts b/quartz/i18n/locales/zh-CN.ts
new file mode 100644
index 0000000..43d0111
--- /dev/null
+++ b/quartz/i18n/locales/zh-CN.ts
@@ -0,0 +1,81 @@
+import { Translation } from "./definition"
+
+export default {
+  propertyDefaults: {
+    title: "无题",
+    description: "无描述",
+  },
+  components: {
+    callout: {
+      note: "笔记",
+      abstract: "摘要",
+      info: "提示",
+      todo: "待办",
+      tip: "提示",
+      success: "成功",
+      question: "问题",
+      warning: "警告",
+      failure: "失败",
+      danger: "危险",
+      bug: "错误",
+      example: "示例",
+      quote: "引用",
+    },
+    backlinks: {
+      title: "反向链接",
+      noBacklinksFound: "无法找到反向链接",
+    },
+    themeToggle: {
+      lightMode: "亮色模式",
+      darkMode: "暗色模式",
+    },
+    explorer: {
+      title: "探索",
+    },
+    footer: {
+      createdWith: "Created with",
+    },
+    graph: {
+      title: "关系图谱",
+    },
+    recentNotes: {
+      title: "最近的笔记",
+      seeRemainingMore: ({ remaining }) => `查看更多${remaining}篇笔记 →`,
+    },
+    transcludes: {
+      transcludeOf: ({ targetSlug }) => `包含${targetSlug}`,
+      linkToOriginal: "指向原始笔记的链接",
+    },
+    search: {
+      title: "搜索",
+      searchBarPlaceholder: "搜索些什么",
+    },
+    tableOfContents: {
+      title: "目录",
+    },
+    contentMeta: {
+      readingTime: ({ minutes }) => `${minutes}分钟阅读`,
+    },
+  },
+  pages: {
+    rss: {
+      recentNotes: "最近的笔记",
+      lastFewNotes: ({ count }) => `最近的${count}条笔记`,
+    },
+    error: {
+      title: "无法找到",
+      notFound: "私有笔记或笔记不存在。",
+    },
+    folderContent: {
+      folder: "文件夹",
+      itemsUnderFolder: ({ count }) => `此文件夹下有${count}条笔记。`,
+    },
+    tagContent: {
+      tag: "标签",
+      tagIndex: "标签索引",
+      itemsUnderTag: ({ count }) => `此标签下有${count}条笔记。`,
+      showingFirst: ({ count }) => `显示前${count}个标签。`,
+      totalTags: ({ count }) => `总共有${count}个标签。`,
+    },
+  },
+} as const satisfies Translation

--
Gitblit v1.10.0