Skip to content

Commit 4e519d3

Browse files
committed
docs(cn): merge all conflicts.
1 parent 84b276b commit 4e519d3

File tree

5 files changed

+91
-72
lines changed

5 files changed

+91
-72
lines changed

.vitepress/config.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,11 @@ export default defineConfig({
168168
link: '/guide/comparisons'
169169
},
170170
{
171-
<<<<<<< HEAD
172-
text: '从 v2 迁移',
173-
=======
174-
text: 'Troubleshooting',
171+
text: '故障排除',
175172
link: '/guide/troubleshooting'
176173
},
177174
{
178-
text: 'Migration from v2',
179-
>>>>>>> 64ed060259eb927a51e68d528f236e349dd0ebb9
175+
text: '从 v2 迁移',
180176
link: '/guide/migration'
181177
}
182178
]

_data/team.js

+37-22
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const core = [
55
title: 'Creator',
66
org: 'Vue.js',
77
orgLink: 'https://vuejs.org/',
8-
desc: 'Independent open source developer, creator of Vue.js and Vite.',
8+
desc: '独立开源开发者,Vue.js & Vite 作者',
99
links: [
1010
{ icon: 'github', link: 'https://github.com/yyx990803' },
1111
{ icon: 'twitter', link: 'https://twitter.com/youyuxi' }
@@ -15,10 +15,10 @@ export const core = [
1515
{
1616
avatar: 'https://www.github.com/patak-dev.png',
1717
name: 'Patak',
18-
title: 'A collaborative being',
18+
title: '合作伙伴',
1919
org: 'StackBlitz',
2020
orgLink: 'https://stackblitz.com/',
21-
desc: 'Core team member of Vite. Team member of Vue.',
21+
desc: 'Vite 核心团队成员,Vue 团队成员',
2222
links: [
2323
{ icon: 'github', link: 'https://github.com/patak-dev' },
2424
{ icon: 'twitter', link: 'https://twitter.com/patak_dev' }
@@ -28,10 +28,10 @@ export const core = [
2828
{
2929
avatar: 'https://www.github.com/antfu.png',
3030
name: 'Anthony Fu',
31-
title: 'A fanatical open sourceror',
31+
title: '极富热情的开源开发者',
3232
org: 'NuxtLabs',
3333
orgLink: 'https://nuxtlabs.com/',
34-
desc: 'Core team member of Vite & Vue. Working at NuxtLabs.',
34+
desc: 'Vite & Vue 核心团队成员,在 NuxtLabs 工作',
3535
links: [
3636
{ icon: 'github', link: 'https://github.com/antfu' },
3737
{ icon: 'twitter', link: 'https://twitter.com/antfu7' }
@@ -40,11 +40,11 @@ export const core = [
4040
},
4141
{
4242
avatar: 'https://github.com/sodatea.png',
43-
name: 'Haoqun Jiang',
44-
title: 'Developer',
43+
name: '蒋豪群',
44+
title: '开发者',
4545
org: 'Vue.js',
4646
orgLink: 'https://vuejs.org/',
47-
desc: 'Vite/Vite core team member. Full-time open sourcerer.',
47+
desc: 'Vite/Vite 核心团队成员,全职开源开发者',
4848
links: [
4949
{ icon: 'github', link: 'https://github.com/sodatea' },
5050
{ icon: 'twitter', link: 'https://twitter.com/haoqunjiang' }
@@ -54,10 +54,10 @@ export const core = [
5454
{
5555
avatar: 'https://github.com/Shinigami92.png',
5656
name: 'Shinigami',
57-
title: 'Maintainer',
57+
title: '维护者',
5858
org: 'Faker',
5959
orgLink: 'https://fakerjs.dev',
60-
desc: 'Passionate TypeScript enthusiast working extensively with Vue SPA and pug.',
60+
desc: '热衷于 TypeScript 的爱好者,广泛使用 Vue SPA pug',
6161
links: [
6262
{ icon: 'github', link: 'https://github.com/Shinigami92' },
6363
{ icon: 'twitter', link: 'https://twitter.com/Shini_92' }
@@ -78,8 +78,8 @@ export const core = [
7878
{
7979
avatar: 'https://github.com/bluwy.png',
8080
name: 'Bjorn Lu',
81-
title: 'Frontend Developer',
82-
desc: 'Svelte and Vite team member. Something something opinions.',
81+
title: '前端开发者',
82+
desc: 'Svelte & Vite 团队成员',
8383
links: [
8484
{ icon: 'github', link: 'https://github.com/bluwy' },
8585
{ icon: 'twitter', link: 'https://twitter.com/bluwyoo' }
@@ -89,8 +89,8 @@ export const core = [
8989
{
9090
avatar: 'https://github.com/poyoho.png',
9191
name: 'yoho',
92-
title: 'Frontend Developer',
93-
desc: 'Frontend. Vite team member.',
92+
title: '前端开发者',
93+
desc: 'Vite 团队成员',
9494
links: [
9595
{ icon: 'github', link: 'https://github.com/poyoho' },
9696
{ icon: 'twitter', link: 'https://twitter.com/yoho_po' }
@@ -99,8 +99,8 @@ export const core = [
9999
{
100100
avatar: 'https://github.com/sapphi-red.png',
101101
name: 'green',
102-
title: 'Web Developer',
103-
desc: 'Vite team member. Call me sapphi or green or midori ;)',
102+
title: 'Web 开发者',
103+
desc: 'Vite 团队成员。(你可以叫我 sapphigreen(翠) 或者 midori',
104104
links: [
105105
{ icon: 'github', link: 'https://github.com/sapphi-red' },
106106
{ icon: 'twitter', link: 'https://twitter.com/sapphi_red' }
@@ -110,8 +110,8 @@ export const core = [
110110
{
111111
avatar: 'https://github.com/ygj6.png',
112112
name: 'ygj6',
113-
title: 'Developer',
114-
desc: 'Web Developer. Vue & Vite team member',
113+
title: 'Web 开发者',
114+
desc: 'Vue & Vite 团队成员',
115115
links: [
116116
{ icon: 'github', link: 'https://github.com/ygj6' },
117117
{ icon: 'twitter', link: 'https://twitter.com/ygj_66' }
@@ -122,7 +122,7 @@ export const core = [
122122
name: 'Niputi',
123123
title: 'Developer',
124124
org: 'Computershare Denmark',
125-
desc: 'weeb/javascript lover.',
125+
desc: 'Web/Javascript 爱好者',
126126
links: [
127127
{ icon: 'github', link: 'https://github.com/Niputi' },
128128
{ icon: 'twitter', link: 'https://twitter.com/Niputi_' }
@@ -134,19 +134,34 @@ export const emeriti = [
134134
{
135135
avatar: 'https://github.com/underfin.png',
136136
name: 'underfin',
137-
title: 'Developer',
137+
title: '开发者',
138138
links: [{ icon: 'github', link: 'https://github.com/underfin' }]
139139
},
140140
{
141141
avatar: 'https://github.com/GrygrFlzr.png',
142142
name: 'GrygrFlzr',
143-
title: 'Developer',
143+
title: '开发者',
144144
links: [{ icon: 'github', link: 'https://github.com/GrygrFlzr' }]
145145
},
146146
{
147147
avatar: 'https://github.com/nihalgonsalves.png',
148148
name: 'Nihal Gonsalves',
149-
title: 'Senior Software Engineer',
149+
title: '高级软件工程师',
150150
links: [{ icon: 'github', link: 'https://github.com/nihalgonsalves' }]
151151
}
152152
]
153+
154+
export const cnTranslator = [
155+
{
156+
avatar: 'https://www.github.com/ShenQingchuan.png',
157+
name: 'ShenQingchuan',
158+
title: '前端开发者',
159+
org: 'Bytedance',
160+
orgLink: 'https://www.bytedance.com/',
161+
desc: 'Vite 团队中文翻译维护者',
162+
links: [
163+
{ icon: 'github', link: 'https://github.com/ShenQingchuan' },
164+
{ icon: 'twitter', link: 'https://twitter.com/ShenQingchuan' }
165+
],
166+
},
167+
]

config/server-options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export default defineConfig({
145145

146146
`server.hmr.server` 被定义后,Vite 将会通过所提供的的服务器来处理 HMR 连接。如果不是在中间件模式下,Vite 将尝试通过已有服务器处理 HMR 连接。这在使用自签证书或想通过网络在某端口暴露 Vite 的情况下,非常有用。
147147

148-
Check out [`vite-setup-catalogue`](https://github.com/sapphi-red/vite-setup-catalogue) for some examples.
148+
查看 [`vite-setup-catalogue`](https://github.com/sapphi-red/vite-setup-catalogue) 一节获取更多实例。
149149

150150
::: tip NOTE
151151

guide/troubleshooting.md

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,81 @@
1-
# Troubleshooting
1+
# 故障排除 {#troubleshooting}
22

3-
See [Rollup's troubleshooting guide](https://rollupjs.org/guide/en/#troubleshooting) for more information too.
3+
> 你还可以查看 [Rollup 的故障排除指南](https://rollupjs.org/guide/en/#troubleshooting) 了解更多。
44
5-
If the suggestions here don't work, please try posting questions on [GitHub Discussions](https://github.com/vitejs/vite/discussions) or in the `#help` channel of [Vite Land Discord](https://chat.vitejs.dev).
5+
如果这里的建议并未帮助到你,请将你的问题发送到 [GitHub 讨论区](https://github.com/vitejs/vite/discussions) [Vite Land Discord](https://chat.vitejs.dev)`#help` 频道。
66

7-
## CLI
7+
## CLI {#cli}
88

9-
### `Error: Cannot find module 'C:\foo\bar&baz\vite\bin\vite.js'`
9+
### `Error: Cannot find module 'C:\foo\bar&baz\vite\bin\vite.js'` {#error-cannot-find-module-cfoobarbazvitebinvitejs}
1010

11-
The path to your project folder may include `?`, which doesn't work with `npm` on Windows ([npm/cmd-shim#45](https://github.com/npm/cmd-shim/issues/45)).
11+
你的项目文件夹路径中可能包含了问号 `?`,这在 Windows 上无法与 `npm` 配合正常工作 ([npm/cmd-shim#45](https://github.com/npm/cmd-shim/issues/45))
1212

13-
You will need to either:
13+
你可以选择以下两种修改方式:
1414

15-
- Switch to another package manager (e.g. `pnpm`, `yarn`)
16-
- Remove `?` from the path to your project
15+
- 切换另一种包管理工具(例如 `pnpm``yarn`
16+
- 从你的项目路径中移除问号 `?`
1717

18-
## Dev Server
18+
## 开发服务器 {#dev-server}
1919

20-
### Requests are stalled forever
20+
### 请求始终停滞 {#requests-are-stalled-forever}
2121

22-
If you are using Linux, file descriptor limits and inotify limits may be causing the issue. As Vite does not bundle most of the files, browsers may request many files which require many file descriptors, going over the limit.
22+
如果你使用的是 Linux,文件描述符限制和 inotify 限制可能会导致这个问题。由于 Vite 不会打包大多数文件,浏览器可能会请求许多文件,而相应地需要许多文件描述符,因此超过了限制。
2323

24-
To solve this:
24+
要解决这个问题:
2525

26-
- Increase file descriptor limit by `ulimit`
26+
- 使用 `ulimit` 增加文件描述符的限制
2727

2828
```shell
29-
# Check current limit
29+
# 查看当前限制值
3030
$ ulimit -Sn
31-
# Change limit (temporary)
32-
$ ulimit -Sn 10000 # You might need to change the hard limit too
33-
# Restart your browser
31+
# (暂时)更改限制值
32+
$ ulimit -Sn 10000 # 你可能也需要更改硬性限制值
33+
# 重启你的浏览器
3434
```
3535

36-
- Increase the following inotify related limits by `sysctl`
36+
- 通过 `sysctl` 提升下列 inotify 相关的限制
3737

3838
```shell
39-
# Check current limits
39+
# 查看当前限制值
4040
$ sysctl fs.inotify
41-
# Change limits (temporary)
41+
# (暂时)更改限制值
4242
$ sudo sysctl fs.inotify.max_queued_events=16384
4343
$ sudo sysctl fs.inotify.max_user_instances=8192
4444
$ sudo sysctl fs.inotify.max_user_watches=524288
4545
```
4646

47-
## HMR
47+
## HMR {#hmr}
4848

49-
### Vite detects a file change but the HMR is not working
49+
### Vite 检测到文件变化,但 HMR 不工作 {#vite-detects-a-file-change-but-the-hmr-is-not-working}
5050

51-
You may be importing a file with a different case. For example, `src/foo.js` exists and `src/bar.js` contains:
51+
你可能导入了一个拥有不同大小写的文件,例如,存在 `src/foo.js` 文件而 `src/bar.js` 导入了它:
5252

5353
```js
54-
import './Foo.js' // should be './foo.js'
54+
import './Foo.js' // 应该为 './foo.js'
5555
```
5656

57-
Related issue: [#964](https://github.com/vitejs/vite/issues/964)
57+
相关 issue[#964](https://github.com/vitejs/vite/issues/964)
5858

59-
### Vite does not detect a file change
59+
### Vite 没有检测到文件变化 {#vite-does-not-detect-a-file-change}
6060

61-
If you are running Vite with WSL2, Vite cannot watch file changes in some conditions. See [`server.watch` option](/config/server-options.md#server-watch).
61+
如果你正在 WSL2 中运行 ViteVite 无法在某些场景下监听文件变化。请查看 [`server.watch` 选项](/config/server-options.md#server-watch) 的描述。
6262

63-
### A full reload happens instead of HMR
63+
### 完全重新加载了,而不是 HMR {#a-full-reload-happens-instead-of-hmr}
6464

65-
If HMR is not handled by Vite or a plugin, a full reload will happen.
65+
如果 HMR 不是由 Vite 或一个插件处理的,那么将进行完全的重新加载。
6666

67-
Also if there is a dependency loop, a full reload will happen. To solve this, try removing the loop.
67+
同时如果有依赖环,也会发生完全重载。要解决这个问题,请先尝试解决依赖循环。
6868

69-
## Others
69+
## 其他 {#others}
7070

71-
### Syntax Error / Type Error happens
71+
### Syntax Error / Type Error {#syntax-error-type-error-happens}
7272

73-
Vite cannot handle and does not support code that only runs on non-strict mode (sloppy mode). This is because Vite uses ESM and it is always [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) inside ESM.
73+
Vite 无法处理、也不支持仅可在非严格模式(sloppy mode)下运行的代码。这是因为 Vite 使用了 ESM 并且始终在 ESM 中使用 [严格模式](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode)
7474

75-
For example, you might see these errors.
75+
例如,你可能会看到以下错误。
7676

7777
> [ERROR] With statements cannot be used with the "esm" output format due to strict mode
7878
7979
> TypeError: Cannot create property 'foo' on boolean 'false'
8080
81-
If these code are used inside dependecies, you could use [`patch-package`](https://github.com/ds300/patch-package) (or [`yarn patch`](https://yarnpkg.com/cli/patch) or [`pnpm patch`](https://pnpm.io/cli/patch)) for an escape hatch.
81+
如果这些代码是在依赖中被使用的,你应该使用 [`patch-package`](https://github.com/ds300/patch-package)(或者 [`yarn patch`](https://yarnpkg.com/cli/patch)[`pnpm patch`](https://pnpm.io/cli/patch) 工具)来做短期补丁处理。

team.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,31 @@ import {
1111
VPTeamPageSection,
1212
VPTeamMembers
1313
} from 'vitepress/theme'
14-
import { core, emeriti } from './_data/team'
14+
import { core, emeriti, cnTranslator } from './_data/team'
1515
</script>
1616

1717
<VPTeamPage>
1818
<VPTeamPageTitle>
19-
<template #title>Meet the Team</template>
19+
<template #title>认识我们的团队</template>
2020
<template #lead>
21-
The development of Vite is guided by an international team, some of whom
22-
have chosen to be featured below.
21+
Vite 目前由一个国际化的团队开发和维护,<br>
22+
下面是对一些团队成员的介绍。
2323
</template>
2424
</VPTeamPageTitle>
2525
<VPTeamMembers :members="core" />
2626
<VPTeamPageSection>
27-
<template #title>Team Emeriti</template>
27+
<template #title>中文文档翻译维护者</template>
2828
<template #lead>
29-
Here we honor some no-longer-active team members who have made valuable
30-
contributions in the past.
29+
官方中文文档目前由以下 Vite 团队成员进行维护。
30+
</template>
31+
<template #members>
32+
<VPTeamMembers size="small" :members="cnTranslator" />
33+
</template>
34+
</VPTeamPageSection>
35+
<VPTeamPageSection>
36+
<template #title>团队荣誉会员</template>
37+
<template #lead>
38+
我们在此处向一些目前暂时不再活跃的团队成员致敬,他们在过去做出了宝贵的贡献。
3139
</template>
3240
<template #members>
3341
<VPTeamMembers size="small" :members="emeriti" />

0 commit comments

Comments
 (0)