From 1036cde22e1686e3f1402e13d86628e30d2863ce Mon Sep 17 00:00:00 2001 From: camperbot Date: Mon, 21 Mar 2022 22:25:58 +0530 Subject: [PATCH] chore(i18n,learn): processed translations (#45493) --- .../relational-database-certification.yml | 2 +- .../comparison-with-the-equality-operator.md | 12 ++-- ...mparison-with-the-greater-than-operator.md | 28 ++++---- ...h-the-greater-than-or-equal-to-operator.md | 26 ++++--- .../smallest-common-multiple.md | 2 +- .../telephone-number-validator.md | 6 ++ .../redux/write-a-counter-with-redux.md | 20 ++++-- .../timestamp-microservice.md | 2 +- ...sh-and-compare-passwords-asynchronously.md | 4 +- .../relational-database-certification.yml | 2 +- .../comparison-with-the-equality-operator.md | 12 ++-- ...mparison-with-the-greater-than-operator.md | 28 ++++---- ...h-the-greater-than-or-equal-to-operator.md | 26 ++++--- .../smallest-common-multiple.md | 2 +- .../telephone-number-validator.md | 6 ++ .../redux/write-a-counter-with-redux.md | 20 ++++-- .../timestamp-microservice.md | 2 +- ...sh-and-compare-passwords-asynchronously.md | 4 +- ...e-property-to-scale-an-element-on-hover.md | 2 +- .../smallest-common-multiple.md | 2 +- .../define-a-constructor-function.md | 2 +- .../redux/write-a-counter-with-redux.md | 20 ++++-- .../redux/write-a-counter-with-redux.md | 20 ++++-- .../redux/write-a-counter-with-redux.md | 20 ++++-- .../decrement-a-number-with-javascript.md | 10 ++- .../basic-javascript/record-collection.md | 8 +-- .../redux/write-a-counter-with-redux.md | 20 ++++-- .../timestamp-microservice.md | 2 +- .../arithmetic-formatter.md | 7 +- .../budget-app.md | 6 -- .../polygon-area-calculator.md | 6 -- .../probability-calculator.md | 8 +-- .../time-calculator.md | 6 -- .../problem-344-silver-dollar-game.md | 2 +- ...-356-largest-roots-of-cubic-polynomials.md | 2 +- .../build-a-number-guessing-game.md | 4 +- .../build-a-periodic-table-database.md | 4 +- .../build-a-bike-rental-shop.md | 2 +- .../build-a-boilerplate.md | 2 +- .../613297a923965e0703b64796.md | 4 +- .../61329b210dac0b08047fd6ab.md | 2 +- .../61329d52e5010e08d9b9d66b.md | 68 +++++++++++++++++++ .../6133acc353338c0bba9cb553.md | 63 +++++++++++++++++ .../614ccc21ea91ef1736b9b578.md | 50 ++++++++++++++ .../redux/write-a-counter-with-redux.md | 20 ++++-- 45 files changed, 382 insertions(+), 184 deletions(-) create mode 100644 curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329d52e5010e08d9b9d66b.md create mode 100644 curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133acc353338c0bba9cb553.md create mode 100644 curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614ccc21ea91ef1736b9b578.md diff --git a/curriculum/challenges/chinese-traditional/00-certifications/relational-database-certification/relational-database-certification.yml b/curriculum/challenges/chinese-traditional/00-certifications/relational-database-certification/relational-database-certification.yml index 8670cdb48bc..7c8f306d4e8 100644 --- a/curriculum/challenges/chinese-traditional/00-certifications/relational-database-certification/relational-database-certification.yml +++ b/curriculum/challenges/chinese-traditional/00-certifications/relational-database-certification/relational-database-certification.yml @@ -13,7 +13,7 @@ tests: title: 世界盃數據庫 - id: 5f87ac112ae598023a42df1a - title: 沙龍預約計劃 + title: 沙龍預約安排程序 - id: 602d9ff222201c65d2a019f2 title: 元素週期表數據庫 diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md index 76ad74cb44d..fde6b0c846e 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md @@ -25,14 +25,12 @@ function equalityTest(myVal) { 如果 `myVal` 等於 `10`,相等運算符會返回 `true`,因此大括號裏面的代碼會被執行,函數將返回 `Equal`。 否則,函數返回 `Not Equal`。 在 JavaScript 中,爲了讓兩個不同的數據類型(例如 `numbers` 和 `strings`)的值可以作比較,它必須把一種類型轉換爲另一種類型。 這叫作 “類型強制轉換”。 轉換之後,可以像下面這樣來比較: ```js -1 == 1 -1 == 2 -1 == '1' -"3" == 3 +1 == 1 // true +1 == 2 // false +1 == '1' // true +"3" == 3 // true ``` -按順序,這些表達式會返回 `true`、`false`、`true`、`true`。 - # --instructions-- 把相等運算符添加到指定的行,這樣當 `val` 的值爲 `12` 的時候,函數會返回 `Equal`。 @@ -57,7 +55,7 @@ assert(testEqual(12) === 'Equal'); assert(testEqual('12') === 'Equal'); ``` -應該使用 `==` 運算符。 +應該使用 `==` 運算符 ```js assert(code.match(/==/g) && !code.match(/===/g)); diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.md index c0a973e6394..bec7a7c31fa 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.md @@ -16,63 +16,61 @@ dashedName: comparison-with-the-greater-than-operator **例如:** ```js -5 > 3 -7 > '3' -2 > 3 -'1' > 9 +5 > 3 // true +7 > '3' // true +2 > 3 // false +'1' > 9 // false ``` -按順序,這些表達式會返回 `true`、`true`、`false` 和 `false`。 - # --instructions-- -添加大於運算符到指定的行,使得返回的語句是有意義的。 +將大於運算符添加到指示的行,以便返回語句有意義。 # --hints-- -`testGreaterThan(0)` 應該返回字符串 `10 or Under`。 +`testGreaterThan(0)` 應該返回字符串 `10 or Under` ```js assert(testGreaterThan(0) === '10 or Under'); ``` -`testGreaterThan(10)` 應該返回字符串 `10 or Under`。 +`testGreaterThan(10)` 應該返回字符串`10 or Under` ```js assert(testGreaterThan(10) === '10 or Under'); ``` -`testGreaterThan(11)` 應該返回字符串 `Over 10`。 +`testGreaterThan(11)` 應該返回字符串 `Over 10` ```js assert(testGreaterThan(11) === 'Over 10'); ``` -`testGreaterThan(99)` 應該返回字符串 `Over 10`。 +`testGreaterThan(99)` 應該返回字符串 `Over 10` ```js assert(testGreaterThan(99) === 'Over 10'); ``` -`testGreaterThan(100)` 應該返回字符串 `Over 10`。 +`testGreaterThan(100)` 應該返回字符串 `Over 10` ```js assert(testGreaterThan(100) === 'Over 10'); ``` -`testGreaterThan(101)` 應該返回字符串 `Over 100`。 +`testGreaterThan(101)` 應該返回字符串 `Over 100` ```js assert(testGreaterThan(101) === 'Over 100'); ``` -`testGreaterThan(150)` 應該返回字符串 `Over 100`。 +`testGreaterThan(150)` 應該返回字符串 `Over 100` ```js assert(testGreaterThan(150) === 'Over 100'); ``` -應該使用 `>` 運算符至少兩次。 +你應該使用 `>` 至少兩次 ```js assert(code.match(/val\s*>\s*('|")*\d+('|")*/g).length > 1); diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.md index 6b7516dbfe3..b9eb0cf4419 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.md @@ -16,63 +16,61 @@ dashedName: comparison-with-the-greater-than-or-equal-to-operator **例如:** ```js -6 >= 6 -7 >= '3' -2 >= 3 -'7' >= 9 +6 >= 6 // true +7 >= '3' // true +2 >= 3 // false +'7' >= 9 // false ``` -按順序,這些表達式會返回 `true`、`true`、`false` 和 `false`。 - # --instructions-- 添加大於等於運算符到指定行,使得函數的返回語句有意義。 # --hints-- -`testGreaterOrEqual(0)` 應該返回字符串 `Less than 10`。 +`testGreaterOrEqual(0)` 應該返回字符串 `Less than 10` ```js assert(testGreaterOrEqual(0) === 'Less than 10'); ``` -`testGreaterOrEqual(9)` 應該返回字符串 `Less than 10`。 +`testGreaterOrEqual(9)` 應該返回字符串 `Less than 10` ```js assert(testGreaterOrEqual(9) === 'Less than 10'); ``` -`testGreaterOrEqual(10)` 應該返回字符串 `10 or Over`。 +`testGreaterOrEqual(10)` 應該返回字符串 `10 or Over` ```js assert(testGreaterOrEqual(10) === '10 or Over'); ``` -`testGreaterOrEqual(11)` 應該返回字符串 `10 or Over`。 +`testGreaterOrEqual(11)` 應該返回字符串 `10 or Over` ```js assert(testGreaterOrEqual(11) === '10 or Over'); ``` -`testGreaterOrEqual(19)` 應該返回字符串 `10 or Over`。 +`testGreaterOrEqual(19)` 應該返回字符串 `10 or Over` ```js assert(testGreaterOrEqual(19) === '10 or Over'); ``` -`testGreaterOrEqual(100)` 應該返回字符串 `20 or Over`。 +`testGreaterOrEqual(100)` 應該返回字符串 `20 or Over` ```js assert(testGreaterOrEqual(100) === '20 or Over'); ``` -`testGreaterOrEqual(21)` 應該返回字符串 `20 or Over`。 +`testGreaterOrEqual(21)` 應該返回字符串 `20 or Over` ```js assert(testGreaterOrEqual(21) === '20 or Over'); ``` -應該使用 `>=` 運算符至少兩次。 +你應該使用 `>=` 運算符至少兩次。 ```js assert(code.match(/val\s*>=\s*('|")*\d+('|")*/g).length > 1); diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md index 4dae74b41f2..ffc944322ad 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md @@ -8,7 +8,7 @@ dashedName: smallest-common-multiple # --description-- -找到給定參數的最小公倍數,可以被這兩個參數整除,也可以被指定範圍內的所以整數整除。 +找到給定參數的最小公倍數,可以被這兩個參數整除,也可以被指定範圍內的所有整數整除。 注意,較小數不一定總是出現在數組的第一個元素。 diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md index 63d18f7ed89..acb1bc3ec8e 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md @@ -186,6 +186,12 @@ assert(telephoneCheck('(555)5(55?)-5555') === false); assert(telephoneCheck('55 55-55-555-5') === false); ``` +`telephoneCheck("11 555-555-5555")` 應該返回 `false`。 + +```js +assert(telephoneCheck('11 555-555-5555') === false); +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/redux/write-a-counter-with-redux.md b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/redux/write-a-counter-with-redux.md index ead10841197..0a1c945fb54 100644 --- a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/redux/write-a-counter-with-redux.md +++ b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/redux/write-a-counter-with-redux.md @@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT); Redux store 應該將 `state` 初始化爲 0。 ```js -assert(store.getState() === 0); +assert(_store.getState() === 0); ``` 在 Redux store 上 dispatch `incAction` 應該將 `state` 增加 1。 @@ -39,9 +39,9 @@ assert(store.getState() === 0); ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(incAction()); - const incState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(incAction()); + const incState = _store.getState(); return initialState + 1 === incState; })() ); @@ -52,9 +52,9 @@ assert( ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(decAction()); - const decState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(decAction()); + const decState = _store.getState(); return initialState - 1 === decState; })() ); @@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing const store = null; // Define the Redux store here, passing in your reducers ``` +## --after-user-code-- + +```js +const _store = Redux.createStore(counterReducer) +``` + # --solutions-- ```js diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index 3a8eee0bd5c..22f4ccb9f7c 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -30,7 +30,7 @@ dashedName: timestamp-microservice }; ``` -對具有有效日期的 `/api/:date?` 的請求應返回一個帶有 `unix` 鍵的 JSON 對象,該鍵是輸入日期的 Unix 時間戳(以毫秒爲單位) +一個對 `/api/:date?` 的有效日期的請求應該返回一個 JSON 對象,該對象的 `unix` 鍵是輸入日期的 Unix 時間戳,單位是毫秒(數字類型)。 ```js (getUserInput) => diff --git a/curriculum/challenges/chinese-traditional/09-information-security/information-security-with-helmetjs/hash-and-compare-passwords-asynchronously.md b/curriculum/challenges/chinese-traditional/09-information-security/information-security-with-helmetjs/hash-and-compare-passwords-asynchronously.md index 43ca7a13723..737288015a7 100644 --- a/curriculum/challenges/chinese-traditional/09-information-security/information-security-with-helmetjs/hash-and-compare-passwords-asynchronously.md +++ b/curriculum/challenges/chinese-traditional/09-information-security/information-security-with-helmetjs/hash-and-compare-passwords-asynchronously.md @@ -20,7 +20,7 @@ bcrypt.hash(myPlaintextPassword, saltRounds, (err, hash) => { # --instructions-- -把這段哈希方法添加到你的服務器(我們已經定義好這個方法的變量給你直接使用了),然後你可以嘗試在控制檯輸出。 之後,我們通常需要把哈希的結果保存到數據庫。 +將該哈希函數添加到你的服務器上(我們已經定義了函數中使用的變量),並將其記錄到控制檯以便你查看! 之後,我們通常需要把哈希的結果保存到數據庫。 當你需要對比用戶輸入的值是否和之前哈希過的值一樣的時候,只需要調用對比函數: @@ -30,7 +30,7 @@ bcrypt.compare(myPlaintextPassword, hash, (err, res) => { }); ``` -當控制檯輸出生成的哈希並在對比的回調中輸出結果後,我們就可以將其添加到現有的哈希函數中。 控制檯中會首先輸出一個哈希結果,然後輸出 true。 如果將比較函數中的 “myPlaintextPassword” 更改爲 “someOtherPlaintextPassword”,則比較的結果應顯示 false。 +在你記錄完成的哈希,並在比較中把 'res' 記錄到控制檯後,將此添加到你現有的哈希函數中(因爲你需要等待哈希完成後再調用比較函數)。 控制檯中會首先輸出一個哈希結果,然後輸出 true。 如果將比較函數中的 “myPlaintextPassword” 更改爲 “someOtherPlaintextPassword”,則比較的結果應顯示 false。 ```js bcrypt.hash('passw0rd!', 13, (err, hash) => { diff --git a/curriculum/challenges/chinese/00-certifications/relational-database-certification/relational-database-certification.yml b/curriculum/challenges/chinese/00-certifications/relational-database-certification/relational-database-certification.yml index 0909d4ed2e5..ff2c9c2eed8 100644 --- a/curriculum/challenges/chinese/00-certifications/relational-database-certification/relational-database-certification.yml +++ b/curriculum/challenges/chinese/00-certifications/relational-database-certification/relational-database-certification.yml @@ -13,7 +13,7 @@ tests: title: 世界杯数据库 - id: 5f87ac112ae598023a42df1a - title: 沙龙预约计划 + title: 沙龙预约安排程序 - id: 602d9ff222201c65d2a019f2 title: 元素周期表数据库 diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md index 2d3e0f6c31e..41bdb37ea74 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md @@ -25,14 +25,12 @@ function equalityTest(myVal) { 如果 `myVal` 等于 `10`,相等运算符会返回 `true`,因此大括号里面的代码会被执行,函数将返回 `Equal`。 否则,函数返回 `Not Equal`。 在 JavaScript 中,为了让两个不同的数据类型(例如 `numbers` 和 `strings`)的值可以作比较,它必须把一种类型转换为另一种类型。 这叫作 “类型强制转换”。 转换之后,可以像下面这样来比较: ```js -1 == 1 -1 == 2 -1 == '1' -"3" == 3 +1 == 1 // true +1 == 2 // false +1 == '1' // true +"3" == 3 // true ``` -按顺序,这些表达式会返回 `true`、`false`、`true`、`true`。 - # --instructions-- 把相等运算符添加到指定的行,这样当 `val` 的值为 `12` 的时候,函数会返回 `Equal`。 @@ -57,7 +55,7 @@ assert(testEqual(12) === 'Equal'); assert(testEqual('12') === 'Equal'); ``` -应该使用 `==` 运算符。 +应该使用 `==` 运算符 ```js assert(code.match(/==/g) && !code.match(/===/g)); diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.md index ea7750caed4..161ce2caa3d 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.md @@ -16,63 +16,61 @@ dashedName: comparison-with-the-greater-than-operator **例如:** ```js -5 > 3 -7 > '3' -2 > 3 -'1' > 9 +5 > 3 // true +7 > '3' // true +2 > 3 // false +'1' > 9 // false ``` -按顺序,这些表达式会返回 `true`、`true`、`false` 和 `false`。 - # --instructions-- -添加大于运算符到指定的行,使得返回的语句是有意义的。 +将大于运算符添加到指示的行,以便返回语句有意义。 # --hints-- -`testGreaterThan(0)` 应该返回字符串 `10 or Under`。 +`testGreaterThan(0)` 应该返回字符串 `10 or Under` ```js assert(testGreaterThan(0) === '10 or Under'); ``` -`testGreaterThan(10)` 应该返回字符串 `10 or Under`。 +`testGreaterThan(10)` 应该返回字符串`10 or Under` ```js assert(testGreaterThan(10) === '10 or Under'); ``` -`testGreaterThan(11)` 应该返回字符串 `Over 10`。 +`testGreaterThan(11)` 应该返回字符串 `Over 10` ```js assert(testGreaterThan(11) === 'Over 10'); ``` -`testGreaterThan(99)` 应该返回字符串 `Over 10`。 +`testGreaterThan(99)` 应该返回字符串 `Over 10` ```js assert(testGreaterThan(99) === 'Over 10'); ``` -`testGreaterThan(100)` 应该返回字符串 `Over 10`。 +`testGreaterThan(100)` 应该返回字符串 `Over 10` ```js assert(testGreaterThan(100) === 'Over 10'); ``` -`testGreaterThan(101)` 应该返回字符串 `Over 100`。 +`testGreaterThan(101)` 应该返回字符串 `Over 100` ```js assert(testGreaterThan(101) === 'Over 100'); ``` -`testGreaterThan(150)` 应该返回字符串 `Over 100`。 +`testGreaterThan(150)` 应该返回字符串 `Over 100` ```js assert(testGreaterThan(150) === 'Over 100'); ``` -应该使用 `>` 运算符至少两次。 +你应该使用 `>` 至少两次 ```js assert(code.match(/val\s*>\s*('|")*\d+('|")*/g).length > 1); diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.md index 739ac0a38c4..aab50a44a06 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.md @@ -16,63 +16,61 @@ dashedName: comparison-with-the-greater-than-or-equal-to-operator **例如:** ```js -6 >= 6 -7 >= '3' -2 >= 3 -'7' >= 9 +6 >= 6 // true +7 >= '3' // true +2 >= 3 // false +'7' >= 9 // false ``` -按顺序,这些表达式会返回 `true`、`true`、`false` 和 `false`。 - # --instructions-- 添加大于等于运算符到指定行,使得函数的返回语句有意义。 # --hints-- -`testGreaterOrEqual(0)` 应该返回字符串 `Less than 10`。 +`testGreaterOrEqual(0)` 应该返回字符串 `Less than 10` ```js assert(testGreaterOrEqual(0) === 'Less than 10'); ``` -`testGreaterOrEqual(9)` 应该返回字符串 `Less than 10`。 +`testGreaterOrEqual(9)` 应该返回字符串 `Less than 10` ```js assert(testGreaterOrEqual(9) === 'Less than 10'); ``` -`testGreaterOrEqual(10)` 应该返回字符串 `10 or Over`。 +`testGreaterOrEqual(10)` 应该返回字符串 `10 or Over` ```js assert(testGreaterOrEqual(10) === '10 or Over'); ``` -`testGreaterOrEqual(11)` 应该返回字符串 `10 or Over`。 +`testGreaterOrEqual(11)` 应该返回字符串 `10 or Over` ```js assert(testGreaterOrEqual(11) === '10 or Over'); ``` -`testGreaterOrEqual(19)` 应该返回字符串 `10 or Over`。 +`testGreaterOrEqual(19)` 应该返回字符串 `10 or Over` ```js assert(testGreaterOrEqual(19) === '10 or Over'); ``` -`testGreaterOrEqual(100)` 应该返回字符串 `20 or Over`。 +`testGreaterOrEqual(100)` 应该返回字符串 `20 or Over` ```js assert(testGreaterOrEqual(100) === '20 or Over'); ``` -`testGreaterOrEqual(21)` 应该返回字符串 `20 or Over`。 +`testGreaterOrEqual(21)` 应该返回字符串 `20 or Over` ```js assert(testGreaterOrEqual(21) === '20 or Over'); ``` -应该使用 `>=` 运算符至少两次。 +你应该使用 `>=` 运算符至少两次。 ```js assert(code.match(/val\s*>=\s*('|")*\d+('|")*/g).length > 1); diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md index ff30a4a4e3c..78625fcac09 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md @@ -8,7 +8,7 @@ dashedName: smallest-common-multiple # --description-- -找到给定参数的最小公倍数,可以被这两个参数整除,也可以被指定范围内的所以整数整除。 +找到给定参数的最小公倍数,可以被这两个参数整除,也可以被指定范围内的所有整数整除。 注意,较小数不一定总是出现在数组的第一个元素。 diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md index d985be3e2a9..fcb7dee45c9 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md @@ -186,6 +186,12 @@ assert(telephoneCheck('(555)5(55?)-5555') === false); assert(telephoneCheck('55 55-55-555-5') === false); ``` +`telephoneCheck("11 555-555-5555")` 应该返回 `false`。 + +```js +assert(telephoneCheck('11 555-555-5555') === false); +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/chinese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md b/curriculum/challenges/chinese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md index 98413413a32..126f863118c 100644 --- a/curriculum/challenges/chinese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md +++ b/curriculum/challenges/chinese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md @@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT); Redux store 应该将 `state` 初始化为 0。 ```js -assert(store.getState() === 0); +assert(_store.getState() === 0); ``` 在 Redux store 上 dispatch `incAction` 应该将 `state` 增加 1。 @@ -39,9 +39,9 @@ assert(store.getState() === 0); ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(incAction()); - const incState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(incAction()); + const incState = _store.getState(); return initialState + 1 === incState; })() ); @@ -52,9 +52,9 @@ assert( ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(decAction()); - const decState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(decAction()); + const decState = _store.getState(); return initialState - 1 === decState; })() ); @@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing const store = null; // Define the Redux store here, passing in your reducers ``` +## --after-user-code-- + +```js +const _store = Redux.createStore(counterReducer) +``` + # --solutions-- ```js diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index 82bc5afbec1..6ee0899ffee 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -30,7 +30,7 @@ dashedName: timestamp-microservice }; ``` -对具有有效日期的 `/api/:date?` 的请求应返回一个带有 `unix` 键的 JSON 对象,该键是输入日期的 Unix 时间戳(以毫秒为单位) +一个对 `/api/:date?` 的有效日期的请求应该返回一个 JSON 对象,该对象的 `unix` 键是输入日期的 Unix 时间戳,单位是毫秒(数字类型)。 ```js (getUserInput) => diff --git a/curriculum/challenges/chinese/09-information-security/information-security-with-helmetjs/hash-and-compare-passwords-asynchronously.md b/curriculum/challenges/chinese/09-information-security/information-security-with-helmetjs/hash-and-compare-passwords-asynchronously.md index 77d930c4142..cc82378b162 100644 --- a/curriculum/challenges/chinese/09-information-security/information-security-with-helmetjs/hash-and-compare-passwords-asynchronously.md +++ b/curriculum/challenges/chinese/09-information-security/information-security-with-helmetjs/hash-and-compare-passwords-asynchronously.md @@ -20,7 +20,7 @@ bcrypt.hash(myPlaintextPassword, saltRounds, (err, hash) => { # --instructions-- -把这段哈希方法添加到你的服务器(我们已经定义好这个方法的变量给你直接使用了),然后你可以尝试在控制台输出。 之后,我们通常需要把哈希的结果保存到数据库。 +将该哈希函数添加到你的服务器上(我们已经定义了函数中使用的变量),并将其记录到控制台以便你查看! 之后,我们通常需要把哈希的结果保存到数据库。 当你需要对比用户输入的值是否和之前哈希过的值一样的时候,只需要调用对比函数: @@ -30,7 +30,7 @@ bcrypt.compare(myPlaintextPassword, hash, (err, res) => { }); ``` -当控制台输出生成的哈希并在对比的回调中输出结果后,我们就可以将其添加到现有的哈希函数中。 控制台中会首先输出一个哈希结果,然后输出 true。 如果将比较函数中的 “myPlaintextPassword” 更改为 “someOtherPlaintextPassword”,则比较的结果应显示 false。 +在你记录完成的哈希,并在比较中把 'res' 记录到控制台后,将此添加到你现有的哈希函数中(因为你需要等待哈希完成后再调用比较函数)。 控制台中会首先输出一个哈希结果,然后输出 true。 如果将比较函数中的 “myPlaintextPassword” 更改为 “someOtherPlaintextPassword”,则比较的结果应显示 false。 ```js bcrypt.hash('passw0rd!', 13, (err, hash) => { diff --git a/curriculum/challenges/espanol/01-responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover.md b/curriculum/challenges/espanol/01-responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover.md index 29aef625231..1a2ff80d013 100644 --- a/curriculum/challenges/espanol/01-responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover.md +++ b/curriculum/challenges/espanol/01-responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover.md @@ -9,7 +9,7 @@ dashedName: use-the-css-transform-scale-property-to-scale-an-element-on-hover # --description-- -La propiedad `transform` tiene una variedad de funciones que el permiten escalar, mover, rotar, sesgar, etc., sus elementos. Cuando se usa con pseudo-classes como `:hover` que especifican un cierto estado de un elemento, la propiedad `transform` puede agregar fácilmente interactividad a sus elementos. +La propiedad `transform` tiene una variedad de funciones que te permiten escalar, mover, rotar, sesgar, etc., sus elementos. Cuando se usa con pseudo-classes como `:hover` que especifican un cierto estado de un elemento, la propiedad `transform` puede agregar fácilmente interactividad a sus elementos. Aquí hay un ejemplo para escalar los elementos de párrafo a 2.1 veces su tamaño original: diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md index e139bc8c50e..fb2606daa37 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md @@ -1,6 +1,6 @@ --- id: ae9defd7acaf69703ab432ea -title: Múltiplo común más pequeño +title: Mínimo común múltiplo challengeType: 5 forumTopicId: 16075 dashedName: smallest-common-multiple diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md index d192ce79f30..cfe788aa323 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function.md @@ -22,7 +22,7 @@ function Bird() { Este constructor define un objeto `Bird` con las propiedades `name`, `color` y `numLegs` establecidas a Albert, blue y 2 respectivamente. Los constructores tienen las siguientes convenciones: - + # --instructions-- diff --git a/curriculum/challenges/espanol/03-front-end-development-libraries/redux/write-a-counter-with-redux.md b/curriculum/challenges/espanol/03-front-end-development-libraries/redux/write-a-counter-with-redux.md index b6346924f75..2290a4ec4e2 100644 --- a/curriculum/challenges/espanol/03-front-end-development-libraries/redux/write-a-counter-with-redux.md +++ b/curriculum/challenges/espanol/03-front-end-development-libraries/redux/write-a-counter-with-redux.md @@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT); El almacén Redux debe inicializarse con un `state` de 0. ```js -assert(store.getState() === 0); +assert(_store.getState() === 0); ``` El envío de `incAction` en el almacén Redux debe incrementar el `state` en 1. @@ -39,9 +39,9 @@ El envío de `incAction` en el almacén Redux debe incrementar el `state` en 1. ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(incAction()); - const incState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(incAction()); + const incState = _store.getState(); return initialState + 1 === incState; })() ); @@ -52,9 +52,9 @@ El envío de `decAction` en el almacén Redux debe disminuir el `state` en 1. ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(decAction()); - const decState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(decAction()); + const decState = _store.getState(); return initialState - 1 === decState; })() ); @@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing const store = null; // Define the Redux store here, passing in your reducers ``` +## --after-user-code-- + +```js +const _store = Redux.createStore(counterReducer) +``` + # --solutions-- ```js diff --git a/curriculum/challenges/italian/03-front-end-development-libraries/redux/write-a-counter-with-redux.md b/curriculum/challenges/italian/03-front-end-development-libraries/redux/write-a-counter-with-redux.md index bb055e2f919..e9872b7aafe 100644 --- a/curriculum/challenges/italian/03-front-end-development-libraries/redux/write-a-counter-with-redux.md +++ b/curriculum/challenges/italian/03-front-end-development-libraries/redux/write-a-counter-with-redux.md @@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT); Lo store Redux dovrebbe essere inizializzato con uno `state` di 0. ```js -assert(store.getState() === 0); +assert(_store.getState() === 0); ``` Effettuare il dispatch di `incAction` nello store Redux dovrebbe aumentare lo `state` di 1. @@ -39,9 +39,9 @@ Effettuare il dispatch di `incAction` nello store Redux dovrebbe aumentare lo `s ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(incAction()); - const incState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(incAction()); + const incState = _store.getState(); return initialState + 1 === incState; })() ); @@ -52,9 +52,9 @@ Effettuare il dispatch di `decAction` nello store Redux dovrebbe decrementare lo ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(decAction()); - const decState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(decAction()); + const decState = _store.getState(); return initialState - 1 === decState; })() ); @@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing const store = null; // Define the Redux store here, passing in your reducers ``` +## --after-user-code-- + +```js +const _store = Redux.createStore(counterReducer) +``` + # --solutions-- ```js diff --git a/curriculum/challenges/japanese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md b/curriculum/challenges/japanese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md index 6148dfd253e..1bb3eec7ec0 100644 --- a/curriculum/challenges/japanese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md +++ b/curriculum/challenges/japanese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md @@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT); Redux ストアを、`state` を 0 として初期化します。 ```js -assert(store.getState() === 0); +assert(_store.getState() === 0); ``` Redux ストアでの `incAction` のディスパッチで、`state` を 1 だけ増やします。 @@ -39,9 +39,9 @@ Redux ストアでの `incAction` のディスパッチで、`state` を 1 だ ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(incAction()); - const incState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(incAction()); + const incState = _store.getState(); return initialState + 1 === incState; })() ); @@ -52,9 +52,9 @@ Redux ストアでの `decAction` のディスパッチで、`state` を 1 だ ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(decAction()); - const decState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(decAction()); + const decState = _store.getState(); return initialState - 1 === decState; })() ); @@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing const store = null; // Define the Redux store here, passing in your reducers ``` +## --after-user-code-- + +```js +const _store = Redux.createStore(counterReducer) +``` + # --solutions-- ```js diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.md index bed512835eb..661078e2419 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.md @@ -38,9 +38,13 @@ assert(myVar === 10); `myVar = myVar - 1;` deve ser alterado. ```js -assert( - /let\s*myVar\s*=\s*11;\s*\/*.*\s*([-]{2}\s*myVar|myVar\s*[-]{2});/.test(code) -); +assert(!code.match(/myVar\s*=\s*myVar\s*[-]\s*1.*?;?/)); +``` + +Você não deve atribuir a `myVar` o valor `10`. + +```js +assert(!code.match(/myVar\s*=\s*10.*?;?/)); ``` Você deve usar o operador `--` na variável `myVar`. diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index bec11f1f664..cd781c29124 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -31,13 +31,13 @@ assert( ); ``` -Após `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` deve ter a string `Take a Chance on Me` como último elemento. +Após `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` deve ter a string `Take a Chance on Me` como o último e único elemento. ```js assert( - updateRecords(_recordCollection, 5439, 'tracks', 'Take a Chance on Me')[5439][ - 'tracks' - ].pop() === 'Take a Chance on Me' + updateRecords(_recordCollection, 5439, 'tracks', 'Take a Chance on Me') && + _recordCollection[5439]['tracks'].length === 1 && + _recordCollection[5439]['tracks'].pop() === 'Take a Chance on Me' ); ``` diff --git a/curriculum/challenges/portuguese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md b/curriculum/challenges/portuguese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md index 29f7280e3ee..966e42f9983 100644 --- a/curriculum/challenges/portuguese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md +++ b/curriculum/challenges/portuguese/03-front-end-development-libraries/redux/write-a-counter-with-redux.md @@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT); A store do Redux deve inicializar com o `state` igual a 0. ```js -assert(store.getState() === 0); +assert(_store.getState() === 0); ``` Despachar `incAction` na store do Redux deve incrementar o `state` por 1. @@ -39,9 +39,9 @@ Despachar `incAction` na store do Redux deve incrementar o `state` por 1. ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(incAction()); - const incState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(incAction()); + const incState = _store.getState(); return initialState + 1 === incState; })() ); @@ -52,9 +52,9 @@ Despachar `decAction` na store do Redux deve decrementar o `state` por 1. ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(decAction()); - const decState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(decAction()); + const decState = _store.getState(); return initialState - 1 === decState; })() ); @@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing const store = null; // Define the Redux store here, passing in your reducers ``` +## --after-user-code-- + +```js +const _store = Redux.createStore(counterReducer) +``` + # --solutions-- ```js diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index 269b25f9638..83ec7a945e1 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -30,7 +30,7 @@ Você deve fornecer seu próprio projeto, não o exemplo de URL. }; ``` -Uma solicitação a `/api/:date?` com uma data válida deve retornar um objeto JSON com uma chave `unix`, que é um timestamp do Unix da data de entrada em milissegundos +Uma solicitação a `/api/:date?` com uma data válida deve retornar um objeto JSON com uma chave `unix`, que é um timestamp do Unix da data de entrada em milissegundos (com o tipo Number) ```js (getUserInput) => diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter.md index c161c639718..93a10c738df 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter.md @@ -10,11 +10,6 @@ dashedName: arithmetic-formatter Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-arithmetic-formatter). -Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto: - -- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas) -- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas) - # --instructions-- Os alunos da escola primária geralmente organizam problemas aritméticos de modo vertical para facilitar a sua resolução. Por exemplo, "235 + 52" se torna: @@ -88,7 +83,7 @@ Copie o URL do seu projeto e envie-o abaixo. # --hints-- -O projeto deve formatar corretamente um problema aritmético e passar em todos os testes. +O programa deve formatar corretamente um problema aritmético e passar em todos os testes. ```js diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/budget-app.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/budget-app.md index bf6ad855bf3..e00bfe934c3 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/budget-app.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/budget-app.md @@ -10,12 +10,6 @@ dashedName: budget-app Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-budget-app). -Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto: - -- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas) - -- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas) - # --instructions-- Complete a classe `Category` no `budget.py`. Ela deve ser capaz de instanciar objetos com base em diferentes categorias de orçamento, como *alimentos* (food), *vestuário* (clothing) e *entretenimento* (entertainment). Quando os objetos são criados, eles são passados com o nome da categoria. A classe deve ter uma variável de instância chamada `ledger` que seja uma lista. A classe também deve conter os seguintes métodos: diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/polygon-area-calculator.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/polygon-area-calculator.md index c1cb929b27e..9fa926e74be 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/polygon-area-calculator.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/polygon-area-calculator.md @@ -10,12 +10,6 @@ dashedName: polygon-area-calculator Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-polygon-area-calculator). -Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto: - -- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas) - -- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas) - # --instructions-- Neste projeto, você usará programação orientada a objetos para criar a classe Rectangle, para um retângulo, e a classe Square, para um quadrado. A classe Square deve ser uma subclasse da classe Rectangle e herdar métodos e atributos. diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/probability-calculator.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/probability-calculator.md index cbe5ce952e0..cd5fbc44a4d 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/probability-calculator.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/probability-calculator.md @@ -10,19 +10,13 @@ dashedName: probability-calculator Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-probability-calculator). -Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto: - -- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas) - -- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas) - # --instructions-- Suponha que haja um chapéu contendo 5 bolas azuis, 4 bolas vermelhas e 2 bolas verdes. Qual é a probabilidade de um sorteio aleatório de 4 bolas conter pelo menos 1 bola vermelha e 2 bolas verdes? Embora seja possível calcular a probabilidade usando matemática avançada, uma maneira mais fácil é escrever um programa para realizar um grande número de experimentos para estimar uma probabilidade aproximada. Para este projeto, escreva um programa para determinar a probabilidade aproximada de retirar certas bolas aleatoriamente de um chapéu. -Primeiro, crie uma classe `Hat` (Chapéu) em `prob_calculator.py`. A classe deve ter um número variável de argumentos que especificam o número de bolas de cada cor que estão no chapéu. Por exemplo, um objeto da classe poderia ser criado de qualquer uma dessas maneiras: +Primeiro, crie uma classe `Hat` em `prob_calculator.py`. A classe deve ter um número variável de argumentos que especificam o número de bolas de cada cor que estão no chapéu. Por exemplo, um objeto da classe poderia ser criado de qualquer uma dessas maneiras: ```py hat1 = Hat(yellow=3, blue=2, green=6) diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/time-calculator.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/time-calculator.md index 5d52a1b6c3b..37deac78fd9 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/time-calculator.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/scientific-computing-with-python-projects/time-calculator.md @@ -10,12 +10,6 @@ dashedName: time-calculator Você [trabalhará neste projeto com nosso código inicial do Replit](https://replit.com/github/freeCodeCamp/boilerplate-time-calculator). -Ainda estamos desenvolvendo a parte instrucional interativa do currículo Python. Por enquanto, aqui estão alguns vídeos no canal do freeCodeCamp.org do YouTube que ensinarão tudo o que você precisa saber para completar este projeto: - -- [Curso de Python em vídeo para todos](https://www.freecodecamp.org/news/python-for-everybody/) (14 horas) - -- [Curso Aprenda Python em vídeo](https://www.freecodecamp.org/news/learn-python-video-course/) (10 horas) - # --instructions-- Escreva uma função chamada `add_time`, que recebe dois parâmetros necessários e um parâmetro opcional: diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-344-silver-dollar-game.md b/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-344-silver-dollar-game.md index 9a289747ba8..5687472b816 100644 --- a/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-344-silver-dollar-game.md +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-344-silver-dollar-game.md @@ -8,7 +8,7 @@ dashedName: problem-344-silver-dollar-game # --description-- -O jogo de N.G. de Bruijn, conhecido como o jogo do dólar de prata, tem uma variante que pode ser descrita da seguinte forma: +Uma variante de N.G. de Bruijn, conhecida como o jogo do dólar de prata, pode ser descrita da seguinte forma: Em uma faixa de quadrados, várias moedas são colocadas, estando, no máximo, uma moeda por quadrado. Apenas uma moeda, chamada de dólar de prata, tem qualquer valor. Dois jogadores se revezam fazendo movimentos. Em cada turno, um jogador deve fazer um movimento regular ou especial. diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.md b/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.md index 5711c272a76..b9f19dc802d 100644 --- a/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.md +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.md @@ -8,7 +8,7 @@ dashedName: problem-356-largest-roots-of-cubic-polynomials # --description-- -Considere an como a maior raiz real de um polinômio $g(x) = x^3 - 2^n \times x^2 + n$. +Considere $a_n$ como sendo a maior raiz real de um polinômio $g(x) = x^3 - 2^n \times x^2 + n$. Por exemplo, $a_2 = 3.86619826\ldots$ diff --git a/curriculum/challenges/portuguese/13-relational-databases/build-a-number-guessing-game-project/build-a-number-guessing-game.md b/curriculum/challenges/portuguese/13-relational-databases/build-a-number-guessing-game-project/build-a-number-guessing-game.md index 46d5539db94..eb941e1c58c 100644 --- a/curriculum/challenges/portuguese/13-relational-databases/build-a-number-guessing-game-project/build-a-number-guessing-game.md +++ b/curriculum/challenges/portuguese/13-relational-databases/build-a-number-guessing-game-project/build-a-number-guessing-game.md @@ -13,11 +13,11 @@ Este é um dos projetos necessários para obter sua certificação. Para este pr # --instructions-- -**Importante:** depois de passar em todos os testes do projeto, salve um dump (cópia) do seu banco de dados em um arquivo `number_guessers.sql`, bem como toda a sua pasta `number_guessing_game` para poder concluir a etapa 2. Haverá instruções sobre como fazer isso dentro da máquina virtual. +**Importante:** depois de passar em todos os testes do projeto, salve um dump (cópia) do seu banco de dados em um arquivo `number_guess.sql`, bem como seu arquivo `number_guess.sh` para poder concluir a etapa 2. Haverá instruções sobre como fazer isso dentro da máquina virtual. # --notes-- -Arquivos necessários: `number_guessers.sql` e toda a pasta `number_guessing_game` +Arquivos necessários: `number_guess.sql`, `number_guess.sh` # --hints-- diff --git a/curriculum/challenges/portuguese/13-relational-databases/build-a-periodic-table-database-project/build-a-periodic-table-database.md b/curriculum/challenges/portuguese/13-relational-databases/build-a-periodic-table-database-project/build-a-periodic-table-database.md index e48d3726d71..336e59cc34f 100644 --- a/curriculum/challenges/portuguese/13-relational-databases/build-a-periodic-table-database-project/build-a-periodic-table-database.md +++ b/curriculum/challenges/portuguese/13-relational-databases/build-a-periodic-table-database-project/build-a-periodic-table-database.md @@ -13,11 +13,11 @@ Este é um dos projetos necessários para obter sua certificação. Para este pr # --instructions-- -**Importante:** depois de passar em todos os testes do projeto, salve um dump (cópia) do seu banco de dados em um arquivo `elements.sql`, bem como toda a sua pasta `periodic_table` para poder concluir a etapa 2. Haverá instruções sobre como fazer isso dentro da máquina virtual. +**Importante:** depois de passar em todos os testes do projeto, salve um dump (cópia) do seu banco de dados no arquivo `periodic_table.sql` bem como seu arquivo `element.sh` para poder completar a etapa 2. Haverá instruções sobre como fazer isso dentro da máquina virtual. # --notes-- -Arquivos necessários: `elements.sql` e toda a pasta `periodic_table` +Arquivos necessários: `periodic_table.sql`, `element.sh` # --hints-- diff --git a/curriculum/challenges/portuguese/13-relational-databases/learn-bash-and-sql-by-building-a-bike-rental-shop/build-a-bike-rental-shop.md b/curriculum/challenges/portuguese/13-relational-databases/learn-bash-and-sql-by-building-a-bike-rental-shop/build-a-bike-rental-shop.md index 2788633a9aa..3f0d97f494a 100644 --- a/curriculum/challenges/portuguese/13-relational-databases/learn-bash-and-sql-by-building-a-bike-rental-shop/build-a-bike-rental-shop.md +++ b/curriculum/challenges/portuguese/13-relational-databases/learn-bash-and-sql-by-building-a-bike-rental-shop/build-a-bike-rental-shop.md @@ -9,7 +9,7 @@ dashedName: build-a-bike-rental-shop # --description-- -Neste curso intermediário, você vai construir um programa de Bash interativo que armazena informações de aluguel para sua loja de aluguel de bicicletas utilizando PostgreSQL. +Neste curso de 210 aulas, você vai construir um programa de Bash interativo que armazena informações de aluguel para sua loja de aluguel de bicicletas utilizando PostgreSQL. # --instructions-- diff --git a/curriculum/challenges/portuguese/13-relational-databases/learn-bash-by-building-a-boilerplate/build-a-boilerplate.md b/curriculum/challenges/portuguese/13-relational-databases/learn-bash-by-building-a-boilerplate/build-a-boilerplate.md index 969f61ae842..dfd1365b854 100644 --- a/curriculum/challenges/portuguese/13-relational-databases/learn-bash-by-building-a-boilerplate/build-a-boilerplate.md +++ b/curriculum/challenges/portuguese/13-relational-databases/learn-bash-by-building-a-boilerplate/build-a-boilerplate.md @@ -9,7 +9,7 @@ dashedName: build-a-boilerplate # --description-- -Neste curso de 170 aulas, você aprenderá comandos básicos criando o boilerplate de um site usando apenas a linha de comando. +Neste curso de 170 aulas, você aprenderá comandos do terminal criando o boilerplate de um site usando apenas a linha de comando. # --instructions-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613297a923965e0703b64796.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613297a923965e0703b64796.md index 6754f9b8af4..61fdc659b30 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613297a923965e0703b64796.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613297a923965e0703b64796.md @@ -7,9 +7,9 @@ dashedName: step-2 # --description-- -Você já deve estar familiarizado com a tag `meta`. Ela é usada para especificar informações sobre a página como título, descrição, palavras-chave e autor. +Você já deve estar familiarizado com o elemento `meta`. Ele é usado para especificar informações sobre a página como título, descrição, palavras-chave e autor. -Dê à página uma tag `meta` com um valor apropriado para `charset`. +Dê à página um elemento `meta` com um valor apropriado para `charset`. O atributo `charset` especifica a codificação de caracteres da página e, hoje em dia, `UTF-8` é a única codificação suportada pela maioria dos navegadores. diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md index cf008f939d2..7ed19a582a4 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md @@ -7,7 +7,7 @@ dashedName: step-3 # --description-- -Continuando com as tags `meta`, uma definição de `viewport` informa ao navegador como renderizar a página. Sua inclusão melhora a acessibilidade visual no celular e a _SEO_ (otimização de mecanismos de busca). +Continuando com os elementos `meta`, uma definição de `viewport` informa ao navegador como renderizar a página. Sua inclusão melhora a acessibilidade visual no celular e a _SEO_ (otimização de mecanismos de busca). Adicione uma definição de `viewport` com um atributo `content` detalhando a `width` (largura) e a `initial-scale` (escala inicial) da página. diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329d52e5010e08d9b9d66b.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329d52e5010e08d9b9d66b.md new file mode 100644 index 00000000000..11c83a9c293 --- /dev/null +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329d52e5010e08d9b9d66b.md @@ -0,0 +1,68 @@ +--- +id: 61329d52e5010e08d9b9d66b +title: Etapa 4 +challengeType: 0 +dashedName: step-4 +--- + +# --description-- + +Outro elemento `meta` importante para a acessibilidade e para a SEO é a `description`. O valor do atributo `content` é usado pelos mecanismos de busca para fornecer uma descrição de sua página. + +Adicione um elemento `meta` com o atributo `name` definido como `description`, e dê a ele um atributo `content`. + +# --hints-- + +Você deve adicionar um novo elemento `meta` à `head`. + +```js +assert.equal(document.querySelectorAll('meta').length, 3); +``` + +Você deve dar ao elemento `meta` um atributo `name` de `description`. + +```js +assert.exists(document.querySelector('meta[name="description"]')); +``` + +Você deve dar ao elemento `meta` um atributo `content`. + +```js +assert.notEmpty(document.querySelector('meta[name="description"]')?.content); +``` + +O valor do atributo `content` não deve ter mais de 165 caracteres. _Esse é o tamanho máximo da descrição para o Google._ + +```js +assert.isAtMost(document.querySelector('meta[name="description"]')?.content?.length, 165); +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + + + +--fcc-editable-region-- + + + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133acc353338c0bba9cb553.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133acc353338c0bba9cb553.md new file mode 100644 index 00000000000..b2121f0bbea --- /dev/null +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133acc353338c0bba9cb553.md @@ -0,0 +1,63 @@ +--- +id: 6133acc353338c0bba9cb553 +title: Etapa 5 +challengeType: 0 +dashedName: step-5 +--- + +# --description-- + +Por fim, em `head`, o elemento `title` é útil para que os leitores de tela entendam o conteúdo de uma página. Além disso, ele é uma parte importante para a _SEO_. + +Dê à sua página um `title` que seja descritivo e conciso. + +# --hints-- + +Você deve adicionar um elemento `title` à `head`. + +```js +assert.exists(document.querySelector('head > title')); +``` + +Você não deve permitir que o `title` seja maior do que 60 caracteres. + +```js +assert.isAtMost(document.querySelector('head > title')?.textContent?.length, 60); +``` + +Tente ser mais descritivo com o elemento `title`. _Dica: use ao menos 15 caracteres_ + +```js +assert.isAtLeast(document.querySelector('head > title')?.textContent?.length, 15); +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + + + + +--fcc-editable-region-- + + + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614ccc21ea91ef1736b9b578.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614ccc21ea91ef1736b9b578.md new file mode 100644 index 00000000000..934f6252802 --- /dev/null +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614ccc21ea91ef1736b9b578.md @@ -0,0 +1,50 @@ +--- +id: 614ccc21ea91ef1736b9b578 +title: Etapa 1 +challengeType: 0 +dashedName: step-1 +--- + +# --description-- + +Boas-vindas à primeira parte do questionário com acessibilidade. Como você está se tornando um desenvolvedor HTML e CSS experiente, já iniciaremos com o boilerplate básico. + +Inicie esta jornada de acessibilidade, fornecendo um atributo `lang` ao seu elemento `html`. Isto ajudará os leitores de tela a identificar o idioma da página. + +# --hints-- + +Você deve dar ao elemento `html` um atributo `lang`. _Dica: você pode usar o valor `en` para o inglês._ + +```js +assert.match(code, //i); +// TODO: This should/could be fixed in the builder.js +// assert.notThrow(Intl.getCanonicalLocales(document.querySelector('html').lang)); +``` + +# --seed-- + +## --seed-contents-- + +```html + +--fcc-editable-region-- + + + + + + + + +--fcc-editable-region-- + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/ukrainian/03-front-end-development-libraries/redux/write-a-counter-with-redux.md b/curriculum/challenges/ukrainian/03-front-end-development-libraries/redux/write-a-counter-with-redux.md index 277287f25ca..3529abd0129 100644 --- a/curriculum/challenges/ukrainian/03-front-end-development-libraries/redux/write-a-counter-with-redux.md +++ b/curriculum/challenges/ukrainian/03-front-end-development-libraries/redux/write-a-counter-with-redux.md @@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT); Сховище Redux повинне ініціалізуватися із `state`, що дорівнює 0. ```js -assert(store.getState() === 0); +assert(_store.getState() === 0); ``` Відправлення `incAction` у сховище Redux має збільшити `state` на 1. @@ -39,9 +39,9 @@ assert(store.getState() === 0); ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(incAction()); - const incState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(incAction()); + const incState = _store.getState(); return initialState + 1 === incState; })() ); @@ -52,9 +52,9 @@ assert( ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(decAction()); - const decState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(decAction()); + const decState = _store.getState(); return initialState - 1 === decState; })() ); @@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing const store = null; // Define the Redux store here, passing in your reducers ``` +## --after-user-code-- + +```js +const _store = Redux.createStore(counterReducer) +``` + # --solutions-- ```js