Skip to content

Commit 9d0e74e

Browse files
committed
docs(cn): tweak words
1 parent 87d89b4 commit 9d0e74e

File tree

13 files changed

+24
-24
lines changed

13 files changed

+24
-24
lines changed

.vitepress/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ export default defineConfig({
468468
link: '/changes/hotupdate-hook',
469469
},
470470
{
471-
text: '迁移到按环境划分的 API',
471+
text: '迁移到基于环境的API',
472472
link: '/changes/per-environment-apis',
473473
},
474474
{

.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ const { startAnimation, isCardActive } = useCardAnimation(
321321
<div class="feature__meta meta--center">
322322
<div class="meta__title">持续的生态系统集成</div>
323323
<div class="meta__description">
324-
我们的持续集成(CI)系统不断测试 Vite 对下游项目的更改
325-
这使我们能够在确保稳定性的同时,自信地改进 Vite
324+
我们的持续集成(CI)系统在不断针对下游项目测试 Vite 的更改
325+
使我们能够在确保稳定性的同时,自信地改进 Vite
326326
</div>
327327
</div>
328328
</div>

.vitepress/theme/components/landing/2. feature-section/FeatureSSRSupport.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ const { isCardActive, startAnimation } = useCardAnimation(
419419
<div class="feature__meta">
420420
<div class="meta__title">一流的 SSR 支持</div>
421421
<div class="meta__description">
422-
设置自定义 SSR(服务端渲染)及构建自己的 SSR 框架从未如此简单
422+
设置自定义 SSR(服务端渲染)或构建自己的 SSR 框架从未如此简单
423423
</div>
424424
</div>
425425
</div>

.vitepress/theme/components/landing/5. sponsor-section/SponsorSection.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const { data } = useSponsor()
6969
href="https://github.com/sponsors/vitejs"
7070
target="_blank"
7171
class="btn btn--outline btn--rounded"
72-
>Become a Sponsor</a
72+
>成为赞助商</a
7373
>
7474
</div>
7575
</div>
@@ -132,7 +132,7 @@ const { data } = useSponsor()
132132
font-weight: 400;
133133
line-height: 150%; /* 24px */
134134
letter-spacing: -0.32px;
135-
width: 520px;
135+
width: 480px;
136136
max-width: 100%;
137137
margin: 0 auto 40px;
138138
padding: 0 20px;

.vitepress/theme/composables/sponsor.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ export function useSponsor() {
9999
function mapSponsors(sponsors: Sponsors) {
100100
return [
101101
{
102-
tier: 'in partnership with',
102+
tier: '合作伙伴',
103103
size: 'big',
104104
items: viteSponsors['special'],
105105
},
106106
{
107-
tier: 'Platinum Sponsors',
107+
tier: '铂金赞助商',
108108
size: 'big',
109109
items: mapImgPath(sponsors['platinum']),
110110
},
111111
{
112-
tier: 'Gold Sponsors',
112+
tier: '黄金赞助商',
113113
size: 'medium',
114114
items: [...mapImgPath(sponsors['gold']), ...viteSponsors['gold']],
115115
},

changes/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Vite 中的破坏性变更列表,包括 API 废弃、移除和变更。在你
1616

1717
- [钩子函数中的 `this.environment`](/changes/this-environment-in-hooks)
1818
- [HMR `hotUpdate` 插件钩子](/changes/hotupdate-hook)
19-
- [迁移到按环境划分的 API](/changes/per-environment-apis)
19+
- [迁移到基于环境的API](/changes/per-environment-apis)
2020
- [使用 `ModuleRunner` API 进行服务端渲染](/changes/ssr-using-modulerunner)
2121
- [构建过程中的共享插件](/changes/shared-plugins-during-build)
2222

changes/per-environment-apis.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 迁移到按环境划分的 API {#move-to-per-environment-apis}
1+
# 迁移到基于环境的API {#move-to-per-environment-apis}
22

33
::: tip 反馈
44
可以在 [环境 API 讨论](https://github.com/vitejs/vite/discussions/16358) 中向我们提供反馈

config/ssr-options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SSR 服务器的构建目标。
3434
## ssr.resolve.conditions {#ssr-resolve-conditions}
3535

3636
- **类型:** `string[]`
37-
- **默认:** `['module', 'node', 'development|production']` (当`ssr.target === 'webworker'`时为`['module', 'browser', 'development|production']`)
37+
- **默认:** `['module', 'node', 'development|production']`(当 `ssr.target === 'webworker'` 时为 `['module', 'browser', 'development|production']`
3838
- **相关:** [解析情景](./shared-options.md#resolve-conditions)
3939

4040
这些条件会在插件管道中使用,并且只会影响 SSR 构建期间的非外部化依赖项。使用 `ssr.resolve.externalConditions` 来影响外部化导入。

guide/api-environment-plugins.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ interface HotUpdateContext {
125125
}
126126
```
127127
128-
## 分环境的插件 {#per-environment-plugins}
128+
## 基于环境的插件 {#per-environment-plugins}
129129
130-
插件可以使用 `applyToEnvironment` 函数定义其应适用于哪些环境
130+
插件可以使用 `applyToEnvironment` 函数来定义它适用的环境
131131
132132
```js
133133
const UnoCssPlugin = () => {
@@ -166,7 +166,7 @@ const UnoCssPlugin = () => {
166166
167167
在未来的主要版本(Vite 7 或 8)中,我们的目标是完全对齐:
168168
169-
- **在开发和构建期间:** 插件是共享的,并具有[按环境的过滤](#per-environment-plugins)
169+
- **在开发和构建期间:** 插件是共享的,并可以 [根据环境进行过滤](#per-environment-plugins)
170170
171171
在构建期间还会共享一个单一的 `ResolvedConfig` 实例,允许在整个应用构建过程中进行缓存,类似于我们在开发期间使用 `WeakMap<ResolvedConfig, CachedData>` 的方式。
172172

guide/api-environment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default {
125125

126126
- [钩子函数中的 `this.environment`](/changes/this-environment-in-hooks)
127127
- [HMR `hotUpdate` 插件钩子](/changes/hotupdate-hook)
128-
- [迁移到按环境划分的 API](/changes/per-environment-apis)
128+
- [迁移到基于环境的API](/changes/per-environment-apis)
129129
- [使用 `ModuleRunner` API 进行服务端渲染](/changes/ssr-using-modulerunner)
130130
- [构建过程中的共享插件](/changes/shared-plugins-during-build)
131131

guide/features.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ HTML 文件位于 Vite 项目的[最前端和中心](/guide/#index-html-and-proj
170170
- `<root>/about.html` -> `http://localhost:5173/about.html`
171171
- `<root>/blog/index.html` -> `http://localhost:5173/blog/index.html`
172172

173-
由 HTML 元素(如 `<script type="module" src>``<link href>`)引用的 Assets 会作为应用程序的一部分进行处理和捆绑。受支持元素的完整列表如下
173+
由 HTML 元素引用的资源,例如 `<script type="module" src>``<link href>`,会作为应用的一部分进行处理和打包。支持的完整元素列表如下
174174

175175
- `<audio src>`
176176
- `<embed src>`
@@ -185,8 +185,8 @@ HTML 文件位于 Vite 项目的[最前端和中心](/guide/#index-html-and-proj
185185
- `<use href>``<use xlink:href>`
186186
- `<video src>``<video poster>`
187187
- `<meta content>`
188-
- 仅当 `name` 属性与 `msapplication-tileimage`, `msapplication-square70x70logo`, `msapplication-square150x150logo`, `msapplication-wide310x150logo`匹配时, `msapplication-square310x310logo`, `msapplication-config`, `twitter:image`
189-
- 或者仅当 `property` 属性与 `og:image`, `og:image:url`, `og:image:secure_url`, `og:audio`, `og:audio:secure_url`, `og:video`匹配时, `og:video:secure_url`
188+
- 仅当 `name` 属性匹配以下值时:`msapplication-tileimage``msapplication-square70x70logo``msapplication-square150x150logo``msapplication-wide310x150logo``msapplication-square310x310logo``msapplication-config``twitter:image`
189+
- 或仅当 `property` 属性匹配以下值时:`og:image``og:image:url``og:image:secure_url``og:audio``og:audio:secure_url``og:video``og:video:secure_url`
190190

191191
```html {4-5,8-9}
192192
<!doctype html>

guide/migration.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737

3838
Vite 6 还为 `json.stringify` 引入了一个新的默认值,即 `'auto'`,它只会对大型 JSON 文件进行字符串化处理。要禁用此行为,请设置 `json.stringify: false`
3939

40-
### 扩展对 HTML 元素中 asset 引用的支持 {#extended-support-of-asset-references-in-html-elements}
40+
### HTML 元素中扩展对资源引用的支持 {#extended-support-of-asset-references-in-html-elements}
4141

42-
在 Vite 5 中,只有少数受支持的 HTML 元素能够引用由 Vite 处理和捆绑的 asset,如`<link href>``<img src>`等。
42+
在 Vite 5 中,只有少数支持的 HTML 元素能够引用由 Vite 处理和打包的资源,如`<link href>``<img src>` 等。
4343

44-
Vite 6 扩展了对更多 HTML 元素的支持。完整列表请参见 [HTML features](/guide/features.html#html) 文档。
44+
Vite 6 扩展了对更多 HTML 元素的支持。完整列表请参见 [HTML 功能介绍](/guide/features.html#html) 文档。
4545

46-
要退出对某些元素的 HTML 处理,可以在元素上添加 `vite-ignore` 属性。
46+
要在某些元素上选择不进行 HTML 处理,可以在元素上添加 `vite-ignore` 属性。
4747

4848
### postcss-load-config
4949

index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import FeatureCI from './.vitepress/theme/components/landing/2. feature-section/
2828

2929
<div class="VPHome">
3030
<Hero/>
31-
<FeatureSection title="重新定义开发者体验" description="Vite 让 Web 开发重回简单" type="blue">
31+
<FeatureSection title="重新诠释开发者体验" description="Vite 让 Web 开发重回简单" type="blue">
3232
<FeatureInstantServerStart />
3333
<FeatureHMR />
3434
<FeatureRichFeatures />

0 commit comments

Comments
 (0)