chore(i8n,curriculum): processed translations (#41617)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
CamperBot
2021-03-29 22:47:35 +09:00
committed by GitHub
parent 87684ad630
commit 08caf09e5c
24 changed files with 186 additions and 151 deletions

View File

@ -1,6 +1,6 @@
---
id: 587d7db5367417b2b2512b94
title: Match Anything with Wildcard Period
title: Haz coincidir cualquier cosa con el comodín punto
challengeType: 1
forumTopicId: 301348
dashedName: match-anything-with-wildcard-period
@ -8,72 +8,74 @@ dashedName: match-anything-with-wildcard-period
# --description--
Sometimes you won't (or don't need to) know the exact characters in your patterns. Thinking of all words that match, say, a misspelling would take a long time. Luckily, you can save time using the wildcard character: `.`
A veces no conoces (o no necesitas conocer) los caracteres exactos en tus patrones. Pensar en todas las palabras que coincidan, digamos, con una ortografía errónea llevaría mucho tiempo. Afortunadamente, puedes ahorrar tiempo utilizando el carácter de comodín: `.`
The wildcard character `.` will match any one character. The wildcard is also called `dot` and `period`. You can use the wildcard character just like any other character in the regex. For example, if you wanted to match `"hug"`, `"huh"`, `"hut"`, and `"hum"`, you can use the regex `/hu./` to match all four words.
El carácter de comodín `.` coincidirá con cualquier carácter único. El comodín también es llamado `dot` y `period`. Puedes utilizar el carácter de comodín como cualquier otro carácter en la expresión regular. Por ejemplo, si quieres hacer coincidir `hug`, `huh`, `hut`, y `hum`, puedes usar la la expresión regular `/hu./` para que coincida con las cuatro palabras.
```js
let humStr = "I'll hum a song";
let hugStr = "Bear hug";
let huRegex = /hu./;
huRegex.test(humStr); // Returns true
huRegex.test(hugStr); // Returns true
huRegex.test(humStr);
huRegex.test(hugStr);
```
Ambas llamadas a `test` devolverán `true`.
# --instructions--
Complete the regex `unRegex` so that it matches the strings `"run"`, `"sun"`, `"fun"`, `"pun"`, `"nun"`, and `"bun"`. Your regex should use the wildcard character.
Completa la expresión regular `unRegex` para que coincida con las cadenas `run`, `sun`, `fun`, `pun`, `nun`, y `bun`. Tu expresión regular debe usar el carácter de comodín.
# --hints--
You should use the `.test()` method.
Debes usar el método `.test()`.
```js
assert(code.match(/\.test\(.*\)/));
```
You should use the wildcard character in your regex `unRegex`
Debes usar el carácter de comodín en tu expresión regular `unRegex`
```js
assert(/\./.test(unRegex.source));
```
Your regex `unRegex` should match `"run"` in `"Let us go on a run."`
Tu expresión regular `unRegex` debe coincidir con `run` en la cadena `Let us go on a run.`
```js
unRegex.lastIndex = 0;
assert(unRegex.test('Let us go on a run.'));
```
Your regex `unRegex` should match `"sun"` in `"The sun is out today."`
Tu expresión regular `unRegex` debe coincidir con `sun` en la cadena `The sun is out today.`
```js
unRegex.lastIndex = 0;
assert(unRegex.test('The sun is out today.'));
```
Your regex `unRegex` should match `"fun"` in `"Coding is a lot of fun."`
Tu expresión regular `unRegex` debe coincidir con `fun` en la cadena `Coding is a lot of fun.`
```js
unRegex.lastIndex = 0;
assert(unRegex.test('Coding is a lot of fun.'));
```
Your regex `unRegex` should match `"pun"` in `"Seven days without a pun makes one weak."`
Tu expresión regular `unRegex` debe coincidir con `pun` en la cadena `Seven days without a pun makes one weak.`
```js
unRegex.lastIndex = 0;
assert(unRegex.test('Seven days without a pun makes one weak.'));
```
Your regex `unRegex` should match `"nun"` in `"One takes a vow to be a nun."`
Tu expresión regular `unRegex` debe coincidir con `nun` en la cadena `One takes a vow to be a nun.`
```js
unRegex.lastIndex = 0;
assert(unRegex.test('One takes a vow to be a nun.'));
```
Your regex `unRegex` should match `"bun"` in `"She got fired from the hot dog stand for putting her hair in a bun."`
Tu expresión regular `unRegex` debe coincidir con `bun` en la cadena `She got fired from the hot dog stand for putting her hair in a bun.`
```js
unRegex.lastIndex = 0;
@ -84,14 +86,14 @@ assert(
);
```
Your regex `unRegex` should not match `"There is a bug in my code."`
Tu expresión regular `unRegex` no debe coincidir con la cadena `There is a bug in my code.`
```js
unRegex.lastIndex = 0;
assert(!unRegex.test('There is a bug in my code.'));
```
Your regex `unRegex` should not match `"Catch me if you can."`
Tu expresión regular `unRegex` no debe coincidir con la cadena `Catch me if you can.`
```js
unRegex.lastIndex = 0;

View File

@ -1,6 +1,6 @@
---
id: 587d7db7367417b2b2512b9d
title: Match Beginning String Patterns
title: Haz coincidir patrones de cadena de inicio
challengeType: 1
forumTopicId: 301349
dashedName: match-beginning-string-patterns
@ -8,45 +8,45 @@ dashedName: match-beginning-string-patterns
# --description--
Prior challenges showed that regular expressions can be used to look for a number of matches. They are also used to search for patterns in specific positions in strings.
Los desafíos anteriores demostraron que las expresiones regulares pueden ser utilizadas para buscar una serie de coincidencias. También se utilizan para buscar patrones en posiciones específicas en cadenas.
In an earlier challenge, you used the caret character (`^`) inside a character set to create a negated character set in the form `[^thingsThatWillNotBeMatched]`. Outside of a character set, the caret is used to search for patterns at the beginning of strings.
En un desafío anterior, usaste el carácter caret (`^`) dentro de un conjunto de caracteres para crear un conjunto de caracteres en la forma `[^thingsThatWillNotBeMatched]`. Fuera de un conjunto de caracteres, el caret es utilizado para buscar patrones al principio de las cadenas.
```js
let firstString = "Ricky is first and can be found.";
let firstRegex = /^Ricky/;
firstRegex.test(firstString);
// Returns true
let notFirst = "You can't find Ricky now.";
firstRegex.test(notFirst);
// Returns false
```
La primera llamada `test` devolverá `true`, mientras que la segunda retornara `false`.
# --instructions--
Use the caret character in a regex to find `"Cal"` only in the beginning of the string `rickyAndCal`.
Usa el carácter caret en una expresión para buscar `Cal` solo al principio de la cadena `rickyAndCal`.
# --hints--
Your regex should search for `"Cal"` with a capital letter.
Tu expresión regular debe buscar la cadena `Cal` con una letra mayúscula.
```js
assert(calRegex.source == '^Cal');
```
Your regex should not use any flags.
Tu expresión regular no debería usar ninguna etiqueta.
```js
assert(calRegex.flags == '');
```
Your regex should match `"Cal"` at the beginning of the string.
Tu expresión regular debe coincidir con la cadena `Cal` en el inicio de la cadena.
```js
assert(calRegex.test('Cal and Ricky both like racing.'));
```
Your regex should not match `"Cal"` in the middle of a string.
Tu expresión regular debe coincidir con la cadena `Cal` en medio de la cadena.
```js
assert(!calRegex.test('Ricky and Cal both like racing.'));

View File

@ -1,6 +1,6 @@
---
id: 587d7db6367417b2b2512b99
title: Match Characters that Occur One or More Times
title: Haz coincidir caracteres que aparecen una o más veces
challengeType: 1
forumTopicId: 301350
dashedName: match-characters-that-occur-one-or-more-times
@ -8,33 +8,33 @@ dashedName: match-characters-that-occur-one-or-more-times
# --description--
Sometimes, you need to match a character (or group of characters) that appears one or more times in a row. This means it occurs at least once, and may be repeated.
A veces, es necesario coincidir con un carácter (o grupo de caracteres) que aparezca una o más veces seguidas. Esto significa que aparece al menos una vez, y puede repetirse.
You can use the `+` character to check if that is the case. Remember, the character or pattern has to be present consecutively. That is, the character has to repeat one after the other.
Puedes usar el carácter `+` para comprobar si es así. Recuerda, el carácter o patrón debe estar presente consecutivamente. Es decir, el carácter tiene que repetirse uno tras otro.
For example, `/a+/g` would find one match in `"abc"` and return `["a"]`. Because of the `+`, it would also find a single match in `"aabc"` and return `["aa"]`.
Por ejemplo, `/a+/g` encontraría una coincidencia en `abc` y regresaría `["a"]`. Debido al `+`, también encontraría una sola coincidencia en `aabc` y regresaría `["aa"]`.
If it were instead checking the string `"abab"`, it would find two matches and return `["a", "a"]` because the `a` characters are not in a row - there is a `b` between them. Finally, since there is no `"a"` in the string `"bcd"`, it wouldn't find a match.
Si en su lugar estuvieras comprobando la cadena `abab`, se encontrarían dos coincidencias y regresaría `["a", "a"]` porque los caracteres `a` no están en fila; hay una `b` entre ellos. Finalmente, dado que no hay una `a` en la cadena `bcd`, no se encontraría una coincidencia.
# --instructions--
You want to find matches when the letter `s` occurs one or more times in `"Mississippi"`. Write a regex that uses the `+` sign.
Quieres encontrar coincidencias cuando la letra `s` ocurre una o más veces en `Mississippi`. Escribe una expresión regular que utilice el signo `+`.
# --hints--
Your regex `myRegex` should use the `+` sign to match one or more `s` characters.
Tu expresión regular `myRegex` debe utilizar el signo `+` para coincidir con uno o más caracteres de `s`.
```js
assert(/\+/.test(myRegex.source));
```
Your regex `myRegex` should match 2 items.
Tu expresión regular `myRegex` debe coincidir con 2 elementos.
```js
assert(result.length == 2);
```
The `result` variable should be an array with two matches of `"ss"`
La variable `result` debe ser un arreglo con dos coincidencias de `ss`
```js
assert(result[0] == 'ss' && result[1] == 'ss');

View File

@ -1,6 +1,6 @@
---
id: 587d7db6367417b2b2512b9a
title: Match Characters that Occur Zero or More Times
title: Haz coincidir caracteres que aparecen cero o más veces
challengeType: 1
forumTopicId: 301351
dashedName: match-characters-that-occur-zero-or-more-times
@ -8,51 +8,53 @@ dashedName: match-characters-that-occur-zero-or-more-times
# --description--
The last challenge used the plus `+` sign to look for characters that occur one or more times. There's also an option that matches characters that occur zero or more times.
El último desafío utilizó el signo más `+` para buscar caracteres que aparecen una o más veces. También hay una opción para hacer coincidir caracteres que aparecen cero o más veces.
The character to do this is the asterisk or star: `*`.
El carácter que hace esto es el asterisco o la estrella: `*`.
```js
let soccerWord = "gooooooooal!";
let gPhrase = "gut feeling";
let oPhrase = "over the moon";
let goRegex = /go*/;
soccerWord.match(goRegex); // Returns ["goooooooo"]
gPhrase.match(goRegex); // Returns ["g"]
oPhrase.match(goRegex); // Returns null
soccerWord.match(goRegex);
gPhrase.match(goRegex);
oPhrase.match(goRegex);
```
En orden, los tres `match` devolverán los valores `["goooooooo"]`, `["g"]`, y `null`.
# --instructions--
For this challenge, `chewieQuote` has been initialized as "Aaaaaaaaaaaaaaaarrrgh!" behind the scenes. Create a regex `chewieRegex` that uses the `*` character to match an uppercase `"A"` character immediately followed by zero or more lowercase `"a"` characters in `chewieQuote`. Your regex does not need flags or character classes, and it should not match any of the other quotes.
Para este desafío, `chewieQuote` ha sido inicializada entre bastidores con la cadena `Aaaaaaaaaaaaaaaarrrgh!`. Crea una expresión regular `chewieRegex` que utilice el carácter `*` para encontrar el carácter `A` mayúscula seguido inmediatamente por cero o más caracteres `a` minúscula en `chewieQuote`. Tu expresión regular no necesita banderas o clases de caracteres, y no debe coincidir con ninguna de las otras comillas.
# --hints--
Your regex `chewieRegex` should use the `*` character to match zero or more `a` characters.
Tu expresión regular `chewieRegex` debe utilizar el `*` para que coincida con cero o más caracteres `a`.
```js
assert(/\*/.test(chewieRegex.source));
```
Your regex should match `"A"` in `chewieQuote`.
Tu expresión regular debe coincidir con la cadena `A` en `chewieQuote`.
```js
assert(result[0][0] === 'A');
```
Your regex should match `"Aaaaaaaaaaaaaaaa"` in `chewieQuote`.
Tu expresión regular debe coincidir con la cadena `Aaaaaaaaaaaaaaaa` en `chewieQuote`.
```js
assert(result[0] === 'Aaaaaaaaaaaaaaaa');
```
Your regex `chewieRegex` should match 16 characters in `chewieQuote`.
Tu expresión regular `chewieRegex` debe coincidir con 16 caracteres en `chewieQuote`.
```js
assert(result[0].length === 16);
```
Your regex should not match any characters in "He made a fair move. Screaming about it can't help you."
Tu expresión regular no debe coincidir con ningún carácter con la cadena `He made a fair move. Screaming about it can't help you.`
```js
assert(
@ -60,7 +62,7 @@ assert(
);
```
Your regex should not match any characters in "Let him have it. It's not wise to upset a Wookiee."
Tu expresión regular no debe coincidir con ningún carácter con la cadena `Let him have it. It's not wise to upset a Wookiee.`
```js
assert(

View File

@ -1,6 +1,6 @@
---
id: 587d7db7367417b2b2512b9e
title: Match Ending String Patterns
title: Haz coincidir patrones de cadena final
challengeType: 1
forumTopicId: 301352
dashedName: match-ending-string-patterns
@ -8,40 +8,39 @@ dashedName: match-ending-string-patterns
# --description--
In the last challenge, you learned to use the caret character to search for patterns at the beginning of strings. There is also a way to search for patterns at the end of strings.
En el último desafío, aprendiste a usar el carácter de intercalación para buscar patrones al inicio de las cadenas. También hay una manera de buscar patrones al final de las cadenas.
You can search the end of strings using the dollar sign character `$` at the end of the regex.
Puedes buscar el final de las cadenas usando el carácter del signo de dólar `$` al final de la expresión regular.
```js
let theEnding = "This is a never ending story";
let storyRegex = /story$/;
storyRegex.test(theEnding);
// Returns true
let noEnding = "Sometimes a story will have to end";
storyRegex.test(noEnding);
// Returns false
```
La primera llamada a `test` devuelve `true`, mientras que la segunda retorna `false`.
# --instructions--
Use the anchor character (`$`) to match the string `"caboose"` at the end of the string `caboose`.
Usa el carácter de ancla (`$`) para coincidir la cadena `caboose` al final de la cadena `caboose`.
# --hints--
You should search for `"caboose"` with the dollar sign `$` anchor in your regex.
Debes buscar `caboose` con el ancla de signo de dólar `$` en tu expresión regular.
```js
assert(lastRegex.source == 'caboose$');
```
Your regex should not use any flags.
Tu expresión regular no debe usar ninguna bandera.
```js
assert(lastRegex.flags == '');
```
You should match `"caboose"` at the end of the string `"The last car on a train is the caboose"`
Debes coincidir `caboose` al final de la cadena `The last car on a train is the caboose`
```js
assert(lastRegex.test('The last car on a train is the caboose'));