Skip to content

Finished translation for article regexp-unicode#582

Merged
KerbalHao merged 6 commits intojavascript-tutorial:masterfrom
asterfell:unicode-property
Jan 8, 2020
Merged

Finished translation for article regexp-unicode#582
KerbalHao merged 6 commits intojavascript-tutorial:masterfrom
asterfell:unicode-property

Conversation

@asterfell
Copy link
Copy Markdown
Contributor

目标章节:9-regular-expressions/03-regexp-unicode

当前上游最新 commit: 002e379

所做更改如下:

文件名 参考上游 commit 更改(理由)
article.md 566b67d 新增翻译

@javascript-translate-bot javascript-translate-bot requested a review from a team January 3, 2020 14:18
@asterfell asterfell changed the title regexp-unicode Finished translation for article regexp-unicode Jan 3, 2020
Copy link
Copy Markdown
Collaborator

@KerbalHao KerbalHao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

校对完成,感谢翻译!

@@ -1,135 +1,135 @@
# Unicode: flag "u" and class \p{...}
# Unicode: 修饰符“u”和 class \p{...}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[修饰符“u”] -> [修饰符 “u” ],英文字符串两边需要空格

所以像 `a` `≈` 这样的字符占用 2 个字节,而 `𝒳``𝒴` `😄` 的对应编码则更长,它们具有 4 个字节的长度。

Long time ago, when JavaScript language was created, Unicode encoding was simpler: there were no 4-byte characters. So, some language features still handle them incorrectly.
很久以前,当 JavaScript 被发明出来的时候,Unicode 的编码要更加简单:当时并没有 4 个字节长的字符。所以,一部分语言特性在现在仍旧对无法对 unicode 进行正确的处理。
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[现在仍旧对无法对 unicode 进行正确的处理] -> [现在仍旧无法对 unicode 进行正确的处理],您看看是否多了一个 "对" 字?

## Unicode properties \p{...}
## Unicode 属性(Unicode properties)\p{...}

```warn header="Not supported in Firefox and Edge"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处 header 的值 [Not supported in Firefox and Edge] 也需要被翻译

- 字母(Letter `L`:
- 小写(lowercase `Ll`
- 修饰(modifier `Lm`,
- 标题(titlecase `Lt`,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原文 [titlecase] 是不是译成 [首字母大写] 比较好呢?

- 属性的对应缩写形式: <https://www.unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt>.
- 以文本格式整理的所有 Unicode 字符,包含了所有的属性: <https://www.unicode.org/Public/UCD/latest/ucd/>.

### 实例: 16 进制数字
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[实例: 16] -> [实例:16],中间是否多了一个空格呢?


- 列出一个字符的所有属性 <https://unicode.org/cldr/utility/character.jsp>.
- 按照属性列出所有的字符 <https://unicode.org/cldr/utility/list-unicodeset.jsp>.
- 属性的对应缩写形式: <https://www.unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt>.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文标点符号后面的空格可以省略
[属性的对应缩写形式: <https] -> [属性的对应缩写形式: <https]


1. Characters of 4 bytes are handled correctly: as a single character, not two 2-byte characters.
2. Unicode properties can be used in the search: `\p{…}`.
1. 4 个字节长的字符被以正确的方式处理: 被看成单个的字符,而不是 2 个 2 字节长的字符。
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文标点符号后面的空格可以省略
[处理: 被看成单个的字符] -> [处理:被看成单个的字符]

```

### Example: currency
### 实例: 货币
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文标点符号后面的空格可以省略
[实例: 货币] -> [实例:货币]

```

### Example: Chinese hieroglyphs
### 实例: 中文字符
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文标点符号后面的空格可以省略
[实例: 中文字符] -> [实例:中文字符]

@javascript-translate-bot
Copy link
Copy Markdown

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

- Fix some typos.
- Replace all end-of-line Enlish periods with Chinese full stops.
- Eliminate whitespace following Chinese punctuations.
@asterfell
Copy link
Copy Markdown
Contributor Author

/done

- 其它(Other `C`:
- 控制符(control `Cc`,
- 格式(format `Cf`,
- 为分配(not assigned `Cn`,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里写错了,应该是“未分配”。如果没有发现其它的错误会最终再补一个commit。

Copy link
Copy Markdown
Collaborator

@KerbalHao KerbalHao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢修改,是我校对的还不够仔细,抱歉了!

- 小写(lowercase) `Ll`
- 修饰(modifier) `Lm`,
- 标题(titlecase) `Lt`,
- 首字母大小写(titlecase) `Lt`,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[首字母大小写] -> [首字母大写]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢校对!这都能改错,我的锅...

## Unicode 属性(Unicode properties)\p{...}

```warn header="Not supported in Firefox and Edge"
```warn header="Firefox Edge 中缺乏支持"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[和 Edge 中缺乏支持] -> [和 Edge 中缺乏支持],[Edge] 后多了一个空格

@javascript-translate-bot
Copy link
Copy Markdown

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@asterfell
Copy link
Copy Markdown
Contributor Author

/done

Copy link
Copy Markdown
Collaborator

@KerbalHao KerbalHao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢翻译!

@KerbalHao KerbalHao merged commit 8992439 into javascript-tutorial:master Jan 8, 2020
@KerbalHao KerbalHao removed the needs +1 label Jan 8, 2020
@asterfell asterfell deleted the unicode-property branch January 8, 2020 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants