Skip to content

Commit ca6bdee

Browse files
committed
feat: add Traditional Chinese translations for blog content
1 parent 232d4b1 commit ca6bdee

4,561 files changed

Lines changed: 485454 additions & 200 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.vitepress/locales/en.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { DefaultTheme, LocaleSpecificConfig } from "vitepress";
2+
3+
type LocaleConfig = LocaleSpecificConfig<DefaultTheme.Config> & {
4+
label: string;
5+
link?: string;
6+
};
7+
8+
export const en: LocaleConfig = {
9+
label: "English",
10+
lang: "en-US",
11+
themeConfig: {
12+
nav: [
13+
{ text: "Home", link: "/en/" },
14+
{ text: "Latest Posts", link: "/en/posts/" },
15+
{ text: "📚 Archive (2018-2025)", link: "/en/archive/" },
16+
],
17+
outline: { label: "On this page" },
18+
docFooter: { prev: "Previous", next: "Next" },
19+
darkModeSwitchLabel: "Dark Mode",
20+
sidebarMenuLabel: "Menu",
21+
returnToTopLabel: "Back to top",
22+
},
23+
};

docs/.vitepress/locales/ja.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { DefaultTheme, LocaleSpecificConfig } from "vitepress";
2+
3+
type LocaleConfig = LocaleSpecificConfig<DefaultTheme.Config> & {
4+
label: string;
5+
link?: string;
6+
};
7+
8+
export const ja: LocaleConfig = {
9+
label: "日本語",
10+
lang: "ja-JP",
11+
themeConfig: {
12+
nav: [
13+
{ text: "ホーム", link: "/ja/" },
14+
{ text: "最新記事", link: "/ja/posts/" },
15+
{ text: "📚 アーカイブ (2018-2025)", link: "/ja/archive/" },
16+
],
17+
outline: { label: "目次" },
18+
docFooter: { prev: "前の記事", next: "次の記事" },
19+
darkModeSwitchLabel: "ダークモード",
20+
sidebarMenuLabel: "メニュー",
21+
returnToTopLabel: "トップに戻る",
22+
},
23+
};

docs/.vitepress/locales/zh-hk.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { DefaultTheme, LocaleSpecificConfig } from "vitepress";
2+
3+
type LocaleConfig = LocaleSpecificConfig<DefaultTheme.Config> & {
4+
label: string;
5+
link?: string;
6+
};
7+
8+
export const zhHk: LocaleConfig = {
9+
label: "繁體中文(香港)",
10+
lang: "zh-HK",
11+
themeConfig: {
12+
nav: [
13+
{ text: "首頁", link: "/zh-hk/" },
14+
{ text: "最新文章", link: "/zh-hk/posts/" },
15+
{ text: "📚 文章歸檔 (2018-2025)", link: "/zh-hk/archive/" },
16+
],
17+
outline: { label: "本文目錄" },
18+
docFooter: { prev: "上一篇", next: "下一篇" },
19+
darkModeSwitchLabel: "深色模式",
20+
sidebarMenuLabel: "選單",
21+
returnToTopLabel: "返回頂部",
22+
},
23+
};

docs/.vitepress/locales/zh-tw.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { DefaultTheme, LocaleSpecificConfig } from "vitepress";
2+
3+
type LocaleConfig = LocaleSpecificConfig<DefaultTheme.Config> & {
4+
label: string;
5+
link?: string;
6+
};
7+
8+
export const zhTw: LocaleConfig = {
9+
label: "繁體中文(台灣)",
10+
lang: "zh-TW",
11+
themeConfig: {
12+
nav: [
13+
{ text: "首頁", link: "/zh-tw/" },
14+
{ text: "最新文章", link: "/zh-tw/posts/" },
15+
{ text: "📚 文章歸檔 (2018-2025)", link: "/zh-tw/archive/" },
16+
],
17+
outline: { label: "本文目錄" },
18+
docFooter: { prev: "上一篇", next: "下一篇" },
19+
darkModeSwitchLabel: "深色模式",
20+
sidebarMenuLabel: "選單",
21+
returnToTopLabel: "回到頂部",
22+
},
23+
};

docs/.vitepress/locales/zh.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { DefaultTheme, LocaleSpecificConfig } from "vitepress";
2+
3+
type LocaleConfig = LocaleSpecificConfig<DefaultTheme.Config> & {
4+
label: string;
5+
link?: string;
6+
};
7+
8+
export const zh: LocaleConfig = {
9+
label: "中文",
10+
lang: "zh-CN",
11+
themeConfig: {
12+
nav: [
13+
{ text: "首页", link: "/" },
14+
{ text: "最新文章", link: "/posts/" },
15+
{ text: "📚 归档 (2018-2025)", link: "/archive/" },
16+
],
17+
outline: { label: "本文目录" },
18+
docFooter: { prev: "上一篇", next: "下一篇" },
19+
darkModeSwitchLabel: "深色模式",
20+
sidebarMenuLabel: "菜单",
21+
returnToTopLabel: "返回顶部",
22+
},
23+
};

docs/archive/2018/01/async-await-best-practices.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: "ES2017 async/await 最佳实践"
33
date: 2018-01-13 09:34:55
44
tags:
55
- JavaScript
6+
readingTime: 2
7+
description: "async/await 在 ES2017 正式成为标准,Node.js 7.6+ 原生支持,配合 Babel 可以在前端项目里使用。用了半年多,记录一些实际项目中积累的经验。"
68
---
79

810
async/await 在 ES2017 正式成为标准,Node.js 7.6+ 原生支持,配合 Babel 可以在前端项目里使用。用了半年多,记录一些实际项目中积累的经验。

docs/archive/2018/01/babel7-migration-guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ date: 2018-01-27 15:13:59
44
tags:
55
- Babel
66
- 工程化
7+
readingTime: 3
8+
description: "Babel 7 beta 已经发布了相当长时间,从 6 升到 7 有不少破坏性变更,但也带来了一些实用的新特性。这篇文章记录实际项目升级的过程和踩过的坑。"
79
---
810

911
Babel 7 beta 已经发布了相当长时间,从 6 升到 7 有不少破坏性变更,但也带来了一些实用的新特性。这篇文章记录实际项目升级的过程和踩过的坑。

docs/archive/2018/01/critical-rendering-path.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: "前端性能优化:搞懂关键渲染路径"
33
date: 2018-01-11 17:34:30
44
tags:
55
- 性能优化
6+
readingTime: 3
7+
description: "做性能优化之前,得先搞清楚浏览器从收到 HTML 到用户看到页面,中间经历了什么。这些步骤合在一起叫做**关键渲染路径**(Critical Rendering Path)。不理解这个,很多优化手段只能照猫画虎。"
68
---
79

810
做性能优化之前,得先搞清楚浏览器从收到 HTML 到用户看到页面,中间经历了什么。这些步骤合在一起叫做**关键渲染路径**(Critical Rendering Path)。不理解这个,很多优化手段只能照猫画虎。

docs/archive/2018/01/css-grid-layout-guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: "CSS Grid 布局入门:从 Flexbox 到 Grid 的思维转变"
33
date: 2018-01-06 14:39:49
44
tags:
55
- CSS
6+
readingTime: 2
7+
description: "CSS Grid 在 2017 年基本完成了主流浏览器的支持(Chrome 57、Firefox 52、Safari 10.1),2018 年已经可以在不需要兼容 IE 的项目里放心使用。但很多人用过 Flexbox 后,一时不太明白 Grid 解决的是什么问题。"
68
---
79

810
CSS Grid 在 2017 年基本完成了主流浏览器的支持(Chrome 57、Firefox 52、Safari 10.1),2018 年已经可以在不需要兼容 IE 的项目里放心使用。但很多人用过 Flexbox 后,一时不太明白 Grid 解决的是什么问题。

docs/archive/2018/01/eslint-prettier-setup.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: "ESLint + Prettier 工程化规范配置实践"
33
date: 2018-01-30 11:21:56
44
tags:
55
- 工程化
6+
readingTime: 2
7+
description: "代码规范是团队协作的基础设施。每次 Code Review 花时间讨论缩进和引号风格是在浪费所有人的时间。ESLint + Prettier 的组合可以把这类问题自动化掉。"
68
---
79

810
代码规范是团队协作的基础设施。每次 Code Review 花时间讨论缩进和引号风格是在浪费所有人的时间。ESLint + Prettier 的组合可以把这类问题自动化掉。

0 commit comments

Comments
 (0)