Skip to content

Commit

Permalink
chore(i18n,learn): processed translations (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
camperbot authored Jul 23, 2024
1 parent 4046375 commit 12da281
Show file tree
Hide file tree
Showing 26 changed files with 325 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Now you'll repeatedly narrow down the interval by finding the midpoint of the cu

For that, inside the `else` block, create a `for` loop that runs up to `max_iterations` times.

For your loop, use the `range` function, which generates a sequence of numbers you can iterate over. The syntax is `range(start, stop, step)`, where `start` is the starting integer (inclusive), `stop` is the last integer (not inclusive), and `step` is the difference between a number and the previous one in the sequence.

Also, use `_` as a loop variable. The `_` acts as a placeholder and is useful when you need to use a variable but don't actually need its value.

# --hints--

You should create a `for` loop to iterate over `range(max_iterations)`. Use `_` as the loop variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,48 @@ dashedName: step-4

# --hints--

الكود الخاص بك يجب أن يحتوي على عنصرين `link` مغلقين ذاتيا.
Your code should have two `link` elements.

```js
assert(document.querySelectorAll('link').length === 2);
assert.strictEqual(document.querySelectorAll('link').length, 2);
```

Your `link` elements should be void elements, they should not have a end tag `</link>`.

```js
assert.notMatch(code, /<\/link>/);
```

Your two `link` elements should be inside the `head` element.

```js
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
const headElementContent = code.match(headContentRegex);

const headElement = document.createElement("head");
headElement.innerHTML = headElementContent;
assert.strictEqual(headElement.querySelectorAll('link').length, 2);
```

يجب أن يكون لكل من عناصر `link` الخاصة بك سمة `rel` بقيمة `stylesheet`.

```js
const links = [...document.querySelectorAll('link')];
assert(links.every(link => link.getAttribute('rel') === 'stylesheet'));
assert.isTrue(links.every(link => link.getAttribute('rel') === 'stylesheet'));
```

احدي عناصر `link` يجب أن يحتوي على السمة `href` بقيمة `./styles.css`.
One of your `link` elements should have an `href` attribute set to `styles.css`.

```js
assert.match(code, /\<link\s+(?:rel\s*=\s*('|"|`)stylesheet\1\s+href\s*=\s*('|"|`)(\.\/|\s*)styles\.css\2|href\s*=\s*('|"|`)(\.\/|\s*)styles\.css\4\s+rel\s*=\s*('|"|`)stylesheet\4)\s*(?:(\s*\>|\s*\/\s*\>))/);
const styleElement = document.querySelector('[data-href]');
assert.isNotNull(styleElement);
```

احدي عناصر `link` يجب أن يحتوي على سمة `href` بقيمة `https://fonts.googleapis.com/css?family=Open+Sans:400,700,800`.

```js
const links = [...document.querySelectorAll('link')];
assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800'));
assert.exists(links.find(link => link?.getAttribute('href') === 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800'));
```
# --seed--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Now you'll repeatedly narrow down the interval by finding the midpoint of the cu

For that, inside the `else` block, create a `for` loop that runs up to `max_iterations` times.

For your loop, use the `range` function, which generates a sequence of numbers you can iterate over. The syntax is `range(start, stop, step)`, where `start` is the starting integer (inclusive), `stop` is the last integer (not inclusive), and `step` is the difference between a number and the previous one in the sequence.

Also, use `_` as a loop variable. The `_` acts as a placeholder and is useful when you need to use a variable but don't actually need its value.

# --hints--

You should create a `for` loop to iterate over `range(max_iterations)`. Use `_` as the loop variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,48 @@ dashedName: step-4

# --hints--

你的代碼應該有兩個自閉合的 `link` 元素。
Your code should have two `link` elements.

```js
assert(document.querySelectorAll('link').length === 2);
assert.strictEqual(document.querySelectorAll('link').length, 2);
```

Your `link` elements should be void elements, they should not have a end tag `</link>`.

```js
assert.notMatch(code, /<\/link>/);
```

Your two `link` elements should be inside the `head` element.

```js
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
const headElementContent = code.match(headContentRegex);

const headElement = document.createElement("head");
headElement.innerHTML = headElementContent;
assert.strictEqual(headElement.querySelectorAll('link').length, 2);
```

兩個 `link` 元素都應該將 `rel` 屬性設置爲 `stylesheet`

```js
const links = [...document.querySelectorAll('link')];
assert(links.every(link => link.getAttribute('rel') === 'stylesheet'));
assert.isTrue(links.every(link => link.getAttribute('rel') === 'stylesheet'));
```

`link` 元素之一應將 `href` 屬性設置爲 `./styles.css`
One of your `link` elements should have an `href` attribute set to `styles.css`.

```js
assert.match(code, /\<link\s+(?:rel\s*=\s*('|"|`)stylesheet\1\s+href\s*=\s*('|"|`)(\.\/|\s*)styles\.css\2|href\s*=\s*('|"|`)(\.\/|\s*)styles\.css\4\s+rel\s*=\s*('|"|`)stylesheet\4)\s*(?:(\s*\>|\s*\/\s*\>))/);
const styleElement = document.querySelector('[data-href]');
assert.isNotNull(styleElement);
```

`link` 元素之一應將 `href` 屬性設置爲 `https://fonts.googleapis.com/css?family=Open+Sans:400,700,800`

```js
const links = [...document.querySelectorAll('link')];
assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800'));
assert.exists(links.find(link => link?.getAttribute('href') === 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800'));
```
# --seed--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Now you'll repeatedly narrow down the interval by finding the midpoint of the cu

For that, inside the `else` block, create a `for` loop that runs up to `max_iterations` times.

For your loop, use the `range` function, which generates a sequence of numbers you can iterate over. The syntax is `range(start, stop, step)`, where `start` is the starting integer (inclusive), `stop` is the last integer (not inclusive), and `step` is the difference between a number and the previous one in the sequence.

Also, use `_` as a loop variable. The `_` acts as a placeholder and is useful when you need to use a variable but don't actually need its value.

# --hints--

You should create a `for` loop to iterate over `range(max_iterations)`. Use `_` as the loop variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,48 @@ dashedName: step-4

# --hints--

你的代码应该有两个自闭合的 `link` 元素。
Your code should have two `link` elements.

```js
assert(document.querySelectorAll('link').length === 2);
assert.strictEqual(document.querySelectorAll('link').length, 2);
```

Your `link` elements should be void elements, they should not have a end tag `</link>`.

```js
assert.notMatch(code, /<\/link>/);
```

Your two `link` elements should be inside the `head` element.

```js
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
const headElementContent = code.match(headContentRegex);

const headElement = document.createElement("head");
headElement.innerHTML = headElementContent;
assert.strictEqual(headElement.querySelectorAll('link').length, 2);
```

两个 `link` 元素都应该将 `rel` 属性设置为 `stylesheet`

```js
const links = [...document.querySelectorAll('link')];
assert(links.every(link => link.getAttribute('rel') === 'stylesheet'));
assert.isTrue(links.every(link => link.getAttribute('rel') === 'stylesheet'));
```

`link` 元素之一应将 `href` 属性设置为 `./styles.css`
One of your `link` elements should have an `href` attribute set to `styles.css`.

```js
assert.match(code, /\<link\s+(?:rel\s*=\s*('|"|`)stylesheet\1\s+href\s*=\s*('|"|`)(\.\/|\s*)styles\.css\2|href\s*=\s*('|"|`)(\.\/|\s*)styles\.css\4\s+rel\s*=\s*('|"|`)stylesheet\4)\s*(?:(\s*\>|\s*\/\s*\>))/);
const styleElement = document.querySelector('[data-href]');
assert.isNotNull(styleElement);
```

`link` 元素之一应将 `href` 属性设置为 `https://fonts.googleapis.com/css?family=Open+Sans:400,700,800`

```js
const links = [...document.querySelectorAll('link')];
assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800'));
assert.exists(links.find(link => link?.getAttribute('href') === 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800'));
```
# --seed--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Now you'll repeatedly narrow down the interval by finding the midpoint of the cu

For that, inside the `else` block, create a `for` loop that runs up to `max_iterations` times.

For your loop, use the `range` function, which generates a sequence of numbers you can iterate over. The syntax is `range(start, stop, step)`, where `start` is the starting integer (inclusive), `stop` is the last integer (not inclusive), and `step` is the difference between a number and the previous one in the sequence.

Also, use `_` as a loop variable. The `_` acts as a placeholder and is useful when you need to use a variable but don't actually need its value.

# --hints--

You should create a `for` loop to iterate over `range(max_iterations)`. Use `_` as the loop variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dashedName: step-26

Dentro del segundo elemento `section`, agrega dos elementos `div` con la clase `question-block`.

Then, within each `div.question-block` element, add one `h3` element with text of incrementing numbers, starting at `1`, and one `fieldset` element with a class of `question`.
Luego, dentro de cada elemento `div.question-block`, agrega un elemento `h3` con texto de números incrementales, empezando por `1`, y un elemento `fieldset` con una clase de `question`.

# --hints--

Expand All @@ -31,19 +31,19 @@ Debes dar al segundo elemento `div` nuevo una clase `question-block`.
assert.equal(document.querySelectorAll('section:nth-of-type(2) > div')?.[1]?.className, 'question-block');
```
You should nest one `h3` element within each `div.question-block` element.
Debes anidar un elemento `h3` dentro de cada elemento `div.question-block`.
```js
assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > h3')?.length, 2);
```
You should give the first `h3` element text of `1`.
Debes dar el primer elemento `h3` el texto de `1`.
```js
assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > h3')?.[0]?.textContent, '1');
```
You should give the second `h3` element text of `2`.
Debes dar el segundo elemento `h3` el texto de `2`.
```js
assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > h3')?.[1]?.textContent, '2');
Expand All @@ -55,13 +55,13 @@ Debes anidar un elemento `fieldset` dentro de cada elemento `div.question-block`
assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > fieldset')?.length, 2);
```
You should place the first `fieldset` element after the first `h3` element.
Debes colocar el primer elemento `fieldset` después del primer elemento `h3`.
```js
assert.exists(document.querySelector('section:nth-of-type(2) > div.question-block > h3 + fieldset'));
```
You should place the second `fieldset` element after the second `h3` element.
Debes colocar el segundo elemento `fieldset` después del segundo elemento `h3`.
```js
assert.exists(document.querySelector('section:nth-of-type(2) > div.question-block:nth-of-type(2) > h3 + fieldset'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dashedName: step-66

Puedes usar un elemento `hr` para mostrar una línea divisora entre secciones con diferente contenido.

First, add an `hr` element between the `p` element with the class `established` and the first `section` element.
En primer lugar, añada un elemento `hr` entre el elemento `p` con la clase `established` y el primer elemento `section`.

# --hints--

Expand All @@ -19,27 +19,27 @@ Debes añadir un elemento `hr`.
assert.match(code, /<hr\s?\/?>/i);
```

The `hr` element is a void element, it should not have an end tag `</hr>`.
El elemento `hr` es un elemento vacío, no debe tener una etiqueta final `</hr>`.

```js
assert.notMatch(code, /<\/hr>/i);
```

You should not change your existing `p` element with the class `established`.
No debes cambiar el elemento `p` con la clase `established` existente.

```js
const pElementCount = document.querySelectorAll('p.established')?.length;
assert.strictEqual(pElementCount, 1);
```
You should not change your existing `main` element.
No debes cambiar el elemento `main` existente.
```js
const mainElementCount = document.querySelectorAll('main')?.length;
assert.strictEqual(mainElementCount, 1);
```
Your `hr` element should be between your `p` element and your `section` element.
Tu elemento `hr` debe estar entre el elemento `p` y tu elemento `section`.
```js
const hrElement = document.querySelector('hr');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ dashedName: step-88

El menú se ve bien, pero aparte de la imagen de fondo con los granos de café, es prácticamente solo texto.

Debajo del título `Coffee`, añade una imagen usando la url `https://cdn.freecodecamp.org/curriculum/css-cafe/coffee.jpg`. Dale a la imagen un atributo `alt` con el valor `coffee icon` (icono de café).
En el encabezado `Coffee`, añade una imagen usando la url `https://cdn.freecodecamp.org/curriculum/css-cafe/coffee.jpg`. Dale a la imagen un atributo `alt` con el valor `coffee icon`.

# --hints--

You should have an `<img>` tag.
Debes tener una etiqueta `<img>`.

```js
const imageElementCount = document.querySelectorAll('img')?.length;
assert.strictEqual(imageElementCount, 1);
```
The `img` element is a void element, it should not have an end tag `</img>`.
El elemento `img` es un elemento vacío, no debe tener una etiqueta final `</img>`.
```js
assert.notMatch(code, /<\/img>/i);
```
Your `img` element should have a `src` attribute, with the value `"https://cdn.freecodecamp.org/curriculum/css-cafe/coffee.jpg"`.
Tu elemento `img` debe tener un atributo `src` con el valor `"https://cdn.freecodecamp.org/curriculum/css-cafe/coffee.jpg"`.
```js
const imageSrcValue = document.querySelector('img')?.getAttribute('src');
assert.strictEqual(imageSrcValue, 'https://cdn.freecodecamp.org/curriculum/css-cafe/coffee.jpg');
```
Your `img` element should have an `alt` attribute, with the value `"coffee icon"`.
Tu elemento `img` debe tener un atributo `alt` con el valor `"coffee icon"`.
```js
const imageAltValue = document.querySelector('img')?.getAttribute('alt');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Debes dar al `action` un valor de `https://register-demo.freecodecamp.org`.
assert.equal(document.querySelector('form')?.action, 'https://register-demo.freecodecamp.org/');
```

Your `form` element should have a closing tag `</form>`.
Tu elemento `form` debe tener una etiqueta de cierre `</form>`.

```js
assert.match(code, /<\/form\>/);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,48 @@ También agregue un elemento `link` para vincular su archivo `styles.css`.

# --hints--

Su código debe tener dos elementos `link` de cierre automático.
Your code should have two `link` elements.

```js
assert(document.querySelectorAll('link').length === 2);
assert.strictEqual(document.querySelectorAll('link').length, 2);
```

Your `link` elements should be void elements, they should not have a end tag `</link>`.

```js
assert.notMatch(code, /<\/link>/);
```

Your two `link` elements should be inside the `head` element.

```js
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
const headElementContent = code.match(headContentRegex);

const headElement = document.createElement("head");
headElement.innerHTML = headElementContent;
assert.strictEqual(headElement.querySelectorAll('link').length, 2);
```

Ambos elementos `link` deben tener el atributo `rel` establecido en `stylesheet`.

```js
const links = [...document.querySelectorAll('link')];
assert(links.every(link => link.getAttribute('rel') === 'stylesheet'));
assert.isTrue(links.every(link => link.getAttribute('rel') === 'stylesheet'));
```

Uno de sus elementos `link` debe tener un atributo `href` establecido en `./styles.css`.
One of your `link` elements should have an `href` attribute set to `styles.css`.

```js
assert.match(code, /\<link\s+(?:rel\s*=\s*('|"|`)stylesheet\1\s+href\s*=\s*('|"|`)(\.\/|\s*)styles\.css\2|href\s*=\s*('|"|`)(\.\/|\s*)styles\.css\4\s+rel\s*=\s*('|"|`)stylesheet\4)\s*(?:(\s*\>|\s*\/\s*\>))/);
const styleElement = document.querySelector('[data-href]');
assert.isNotNull(styleElement);
```

Uno de sus elementos `link` debe tener un atributo `href` establecido en `https://fonts.googleapis.com/css?family=Open+Sans:400,700,800`.

```js
const links = [...document.querySelectorAll('link')];
assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800'));
assert.exists(links.find(link => link?.getAttribute('href') === 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800'));
```
# --seed--
Expand Down
Loading

0 comments on commit 12da281

Please sign in to comment.