Skip to content

Commit db8c476

Browse files
Alan WangJustineokiaking
authored
docs(zh): add zh translation for 4.0 docs (#1965)
* docs: add zh docs for vuex 4.0 * docs: add sidebar * Update docs/zh/installation.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/installation.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/api/index.md Co-authored-by: GU Yiling <[email protected]> * Update docs/.vitepress/config.js Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/api/index.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/api/index.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/api/index.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/actions.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/composition-api.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/composition-api.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/composition-api.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/composition-api.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/composition-api.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/forms.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/getters.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/composition-api.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/getters.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/index.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/index.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/index.md Co-authored-by: GU Yiling <[email protected]> * docs: update some mistakes * Update docs/zh/guide/migrating-to-4-0-from-3-x.md Co-authored-by: GU Yiling <[email protected]> * docs: update * docs: fix anchor * Update docs/zh/guide/composition-api.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/migrating-to-4-0-from-3-x.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/modules.md Co-authored-by: GU Yiling <[email protected]> * Update docs/zh/guide/typescript-support.md Co-authored-by: GU Yiling <[email protected]> * docs: scrimba -> Scrimba * docs: adjust lang list order and fix link to api docs Co-authored-by: GU Yiling <[email protected]> Co-authored-by: Kia King Ishii <[email protected]>
1 parent 34225b3 commit db8c476

19 files changed

+2438
-1
lines changed

docs/.vitepress/config.js

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ module.exports = {
99
title: 'Vuex',
1010
description: 'Centralized State Management for Vue.js'
1111
},
12+
'/zh/': {
13+
lang: 'zh-CN',
14+
title: 'Vuex',
15+
description: 'Vue.js 的中心化状态管理方案'
16+
},
1217
'/ptbr/': {
1318
lang: 'pt-BR',
1419
title: 'Vuex',
@@ -20,7 +25,7 @@ module.exports = {
2025
['link', { rel: 'icon', href: `/logo.png` }],
2126
['link', { rel: 'apple-touch-icon', href: `/icons/apple-touch-icon-152x152.png` }],
2227
['link', { rel: 'mask-icon', href: '/icons/safari-pinned-tab.svg', color: '#3eaf7c' }],
23-
['meta', { name: 'msapplication-TileImage', content: '/icons/msapplication-icon-144x144.png' }],
28+
['meta', { name: 'msapplication-TileImage', content: '/icons/msapplication-icon-144x144.png' }]
2429
],
2530

2631
themeConfig: {
@@ -90,6 +95,65 @@ module.exports = {
9095
]
9196
},
9297

98+
'/zh/': {
99+
label: '简体中文',
100+
selectText: '选择语言',
101+
editLinkText: '在 GitHub 上编辑此页',
102+
lastUpdated: '最近更新时间',
103+
104+
nav: [
105+
{ text: '指南', link: '/zh/guide/' },
106+
{ text: 'API 参考', link: '/zh/api/' },
107+
{ text: '更新记录', link: 'https://github.com/vuejs/vuex/releases' },
108+
{
109+
text: 'v4.x',
110+
items: [
111+
{ text: 'v3.x', link: 'https://vuex.vuejs.org/zh' }
112+
]
113+
}
114+
],
115+
116+
sidebar: [
117+
{
118+
text: '介绍',
119+
children: [
120+
{ text: 'Vuex 是什么?', link: '/zh/' },
121+
{ text: '安装', link: '/zh/installation' },
122+
{ text: '开始', link: '/zh/guide/' }
123+
]
124+
},
125+
{
126+
text: '核心概念',
127+
children: [
128+
{ text: 'State', link: '/zh/guide/state' },
129+
{ text: 'Getter', link: '/zh/guide/getters' },
130+
{ text: 'Mutation', link: '/zh/guide/mutations' },
131+
{ text: 'Action', link: '/zh/guide/actions' },
132+
{ text: 'Module', link: '/zh/guide/modules' }
133+
]
134+
},
135+
{
136+
text: '进阶',
137+
children: [
138+
{ text: '项目结构', link: '/zh/guide/structure' },
139+
{ text: '组合式 API', link: '/zh/guide/composition-api' },
140+
{ text: '插件', link: '/zh/guide/plugins' },
141+
{ text: '严格模式', link: '/zh/guide/strict' },
142+
{ text: '表单处理', link: '/zh/guide/forms' },
143+
{ text: '测试', link: '/zh/guide/testing' },
144+
{ text: '热重载', link: '/zh/guide/hot-reload' },
145+
{ text: 'TypeScript 支持', link: '/zh/guide/typescript-support' },
146+
]
147+
},
148+
{
149+
text: '迁移指南',
150+
children: [
151+
{ text: '从 3.x 迁移到 4.0', link: '/zh/guide/migrating-to-4-0-from-3-x' }
152+
]
153+
}
154+
]
155+
},
156+
93157
'/ptbr/': {
94158
label: 'Português',
95159
selectText: 'Idiomas',

0 commit comments

Comments
 (0)