diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/rosetta-code/state-name-puzzle.md b/curriculum/challenges/arabic/10-coding-interview-prep/rosetta-code/state-name-puzzle.md
index 841319d1bda..6ae83d11ec1 100644
--- a/curriculum/challenges/arabic/10-coding-interview-prep/rosetta-code/state-name-puzzle.md
+++ b/curriculum/challenges/arabic/10-coding-interview-prep/rosetta-code/state-name-puzzle.md
@@ -15,7 +15,7 @@ dashedName: state-name-puzzle
Write a function to solve the challenge for a given array of actual U.S. state names, and for fictional state names.
-The function should return an array. Each element should be an object in this form: `{"from":[],"to":[]}`. The `"from"` array should contain the original names and the `"to"` array should contain the resultant names.
+The function should return an array. Each element should be an object in this form: `{"from":[],"to":[]}`. The `from` array should contain the original names and the `to` array should contain the resultant names.
# --hints--
diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537c9eecea6a335db6da79.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537c9eecea6a335db6da79.md
index 7d84dc3d6a8..472e09d230d 100644
--- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537c9eecea6a335db6da79.md
+++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537c9eecea6a335db6da79.md
@@ -7,7 +7,7 @@ dashedName: step-5
# --description--
-أسفل عنصرك `.header`، أنشئ عنصر `div` جديد مع `class` يسمى `"gallery"`. سيكون `div` حاوية لصور المَعْرِض.
+Below your `.header` element, create a new `div` element and assign it a `class` of `gallery`. سيكون `div` حاوية لصور المَعْرِض.
في عنصر `.gallery`، أنشئ تسع عناصر `img`.
diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2999ec27ec516655eba6.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2999ec27ec516655eba6.md
index aa044de71f3..ee088d679f6 100644
--- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2999ec27ec516655eba6.md
+++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2999ec27ec516655eba6.md
@@ -17,7 +17,7 @@ You should use compound assignment to add the string `Right! You win 20 gold!` t
assert.match(pick.toString(), /text\.innerText\s*\+=\s*('|")Right! You win 20 gold!\1/);
```
-You should use compound assignment add `20` to the value of `gold`.
+You should use compound assignment to add `20` to the value of `gold`.
```js
assert.match(pick.toString(), /gold\s*\+=\s*20/);
diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md
index 01adfa0d9d5..8f7e4f2b1da 100644
--- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md
+++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md
@@ -11,12 +11,12 @@ dashedName: escape-sequences-in-strings
引號不是字符串中唯一可以被轉義(escaped)的字符。 使用轉義字符有兩個原因:
-1. To allow you to use characters you may not otherwise be able to type out, such as a newline.
+1. 首先是可以讓你使用無法輸入的字符,例如換行。
2. 其次是可以讓你在一個字符串中表示多個引號,而不會出錯。
我們在之前的挑戰中學到了這個。
-
| 代碼 | 輸出 |
|---|
\' | 單引號 |
\" | 雙引號 |
\\ | 反斜槓 |
\n | 換行符 |
\t | tab |
\r | carriage return |
\b | 退格 |
\f | 換頁符 |
+| 代碼 | 輸出 |
|---|
\' | 單引號 |
\" | 雙引號 |
\\ | 反斜槓 |
\n | 換行符 |
\t | 製表符 |
\r | 回車 |
\b | 退格 |
\f | 換頁符 |
*請注意,必須對反斜槓本身進行轉義,它才能顯示爲反斜槓。*
diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md
index 964bdf024bd..afa9caeb654 100644
--- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md
+++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md
@@ -71,7 +71,7 @@ assert(
);
```
-Global variables should not be used to cache the array.
+不應使用全局變量來緩存數組。
```js
countdown(1)
diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md
index 429cd2dcbd5..c793ef04a4e 100644
--- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md
+++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md
@@ -56,7 +56,7 @@ assert.deepStrictEqual(rangeOfNumbers(6, 9), [6, 7, 8, 9]);
assert.deepStrictEqual(rangeOfNumbers(4, 4), [4]);
```
-Global variables should not be used to cache the array.
+不應使用全局變量來緩存數組。
```js
rangeOfNumbers(1, 3)
diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function.md
index bf01fc37706..1a8adb89066 100644
--- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function.md
+++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function.md
@@ -12,9 +12,9 @@ ES6 提供了一個新的創建對象的語法,使用關鍵字 classhttps://25--5-clock.freecodecamp.rocks.
+**目標:** 構建一個應用,功能和 https://25--5-clock.freecodecamp.rocks 類似。
完成以下需求,並且通過所有測試。 可以使用你需要的任何庫或 API。 賦予它你自己的個人風格。
diff --git a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md
index 46bc000a2e2..4c71d344f0a 100644
--- a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md
+++ b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md
@@ -8,7 +8,7 @@ dashedName: build-a-drum-machine
# --description--
-**Objective:** Build an app that is functionally similar to this: https://drum-machine.freecodecamp.rocks/.
+**目標:** 構建一個應用,功能和 https://drum-machine.freecodecamp.rocks/ 類似。
完成以下需求,並且通過所有測試。 可以使用你需要的任何庫或 API。 賦予它你自己的個人風格。
diff --git a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md
index 51cf65eeebc..e60ca5202ae 100644
--- a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md
+++ b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md
@@ -8,7 +8,7 @@ dashedName: build-a-javascript-calculator
# --description--
-**Objective:** Build an app that is functionally similar to this: https://javascript-calculator.freecodecamp.rocks/.
+**目標:** 構建一個應用,功能和 https://javascript-calculator.freecodecamp.rocks/ 類似。
完成以下需求,並且通過所有測試。 可以使用你需要的任何庫或 API。 賦予它你自己的個人風格。
diff --git a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md
index 385221aecf0..8c3658cf9cd 100644
--- a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md
+++ b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md
@@ -8,7 +8,7 @@ dashedName: build-a-markdown-previewer
# --description--
-**Objective:** Build an app that is functionally similar to this: https://markdown-previewer.freecodecamp.rocks/.
+**目標:** 構建一個應用,功能和 https://markdown-previewer.freecodecamp.rocks/ 類似。
完成以下需求,並且通過所有測試。 可以使用你需要的任何庫或 API。 賦予它你自己的個人風格。
diff --git a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md
index d2656cd7cac..7b2fc07ec7b 100644
--- a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md
+++ b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md
@@ -8,7 +8,7 @@ dashedName: build-a-random-quote-machine
# --description--
-**Objective:** Build an app that is functionally similar to this: https://random-quote-machine.freecodecamp.rocks/.
+**目標:** 構建一個應用,功能和 https://random-quote-machine.freecodecamp.rocks/ 類似。
完成以下需求,並且通過所有測試。 可以使用你需要的任何庫或 API。 賦予它你自己的個人風格。
diff --git a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/jquery/learn-how-script-tags-and-document-ready-work.md b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/jquery/learn-how-script-tags-and-document-ready-work.md
index 461d0ddcb5f..990d08c4bd2 100644
--- a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/jquery/learn-how-script-tags-and-document-ready-work.md
+++ b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/jquery/learn-how-script-tags-and-document-ready-work.md
@@ -18,7 +18,7 @@ dashedName: learn-how-script-tags-and-document-ready-work
在 `script` 標籤中添加代碼 `$(document).ready(function() {`。 然後在後面(仍在該 `script` 標籤內)用 `});` 閉合它。
-稍後將詳細介紹 `functions`, 現在需要知道的是,只要瀏覽器加載頁面,`function` 中放入的代碼就會運行。
+稍後將詳細介紹 `functions`, 重要的是要知道,在瀏覽器加載頁面後,你放入此 `function` 的代碼將立即運行。
有一點很重要,如果沒有 `document ready function`,代碼將在 HTML 頁面呈現之前運行,這可能會導致錯誤。
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/authentication-strategies.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/authentication-strategies.md
index b32a2b4ec88..5d35dbeb88f 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/authentication-strategies.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/authentication-strategies.md
@@ -10,7 +10,7 @@ dashedName: authentication-strategies
策略是認證用戶的一種方式。 如果你讓用戶在註冊時填寫了用戶信息,那你就可以基於這些信息進行驗證。或者也可以引入第三方登錄,如 Google 或者 Github。 在這個項目中,我們將使用 Passport 中間件。 Passport 提供了一套全面的策略,支持使用用戶名和密碼、GitHub、谷歌等進行認證。
-`passport-local@~1.0.0` has already been added as a dependency, so add it to your server as follows: `const LocalStrategy = require('passport-local');`
+已經引入 `passport-local@~1.0.0` 作爲依賴,將它添加到服務器,就像這樣:`const LocalStrategy = require('passport-local');`
然後,需要讓 passport **使用**一個實例化的 LocalStrategy 對象,這個對象的一些設置已完成。 請注意,接下來的所有代碼都應寫在連接數據庫的回調中,因爲它們的執行都依賴數據庫。
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/authentication-with-socket.io.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/authentication-with-socket.io.md
index e1d14e15d4d..c5f9ee3c458 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/authentication-with-socket.io.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/authentication-with-socket.io.md
@@ -10,7 +10,7 @@ dashedName: authentication-with-socket-io
目前,你還無法確定連接到服務器的用戶身份。 雖然 `req.user` 包含用戶信息,但這個只在用戶直接與服務器交互時產生。當用戶通過 web socket 與服務器連接時,由於不存在 `req` 對象,我們就無法獲取用戶數據。 解決這個問題的方法之一是通過讀取和解析請求中包含 passport session 的 cookie,然後反序列化,進而獲取用戶信息對象。 幸運的是,NPM 上有可以讓這個複雜的流程簡單化的庫。
-`passport.socketio@~3.7.0`, `connect-mongo@~3.2.0`, and `cookie-parser@~1.4.5` have already been added as dependencies. Require them as `passportSocketIo`, `MongoStore`, and `cookieParser` respectively. Also, we need to initialize a new memory store, from `express-session` which we previously required. It should look like this:
+`passport.socketio@~3.7.0`、`connect-mongo@~3.2.0` 和 `cookie-parser@~1.4.5` 已經被添加爲依賴項。 分別請求它們爲 `passportSocketIo`、`MongoStore` 和 `cookieParser`。 同時,我們需要從之前引入的 `express-session` 中初始化新的內存。 就像這樣:
```js
const MongoStore = require('connect-mongo')(session);
@@ -65,7 +65,7 @@ console.log('user ' + socket.request.user.name + ' connected');
它將在服務器控制檯記錄已連接的用戶!
-完成以上要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project up to this point https://gist.github.com/camperbot/1414cc9433044e306dd7fd0caa1c6254.
+完成以上要求後,請提交你的頁面鏈接。 如果你遇到了問題,可以參考 https://gist.github.com/camperbot/1414cc9433044e306dd7fd0caa1c6254。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/clean-up-your-project-with-modules.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/clean-up-your-project-with-modules.md
index b14d397bf59..19350e0ce2e 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/clean-up-your-project-with-modules.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/clean-up-your-project-with-modules.md
@@ -26,7 +26,7 @@ module.exports = function (app, myDataBase) {
現在,我們來把 server.js 中與驗證相關的代碼分離到 auth.js 中,例如序列化,設置驗證策略等。 請正確添加依賴,並在 server.js 中調用 `auth(app, myDataBase)`。
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out an example of the completed project.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/communicate-by-emitting.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/communicate-by-emitting.md
index ad93e666f65..73808e06b97 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/communicate-by-emitting.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/communicate-by-emitting.md
@@ -38,7 +38,7 @@ socket.on('user count', function(data) {
現在你可以嘗試啓動你的 app 並登錄,你會看到在客戶端的控制檯打印出了 “1”,這就表示目前連接到服務器的用戶數爲 1。 你可以試着通過打開多個 app 來驗證數量是否會增加。
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/create-new-middleware.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/create-new-middleware.md
index ba267e8e475..6c8f145b81c 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/create-new-middleware.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/create-new-middleware.md
@@ -31,7 +31,7 @@ app
});
```
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/handle-a-disconnect.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/handle-a-disconnect.md
index eab72ab1823..cf7f8820a15 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/handle-a-disconnect.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/handle-a-disconnect.md
@@ -22,7 +22,7 @@ socket.on('disconnect', () => {
**注意:**和 `'disconnect'` 類似,所有 socket 可以發送到服務器的事件,我們都應該在有 “socket” 定義的連接監聽器裏處理。
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/hashing-your-passwords.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/hashing-your-passwords.md
index 42b5b3d0243..49765741143 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/hashing-your-passwords.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/hashing-your-passwords.md
@@ -10,7 +10,7 @@ dashedName: hashing-your-passwords
回過頭來看信息安全,你也許記得在數據庫中存儲明文密碼是*絕對*禁止的。 現在,我們需要引入 BCrypt 來解決這個問題。
-`bcrypt@~5.0.0` has already been added as a dependency, so require it in your server. 你需要在兩個步驟中使用哈希運算:註冊和保存新賬戶,以及登錄時檢查密碼是否正確。
+`bcrypt@~5.0.0` 已被添加爲依賴項,在你的服務器中請求它。 你需要在兩個步驟中使用哈希運算:註冊和保存新賬戶,以及登錄時檢查密碼是否正確。
目前處理註冊的路由中,我們是這樣把密碼添加到數據庫的:`password: req.body.password`。 保存哈希值的一個簡單方式是在數據庫邏輯中添加 `const hash = bcrypt.hashSync(req.body.password, 12);`,然後把 `req.body.password` 替換爲 `password: hash`。
@@ -24,7 +24,7 @@ if (!bcrypt.compareSync(password, user.password)) {
當你需要存儲密碼時,這樣做可以有效地提升網站的安全性。
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/how-to-put-a-profile-together.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/how-to-put-a-profile-together.md
index 119469df9d5..5b6d472022c 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/how-to-put-a-profile-together.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/how-to-put-a-profile-together.md
@@ -24,7 +24,7 @@ h2.center#welcome Welcome, #{username}!
a(href='/logout') Logout
```
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/how-to-use-passport-strategies.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/how-to-use-passport-strategies.md
index 10ab146d70b..e6b848566e9 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/how-to-use-passport-strategies.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/how-to-use-passport-strategies.md
@@ -18,7 +18,7 @@ dashedName: how-to-use-passport-strategies
這時,由於我們還沒有實現註冊功能,如果你在表單裏輸入了用戶名和密碼,路由將會重定向到主頁 `/`,在服務端將會打印 `'User {USERNAME} attempted to log in.'`。
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.md
index b3989f852ce..54c27f2dad3 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.md
@@ -10,7 +10,7 @@ dashedName: implement-the-serialization-of-a-passport-user
截至目前,我們還沒有配置完數據庫,因此還無法加載用戶數據。 實現這個的方式很多,但對於我們的項目,一旦服務器啓動,那麼只要有 app 實例在運行,數據庫就應一直處於連接狀態。 爲此,你需要在環境變量 `MONGO_URI` 中添加你的數據庫地址(比如:`mongodb+srv://:@cluster0-jvwxi.mongodb.net/?retryWrites=true&w=majority`)。 我們會在 `connection.js` 文件中調用它。
-*If you are having issues setting up a free database on MongoDB Atlas, check out tutorial.*
+*如果你在 MongoDB Atlas 設置免費數據庫時遇到問題,請查看教程。*
現在我們想要連接到數據庫,然後開始監聽請求。 這樣做的目的是在連接數據庫之前或者出現數據庫錯誤時,不接收任何請求。 要實現這一點,你需要在以下代碼中包含序列化和應用的路由:
@@ -40,7 +40,7 @@ myDB(async client => {
記得要取消 `deserializeUser` 中 `myDataBase` 的註釋,並把 `doc` 添加到 `done(null, null)`。
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-ii.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-ii.md
index 78d443e59b0..0f607bd5892 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-ii.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-ii.md
@@ -8,13 +8,13 @@ dashedName: implementation-of-social-authentication-ii
# --description--
-設置 GitHub 驗證的最後一步是創建策略本身。 `passport-github@~1.1.0` has already been added as a dependency, so require it in your `auth.js` file as `GithubStrategy` like this: `const GitHubStrategy = require('passport-github').Strategy;`. 別忘了請求和配置 `dotenv`,使用你的環境變量。
+設置 GitHub 驗證的最後一步是創建策略本身。 已經添加 `passport-github@~1.1.0` 作爲依賴,在 `auth.js` 中請求它,作爲 `GithubStrategy`,像這樣:`const GitHubStrategy = require('passport-github').Strategy;`。 別忘了請求和配置 `dotenv`,使用你的環境變量。
爲了設置 GitHub 策略,我們需要在 Passport 中使用實例化的 `GitHubStrategy`,它可以接收兩個參數:一個對象(包括 `clientID`、`clientSecret` 和 `callbackURL`),以及一個回調函數。在這個回調函數中,我們要處理驗證成功時,判斷用戶是否已經在數據庫中存在的邏輯,以及在用戶數據庫對象中最初保存哪些字段。 這種處理方式適用於絕大部分第三方驗證策略,但有些策略會需要我們提供更多的信息,詳情請參考相關策略的 GitHub README。 例如,Google 的驗證策略會要求你提供一個 *scope*,用於標示用戶成功登錄後,你需要從返回的對象中獲取那些信息。以及,這也需要經過用戶同意,你纔可以獲取到。
-The current strategy we are implementing authenticates users using a GitHub account and OAuth 2.0 tokens. The client ID and secret obtained when creating an application are supplied as options when creating the strategy. The strategy also requires a `verify` callback, which receives the access token and optional refresh token, as well as `profile` which contains the authenticated user's GitHub profile. The `verify` callback must call `cb` providing a user to complete authentication.
+當前策略是使用 GitHub 賬戶和 OAuth 2.0 令牌驗證用戶。 創建應用程序時獲得的客戶 ID 和密碼在創建策略時作爲選項提供。 策略還需要 `verify` 回調,接收訪問令牌和可選刷新令牌, 以及包含認證用戶的 GitHub 資料的 `profile`。 `verify` 回調必須調用 `cb` 提供用戶完成驗證。
-Here's how your new strategy should look at this point:
+你的新策略應該是這樣的:
```js
passport.use(new GitHubStrategy({
@@ -29,13 +29,13 @@ passport.use(new GitHubStrategy({
));
```
-Your authentication won't be successful yet, and it will actually throw an error without the database logic and callback, but it should log your GitHub profile to your console if you try it!
+目前,你的驗證部分不會成功。由於沒有數據庫的邏輯和回調函數,你的代碼目前還會報錯。但如果你試一試,就可以在控制檯裏看到輸出了你的 GitHub 個人信息。
-Submit your page when you think you've got it right. If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
-passport-github dependency should be added.
+應正確添加依賴 passport-github。
```js
(getUserInput) =>
@@ -54,7 +54,7 @@ passport-github dependency should be added.
);
```
-passport-github should be required.
+應正確請求依賴 passport-github。
```js
(getUserInput) =>
@@ -72,7 +72,7 @@ passport-github should be required.
);
```
-GitHub strategy should be setup correctly thus far.
+到目前爲止,GitHub 策略應正確設置。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-iii.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-iii.md
index d278ad9897b..410f568fb37 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-iii.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-iii.md
@@ -42,7 +42,7 @@ myDataBase.findOneAndUpdate(
你現在應該可以登錄你的應用了,試試吧。
-完成上述要求後,你可以在下方提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,你可以在下方提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication.md
index 8d2b0f776fe..91ac422dbcd 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication.md
@@ -18,7 +18,7 @@ dashedName: implementation-of-social-authentication
在 OAuth 驗證策略中,我們至少需要提供 *Client ID* 和 *Client Secret*,這樣第三方平臺就會獲悉驗證請求的來源,以及這個來源是否有效。 爲此,需要去我們使用的第三方驗證平臺(比如 GitHub)獲取這兩個字段的值。 注意,我們獲取到的這個值是唯一的,僅對我們的當前 app 有效——**因此,千萬不要分享給別人**,更不要上傳到公共倉庫或者直接寫在代碼裏。 通常,我們會把它們放在 `.env` 文件裏,並通過 `process.env.GITHUB_CLIENT_ID` 獲取。 對於這次挑戰,我們將會使用 GitHub 作爲驗證平臺。
-Obtaining your *Client ID and Secret* from GitHub is done in your account profile settings under 'developer settings', then 'OAuth applications'. 點擊 “Register a new application(註冊一個新的應用)”,設置你的應用名稱,然後把你的 Replit 主頁地址(**不是項目代碼的 url**)粘貼到 Homepage URL。然後,回調 url 需要設置成上面 Homepage URL 裏你粘貼的地址,但後面要加上 `/auth/github/callback`。 這樣在用戶通過 Github 驗證後才能跳轉到我們指定的頁面。 在你的 `.env` 文件裏將返回的信息保存爲 `'GITHUB_CLIENT_ID'` 和 `'GITHUB_CLIENT_SECRET'`。
+首先,你需要進入賬戶設置裏的 “developer settings(開發者設置)”板塊,在 'OAuth applications' 獲取 *用戶 ID 和密碼*。 點擊 “Register a new application(註冊一個新的應用)”,設置你的應用名稱,然後把你的 Replit 主頁地址(**不是項目代碼的 url**)粘貼到 Homepage URL。然後,回調 url 需要設置成上面 Homepage URL 裏你粘貼的地址,但後面要加上 `/auth/github/callback`。 這樣在用戶通過 Github 驗證後才能跳轉到我們指定的頁面。 在你的 `.env` 文件裏將返回的信息保存爲 `'GITHUB_CLIENT_ID'` 和 `'GITHUB_CLIENT_SECRET'`。
在你的 `routes.js` 文件中,添加 `showSocialAuth: true` 到主頁路由,在 `showRegistration: true` 的後面。 然後,爲 `/auth/github` 和 `/auth/github/callback` 創建兩個接收 GET 請求的路由。 第一個只需要通過調用 passport 來驗證 `'github'`。 第二個應該調用 passport 來驗證 `'github'`,但需要在失敗時跳轉回主頁 `/`,成功時跳轉到用戶頁面 `/profile`(跳轉的邏輯與上一個項目中的邏輯一樣)。
@@ -31,7 +31,7 @@ app.route('/login')
});
```
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project up to this point https://gist.github.com/camperbot/1f7f6f76adb178680246989612bea21e.
+完成上述要求後,請提交你的頁面鏈接。 如果你遇到了問題,可以參考 https://gist.github.com/camperbot/1f7f6f76adb178680246989612bea21e。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/logging-a-user-out.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/logging-a-user-out.md
index b1523952694..0f97b984faa 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/logging-a-user-out.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/logging-a-user-out.md
@@ -30,11 +30,11 @@ app.use((req, res, next) => {
});
```
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
-`req.logout()` should be called in your `/logout` route.
+`req.logout()` 應在 `/logout` 路由中調用。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/registration-of-new-users.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/registration-of-new-users.md
index a2a47f0bd01..7dc97b2d1b0 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/registration-of-new-users.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/registration-of-new-users.md
@@ -47,7 +47,7 @@ app.route('/register')
);
```
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
**注意:**接下來的挑戰可能會在運行 *picture-in-picture*(畫中畫)模式的瀏覽器中出現問題。 如果你使用的線上 IDE 提供在 IDE 內預覽 app 的功能,請考慮打開新的標籤頁預覽。
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/send-and-display-chat-messages.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/send-and-display-chat-messages.md
index 32bdcaf76bd..d7bd3979595 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/send-and-display-chat-messages.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/send-and-display-chat-messages.md
@@ -28,7 +28,7 @@ socket.emit('chat message', messageToSend);
至此,我們已經完成發送信息到所有客戶端的功能。
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/serialization-of-a-user-object.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/serialization-of-a-user-object.md
index 5891eee6470..3f841df1ef9 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/serialization-of-a-user-object.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/serialization-of-a-user-object.md
@@ -12,7 +12,7 @@ dashedName: serialization-of-a-user-object
我們需要用到序列化和反序列化的方法來進行配置。 passport 爲我們提供了 `passport.serializeUser( OURFUNCTION )` 和 `passport.deserializeUser( OURFUNCTION )` 兩個方法。
-`serializeUser` 方法接收兩個參數,分別是表示用戶的對象和一個回調函數。 其中,回調函數的返回值應爲這個用戶的唯一標識符:最簡單的寫法就是讓它返回用戶的 `_id`。 它應當是唯一的,是由 MongoDB 產生的。 類似地,`deserializeUser` 也接收兩個參數,分別是在序列化時生成的標識符以及一個回調函數。在回調函數裏,我們需要根據根據傳入的標識符(比如 \_id)返回表示用戶的對象。 爲了在 MongoDB 中通過 query(查詢語句)獲取 `_id` 字段,首先我們需要創建 `const ObjectID = require('mongodb').ObjectID;`;然後調用它:`new ObjectID(THE_ID)`。 `mongodb@~3.6.0` has already been added as a dependency. 你可以在下面的例子中看到:
+`serializeUser` 方法接收兩個參數,分別是表示用戶的對象和一個回調函數。 其中,回調函數的返回值應爲這個用戶的唯一標識符:最簡單的寫法就是讓它返回用戶的 `_id`。 它應當是唯一的,是由 MongoDB 產生的。 類似地,`deserializeUser` 也接收兩個參數,分別是在序列化時生成的標識符以及一個回調函數。在回調函數裏,我們需要根據根據傳入的標識符(比如 \_id)返回表示用戶的對象。 爲了在 MongoDB 中通過 query(查詢語句)獲取 `_id` 字段,首先我們需要創建 `const ObjectID = require('mongodb').ObjectID;`;然後調用它:`new ObjectID(THE_ID)`。 `mongodb@~3.6.0` 已經被添加爲依賴項。 你可以在下面的例子中看到:
```js
passport.serializeUser((user, done) => {
@@ -28,7 +28,7 @@ passport.deserializeUser((id, done) => {
因此,在我們在下一步中配置 DB 前,`deserializeUser` 會拋出錯誤。所以,現在請先註釋掉上面的代碼,在 `deserializeUser` 中僅調用 `done(null, null)` 即可。
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md
index 3a24e4382d9..ac369eba179 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md
@@ -10,25 +10,25 @@ dashedName: set-up-a-template-engine
你可以採用下面的任意一種方式完成這些挑戰:
-- Clone this GitHub repo and complete these challenges locally.
-- Use our Replit starter project to complete these challenges.
+- 克隆這個 GitHub 倉庫,並在本地完成這些挑戰。
+- 使用我們在 Replit 上的初始化項目來完成這些挑戰。
- 使用一個你選擇的站點生成器來完成項目。 需要確定包含了我們 GitHub 倉庫的所有文件。
完成本項目後,請將一個正常運行的 demo(項目演示)託管在可以公開訪問的平臺。 然後在 `Solution Link` 框中提交你的項目 URL。
你可以在應用的模版引擎中使用靜態模板文件(如那些寫在 *Pug* 裏的)。 在運行時,模版引擎會用服務端的真實數據替換掉模版文件中的變量, 然後將模版轉譯成發送給客戶端的 HTML 靜態文件。 這樣可以輕鬆地構造 HTML 頁面,允許在頁面直接顯示變量內容而不需要從客戶端發送 API 請求。
-`pug@~3.0.0` has already been installed, and is listed as a dependency in your `package.json` file.
+`pug@~3.0.0` 已經被安裝,並且在你項目的 `package.json` 文件中作爲依賴。
Express 需要知道你正在使用哪個模板引擎。 我們將使用 `set` 方法來分配 `pug` 作爲 `view engine` 屬性的值: `app.set('view engine', 'pug')`。
-Your page will be blank until you correctly render the index file in the `views/pug` directory.
+在正確渲染 `views/pug` 目錄中的索引文件之後,加載頁面。
-To render the `pug` template, you need to use `res.render()` in the `/` route. Pass the file path to the `views/pug` directory as the argument to the method. The path can be a relative path (relative to views), or an absolute path, and does not require a file extension.
+要渲染 `pug` 模板,你需要在 `/` 路由中使用 `res.render()`。 將文件路徑作爲參數傳遞到方法的 `views/pug` 目錄。 這個路徑可以是相對路徑(相對於 views),也可以是絕對路徑,不需要文件擴展。
-If all went as planned, your app home page will no longer be blank and will display a message indicating you've successfully rendered the Pug template!
+如果一切按計劃進行,你的應用程序主頁將不再是空白的,並將顯示一條信息,表明你已經成功地渲染了 Pug 模板!
-完成以上要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成以上要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-passport.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-passport.md
index 55f6d64fbfb..5e89342a239 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-passport.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-passport.md
@@ -8,13 +8,13 @@ dashedName: set-up-passport
# --description--
-現在我們來創建 *Passport*,最終我們需要用它來實現用戶註冊和登錄。 除了 Passport,我們還會用 Express-session 來處理 session(會話)。 Express-session has a ton of advanced features you can use, but for now we're just going to use the basics! Using this middleware saves the session id as a cookie in the client and allows us to access the session data using that id on the server. This way we keep personal account information out of the cookie used by the client to verify to our server they are authenticated and just keep the *key* to access the data stored on the server.
+現在我們來創建 *Passport*,最終我們需要用它來實現用戶註冊和登錄。 除了 Passport,我們還會用 Express-session 來處理 session(會話)。 Express-session 有許多高級特性,但我們暫時只需要瞭解其基礎功能。 在客戶端,我們可以用這個中間件把 session id 儲存到 cookie。同時,我們可以在服務器上通過這個 id 訪問 session 數據。 通過這種方式,我們無需把用戶的個人賬號信息存到 cookie,來完成用戶的驗證。只需要用這個 id 作爲 *key* 來訪問服務器上用戶的數據即可。
-`passport@~0.4.1` and `express-session@~1.17.1` are already installed, and are both listed as dependencies in your `package.json` file.
+`passport@~0.4.1` 和 `express-session@~1.17.1` 已經安裝,並且在你的 `package.json` 文件中均被列爲依賴項。
-You will need to set up the session settings now and initialize Passport. Be sure to first create the variables 'session' and 'passport' to require 'express-session' and 'passport' respectively.
+現在,你需要配置 session 並初始化 Passport。 請先創建變量 “session” 和 “passport” 來分別引入 “express-session” 和 “passport”。
-To set up your express app to use the session we'll define just a few basic options. Be sure to add 'SESSION_SECRET' to your .env file and give it a random value. This is used to compute the hash used to encrypt your cookie!
+爲了讓 express 應用可以使用 session,我們需要添加一些基礎選項。 請在 .env 文件中添加字段 “SESSION_SECRET”,並給它賦一個隨機值, 便於加密 cookie、計算哈希。
```js
app.use(session({
@@ -25,13 +25,13 @@ app.use(session({
}));
```
-As well you can go ahead and tell your express app to **use** 'passport.initialize()' and 'passport.session()'. (For example, `app.use(passport.initialize());`)
+還有,我們需要讓 express **使用** “passport.initialize()” 和 “passport.session()”。 (例如,`app.use(passport.initialize());`)。
-Submit your page when you think you've got it right. If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
-Passport and Express-session should be dependencies.
+應添加 Passport 和 Express-session 作爲依賴。
```js
(getUserInput) =>
@@ -55,7 +55,7 @@ Passport and Express-session should be dependencies.
);
```
-Dependencies should be correctly required.
+依賴應正確引入。
```js
(getUserInput) =>
@@ -78,7 +78,7 @@ Dependencies should be correctly required.
);
```
-Express app should use new dependencies.
+Express app 可以使用新的依賴。
```js
(getUserInput) =>
@@ -101,7 +101,7 @@ Express app should use new dependencies.
);
```
-Session and session secret should be correctly set up.
+應正確設置 Session 和會話密碼。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-the-environment.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-the-environment.md
index 9b779f41eac..05f2aab129f 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-the-environment.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-the-environment.md
@@ -10,7 +10,7 @@ dashedName: set-up-the-environment
在接下來的挑戰中,我們將會用到 `chat.pug` 文件。 首先,在你的 `routes.js` 文件中爲 `/chat` 添加一個處理 GET 請求的路由,並給它傳入 `ensureAuthenticated`。在回調函數中,我們需要讓它渲染 `chat.pug` 文件,並在響應中包含 `{ user: req.user }` 信息。 現在,請修改 `/auth/github/callback` 路由,讓它可以像這樣設置 user_id:`req.session.user_id = req.user.id`,並在設置完成後重定向至 `/chat`。
-`socket.io@~2.3.0` has already been added as a dependency, so require/instantiate it in your server as follows with `http` (comes built-in with Nodejs):
+已添加 `socket.io@~2.3.0` 作爲依賴項,在你的服務器中和 `http` (內置在 Nodejs 中)一起導入/實例化,具體如下:
```javascript
const http = require('http').createServer(app);
@@ -19,7 +19,7 @@ const io = require('socket.io')(http);
現在我們的 *express 應用*已經包含了 *http* 服務,接下來我們需要監聽 *http* 服務的事件。 爲此,我們需要把 `app.listen` 更新爲 `http.listen`。
-需要處理的第一件事是監聽客戶端的新連接。 on 關鍵字就是監聽這個特定事件。 It requires 2 arguments: a string containing the title of the event that's emitted, and a function with which the data is passed through. 在連接監聽器中,我們用 *socket* 來代表它所包含的數據。 socket 就是指已連接到服務器的客戶端。
+需要處理的第一件事是監聽客戶端的新連接。 on 關鍵字就是監聽這個特定事件。 它需要 2 個參數:一個包含所發出事件標題的字符串,以及一個用於傳遞數據的函數。 在連接監聽器中,我們用 *socket* 來代表它所包含的數據。 socket 就是指已連接到服務器的客戶端。
爲了可以監聽服務器的連接事件,我們在數據庫連接的部分加入如下代碼:
@@ -42,7 +42,7 @@ let socket = io();
**注意:**只有在連接到處於同一個 url/server 上的 socket 時,`io()`纔可以正常執行。 如果需要連接到外部的 socket,就需要這樣調用:`io.connect('URL');`。
-完成上述要求後,請提交你的頁面鏈接。 If you're running into errors, you can check out the project completed up to this point.
+完成上述要求後,請提交你的頁面鏈接。 如果你在運行時遇到錯誤,你可以查看已執行項目的當前進度。
# --hints--
diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/use-a-template-engines-powers.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/use-a-template-engines-powers.md
index cce5575a5af..fca272ec0ab 100644
--- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/use-a-template-engines-powers.md
+++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/use-a-template-engines-powers.md
@@ -12,9 +12,9 @@ dashedName: use-a-template-engines-powers
在 Pug 文件中,你可以用變量名來調用變量,比如寫成 `#{variable_name}` 來實現行內調用,或像 `p=variable_name` 把元素與變量直接寫在一起,這表示 p 元素的內容等價於這個變量。
- Pug is all about using whitespace and tabs to show nested elements and cutting down on the amount of code needed to make a beautiful site. Read the Pug documentation for more information on usage and syntax.
+ Pug 是關於使用空白和製表符來顯示嵌套元素,並減少製作一個漂亮網站所需的代碼量。 閱讀 Pug 文檔以獲取更多關於使用和語法的信息。
- Here is an example:
+ 下面是一個例子:
```html
@@ -38,17 +38,17 @@ dashedName: use-a-template-engines-powers