chore(i8n,learn): processed chinese translations (#40752)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
github-actions[bot]
2021-01-21 10:07:18 -08:00
committed by GitHub
parent 5bfc6de78b
commit 392005154c
3 changed files with 19 additions and 19 deletions

View File

@ -17,8 +17,8 @@ HTML 有一个特定的元素用于创建<dfn>无序列表</dfn>。
```html ```html
<ul> <ul>
<li>牛奶</li> <li>milk</li>
<li>奶酪</li> <li>cheese</li>
</ul> </ul>
``` ```

View File

@ -13,7 +13,7 @@ dashedName: link-to-external-pages-with-anchor-elements
`a` 需要一个 `href` 属性指向跳转的目的地。 同时,它还应有内容。 例如: `a` 需要一个 `href` 属性指向跳转的目的地。 同时,它还应有内容。 例如:
`<a href="https://freecodecamp.org">链接到 freeCodeCamp</a>` `<a href="https://freecodecamp.org">this links to freecodecamp.org</a>`
在浏览器中,以上的标签会将文字 **"链接到 freeCodeCamp"** 展示成一个可点击的超链接。 点击该文本就会跳转到 **`https://freecodecamp.org`**。 在浏览器中,以上的标签会将文字 **"链接到 freeCodeCamp"** 展示成一个可点击的超链接。 点击该文本就会跳转到 **`https://freecodecamp.org`**。

View File

@ -8,13 +8,13 @@ dashedName: reuse-patterns-using-capture-groups
# --description-- # --description--
一些你所搜寻的匹配模式会在字符串中出现多次,手动重复该正则表达式太浪费了。有一种更好的方法可以指定何时在字符串中会有多个重复子字符串。 一些你所搜寻的匹配模式会在字符串中出现多次, 手动重复该正则表达式显得不够简洁。 当字符串中出现多个重复子字符串时,有一种更好的方式来编写模式
可以使用`捕获组`搜寻重复的子字符串。括号`(``)`可以用来匹配重复的子字符串。需要重复匹配模式的正则表达式放在括号中即可。 可以使用 <dfn>捕获组</dfn> 搜寻重复的子字符串。 括号 `(``)` 可以用来匹配重复的子字符串。需要重复匹配模式放在括号中即可。
要指定重复字符串将出现的位置,可以使用反斜杠(`\`)后接一个数字。这个数字从 1 开始,随着你使用的每个捕获组的增加而增加。这里有一个示例,`\1`可以匹配第一个组。 要指定重复字符串将出现的位置,可以使用反斜杠(<code>\\</code>)后接一个数字。 这个数字从 1 开始,随着你使用的每个捕获组的增加而增加。 这里有一个示例,`\1`可以匹配第一个组。
下面的示例匹配任意两个被空格分割的单词: 下面的示例展示的是匹配被空格隔开的两个相同单词:
```js ```js
let repeatStr = "regex regex"; let repeatStr = "regex regex";
@ -23,27 +23,27 @@ repeatRegex.test(repeatStr); // Returns true
repeatStr.match(repeatRegex); // Returns ["regex regex", "regex"] repeatStr.match(repeatRegex); // Returns ["regex regex", "regex"]
``` ```
在字符串上使用`.match()`方法将返回一个数组,其中包含它匹配的字符串及其捕获组。 在字符串上调用 `.match()` 方法将返回一个数组,其中包含它最终匹配的字符串及其捕获组。
# --instructions-- # --instructions--
在正则表达式`reRegex`中使用`捕获组`,以匹配在字符串中仅重复三次的数字,每一个都由空格分隔 在正则表达式 `reRegex` 中使用捕获组,以匹配在字符串中被空格隔开的三个相同数字
# --hints-- # --hints--
你的正则表达式应该使用数字的速记元字符。 你的正则表达式应该使用数字的简写字符
```js ```js
assert(reRegex.source.match(/\\d/)); assert(reRegex.source.match(/\\d/));
``` ```
你的正则表达式应该用两次捕获组。 你的正则表达式应该使用两次捕获组。
```js ```js
assert(reRegex.source.match(/\\1|\\2/g).length >= 2); assert(reRegex.source.match(/\\1|\\2/g).length >= 2);
``` ```
你的正则表达式应该有两个空格分隔三个数字。 你的正则表达式应该有两个空格分隔三个数字。
```js ```js
assert( assert(
@ -52,43 +52,43 @@ assert(
); );
``` ```
你的正则表达式应该匹配`'42 42 42'` 你的正则表达式应该匹配 `"42 42 42"`
```js ```js
assert(reRegex.test('42 42 42')); assert(reRegex.test('42 42 42'));
``` ```
你的正则表达式应该匹配`'100 100 100'` 你的正则表达式应该匹配 `"100 100 100"`
```js ```js
assert(reRegex.test('100 100 100')); assert(reRegex.test('100 100 100'));
``` ```
你的正则表达式不应该匹配`'42 42 42 42'` 你的正则表达式不应该匹配 `"42 42 42 42"`
```js ```js
assert.equal('42 42 42 42'.match(reRegex.source), null); assert.equal('42 42 42 42'.match(reRegex.source), null);
``` ```
你的正则表达式不应该匹配`'42 42'` 你的正则表达式不应该匹配 `"42 42"`
```js ```js
assert.equal('42 42'.match(reRegex.source), null); assert.equal('42 42'.match(reRegex.source), null);
``` ```
你的正则表达式不应该匹配`'101 102 103'` 你的正则表达式不应该匹配 `"101 102 103"`
```js ```js
assert(!reRegex.test('101 102 103')); assert(!reRegex.test('101 102 103'));
``` ```
你的正则表达式不应该匹配`'1 2 3'` 你的正则表达式不应该匹配 `"1 2 3"`
```js ```js
assert(!reRegex.test('1 2 3')); assert(!reRegex.test('1 2 3'));
``` ```
你的正则表达式应该匹配`'10 10 10'` 你的正则表达式应该匹配 `"10 10 10"`
```js ```js
assert(reRegex.test('10 10 10')); assert(reRegex.test('10 10 10'));