Skip to content

Commit

Permalink
chore(i18n,learn): processed translations (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
camperbot authored Oct 22, 2024
1 parent a10bbfa commit 319a979
Show file tree
Hide file tree
Showing 4,208 changed files with 604,827 additions and 8,847 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dashedName: step-3

The `p` element is used to create a paragraph of text on websites. Create a `p` element below your `h2` element and give it the following text:

`See more cat photos in our gallery.`
`Everyone loves cute cats online!`

# --hints--

Expand All @@ -25,13 +25,13 @@ assert(document.querySelector('p'));
assert(code.match(/<\/p\>/));
```

Your `p` element's text should be `See more cat photos in our gallery.` You have either omitted the text or have a typo.
Your `p` element's text should be `Everyone loves cute cats online!` You have either omitted the text or have a typo.

```js
const extraSpacesRemoved = document
.querySelector('p')
.innerText.replace(/\s+/g, ' ');
assert(extraSpacesRemoved.match(/see more cat photos in our gallery\.?$/i));
assert.match(extraSpacesRemoved, /everyone loves cute cats online!$/i);
```

你的 `p` 元素應該在 `h2` 元素的下方。 你把順序寫錯了。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@ assert(code.match(/<!--\s*todo:\s+add\s+link\s+to\s+cat\s+photos\s*-->/i));
Your comment should be above the `p` element. 你把順序寫錯了。

```js
assert(
code
.replace(/\s/g, '')
.match(
/<!--todo:addlinktocatphotos--><p>seemorecatphotosinourgallery\.?<\/p>/i
)
assert.match(
code.replace(/\s/g, ''),
/<!--todo:addlinktocatphotos--><p>everyonelovescutecatsonline!<\/p>/i
);
```

Expand All @@ -69,7 +66,7 @@ assert(
<h2>Cat Photos</h2>
--fcc-editable-region--

<p>See more cat photos in our gallery.</p>
<p>Everyone loves cute cats online!</p>

--fcc-editable-region--
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ Your `main` element's closing tag should be below the `p` element. 你的順序
```js
const mainNode = document.querySelector('main');
const pNode = document.querySelector('p');
assert(
mainNode.contains(pNode) &&
pNode.textContent.toLowerCase().match(/see more cat photos in our gallery/)
);
assert.isTrue(mainNode.contains(pNode));
assert.match(pNode.textContent.toLowerCase(), /everyone loves cute cats online!/);
```
# --seed--
Expand All @@ -73,7 +71,7 @@ assert(
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>See more cat photos in our gallery.</p>
<p>Everyone loves cute cats online!</p>

--fcc-editable-region--
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ Your code should have a `p` element. You have removed the `p` element from an ea
assert(document.querySelector('p'));
```

The text of the `p` element should be `See more cat photos in our gallery.` Do not change the text, spacing, or punctuation of the `p` element.
The text of the `p` element should be `Everyone loves cute cats online!` Do not change the text, spacing, or punctuation of the `p` element.

```js
assert(
assert.match(
document
.querySelector('p')
.innerText.toLowerCase()
.match(/see\s+more\s+cat\s+photos\s+in\s+our\s+gallery\.?$/)
.innerText.toLowerCase(),
/everyone\s+loves\s+cute\s+cats\s+online!$/
);
```

Expand All @@ -98,12 +98,12 @@ assert(code.toLowerCase().match(/-->\s*\n\s{6}<p>/));
```html
<html>
<body>
--fcc-editable-region--
--fcc-editable-region--
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>See more cat photos in our gallery.</p>
<p>Everyone loves cute cats online!</p>
</main>
--fcc-editable-region--
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ assert(collection.indexOf('P') < collection.indexOf('IMG'));
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
--fcc-editable-region--
<p>See more cat photos in our gallery.</p>
<p>Everyone loves cute cats online!</p>

--fcc-editable-region--
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ assert(document.querySelector('img').src);
你的 `img` 元素的 `src` 屬性應設置爲 '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'。 你可能忽略了 URL 或者有拼寫錯誤。 URL 的大小寫很重要。

```js
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
assert.strictEqual(document.querySelector('img').src, 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
```

儘管你已將 `img` 元素的 `src` 設置爲正確的 URL,但建議始終用引號將屬性的值括起來。

```js
assert(!/\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/.test(code));
assert.notMatch(code, /\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/);
```

你的 `img` 元素應該以 `>``/>` 結束。

```js
assert(/<img\s+src\s*=\s*("|')https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg\1\s*\/?>/.test(code));
assert.match(code, /<img\s+src\s*=\s*("|')\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg\s*\1\s*\/?>/);
```

# --seed--
Expand All @@ -62,7 +62,7 @@ assert(/<img\s+src\s*=\s*("|')https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>See more cat photos in our gallery.</p>
<p>Everyone loves cute cats online!</p>
--fcc-editable-region--
<img>
--fcc-editable-region--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ assert(altText.match(/A cute orange cat lying on its back\.?$/i));
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>See more cat photos in our gallery.</p>
<p>Everyone loves cute cats online!</p>
--fcc-editable-region--
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg">
--fcc-editable-region--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ assert(
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
--fcc-editable-region--
<p>See more cat photos in our gallery.</p>
<p>Everyone loves cute cats online!</p>

--fcc-editable-region--
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A link's text must be placed between the opening and closing tags of an anchor (
<a href="https://www.freecodecamp.org">click here to go to freeCodeCamp.org</a>
```

Add the anchor text `link to cat pictures` to the anchor element. This will become the link's text.
Add the anchor text `cat photos` to the anchor element. This will become the link's text.

# --hints--

Expand All @@ -31,12 +31,12 @@ assert(document.querySelector('a'));
assert(code.match(/<\/a\>/));
```

Your anchor (`a`) element's text should be `link to cat pictures`. Make sure to put the link text between the anchor (`a`) element's opening tag and closing tag.
Your anchor (`a`) element's text should be `cat photos`. Make sure to put the link text between the anchor (`a`) element's opening tag and closing tag.

```js
assert(
document.querySelector('a').innerText.toLowerCase().replace(/\s+/g, ' ') ===
'link to cat pictures'
assert.strictEqual(
document.querySelector('a').innerText.toLowerCase().replace(/\s+/g, ' '),
'cat photos'
);
```

Expand All @@ -51,7 +51,7 @@ assert(
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>See more cat photos in our gallery.</p>
<p>Everyone loves cute cats online!</p>
--fcc-editable-region--
<a href="https://freecatphotoapp.com"></a>
--fcc-editable-region--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
id: 5dfa2407b521be39a3de7be1
title: 第 14 步
title: Step 15
challengeType: 0
dashedName: step-14
dashedName: step-15
---

# --description--
Expand All @@ -25,22 +25,20 @@ Your `p` element should have a nested anchor (`a`) element with the text `cat ph

```js
const anchor = document.querySelectorAll('p > a');
assert(
anchor.length &&
anchor[0].innerText.toLowerCase().replace(/\s+/g, ' ') === 'cat photos'
);
assert.isNotEmpty(anchor);
assert.strictEqual(anchor[1]?.innerText?.toLowerCase().replace(/\s+/g, ' '), 'cat photos')
```
Your anchor (`a`) element does not have a `target` attribute. 請檢查在開始標籤的名稱後面要有一個空格,且/或所有的屬性名稱前面也要有一個空格。
```js
assert(document.querySelector('a').hasAttribute('target'));
assert.isTrue(document.querySelectorAll('a')[1]?.hasAttribute('target'));
```
The value of the `target` attribute should be `_blank`. 你可能落下了這個值或者有拼寫錯誤。 所有屬性的值都應該放在引號中。
```js
assert(document.querySelector('a').getAttribute('target') === '_blank');
assert.strictEqual(document.querySelectorAll('a')[1]?.getAttribute('target'), '_blank');
```
# --seed--
Expand All @@ -54,6 +52,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
--fcc-editable-region--
<p>See more <a href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
--fcc-editable-region--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
id: 5dfa30b9eacea3f48c6300ad
title: Step 15
title: Step 17
challengeType: 0
dashedName: step-15
dashedName: step-17
---

# --description--
Expand Down Expand Up @@ -40,7 +40,7 @@ assert(document.querySelectorAll('a').length >= 2);
You are missing a closing (`a`) tag after the image.

```js
assert(document.querySelectorAll('a').length === 2);
assert.lengthOf(document.querySelectorAll('a'), 3);
```

Your anchor (`a`) element should have a closing tag. Closing tags have a `/` just after the `<` character.
Expand All @@ -52,7 +52,7 @@ assert(code.match(/<\/a>/g).length >= 2);
You should only add one closing anchor (`a`) tag. Please remove any extras.

```js
assert(code.match(/<\/a>/g).length === 2);
assert.lengthOf(code.match(/<\/a>/g), 3);
```

Your anchor (`a`) element does not have an `href` attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names.
Expand Down Expand Up @@ -86,7 +86,7 @@ assert(document.querySelector('img').parentNode.nodeName === 'A');
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
--fcc-editable-region--
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
id: 5dfa3589eacea3f48c6300ae
title: 步驟 18
title: Step 20
challengeType: 0
dashedName: step-18
dashedName: step-20
---

# --description--
Expand Down Expand Up @@ -60,7 +60,7 @@ assert(
<h1>CatPhotoApp</h1>
<section>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
id: 5dfa371beacea3f48c6300af
title: 步驟 19
title: Step 21
challengeType: 0
dashedName: step-19
dashedName: step-21
---

# --description--
Expand Down Expand Up @@ -68,7 +68,7 @@ assert(
<h1>CatPhotoApp</h1>
<section>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
id: 5dfa37b9eacea3f48c6300b0
title: 步驟 20
title: Step 22
challengeType: 0
dashedName: step-20
dashedName: step-22
---

# --description--
Expand Down Expand Up @@ -43,7 +43,7 @@ assert.equal(secondSectionLastElemNode?.nodeName , 'UL');
<h1>CatPhotoApp</h1>
<section>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
id: 5dfb5ecbeacea3f48c6300b1
title: 步驟21
title: Step 23
challengeType: 0
dashedName: step-21
dashedName: step-23
---

# --description--
Expand Down Expand Up @@ -63,7 +63,7 @@ assert(
<h1>CatPhotoApp</h1>
<section>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
id: 5dfb6250eacea3f48c6300b2
title: 步驟 22
title: Step 24
challengeType: 0
dashedName: step-22
dashedName: step-24
---

# --description--
Expand Down Expand Up @@ -72,7 +72,7 @@ assert.isTrue(!/\<img\s+.+\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curricu
<h1>CatPhotoApp</h1>
<section>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
Expand Down
Loading

0 comments on commit 319a979

Please sign in to comment.