Skip to content

Commit e39f54e

Browse files
authored
docs: update translations in code-splitting.mdx (#1896)
* typo: Update code-splitting.mdx * Update progressive-web-application.mdx * Update csp.mdx
1 parent 3fb9c2e commit e39f54e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/content/guides/csp.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ translators:
1313
related:
1414
- title: 解释 nonce 设计目的
1515
url: https://stackoverflow.com/questions/42922784/what-s-the-purpose-of-the-html-nonce-attribute-for-script-and-style-elements
16-
- title: 白名单的不安全性和内容安全政策的未来
16+
- title: 白名单的不安全性和内容安全策略的未来
1717
url: https://ai.google/research/pubs/pub45542
1818
- title: 使用 CSP, Hash, Nonce 和 Report URI 锁定你的网站脚本
1919
url: https://www.troyhunt.com/locking-down-your-website-scripts-with-csp-hashes-nonces-and-report-uri/
@@ -37,7 +37,7 @@ __webpack_nonce__ = 'c29tZSBjb29sIHN0cmluZyB3aWxsIHBvcCB1cCAxMjM=';
3737

3838
## 启用 CSP $#enabling-csp$
3939

40-
注意,默认情况下不启用 CSP。需要与文档一同发送相应的 `CSP` 响应头 `<Content-Security-Policy` 或元标签 `<meta http-equiv="Content-Security-Policy" ...>` 以告知浏览器需要启用 CSP。以下是一个包含 CDN 白名单 URL 的 CSP 头部示例:
40+
注意,默认情况下不启用 CSP。需要与文档一同发送相应的 `CSP` 响应头 `Content-Security-Policy` 或元标签 `<meta http-equiv="Content-Security-Policy" ...>` 以告知浏览器需要启用 CSP。以下是一个包含 CDN 白名单 URL 的 CSP 头部示例:
4141

4242
```html
4343
Content-Security-Policy: default-src 'self'; script-src 'self'

src/content/guides/progressive-web-application.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ translators:
1515

1616
T> 本指南继续沿用 [管理输出](/guides/output-management) 中的代码示例。
1717

18-
渐进式网络应用程序(progressive web application - PWA),是一种可以提供类似于 native app(原生应用程序) 体验的 web app(网络应用程序)。PWA 可以用来做很多事。其中最重要的是,在**离线(offline)**时应用程序能够继续运行功能。这是通过使用名为 [Service Workers](https://developers.google.com/web/fundamentals/primers/service-workers/) 的 web 技术来实现的。
18+
渐进式网络应用程序(progressive web application - PWA),是一种可以提供类似于 native app(原生应用程序) 体验的 web app(网络应用程序)。PWA 可以用来做很多事。其中最重要的是,在 **离线(offline)** 时应用程序能够继续运行功能。这是通过使用名为 [Service Workers](https://developers.google.com/web/fundamentals/primers/service-workers/) 的 web 技术来实现的。
1919

2020
本章将重点介绍,如何为我们的应用程序添加离线体验。我们将使用名为 [Workbox](https://github.com/GoogleChrome/workbox) 的 Google 项目来实现此目的,该项目提供的工具可帮助我们更简单地为 web app 提供离线支持。
2121

@@ -111,7 +111,7 @@ precache-manifest.b5ca1c555e832d6fbf9462efd29d27eb.js 268 bytes [emitt
111111
...
112112
```
113113

114-
现在你可以看到,生成了两个额外的文件:`service-worker.js` 和名称冗长的 `precache-manifest.b5ca1c555e832d6fbf9462efd29d27eb.js``service-worker.js` 是 Service Worker 文件,`precache-manifest.b5ca1c555e832d6fbf9462efd29d27eb.js``service-worker.js` 引用的文件,所以它也可以运行。你本地生成的文件可能会有所不同但是应该会有一个 `service-worker.js` 文件。
114+
现在你可以看到,生成了两个额外的文件:`service-worker.js` 和名称冗长的 `precache-manifest.b5ca1c555e832d6fbf9462efd29d27eb.js``service-worker.js` 是 Service Worker 文件,`precache-manifest.b5ca1c555e832d6fbf9462efd29d27eb.js``service-worker.js` 引用的文件,所以它也可以运行。你本地生成的文件可能会有所不同但是应该会有一个 `service-worker.js` 文件。
115115

116116
所以,值得高兴的是,我们现在已经创建出一个 Service Worker。接下来该做什么?
117117

0 commit comments

Comments
 (0)