Skip to content

Commit 657fd13

Browse files
authored
docs: fix translations in builtin/components (#238)
1 parent bf17c10 commit 657fd13

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

builtin/components.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
- `y2` (`string | number`, 必要值): 终点 y 位置
2929
- `width` (`string | number`, 默认为: `2`): 线宽
3030
- `color` (`string`, 默认为: `'currentColor'`): 颜色
31-
- `two-way` (`boolean`, default: `false`): draw a two-way arrow
31+
- `two-way` (`boolean`, 默认为: `false`): 是否为双向箭头
3232

3333
## `VDragArrow`
3434

@@ -60,16 +60,16 @@
6060

6161
## `LightOrDark`
6262

63-
你可以使用它来根据活动的亮色或暗色主题,显示一种或另一种内容
63+
你可以使用它来根据当前的主题色(亮色或暗色),显示不同的内容
6464

6565
### 用法 {#light-or-dark-使用方式}
6666

6767
`#dark``#light` 插槽一起使用:
6868

6969
```md
7070
<LightOrDark>
71-
<template #dark>Dark mode is on</template>
72-
<template #light>Light mode is on</template>
71+
<template #dark>正在使用暗色主题</template>
72+
<template #light>正在使用亮色主题</template>
7373
</LightOrDark>
7474
```
7575

@@ -110,7 +110,7 @@
110110
### 使用方式
111111

112112
```md
113-
<Link to="42">Go to slide 42</Link>
113+
<Link to="42">跳转到第 42 张 slide</Link>
114114
<Link to="42" title="Go to slide 42"/>
115115
<Link to="solutions" title="Go to solutions"/>
116116
```
@@ -127,12 +127,13 @@
127127
routeAlias: solutions
128128
---
129129

130-
# Now some solutions!
130+
# 现在来些解决方案!
131131
```
132132

133133
## `PoweredBySlidev`
134134

135-
Renders "Powered by Slidev" with a link to the Slidev website.
135+
添加一个带有指向 slidev 网站的 “Powered by Slidev” 标志到幻灯片信息中。
136+
你可以在导航栏中点击<carbon-information class="inline-icon-btn"/>来查看
136137

137138
## `RenderWhen`
138139

@@ -141,12 +142,12 @@ Renders "Powered by Slidev" with a link to the Slidev website.
141142
### 使用方式
142143

143144
```md
144-
<RenderWhen context="presenter">This will only be rendered in presenter view.</RenderWhen>
145+
<RenderWhen context="presenter">这只会在演讲者视图中显示。</RenderWhen>
145146
```
146147

147-
Context type: `'main' | 'visible' | 'print' | 'slide' | 'overview' | 'presenter' | 'previewNext'`
148+
context 的类型: `'main' | 'visible' | 'print' | 'slide' | 'overview' | 'presenter' | 'previewNext'`
148149

149-
Props:
150+
尝试:
150151

151152
- `context` (`Context | Context[]`): 要求的渲染上下文或渲染上下文数组
152153
- `'main'`: 在幻灯片和演示者视图中渲染(相当于 ['slide', 'presenter']),
@@ -157,10 +158,10 @@ Props:
157158
- `'presenter'`: 在演示者视图中渲染
158159
- `'previewNext'`: 在演示者的下一张幻灯片视图中渲染
159160

160-
Slots:
161+
插槽:
161162

162-
- `#default`: Rendered when the context matches
163-
- `#fallback`: Rendered when the context does not match
163+
- `#default`: context 符合时显示
164+
- `#fallback`: context 不符合时显示
164165

165166
## `SlideCurrentNo`
166167

@@ -192,7 +193,7 @@ Slots:
192193

193194
```yml
194195
---
195-
title: Amazing slide title
196+
title: 一个令人惊叹的标题
196197
level: 2
197198
---
198199
```
@@ -211,7 +212,7 @@ import TitleRenderer from '#slidev/title-renderer'
211212
<TitleRenderer no="42" />
212213
```
213214

214-
Props:
215+
参数:
215216

216217
- `no` (`string | number`): 显示标题的幻灯片编号(幻灯片从 `1` 开始)
217218

@@ -259,7 +260,7 @@ hideInToc: true
259260
</Transform>
260261
```
261262

262-
Props:
263+
参数:
263264

264265
- `scale` (`number | string`, 默认为 `1`): 大小比例
265266
- `origin` (`string`, 默认为 `'top left'`): 原点位置
@@ -274,7 +275,7 @@ Props:
274275
<Tweet id="20" />
275276
```
276277

277-
Props:
278+
参数:
278279

279280
- `id` (`number | string`, 必要值): 推文 id
280281
- `scale` (`number | string`, 默认为: `1`): 大小比例
@@ -307,7 +308,7 @@ Props:
307308

308309
```md
309310
<SlidevVideo v-click autoplay controls>
310-
<!-- Anything that can go in an HTML video element. -->
311+
<!-- 可以加入 HTML video 元素中能包含的任何内容。 -->
311312
<source src="/myMovie.mp4" type="video/mp4" />
312313
<source src="/myMovie.webm" type="video/webm" />
313314
<p>
@@ -320,7 +321,7 @@ Props:
320321

321322
查阅 [HTML video 元素文档](https://developer.mozilla.org/docs/Web/HTML/Element/Video) 以了解可以包含在此组件插槽中的内容。
322323

323-
Props:
324+
参数:
324325

325326
- `controls` (`boolean`, 默认为 `false`): 显示视频控件
326327
- `autoplay` (`boolean | 'once'`, 默认为 `false`):

guide/exporting.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,17 @@ $ slidev export --executable-path [path_to_chromium]
179179
$ slidev export --with-toc
180180
```
181181

182-
### Omit Background
182+
### 去除背景
183183

184-
When exporting to PNGs, you can remove the default browser background by passing `--omit-background`:
184+
在导出为 PNG图像时,你可以通过传递 `--omit-background` 选项去除默认的浏览器背景:
185185

186186
```bash
187187
$ slidev export --omit-background
188188
```
189189

190-
The default browser background is the white background visible on all browser windows and is different than other backgrounds applied throughout the application using CSS styling. [See Playwright docs](https://playwright.dev/docs/api/class-page#page-screenshot-option-omit-background). You will then need to apply additional CSS styling to the application to reveal the transparency.
190+
默认浏览器背景是所有浏览器窗口上可见的白色背景。它与在整个应用中使用CSS样式呈现的其他背景不同。请参阅 [Playwright 的文档](https://playwright.dev/docs/api/class-page#page-screenshot-option-omit-background)。此外,你需要应用额外的CSS样式以显示透明度。
191191

192-
Here is a basic example that covers all backgrounds in the application:
192+
以下是一个示例,覆盖了应用中的所有背景:
193193

194194
```css
195195
* {

0 commit comments

Comments
 (0)