From c1ee2720b3b95091a171bc36fc95c41dd51bf408 Mon Sep 17 00:00:00 2001 From: camperbot Date: Sat, 10 Apr 2021 01:58:02 +0900 Subject: [PATCH] chore(i18n,curriculum): update translations (#41787) --- .../access-array-data-with-indexes.md | 3 +-- ...s-multi-dimensional-arrays-with-indexes.md | 2 -- .../accessing-nested-objects.md | 3 +-- ...t-json-with-the-javascript-fetch-method.md | 6 ++--- .../access-array-data-with-indexes.md | 3 +-- ...s-multi-dimensional-arrays-with-indexes.md | 2 -- .../accessing-nested-objects.md | 3 +-- ...a-class-to-target-with-jquery-selectors.md | 8 +++---- .../bootstrap/create-a-custom-heading.md | 18 +++++++-------- .../jquery/disable-an-element-using-jquery.md | 22 ++++++++++--------- ...ove-classes-from-an-element-with-jquery.md | 18 ++++++++------- 11 files changed, 42 insertions(+), 46 deletions(-) diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md index cccb75c914..ff44d0b7de 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md @@ -76,10 +76,9 @@ if(typeof myArray !== "undefined" && typeof myData !== "undefined"){(function(y, ## --seed-contents-- ```js -// Setup var myArray = [50,60,70]; -// Only change code below this line + ``` # --solutions-- diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md index 19d1f874d9..6930f32e3d 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md @@ -58,10 +58,8 @@ if(typeof myArray !== "undefined"){(function(){return "myData: " + myData + " my ## --seed-contents-- ```js -// Setup var myArray = [[1,2,3], [4,5,6], [7,8,9], [[10,11,12], 13, 14]]; -// Only change code below this line var myData = myArray[0][0]; ``` diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md index db833dd81b..e790e3eabd 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md @@ -66,7 +66,6 @@ assert(/=\s*myStorage\.car\.inside\[\s*("|')glove box\1\s*\]/g.test(code)); ## --seed-contents-- ```js -// Setup var myStorage = { "car": { "inside": { @@ -79,7 +78,7 @@ var myStorage = { } }; -var gloveBoxContents = undefined; // Change this line +var gloveBoxContents = undefined; ``` # --solutions-- diff --git a/curriculum/challenges/chinese/04-data-visualization/json-apis-and-ajax/get-json-with-the-javascript-fetch-method.md b/curriculum/challenges/chinese/04-data-visualization/json-apis-and-ajax/get-json-with-the-javascript-fetch-method.md index 5e72b236aa..97395bea99 100644 --- a/curriculum/challenges/chinese/04-data-visualization/json-apis-and-ajax/get-json-with-the-javascript-fetch-method.md +++ b/curriculum/challenges/chinese/04-data-visualization/json-apis-and-ajax/get-json-with-the-javascript-fetch-method.md @@ -57,15 +57,15 @@ assert( 应该使用另一个 `then` 接收 `then` 转换的 JSON。 ```js -assert(code.match(/\.then\s*\(\s*(data|\(\s*data\s*\))\s*=>\s*{[^}]*}\s*\)/g)); +assert(__helpers.removeWhiteSpace(code).match(/\.then\(\(?\w+\)?=>{[^}]*}\)/g)); ``` 代码应该选择 id 为 `message` 的元素然后把它的内部 HTML 改成 JSON data 的字符串。 ```js assert( - code.match( - /document\s*\.getElementById\s*\(\s*('|")message\1\s*\)\s*\.innerHTML\s*=\s*JSON\s*\.\s*stringify\s*\(\s*data\s*\)/g + __helpers.removeWhiteSpace(code).match( + /document\.getElementById\(('|")message\1\)\.innerHTML=JSON\.stringify\(?\w+\)/g ) ); ``` diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md index caea4e955e..24ccd0b48c 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md @@ -76,10 +76,9 @@ if(typeof myArray !== "undefined" && typeof myData !== "undefined"){(function(y, ## --seed-contents-- ```js -// Setup var myArray = [50,60,70]; -// Only change code below this line + ``` # --solutions-- diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md index 8a864df448..80adef4699 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md @@ -58,10 +58,8 @@ if(typeof myArray !== "undefined"){(function(){return "myData: " + myData + " my ## --seed-contents-- ```js -// Setup var myArray = [[1,2,3], [4,5,6], [7,8,9], [[10,11,12], 13, 14]]; -// Only change code below this line var myData = myArray[0][0]; ``` diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md index 4ea3316cab..3b0275ecfd 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md @@ -66,7 +66,6 @@ assert(/=\s*myStorage\.car\.inside\[\s*("|')glove box\1\s*\]/g.test(code)); ## --seed-contents-- ```js -// Setup var myStorage = { "car": { "inside": { @@ -79,7 +78,7 @@ var myStorage = { } }; -var gloveBoxContents = undefined; // Change this line +var gloveBoxContents = undefined; ``` # --solutions-- diff --git a/curriculum/challenges/espanol/03-front-end-libraries/bootstrap/create-a-class-to-target-with-jquery-selectors.md b/curriculum/challenges/espanol/03-front-end-libraries/bootstrap/create-a-class-to-target-with-jquery-selectors.md index eaea933735..4d2c8bebdb 100644 --- a/curriculum/challenges/espanol/03-front-end-libraries/bootstrap/create-a-class-to-target-with-jquery-selectors.md +++ b/curriculum/challenges/espanol/03-front-end-libraries/bootstrap/create-a-class-to-target-with-jquery-selectors.md @@ -1,6 +1,6 @@ --- id: bad87fee1348bd9aec908852 -title: Create a Class to Target with jQuery Selectors +title: Crear una clase para apuntar con selectores jQuery challengeType: 0 forumTopicId: 16815 dashedName: create-a-class-to-target-with-jquery-selectors @@ -8,13 +8,13 @@ dashedName: create-a-class-to-target-with-jquery-selectors # --description-- -Not every class needs to have corresponding CSS. Sometimes we create classes just for the purpose of selecting these elements more easily using jQuery. +No todas las clases necesitan tener CSS correspondientes. A veces creamos clases sólo con el propósito de seleccionar aquellos elementos más fácilmente utilizando jQuery. -Give each of your `button` elements the class `target`. +Dale a cada uno de tus elementos `button` la clase `target`. # --hints-- -You should apply the `target` class to each of your `button` elements. +Debes aplicar la clase `target` a cada uno de tus elementos `button`. ```js assert($('.target').length > 5); diff --git a/curriculum/challenges/espanol/03-front-end-libraries/bootstrap/create-a-custom-heading.md b/curriculum/challenges/espanol/03-front-end-libraries/bootstrap/create-a-custom-heading.md index 646afcbe0f..3aa2946413 100644 --- a/curriculum/challenges/espanol/03-front-end-libraries/bootstrap/create-a-custom-heading.md +++ b/curriculum/challenges/espanol/03-front-end-libraries/bootstrap/create-a-custom-heading.md @@ -1,6 +1,6 @@ --- id: bad87fee1348bd9aede08845 -title: Create a Custom Heading +title: Crea un título personalizado challengeType: 0 forumTopicId: 16816 dashedName: create-a-custom-heading @@ -8,23 +8,23 @@ dashedName: create-a-custom-heading # --description-- -We will make a simple heading for our Cat Photo App by putting the title and relaxing cat image in the same row. +Crearemos un título simple para nuestra aplicación de fotos de gatos colocando el título y la imagen relajante del gato en la misma fila. -Remember, Bootstrap uses a responsive grid system, which makes it easy to put elements into rows and specify each element's relative width. Most of Bootstrap's classes can be applied to a `div` element. +Recuerda, Bootstrap usa un sistema de cuadrícula responsivo, lo que facilita la colocación de elementos en filas y especifica el ancho relativo de cada elemento. La mayoría de las clases de Bootstrap se pueden aplicar a un elemento `div`. -Nest your first image and your `h2` element within a single `
` element. Nest your `h2` element within a `
` and your image in a `
` so that they are on the same line. +Anida tu primera imagen y tu elemento `h2` dentro de un solo elemento `
`. Anida tu elemento `h2` dentro de un `
` y tu imagen en un `
` de modo que estén en la misma línea. -Notice how the image is now just the right size to fit along the text? +¿Observas cómo la imagen ahora tiene el tamaño adecuado para ajustarse al texto? # --hints-- -Your `h2` element and topmost `img` element should both be nested together within a `div` element with the class `row`. +Tu elemento `h2` y el elemento superior `img` deben estar anidados juntos dentro de un elemento `div` con la clase `row`. ```js assert($('div.row:has(h2)').length > 0 && $('div.row:has(img)').length > 0); ``` -Your topmost `img` element should be nested within a `div` with the class `col-xs-4`. +Tu elemento superior `img` debe estar anidado dentro de un `div` con la clase `col-xs-4`. ```js assert( @@ -33,7 +33,7 @@ assert( ); ``` -Your `h2` element should be nested within a `div` with the class `col-xs-8`. +Tu elemento `h2` debe estar anidado dentro de un `div` con la clase `col-xs-8`. ```js assert( @@ -42,7 +42,7 @@ assert( ); ``` -All of your `div` elements should have closing tags. +Todos tus elementos `div` deben tener etiquetas de cierre. ```js assert( diff --git a/curriculum/challenges/espanol/03-front-end-libraries/jquery/disable-an-element-using-jquery.md b/curriculum/challenges/espanol/03-front-end-libraries/jquery/disable-an-element-using-jquery.md index bdfefa4578..214acce321 100644 --- a/curriculum/challenges/espanol/03-front-end-libraries/jquery/disable-an-element-using-jquery.md +++ b/curriculum/challenges/espanol/03-front-end-libraries/jquery/disable-an-element-using-jquery.md @@ -1,6 +1,6 @@ --- id: bad87fee1348bd9aed808826 -title: Disable an Element Using jQuery +title: Deshabilita un elemento usando jQuery challengeType: 6 forumTopicId: 17563 dashedName: disable-an-element-using-jquery @@ -8,21 +8,23 @@ dashedName: disable-an-element-using-jquery # --description-- -You can also change the non-CSS properties of HTML elements with jQuery. For example, you can disable buttons. +También puedes cambiar las demás propiedades (además de las propiedades CSS) de los elementos HTML con jQuery. Por ejemplo, puedes deshabilitar botones. -When you disable a button, it will become grayed-out and can no longer be clicked. +Cuando deshabilitas un botón, se mostrará en gris y no se podrá hacer clic sobre este. -jQuery has a function called `.prop()` that allows you to adjust the properties of elements. +jQuery tiene una función llamada `.prop()` que te permite ajustar las propiedades de los elementos. -Here's how you would disable all buttons: +Así es como deshabilitarías todos los botones: -`$("button").prop("disabled", true);` +```js +$("button").prop("disabled", true); +``` -Disable only the `target1` button. +Deshabilita solo el botón `target1`. # --hints-- -Your `target1` button should be disabled. +Tu botón `target1` debe ser deshabilitado. ```js assert( @@ -32,13 +34,13 @@ assert( ); ``` -No other buttons should be disabled. +Ningún otro botón debe estar deshabilitado. ```js assert($('#target2') && !$('#target2').prop('disabled')); ``` -You should only use jQuery to add these classes to the element. +Solo debes usar jQuery para añadir estas clases al elemento. ```js assert(!code.match(/disabled[^<]*>/g)); diff --git a/curriculum/challenges/espanol/03-front-end-libraries/jquery/remove-classes-from-an-element-with-jquery.md b/curriculum/challenges/espanol/03-front-end-libraries/jquery/remove-classes-from-an-element-with-jquery.md index aeaa523467..7a1a50f504 100644 --- a/curriculum/challenges/espanol/03-front-end-libraries/jquery/remove-classes-from-an-element-with-jquery.md +++ b/curriculum/challenges/espanol/03-front-end-libraries/jquery/remove-classes-from-an-element-with-jquery.md @@ -1,6 +1,6 @@ --- id: bad87fee1348bd9aed918626 -title: Remove Classes from an Element with jQuery +title: Elimina clases de un elemento con jQuery challengeType: 6 forumTopicId: 18264 required: @@ -11,29 +11,31 @@ dashedName: remove-classes-from-an-element-with-jquery # --description-- -In the same way you can add classes to an element with jQuery's `addClass()` function, you can remove them with jQuery's `removeClass()` function. +De la misma manera en que puedes agregar clases a un elemento con la función `addClass()` de jQuery, puedes eliminarlos con la función `removeClass()` de jQuery. -Here's how you would do this for a specific button: +Así es como lo harías para un botón específico: -`$("#target2").removeClass("btn-default");` +```js +$("#target2").removeClass("btn-default"); +``` -Let's remove the `btn-default` class from all of our `button` elements. +Eliminemos la clase `btn-default` de todos nuestros elementos `button`. # --hints-- -The `btn-default` class should be removed from all of your `button` elements. +La clase `btn-default` debe ser eliminada de todos los elementos `button`. ```js assert($('.btn-default').length === 0); ``` -You should only use jQuery to remove this class from the element. +Sólo debes usar jQuery para eliminar esta clase del elemento. ```js assert(code.match(/btn btn-default/g)); ``` -You should only remove the `btn-default` class. +Solo debes eliminar la clase `btn-default`. ```js assert(