chore(i18n,learn): processed translations (#41378)

* chore(i8n,learn): processed translations

* Update curriculum/challenges/chinese/01-responsive-web-design/applied-visual-design/use-the-u-tag-to-underline-text.md

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
This commit is contained in:
camperbot
2021-03-05 08:43:24 -07:00
committed by GitHub
parent ae79525493
commit 5075f14248
120 changed files with 975 additions and 971 deletions

View File

@ -1,6 +1,6 @@
---
id: cf1111c1c11feddfaeb7bdef
title: Nest one Array within Another Array
title: Anida un arreglo dentro de otro arreglo
challengeType: 1
videoUrl: 'https://scrimba.com/c/crZQZf8'
forumTopicId: 18247
@ -9,21 +9,21 @@ dashedName: nest-one-array-within-another-array
# --description--
You can also nest arrays within other arrays, like below:
También puedes anidar arreglos dentro de otros arreglos, como a continuación:
```js
[["Bulls", 23], ["White Sox", 45]]
```
This is also called a <dfn>multi-dimensional array</dfn>.
Esto también es conocido como <dfn>arreglo multidimensional</dfn>.
# --instructions--
Create a nested array called `myArray`.
Crea un arreglo anidado llamado `myArray`.
# --hints--
`myArray` should have at least one array nested within another array.
`myArray` debe tener al menos un arreglo anidado dentro de otro arreglo.
```js
assert(Array.isArray(myArray) && myArray.some(Array.isArray));

View File

@ -1,6 +1,6 @@
---
id: 56533eb9ac21ba0edf2244bc
title: Shopping List
title: Lista de compras
challengeType: 1
videoUrl: 'https://scrimba.com/c/c9MEKHZ'
forumTopicId: 18280
@ -9,35 +9,35 @@ dashedName: shopping-list
# --description--
Create a shopping list in the variable `myList`. The list should be a multi-dimensional array containing several sub-arrays.
Crea una lista de compras en la variable `myList`. La lista debe ser un arreglo multidimensional que contenga varios sub-arreglos.
The first element in each sub-array should contain a string with the name of the item. The second element should be a number representing the quantity i.e.
El primer elemento de cada sub-arreglo debe contener una cadena con el nombre del artículo. El segundo elemento debe ser un número que represente la cantidad, por ejemplo.
`["Chocolate Bar", 15]`
There should be at least 5 sub-arrays in the list.
Debe haber al menos 5 sub-arreglos en la lista.
# --hints--
`myList` should be an array.
`myList` debe ser un arreglo.
```js
assert(isArray);
```
The first elements in each of your sub-arrays should all be strings.
Los primeros elementos de cada sub-arreglo deben ser cadenas.
```js
assert(hasString);
```
The second elements in each of your sub-arrays should all be numbers.
Los segundos elementos de cada sub-arreglo deben ser números.
```js
assert(hasNumber);
```
You should have at least 5 items in your list.
Debes tener al menos 5 elementos en tu lista.
```js
assert(count > 4);

View File

@ -1,6 +1,6 @@
---
id: 5cdafbc32913098997531680
title: Complete a Promise with resolve and reject
title: Cumple una Promesa con "Resolve" y "Reject"
challengeType: 1
forumTopicId: 301196
dashedName: complete-a-promise-with-resolve-and-reject
@ -8,7 +8,7 @@ dashedName: complete-a-promise-with-resolve-and-reject
# --description--
A promise has three states: `pending`, `fulfilled`, and `rejected`. The promise you created in the last challenge is forever stuck in the `pending` state because you did not add a way to complete the promise. The `resolve` and `reject` parameters given to the promise argument are used to do this. `resolve` is used when you want your promise to succeed, and `reject` is used when you want it to fail. These are methods that take an argument, as seen below.
Una promesa tiene tres estados: `pending`, `fulfilled`, y `rejected`. La promesa creada en el último desafío está atascada en el estado `pending` porque no añadiste una forma de completar la promesa. Los parámetros `resolve` y `reject` enviados a "promise" como argumentos, son utilizados para hacer lo siguiente. `resolve` se utiliza, cuando la promesa es cumplida y `reject` cuando es rechazada. Estos son métodos que toman un argumento, como se ve a continuación.
```js
const myPromise = new Promise((resolve, reject) => {
@ -20,15 +20,15 @@ const myPromise = new Promise((resolve, reject) => {
});
```
The example above uses strings for the argument of these functions, but it can really be anything. Often, it might be an object, that you would use data from, to put on your website or elsewhere.
El ejemplo anterior utiliza strings como argumento de las funciones, pero podrían ser cualquier otra cosa. A menudo, podría ser un objeto, del que utilizas datos, para colocar en tu sitio web o en otro lugar.
# --instructions--
Make the promise handle success and failure. If `responseFromServer` is `true`, call the `resolve` method to successfully complete the promise. Pass `resolve` a string with the value `We got the data`. If `responseFromServer` is `false`, use the `reject` method instead and pass it the string: `Data not received`.
Haga una función promesa que maneje el éxito y el fallo. Si `responseFromServer` es `true`, llame al método `resolve` para completar satisfactoriamente la promesa. `resolve` devuelve un string con el valor `We got the data`. Si `responseFromServer` es `false`, utilice el método `reject` y devuelva la cadena: `Data not received`.
# --hints--
`resolve` should be called with the expected string when the `if` condition is `true`.
`resolve` debe ser llamada con el string esperado, cuando la condición `if` es `true`.
```js
assert(
@ -40,7 +40,7 @@ assert(
);
```
`reject` should be called with the expected string when the `if` condition is `false`.
`reject` debe ser llamada con el string esperado, cuando la condición `if` es `false`.
```js
assert(

View File

@ -1,6 +1,6 @@
---
id: 5cdafbb0291309899753167f
title: Create a JavaScript Promise
title: Crea una promesa de JavaScript
challengeType: 1
forumTopicId: 301197
dashedName: create-a-javascript-promise
@ -8,7 +8,7 @@ dashedName: create-a-javascript-promise
# --description--
A promise in JavaScript is exactly what it sounds like - you use it to make a promise to do something, usually asynchronously. When the task completes, you either fulfill your promise or fail to do so. `Promise` is a constructor function, so you need to use the `new` keyword to create one. It takes a function, as its argument, with two parameters - `resolve` and `reject`. These are methods used to determine the outcome of the promise. The syntax looks like this:
Una promesa en JavaScript es exactamente lo que suena, la usas para hacer una promesa de hacer algo, normalmente de forma asíncrona. Cuando la tarea se complete, cumple su promesa o no la cumple. `Promise` es una función constructora, así que tu necesitas usar la palabra clave `new` para crear una. Toma una función como su argumento, con dos parámetros - `resolve` y `reject`. Estos son métodos utilizados para determinar el resultado de la promesa. La sintaxis se ve así:
```js
const myPromise = new Promise((resolve, reject) => {
@ -18,17 +18,17 @@ const myPromise = new Promise((resolve, reject) => {
# --instructions--
Create a new promise called `makeServerRequest`. Pass in a function with `resolve` and `reject` parameters to the constructor.
Crea una nueva promesa llamada `makeServerRequest`. Pase en una función con `resolve` y `reject` parámetros al constructor.
# --hints--
You should assign a promise to a declared variable named `makeServerRequest`.
Debes asignar una promesa a una variable declarada con el nombre `makeServerRequest`.
```js
assert(makeServerRequest instanceof Promise);
```
Your promise should receive a function with `resolve` and `reject` as parameters.
Tu promesa debe recibir una función con `resolve` y `reject` como parámetros.
```js
assert(
@ -41,7 +41,9 @@ assert(
# --seed--
## --seed-contents--
```js
```
# --solutions--

View File

@ -1,6 +1,6 @@
---
id: 5cdafbd72913098997531681
title: Handle a Fulfilled Promise with then
title: Maneja una promesa cumplida usando then
challengeType: 1
forumTopicId: 301203
dashedName: handle-a-fulfilled-promise-with-then
@ -8,23 +8,23 @@ dashedName: handle-a-fulfilled-promise-with-then
# --description--
Promises are most useful when you have a process that takes an unknown amount of time in your code (i.e. something asynchronous), often a server request. When you make a server request it takes some amount of time, and after it completes you usually want to do something with the response from the server. This can be achieved by using the `then` method. The `then` method is executed immediately after your promise is fulfilled with `resolve`. Heres an example:
Las promesas son muy útiles, cuando tu tienes un proceso que toma una cantidad de tiempo desconocida en tu código (algo asíncrono por ejemplo), a menudo una petición de servidor. Cuando tu haces una petición a un servidor, toma algo de tiempo, después de que termina, normalmente quieres hacer algo con la respuesta del servidor. Esto se puede lograr utilizando el método `then`. El método `then`, se ejecuta inmediatamente después de que tu promesa se cumple con `resolve`. A continuación un ejemplo:
```js
myPromise.then(result => {
// do something with the result.
});
```
`result` comes from the argument given to the `resolve` method.
`result` viene con el argumento proporcionado al método `resolve`.
# --instructions--
Add the `then` method to your promise. Use `result` as the parameter of its callback function and log `result` to the console.
Añade el método `then` a tu promesa. Usa `result` como parámetro de tu función callback, asimismo imprime `result` en la consola.
# --hints--
You should call the `then` method on the promise.
Debes llamar al método `then` en la promesa.
```js
assert(
@ -32,13 +32,13 @@ assert(
);
```
Your `then` method should have a callback function with `result` as its parameter.
El método `then`, debe tener una función callback con `result` como parámetro.
```js
assert(resultIsParameter);
```
You should log `result` to the console.
Debes imprimir `result` en la consola.
```js
assert(

View File

@ -1,6 +1,6 @@
---
id: 5cdafbe72913098997531682
title: Handle a Rejected Promise with catch
title: Maneja una promesa rechazada usando catch
challengeType: 1
forumTopicId: 301204
dashedName: handle-a-rejected-promise-with-catch
@ -8,23 +8,23 @@ dashedName: handle-a-rejected-promise-with-catch
# --description--
`catch` is the method used when your promise has been rejected. It is executed immediately after a promise's `reject` method is called. Heres the syntax:
`catch` es el método utilizado cuando tu promesa ha sido rechazada. Se ejecuta inmediatamente, después de que se llama al método `reject` de una promesa. A continuación la sintaxis:
```js
myPromise.catch(error => {
// do something with the error.
});
```
`error` is the argument passed in to the `reject` method.
`error` es el argumento pasado al método `reject`.
# --instructions--
Add the `catch` method to your promise. Use `error` as the parameter of its callback function and log `error` to the console.
Añade el método `catch` a tu promesa. Usa `error` como el parámetro de tu función callback e imprime `error` en la consola.
# --hints--
You should call the `catch` method on the promise.
Debes llamar al método `catch` en la promesa.
```js
assert(
@ -32,13 +32,13 @@ assert(
);
```
Your `catch` method should have a callback function with `error` as its parameter.
El método `catch`, debe tener una función callback con `error` como parámetro.
```js
assert(errorIsParameter);
```
You should log `error` to the console.
Debes imprimir `error` en la consola.
```js
assert(