Skip to content

Commit

Permalink
chore(i18n,learn): processed translations (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
camperbot authored Feb 3, 2025
1 parent d07c1a4 commit bd1239e
Show file tree
Hide file tree
Showing 1,085 changed files with 49,225 additions and 12,025 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,42 @@ For now, each recursive call prints the `rods` dictionary without performing any
You should remove the last element from the `rods[source]` list and append it to the `rods[target]` list before the `print` call.

```js
({ test: () => assert.match(code, /move\(\s*n\s*-\s*1\s*,\s*source\s*,\s*auxiliary\s*,\s*target\s*\)\s+rods\s*\[\s*target\s*\]\s*\.append\(\s*rods\s*\[\s*source\s*\]\s*\.pop\(\s*\)\s*\)/) })
({ test: () => assert.isTrue(runPython(`
_log = []
def capture_print(*args):
_log.append(repr(args))
old_print = print
print = capture_print
old_rods = rods
rods2 = {
'A': list(range(5, 0, -1)),
'B': [],
'C': []
}
rods = rods2
move(5, 'A', 'B', 'C')
rods = old_rods
print = old_print
_expected_prints = [
r"({'A': [5, 4, 3, 2], 'B': [], 'C': [1]}, '\\n')",
r"({'A': [5, 4, 3], 'B': [], 'C': [1, 2]}, '\\n')",
r"({'A': [5, 4], 'B': [], 'C': [1, 2, 3]}, '\\n')",
r"({'A': [5], 'B': [], 'C': [1, 2, 3, 4]}, '\\n')",
r"({'A': [], 'B': [], 'C': [1, 2, 3, 4, 5]}, '\\n')",
]
for args in _log:
if not _expected_prints:
break
if args == _expected_prints[0]:
_expected_prints.pop(0)
not rods2['A'] and rods2['C'] == list(range(1, 6)) and not _expected_prints
`))})
```

# --seed--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ assert(
);
```

你的 `h1` 元素的文本應該是 “CatPhotoApp”。 你可能忽略了文本或有拼寫錯誤。
Your `h1` element's text should be `CatPhotoApp`. 你可能忽略了文本或有拼寫錯誤。

```js
assert(document.querySelector('h1').innerText.toLowerCase() === 'catphotoapp');
Expand All @@ -64,7 +64,7 @@ assert(document.querySelector('h2'));
assert(code.match(/<\/h2\>/));
```

你的 `h2` 元素中的文本應該是 “Cat Photos”。 僅將文本 `Cat Photos` 放在開始和結束 `h2` 標籤之間。
Your `h2` element's text should be `Cat Photos`. 僅將文本 `Cat Photos` 放在開始和結束 `h2` 標籤之間。

```js
assert(document.querySelector('h2').innerText.toLowerCase() === 'cat photos');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,34 @@ dashedName: step-24
`</ul>` 結束標籤之後應該有一個 `img` 元素。

```js
assert.equal(document.querySelectorAll('section')?.[1]?.lastElementChild?.nodeName, 'IMG');
assert.equal(document.querySelectorAll('section')[1].querySelector('ul').nextElementSibling?.nodeName, 'IMG');
```
新圖像沒有 `alt` 屬性。 請檢查在開始標籤的名稱後面要有一個空格,且/或所有的屬性名稱前面也要有一個空格。
```js
assert.isTrue(document.querySelectorAll('section')?.[1]?.lastElementChild?.hasAttribute('alt'));
assert.isTrue(document.querySelectorAll('section')[1].querySelector('ul').nextElementSibling?.hasAttribute('alt'));
```
新圖像的 `alt` 值應爲 `A slice of lasagna on a plate.`。確保將 `alt` 屬性的值放在引號中。
```js
assert(
document.querySelectorAll('section')?.[1]
?.lastElementChild?.getAttribute('alt')
.replace(/\s+/g, ' ')
.match(/^A slice of lasagna on a plate\.?$/i)
assert.match(
document.querySelectorAll('section')[1].querySelector('ul').nextElementSibling?.getAttribute('alt')?.replace(/\s+/g, ' '), /^A slice of lasagna on a plate\.?$/i
);
```
新圖像沒有 `src` 屬性。 請檢查確認在開始標籤的名稱後面要有一個空格,且所有的屬性名稱前面也要有一個空格。
```js
assert.isTrue(document.querySelectorAll('section')?.[1]?.lastElementChild?.hasAttribute('src'));
assert.isTrue(document.querySelectorAll('section')[1].querySelector('ul').nextElementSibling?.hasAttribute('src'));
```
新圖像的 `src` 值應爲 `https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg`。 確保將 `src` 屬性的值放在引號中。

```js
assert.strictEqual(
document.querySelectorAll('section')?.[1]?.lastElementChild?.getAttribute('src'),
document.querySelectorAll('section')[1].querySelector('ul').nextElementSibling?.getAttribute('src'),
'https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg'
);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ assert.equal(document.querySelector('fieldset:nth-child(3) + label > input + a')

```js
const nestedAnchor = document.querySelector('fieldset:nth-child(3) + label > input + a')?.textContent;
const innerContent = nestedAnchor.innerHTML;
const innerContent = nestedAnchor?.innerHTML;
assert.isNotTrue(/^\s+|\s+$/.test(innerContent));
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ input[type="file"] {
padding: 1px 2px;
}

.inline{
display: inline;
}

--fcc-editable-region--

--fcc-editable-region--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ dashedName: build-a-palindrome-checker
1. You should have an `input` element with an `id` of `"text-input"`.
1. You should have a `button` element with an `id` of `"check-btn"`.
1. You should have a `div`, `span` or `p` element with an `id` of `"result"`.
1. When you click on the `#check-btn` element without entering a value into the `#text-input` element, an alert should appear with the text `"Please input a value"`.
1. When the `#text-input` element only contains the letter `A` and the `#check-btn` element is clicked, the `#result` element should contain the text `"A is a palindrome"`.
1. When the `#text-input` element contains the text `eye` and the `#check-btn` element is clicked, the `#result` element should contain the text `"eye is a palindrome"`.
1. When the `#text-input` element contains the text `_eye` and the `#check-btn` element is clicked, the `#result` element should contain the text `"_eye is a palindrome"`.
1. When the `#text-input` element contains the text `race car` and the `#check-btn` element is clicked, the `#result` element should contain the text `"race car is a palindrome"`.
1. When the `#text-input` element contains the text `not a palindrome` and the `#check-btn` element is clicked, the `#result` element should contain the text `"not a palindrome is not a palindrome"`.
1. When the `#text-input` element contains the text `A man, a plan, a canal. Panama` and the `#check-btn` element is clicked, the `#result` element should contain the text `"A man, a plan, a canal. Panama is a palindrome"`.
1. When the `#text-input` element contains the text `never odd or even` and the `#check-btn` element is clicked, the `#result` element should contain the text `"never odd or even is a palindrome"`.
1. When the `#text-input` element contains the text `nope` and the `#check-btn` element is clicked, the `#result` element should contain the text `"nope is not a palindrome"`.
1. When the `#text-input` element contains the text `almostomla` and the `#check-btn` element is clicked, the `#result` element should contain the text `"almostomla is not a palindrome"`.
1. When the `#text-input` element contains the text `My age is 0, 0 si ega ym.` and the `#check-btn` element is clicked, the `#result` element should contain the text `"My age is 0, 0 si ega ym. is a palindrome"`.
1. When the `#text-input` element contains the text `1 eye for of 1 eye.` and the `#check-btn` element is clicked, the `#result` element should contain the text `"1 eye for of 1 eye. is not a palindrome"`.
1. When the `#text-input` element contains the text `0_0 (: /-\ :) 0-0` and the `#check-btn` element is clicked, the `#result` element should contain the text `"0_0 (: /-\ :) 0-0 is a palindrome"`.
1. When the `#text-input` element contains the text `five|\_/|four` and the `#check-btn` element is clicked, the `#result` element should contain the text `"five|\_/|four is not a palindrome"`.
1. When you click on the `#check-btn` element without entering a value into the `#text-input` element, an alert should appear with the text `Please input a value`.
1. When the `#text-input` element only contains the letter `A` and the `#check-btn` element is clicked, the `#result` element should contain the text `A is a palindrome`.
1. When the `#text-input` element contains the text `eye` and the `#check-btn` element is clicked, the `#result` element should contain the text `eye is a palindrome`.
1. When the `#text-input` element contains the text `_eye` and the `#check-btn` element is clicked, the `#result` element should contain the text `_eye is a palindrome`.
1. When the `#text-input` element contains the text `race car` and the `#check-btn` element is clicked, the `#result` element should contain the text `race car is a palindrome`.
1. When the `#text-input` element contains the text `not a palindrome` and the `#check-btn` element is clicked, the `#result` element should contain the text `not a palindrome is not a palindrome`.
1. When the `#text-input` element contains the text `A man, a plan, a canal. Panama` and the `#check-btn` element is clicked, the `#result` element should contain the text `A man, a plan, a canal. Panama is a palindrome`.
1. When the `#text-input` element contains the text `never odd or even` and the `#check-btn` element is clicked, the `#result` element should contain the text `never odd or even is a palindrome`.
1. When the `#text-input` element contains the text `nope` and the `#check-btn` element is clicked, the `#result` element should contain the text `nope is not a palindrome`.
1. When the `#text-input` element contains the text `almostomla` and the `#check-btn` element is clicked, the `#result` element should contain the text `almostomla is not a palindrome`.
1. When the `#text-input` element contains the text `My age is 0, 0 si ega ym.` and the `#check-btn` element is clicked, the `#result` element should contain the text `My age is 0, 0 si ega ym. is a palindrome`.
1. When the `#text-input` element contains the text `1 eye for of 1 eye.` and the `#check-btn` element is clicked, the `#result` element should contain the text `1 eye for of 1 eye. is not a palindrome`.
1. When the `#text-input` element contains the text `0_0 (: /-\ :) 0-0` and the `#check-btn` element is clicked, the `#result` element should contain the text `0_0 (: /-\ :) 0-0 is a palindrome`.
1. When the `#text-input` element contains the text `five|\_/|four` and the `#check-btn` element is clicked, the `#result` element should contain the text `five|\_/|four is not a palindrome`.

完成用戶需求並通過下面的所有測試來完成這個項目。 賦予它你的個人風格。 祝你編碼愉快!

Expand All @@ -52,14 +52,14 @@ const el = document.getElementById('check-btn');
assert.strictEqual(el?.nodeName?.toLowerCase(), 'button');
```
你應該有一個 `id``result``div``span` `p` 元素。
You should have a `div`, `span`, or `p` element with an `id` of `"result"`.
```js
const el = document.getElementById('result');
assert(['div', 'span', 'p'].includes(el?.nodeName?.toLowerCase()));
```
當你點擊 `#check-btn` 元素但沒有給 `#text-input` 元素輸入一個值時,會出現提示 `"Please input a value"`
When you click on the `#check-btn` element without entering a value into the `#text-input` element, an alert should appear with the text `Please input a value`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -73,7 +73,7 @@ checkBtn.click();
assert.strictEqual(alertMessage?.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'please input a value');
```
`#text-input` 元素只包含字母 `A`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"A is a palindrome"`
When the `#text-input` element only contains the letter `A` and the `#check-btn` element is clicked, the `#result` element should contain the text `A is a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -86,7 +86,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'a is a palindrome');
```
`#text-input` 元素包含文本 `eye`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"eye is a palindrome"`
When the `#text-input` element contains the text `eye` and the `#check-btn` element is clicked, the `#result` element should contain the text `eye is a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -99,7 +99,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'eye is a palindrome');
```
`#text-input` 元素包含文本 `_eye`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"_eye is a palindrome"`
When the `#text-input` element contains the text `_eye` and the `#check-btn` element is clicked, the `#result` element should contain the text `_eye is a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -112,7 +112,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), '_eye is a palindrome');
```
`#text-input` 元素包含文本 `race car`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"race car is a palindrome"`
When the `#text-input` element contains the text `race car` and the `#check-btn` element is clicked, the `#result` element should contain the text `race car is a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -125,7 +125,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'race car is a palindrome');
```
`#text-input` 元素包含文本 `not a palindrome`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"not a palindrome is not a palindrome"`
When the `#text-input` element contains the text `not a palindrome` and the `#check-btn` element is clicked, the `#result` element should contain the text `not a palindrome is not a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -138,7 +138,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'not a palindrome is not a palindrome');
```
When the `#text-input` element contains the text `A man, a plan, a canal. Panama` and the `#check-btn` element is clicked, the `#result` element should contain the text `"A man, a plan, a canal. Panama is a palindrome"`.
When the `#text-input` element contains the text `A man, a plan, a canal. Panama` and the `#check-btn` element is clicked, the `#result` element should contain the text `A man, a plan, a canal. Panama is a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -151,7 +151,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'a man, a plan, a canal. panama is a palindrome');
```
`#text-input` 元素包含文本 `never odd or even`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"never odd or even is a palindrome"`
When the `#text-input` element contains the text `never odd or even` and the `#check-btn` element is clicked, the `#result` element should contain the text `never odd or even is a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -164,7 +164,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'never odd or even is a palindrome');
```
`#text-input` 元素包含文本 `nope`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"nope is not a palindrome"`
When the `#text-input` element contains the text `nope` and the `#check-btn` element is clicked, the `#result` element should contain the text `nope is not a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -177,7 +177,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'nope is not a palindrome');
```
`#text-input` 元素包含文本 `almostomla`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"almostomla is not a palindrome"`
When the `#text-input` element contains the text `almostomla` and the `#check-btn` element is clicked, the `#result` element should contain the text `almostomla is not a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -190,7 +190,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'almostomla is not a palindrome');
```
`#text-input` 元素包含文本 `My age is 0, 0 si ega ym.`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"My age is 0, 0 si ega ym. is a palindrome"`
When the `#text-input` element contains the text `My age is 0, 0 si ega ym.` and the `#check-btn` element is clicked, the `#result` element should contain the text `My age is 0, 0 si ega ym. is a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -203,7 +203,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), 'my age is 0, 0 si ega ym. is a palindrome');
```
When the `#text-input` element contains the text `1 eye for of 1 eye.` and the `#check-btn` element is clicked, the `#result` element should contain the text `"1 eye for of 1 eye. is not a palindrome"`.
When the `#text-input` element contains the text `1 eye for of 1 eye.` and the `#check-btn` element is clicked, the `#result` element should contain the text `1 eye for of 1 eye. is not a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -216,7 +216,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), '1 eye for of 1 eye. is not a palindrome');
```
`#text-input` 元素包含文本 `0_0 (: /-\ :) 0-0`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"0_0 (: /-\ :) 0-0 is a palindrome"`。
When the `#text-input` element contains the text `0_0 (: /-\ :) 0-0` and the `#check-btn` element is clicked, the `#result` element should contain the text `0_0 (: /-\ :) 0-0 is a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand All @@ -229,7 +229,7 @@ checkBtn.click();
assert.strictEqual(resultEl.innerText.trim().replace(/[.,?!]+$/g, '').toLowerCase(), '0_0 (: /-\ :) 0-0 is a palindrome');
```
`#text-input` 元素包含文本 `five|\_/|four`,並且 `#check-btn` 元素被點擊時,`#result` 元素應該包含文本 `"five|\_/|four is not a palindrome"`
When the `#text-input` element contains the text `five|\_/|four` and the `#check-btn` element is clicked, the `#result` element should contain the text `five|\_/|four is not a palindrome`.
```js
const inputEl = document.getElementById('text-input');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dashedName: task-8

Questions in the past tense with the verb `to be` are very similar to how you do it in the present tense. The only difference is that you need to remember to conjugate the verb to `were` or `was`, followed by the subject and then the main verb. 舉個例子:

`Were you at the meeting yesterday?` Notice how `were` comes before `you` to for a question. `What was my assignment?` For a specific question, notice how `was` comes after `what` and before `my`.
`Were you at the meeting yesterday?` Notice how `were` comes before `you` to form a question. `What was my assignment?` For a specific question, notice how `was` comes after `what` and before `my`.

# --questions--

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dashedName: task-60

# --description--

Lisnte to the audio and complete the sentence.
Listen to the audio and complete the sentence.

# --fillInTheBlank--

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dashedName: task-21

# --description--

`Remote work` means doing your job from home or another location outside of the office. Instead of going to a workplace, you use computers and the internet to do you tasks. You talk to your colleagues through emails, video calls, and messages. `Remote work` gives flexibility and allows people to balance work and home life.
`Remote work` means doing your job from home or another location outside of the office. Instead of going to a workplace, you use computers and the internet to do your tasks. You talk to your colleagues through emails, video calls, and messages. `Remote work` gives flexibility and allows people to balance work and home life.

Listen and fill in the blank.

Expand Down
Loading

0 comments on commit bd1239e

Please sign in to comment.