Skip to content

Commit f2b0706

Browse files
committed
docs(cn): translate content/docs/cdn-links.md into Chinese (reactjs#7)
* docs(cn): translate content/docs/cdn-links.md into Chinese * docs(cn): fix translate error
1 parent 0a4cff4 commit f2b0706

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

content/docs/cdn-links.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@ prev: create-a-new-react-app.html
66
next: hello-world.html
77
---
88

9-
Both React and ReactDOM are available over a CDN.
9+
可以通过 CDN 获得 React ReactDOM 的 UMD 版本。
1010

1111
```html
1212
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
1313
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
1414
```
1515

16-
The versions above are only meant for development, and are not suitable for production. Minified and optimized production versions of React are available at:
16+
上述版本仅用于开发环境,不适合用于生产环境。压缩优化后可用于生产的 React 版本可通过如下方式引用:
1717

1818
```html
1919
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
2020
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
2121
```
2222

23-
To load a specific version of `react` and `react-dom`, replace `16` with the version number.
23+
如果需要加载指定版本的 `react` `react-dom`,可以把 `16` 替换成所需加载的版本号。
2424

25-
### Why the `crossorigin` Attribute?
25+
### 为什么要使用 `crossorigin` 属性?
2626

27-
If you serve React from a CDN, we recommend to keep the [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute set:
27+
如果你通过 CDN 的方式引入 React,我们建议你设置 [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) 属性:
2828

2929
```html
3030
<script crossorigin src="..."></script>
3131
```
3232

33-
We also recommend to verify that the CDN you are using sets the `Access-Control-Allow-Origin: *` HTTP header:
33+
我们同时建议你验证使用的 CDN 是否设置了 `Access-Control-Allow-Origin: *` HTTP 请求头:
3434

3535
![Access-Control-Allow-Origin: *](../images/docs/cdn-cors-header.png)
3636

37-
This enables a better [error handling experience](/blog/2017/07/26/error-handling-in-react-16.html) in React 16 and later.
37+
这样能在 React 16 及以上的版本中有更好的[错误处理体验](/blog/2017/07/26/error-handling-in-react-16.html)

0 commit comments

Comments
 (0)