chore(i18n,curriculum): update translations (#44346)

This commit is contained in:
camperbot
2021-12-03 01:21:50 -08:00
committed by GitHub
parent 6af8ee6528
commit cd4d53f4c0
10 changed files with 90 additions and 74 deletions

View File

@ -9,9 +9,9 @@ dashedName: use-the-css-transform-property-skewx-to-skew-an-element-along-the-x-
# --description-- # --description--
接下來要介紹的 `transform` 屬性是 `skewX()`:它使選擇的元素沿着 X 軸(橫向)翻轉指定的角度。 接下來要介紹的 `transform` 屬性是 `skewX()`:它使選擇的元素沿着 X 軸(橫向)傾斜指定的角度。
下面的代碼沿着 X 軸翻轉段落元素 -32 度。 下面的代碼沿着 X 軸傾斜段落元素 -32 度。
```css ```css
p { p {
@ -21,11 +21,11 @@ p {
# --instructions-- # --instructions--
使用 `transform` 屬性沿 X 軸翻轉 id 爲 `bottom` 的元素 24 度。 使用 `transform` 屬性沿 X 軸傾斜 id 爲 `bottom` 的元素 24 度。
# --hints-- # --hints--
id 爲 `bottom` 的元素應該沿着 X 軸翻轉 24 度。 id 爲 `bottom` 的元素應該沿着 X 軸傾斜 24 度。
```js ```js
assert(code.match(/#bottom\s*?{\s*?.*?\s*?transform:\s*?skewX\(24deg\);/g)); assert(code.match(/#bottom\s*?{\s*?.*?\s*?transform:\s*?skewX\(24deg\);/g));

View File

@ -20,11 +20,13 @@ dashedName: use-the--env-file
當向 `/json` 發 GET 請求時,如果 `process.env.MESSAGE_STYLE` 的值爲 `uppercase`,那麼上一次挑戰中的路由處理程序返回的對象的消息則應該大寫。 響應對象應該是 `{"message": "Hello json"}` or `{"message": "HELLO JSON"}`,取決於 `MESSAGE_STYLE` 的值。 當向 `/json` 發 GET 請求時,如果 `process.env.MESSAGE_STYLE` 的值爲 `uppercase`,那麼上一次挑戰中的路由處理程序返回的對象的消息則應該大寫。 響應對象應該是 `{"message": "Hello json"}` or `{"message": "HELLO JSON"}`,取決於 `MESSAGE_STYLE` 的值。
**注意:**如果你正在使用 Replit你無法創建一個 `.env` 文件。 相反,使用內置的 <dfn>SECRETS</dfn> 標籤添加變量。 **注意:** 如果你正在使用 Replit你無法創建一個 `.env` 文件。 相反,使用內置的 <dfn>SECRETS</dfn> 標籤添加變量。
如果你在本地工作,你將需要 `dotenv` 包。 它將環境變量從你的 `.env` 文件加載到 `process.env` 中。 使用 `npm install dotenv` 安裝它。 然後,在 `myApp.js` 文件的頂部,使用 `require('dotenv').config()` 導入和加載變量。
# --hints-- # --hints--
`/json` 響應的值,應該隨着環境變量 `MESSAGE_STYLE` 的變化而改變 `/json` 響應應該根據環境變量 `MESSAGE_STYLE` 改變
```js ```js
(getUserInput) => (getUserInput) =>

View File

@ -9,9 +9,9 @@ dashedName: use-the-css-transform-property-skewx-to-skew-an-element-along-the-x-
# --description-- # --description--
接下来要介绍的 `transform` 属性是 `skewX()`:它使选择的元素沿着 X 轴(横向)翻转指定的角度。 接下来要介绍的 `transform` 属性是 `skewX()`:它使选择的元素沿着 X 轴(横向)倾斜指定的角度。
下面的代码沿着 X 轴翻转段落元素 -32 度。 下面的代码沿着 X 轴倾斜段落元素 -32 度。
```css ```css
p { p {
@ -21,11 +21,11 @@ p {
# --instructions-- # --instructions--
使用 `transform` 属性沿 X 轴翻转 id 为 `bottom` 的元素 24 度。 使用 `transform` 属性沿 X 轴倾斜 id 为 `bottom` 的元素 24 度。
# --hints-- # --hints--
id 为 `bottom` 的元素应该沿着 X 轴翻转 24 度。 id 为 `bottom` 的元素应该沿着 X 轴倾斜 24 度。
```js ```js
assert(code.match(/#bottom\s*?{\s*?.*?\s*?transform:\s*?skewX\(24deg\);/g)); assert(code.match(/#bottom\s*?{\s*?.*?\s*?transform:\s*?skewX\(24deg\);/g));

View File

@ -20,11 +20,13 @@ dashedName: use-the--env-file
当向 `/json` 发 GET 请求时,如果 `process.env.MESSAGE_STYLE` 的值为 `uppercase`,那么上一次挑战中的路由处理程序返回的对象的消息则应该大写。 响应对象应该是 `{"message": "Hello json"}` or `{"message": "HELLO JSON"}`,取决于 `MESSAGE_STYLE` 的值。 当向 `/json` 发 GET 请求时,如果 `process.env.MESSAGE_STYLE` 的值为 `uppercase`,那么上一次挑战中的路由处理程序返回的对象的消息则应该大写。 响应对象应该是 `{"message": "Hello json"}` or `{"message": "HELLO JSON"}`,取决于 `MESSAGE_STYLE` 的值。
**注意:**如果你正在使用 Replit你无法创建一个 `.env` 文件。 相反,使用内置的 <dfn>SECRETS</dfn> 标签添加变量。 **注意:** 如果你正在使用 Replit你无法创建一个 `.env` 文件。 相反,使用内置的 <dfn>SECRETS</dfn> 标签添加变量。
如果你在本地工作,你将需要 `dotenv` 包。 它将环境变量从你的 `.env` 文件加载到 `process.env` 中。 使用 `npm install dotenv` 安装它。 然后,在 `myApp.js` 文件的顶部,使用 `require('dotenv').config()` 导入和加载变量。
# --hints-- # --hints--
`/json` 响应的值,应该随着环境变量 `MESSAGE_STYLE` 的变化而改变 `/json` 响应应该根据环境变量 `MESSAGE_STYLE` 改变
```js ```js
(getUserInput) => (getUserInput) =>

View File

@ -1,6 +1,6 @@
--- ---
id: 587d824c367417b2b2512c4d id: 587d824c367417b2b2512c4d
title: Compare the Properties of Two Elements title: Compara las propiedades de dos elementos
challengeType: 2 challengeType: 2
forumTopicId: 301588 forumTopicId: 301588
dashedName: compare-the-properties-of-two-elements dashedName: compare-the-properties-of-two-elements
@ -8,15 +8,15 @@ dashedName: compare-the-properties-of-two-elements
# --description-- # --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/). Como recordatorio, este proyecto está siendo construido con base en el siguiente proyecto inicial [Repl.it](https://replit.com/github/freeCodeCamp/boilerplate-mochachai), o clonado desde [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
# --instructions-- # --instructions--
Within `tests/1_unit-tests.js` under the test labelled `#8` in the `Comparisons` suite, change each `assert` to either `assert.isAbove` or `assert.isAtMost` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts. Dentro de `tests/1_unit-tests.js` bajo la prueba etiquetada `#8` en `Comparisons` suite, cambiar cada `assert` a `assert.isAbove` o `assert.isAtMost` para que el test sea superado (debe evaluarse a `true`). No modifiques los argumentos pasados a los verificadores.
# --hints-- # --hints--
All tests should pass. Todas las pruebas deben pasar.
```js ```js
(getUserInput) => (getUserInput) =>
@ -30,7 +30,7 @@ All tests should pass.
); );
``` ```
You should choose the correct method for the first assertion - `isAbove` vs. `isAtMost`. Debe elegir el método correcto para la primera aserción - `isAbove` vs. `isAtMost`.
```js ```js
(getUserInput) => (getUserInput) =>
@ -48,7 +48,7 @@ You should choose the correct method for the first assertion - `isAbove` vs. `is
); );
``` ```
You should choose the correct method for the second assertion - `isAbove` vs. `isAtMost`. Debe elegir el método correcto para la segunda aserción - `isAbove` vs. `isAtMost`.
```js ```js
(getUserInput) => (getUserInput) =>
@ -62,7 +62,7 @@ You should choose the correct method for the second assertion - `isAbove` vs. `i
); );
``` ```
You should choose the correct method for the third assertion - `isAbove` vs. `isAtMost`. Debe elegir el método correcto para la tercera aserción - `isAbove` vs. `isAtMost`.
```js ```js
(getUserInput) => (getUserInput) =>
@ -80,7 +80,7 @@ You should choose the correct method for the third assertion - `isAbove` vs. `is
); );
``` ```
You should choose the correct method for the fourth assertion - `isAbove` vs. `isAtMost`. Debe elegir el método correcto para la cuarta aserción - `isAbove` vs. `isAtMost`.
```js ```js
(getUserInput) => (getUserInput) =>

View File

@ -1,6 +1,6 @@
--- ---
id: 587d824a367417b2b2512c46 id: 587d824a367417b2b2512c46
title: Learn How JavaScript Assertions Work title: Aprende cómo funcionan las aserciones de JavaScript
challengeType: 2 challengeType: 2
forumTopicId: 301589 forumTopicId: 301589
dashedName: learn-how-javascript-assertions-work dashedName: learn-how-javascript-assertions-work
@ -8,21 +8,21 @@ dashedName: learn-how-javascript-assertions-work
# --description-- # --description--
Working on these challenges will involve you writing your code using one of the following methods: Trabajar en estos desafíos implica escribir tu código usando uno de los siguientes métodos:
- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-mochachai/) and complete these challenges locally. - Clona [este repositorio de Github](https://github.com/freeCodeCamp/boilerplate-mochachai/) y completa estos desafíos localmente.
- Use [our Replit starter project](https://replit.com/github/freeCodeCamp/boilerplate-mochachai) to complete these challenges. - Use [nuetro proyecto inicial de Replit](https://replit.com/github/freeCodeCamp/boilerplate-mochachai) para completar estos retos.
- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo. - Utiliza un constructor de sitios web de tu elección para completar el proyecto. Asegúrate de incorporar todos los archivos de nuestro repositorio de GitHub.
When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Cuando hayas terminado, asegúrate de que un demo funcional de tu proyecto esté alojado en algún lugar público. Luego, envía la URL en el campo `Solution Link`.
# --instructions-- # --instructions--
Within `tests/1_unit-tests.js` under the test labelled `#1` in the `Basic Assertions` suite, change each `assert` to either `assert.isNull` or `assert.isNotNull` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts. Dentro de `tests/1_unit-tests.js` bajo la prueba etiquetada `#1` en la `Basic Assertions`, cambiar cada `assert` a `assert.isNull` o `assert.isNotNull` para que la prueba sea superada (debe evaluar a `true`). No modifiques los argumentos pasados a los verificadores.
# --hints-- # --hints--
All tests should pass. Todas las pruebas deben pasar.
```js ```js
(getUserInput) => (getUserInput) =>
@ -36,7 +36,7 @@ All tests should pass.
); );
``` ```
You should choose the correct method for the first assertion - `isNull` vs. `isNotNull`. Debe elegir el método correcto para la primera aserción - `isNull` vs. `isNotNull`.
```js ```js
(getUserInput) => (getUserInput) =>
@ -50,7 +50,7 @@ You should choose the correct method for the first assertion - `isNull` vs. `isN
); );
``` ```
You should choose the correct method for the second assertion - `isNull` vs. `isNotNull`. Debe elegir el método correcto para la segunda aserción - `isNull` vs. `isNotNull`.
```js ```js
(getUserInput) => (getUserInput) =>

View File

@ -1,6 +1,6 @@
--- ---
id: 587d824f367417b2b2512c5a id: 587d824f367417b2b2512c5a
title: Run Functional Tests on an API Response using Chai-HTTP III - PUT method title: Ejecutar pruebas funcionales en la respuesta de un API usando Chai-HTTP III - método PUT
challengeType: 2 challengeType: 2
forumTopicId: 301590 forumTopicId: 301590
dashedName: run-functional-tests-on-an-api-response-using-chai-http-iii---put-method dashedName: run-functional-tests-on-an-api-response-using-chai-http-iii---put-method
@ -8,31 +8,39 @@ dashedName: run-functional-tests-on-an-api-response-using-chai-http-iii---put-me
# --description-- # --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/). Como recordatorio, este proyecto está siendo construido con base en el siguiente proyecto inicial [Repl.it](https://replit.com/github/freeCodeCamp/boilerplate-mochachai), o clonado desde [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
In the next example we'll see how to send data in a request payload (body). We are going to test a PUT request. The `'/travellers'` endpoint accepts a JSON object taking the structure: Cuando se prueba una solicitud `PUT`, a menudo enviarás datos junto con ella. Los datos que incluye con su solicitud `PUT` se llama el body de la petición.
Para enviar una petición `PUT` y un objeto JSON al endpoint `'/travellers'`, puedes usar el complemento `chai-http`, con los métodos `put` y `send`:
```js
chai
.request(server)
.put('/travellers')
.send({
"surname": [last name of a traveller of the past]
})
...
```
Y la ruta responde con:
```json ```json
{ {
"surname": [last name of a traveller of the past] "name": [first name],
"surname": [last name],
"dates": [birth - death years]
} }
``` ```
The route responds with : Vea el código del servidor para las diferentes respuestas del endpoint `'/travellers'`.
```json
{
"name": [first name], "surname": [last name], "dates": [birth - death years]
}
```
See the server code for more details.
# --instructions-- # --instructions--
Within `tests/2_functional-tests.js`, alter the `'send {surname: "Colombo"}'` test (`// #3`): Dentro de `tests/2_functional-tests.js`, arregla el test `'Send {surname: "Colombo"}'` (`// #3`), use los métodos `put` y `send` para testear el endpoint `'/travellers'`.
Send the following JSON response as a payload: Enviar el siguiente objeto JSON con su solicitud PUT:
```json ```json
{ {
@ -40,18 +48,18 @@ Send the following JSON response as a payload:
} }
``` ```
Check for the following, within the `request.end` callback: Compruebe lo siguiente dentro del callback `request.end`:
1. `status` 1. El `status` debe ser `200`
2. `type` 2. El `type` debe ser `application/json`
3. `body.name` 3. El `body.name` debe ser `Cristoforo`
4. `body.surname` 4. El `body.surname` debe ser `Colombo`
Follow the assertion order above - we rely on it. Be sure to remove `assert.fail()`, once complete. Sigue el orden de las aserciones de arriba - nos basamos en esto. También, asegúrese de eliminar `assert.fail()` una vez completado.
# --hints-- # --hints--
All tests should pass. Todas las pruebas deben pasar.
```js ```js
(getUserInput) => (getUserInput) =>
@ -65,7 +73,7 @@ All tests should pass.
); );
``` ```
You should test for 'res.status' to be 200. Debes comprobar que `res.status` sea 200.
```js ```js
(getUserInput) => (getUserInput) =>
@ -81,7 +89,7 @@ You should test for 'res.status' to be 200.
); );
``` ```
You should test for 'res.type' to be 'application/json'. Debes comprobar que `res.type` sea `'application/json'`.
```js ```js
(getUserInput) => (getUserInput) =>
@ -97,7 +105,7 @@ You should test for 'res.type' to be 'application/json'.
); );
``` ```
You should test for 'res.body.name' to be 'Cristoforo'. Debes comprobar que `res.body.name` sea `'Cristoforo'`.
```js ```js
(getUserInput) => (getUserInput) =>
@ -113,7 +121,7 @@ You should test for 'res.body.name' to be 'Cristoforo'.
); );
``` ```
You should test for 'res.body.surname' to be 'Colombo'. Debes comprobar que `res.body.surname` sea `'Colombo'`.
```js ```js
(getUserInput) => (getUserInput) =>

View File

@ -1,6 +1,6 @@
--- ---
id: 587d824f367417b2b2512c5b id: 587d824f367417b2b2512c5b
title: Run Functional Tests on an API Response using Chai-HTTP IV - PUT method title: Ejecutar pruebas funcionales en la respuesta de un API usando Chai-HTTP IV - método PUT
challengeType: 2 challengeType: 2
forumTopicId: 301591 forumTopicId: 301591
dashedName: run-functional-tests-on-an-api-response-using-chai-http-iv---put-method dashedName: run-functional-tests-on-an-api-response-using-chai-http-iv---put-method
@ -8,15 +8,17 @@ dashedName: run-functional-tests-on-an-api-response-using-chai-http-iv---put-met
# --description-- # --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/). This exercise is similar to the preceding one. Look at it for the details. Como recordatorio, este proyecto está siendo construido con base en el siguiente proyecto inicial [Repl.it](https://replit.com/github/freeCodeCamp/boilerplate-mochachai), o clonado desde [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
Now that you have seen how it is done, it is your turn to do it from scratch. Este ejercicio es similar al anterior.
Ahora que sabes cómo comprobar una petición `PUT`, es tu turno de hacerlo desde cero.
# --instructions-- # --instructions--
Within `tests/2_functional-tests.js`, alter the `'send {surname: "da Verrazzano"}'` test (`// #4`): Dentro de `tests/2_functional-tests.js`, modifica la prueba `'Send {surname: "da Verrazzano"}'` (`// #4`), usa los métodos `put` y `send` para probar el endpoint `'/travellers'`.
Send the following JSON response as a payload to the `/travellers` route: Envia el siguiente objeto JSON con tu solicitud PUT:
```json ```json
{ {
@ -24,18 +26,18 @@ Send the following JSON response as a payload to the `/travellers` route:
} }
``` ```
Check for the following, within a `request.end` callback: Compruebe lo siguiente dentro del callback `request.end`:
1. `status` 1. El `status` debe ser `200`
2. `type` 2. El `type` debe ser `application/json`
3. `body.name` 3. El `body.name` debe ser `Giovanni`
4. `body.surname` 4. El `body.surname` debe ser `da Verrazzano`
Follow the assertion order above - we rely on it. Be sure to remove `assert.fail()`, once complete. Sigue el orden de las aserciones de arriba - nos basamos en esto. Además, asegúrese de eliminar `assert.fail()` una vez completado.
# --hints-- # --hints--
All tests should pass Todas las pruebas deben pasar
```js ```js
(getUserInput) => (getUserInput) =>
@ -49,7 +51,7 @@ All tests should pass
); );
``` ```
You should test for 'res.status' to be 200 Debes comprobar que `res.status` sea 200
```js ```js
(getUserInput) => (getUserInput) =>
@ -65,7 +67,7 @@ You should test for 'res.status' to be 200
); );
``` ```
You should test for 'res.type' to be 'application/json' Debes comprobar que `res.type` sea `'application/json'`
```js ```js
(getUserInput) => (getUserInput) =>
@ -81,7 +83,7 @@ You should test for 'res.type' to be 'application/json'
); );
``` ```
You should test for 'res.body.name' to be 'Giovanni' Debes comprobar que `res.body.name` sea `'Giovanni'`
```js ```js
(getUserInput) => (getUserInput) =>
@ -97,7 +99,7 @@ You should test for 'res.body.name' to be 'Giovanni'
); );
``` ```
You should test for 'res.body.surname' to be 'da Verrazzano' Debes comprobar que `res.body.surname` sea `'da Verrazzano'`
```js ```js
(getUserInput) => (getUserInput) =>

View File

@ -16,6 +16,8 @@ Crie um aplicativo full stack em JavaScript que seja funcionalmente semelhante a
Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`.
**Observação:** a conversão de fusos horários não é um dos objetivos deste projeto, então suponha que todas as datas válidas enviadas serão analisadas com `new Date()` como datas GMT.
# --hints-- # --hints--
Você deve fornecer seu próprio projeto, não o exemplo de URL. Você deve fornecer seu próprio projeto, não o exemplo de URL.
@ -85,7 +87,7 @@ Seu projeto pode tratar as datas que podem ser analisadas com sucesso por `new D
```js ```js
(getUserInput) => (getUserInput) =>
$.get(getUserInput('url') + '/api/05 October 2011').then( $.get(getUserInput('url') + '/api/05 October 2011, GMT').then(
(data) => { (data) => {
assert( assert(
data.unix === 1317772800000 && data.unix === 1317772800000 &&

View File

@ -10,7 +10,7 @@ dashedName: problem-199-iterative-circle-packing
Três círculos de raio igual são colocados dentro de um círculo maior, de tal forma que cada par de círculos é tangente entre si e os círculos internos não se sobrepõem. Há quatro "lacunas" descobertas que devem ser preenchidas iterativamente com mais círculos tangentes. Três círculos de raio igual são colocados dentro de um círculo maior, de tal forma que cada par de círculos é tangente entre si e os círculos internos não se sobrepõem. Há quatro "lacunas" descobertas que devem ser preenchidas iterativamente com mais círculos tangentes.
<img class="img-responsive center-block" alt="um diagrama de círculos concêntricos não sobrepostos" src="https://cdn-media-1.freecodecamp.org/project-euler/199-circles-in-circles.gif" style="background-color: white; padding: 10px;" /> <img class="img-responsive center-block" alt="um diagrama de círculos não sobrepostos" src="https://cdn-media-1.freecodecamp.org/project-euler/199-circles-in-circles.gif" style="background-color: white; padding: 10px;" />
A cada iteração, um círculo de tamanho máximo é colocado em cada lacuna, o que cria mais lacunas para a próxima iteração. Após 3 iterações (na figura), há 108 lacunas e a fração da área que não é coberta pelos círculos é de 0, 6790342, arredondado para oito casas decimais. A cada iteração, um círculo de tamanho máximo é colocado em cada lacuna, o que cria mais lacunas para a próxima iteração. Após 3 iterações (na figura), há 108 lacunas e a fração da área que não é coberta pelos círculos é de 0, 6790342, arredondado para oito casas decimais.