From eeafd4fe9cd2e904af526447048321dadf679691 Mon Sep 17 00:00:00 2001 From: fakeinc Date: Mon, 3 Jun 2019 23:11:28 -0400 Subject: [PATCH 01/14] Translated README.MD. --- README.md | 126 +++++++++++++++++++++++++++--------------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index 3f60f7ffc3..2ec2a46b4c 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 现代 JavaScript 教程中文版 -这个仓库托管了现代 JavaScript 教程的中文版内容,发布于 [https://zh.javascript.info](https://zh.javascript.info)。 +这个仓库托管了中文版的现代 JavaScript 教程。该教程发布于 [网站 https://zh.javascript.info](https://zh.javascript.info)。 ## 赞助商 @@ -8,69 +8,69 @@ ## 翻译 -我们希望提供本教程的多语言版本。如果你感兴趣,那就快来和我们一起翻译吧。 +我们希望本教程可以以更多语言呈现。如果你感兴趣,那就快来和我们一起翻译吧。 -详见:https://javascript.info/translate +详见[翻译](https://javascript.info/translate)。 -## 贡献 +## 贡献指南 -**That's how you can contribute:** +**翻译流程** -- See the [Chinese Translate Progress](https://github.com/javascript-tutorial/zh.javascript.info/issues/324) issue. -- Choose an unchecked article you'd like to translate. -- Add a comment with the article title to the issue, e.g. `An Introduction to JavaScript`. - - Our bot will mark it in the issue, for everyone to know that you're translating it. - - Your comment should contain only the title. -- Fork the repository, translate and send a PR when done. - - PR title should match article title, the bot will write it's number into the issue. +- 检查[中文翻译进度 issue (Chinese Translate Progress issue)](https://github.com/javascript-tutorial/zh.javascript.info/issues/324)。 +- 选择一篇还没有被选走(在[列表](https://github.com/javascript-tutorial/zh.javascript.info/issues/324#issue-433691990)中被人勾选)的文章。 +- 在[该 issue](https://github.com/javascript-tutorial/zh.javascript.info/issues/324) 中添加以文章标题为内容的评论,如 `An Introduction to JavaScript`。 + - 我们的 bot 会在[列表](https://github.com/javascript-tutorial/zh.javascript.info/issues/324#issue-433691990)中勾选上对应的文章,这样其他人就知道你正在翻译该文章了。 + - 不要在改评论中添加其他说明。 +- Fork 此仓库并开始翻译。完成翻译后,请投递一个 PR。 + - PR 应以文章标题命名。Bot 会添加更多信息。 -Please kindly allow maintainers to review and merge or request changes in your translation. +请给维护者时间来审核和 merge 你的翻译,或者提出对其的修改意见。 -If maintainers do not respond, or if you'd like to become a maintainer, write us at the [main repo](https://github.com/javascript-tutorial/en.javascript.info/issues/new). +如果维护者没能回复,或者你想成为一个维护者,请在[主仓库给我们提新 issue](https://github.com/javascript-tutorial/en.javascript.info/issues/new)。 -**Let others know what you're translating, in message boards or chats in your language. Invite them to join!** +**如果你愿意的话,请让其他人知道你在翻译这个教程,并尝试邀请他们参与翻译。你可以通过微博或群聊来号召。** -🎉 Thank you! +🎉 非常感谢! -Your name and the contribution size will appear in the "About project" page when the translation gets published. +翻译版本上线后,我们会在“关于本项目“页面写上你的名字和贡献。 -P.S. The full list of languages can be found at . +注: 罗列了完整的语言列表。 -## Structure +## 文件结构 -Every chapter, an article or a task resides in its own folder. +每一个章节或任务都在它自己的文件夹里。 -The folder is named `N-url`, where `N` – is the number for sorting (articles are ordered), and `url` is the URL-slug on the site. +这个文件夹以 `N=url` 命名。`N` 为文章序号(文章遵循一定的顺序),`url` 是该网站上对应教程的净链接。 -The folder has one of files: +这个文件夹含有以下一种文件: -- `index.md` for a section, -- `article.md` for an article, -- `task.md` for a task formulation (+`solution.md` with the solution text if any). +- `index.md` 对应一个部分, +- `article.md` 对应一个文章, +- `task.md` 对应一个任务 (如果有答案的话还会有 `solution.md` 这个文件)。 -A file starts with the `# Title Header`, and then the text in Markdown-like format, editable in a simple text editor. +每一个文件都以 `# 标题` 开始,然后是类 Markdown 格式的文本。一个简单的文字编辑器就可以编辑该文件。 -Additional resources and examples for the article or the task, are also in the same folder. +文章或任务中需要用到的资源也在同一个文件夹中。 -## Translation Tips +## 翻译提示 -Please keep line breaks and paragraphs "as is": don't add newlines and don't remove existing ones. Makes it easy to merge future changes from the English version into the translation. +请不要添加换行,段落或移除已有的行和段落。这样可以减少 merge 英文版中的新变化时出现的问题。 -If you see that the English version can be improved – great, please send a PR to it. +如果你觉得英文版可以被改善,请给我们发一个 [PR](https://github.com/javascript-tutorial/en.javascript.info/compare)。 -### Terms +### 专有词 -- Some specification terms are not to be translated, e.g. "Function Declaration" can be left "as is". -- For other terms like `resolved promise`, `slash`, `regexp`, and so on - look for a glossary, hopefully there's one for your language already. If not, look for translations in manuals, such as [MDN](https://developer.mozilla.org/en-US/). +- 一些具体的专有词不应被翻译。如”Function Declaration“。 +- 对于其他专有词,如 `resolved promise`, `slash`, `regexp` 等,请使用一个你的语言中的同义词。如果没有意思足够相近的词,请使用教程(如:[MDN](https://developer.mozilla.org/en-US/))中的翻译。 -### Text in Code Blocks +### 代码块中的文本 -- Translate comments. -- Translate user-messages and example strings. -- Don't translate variables, classes, identifiers. -- Ensure that the code works after the translation :) +- 翻译注释。 +- 翻译展示给用户的信息和用来举例的字符串。 +- 不要翻译变量,类等标识符。 +- 确保翻译后的代码可以正常运行。 :) -Example: +例: ```js // Example @@ -81,44 +81,44 @@ document.querySelector('.hello').innerHTML = text; ✅ DO (translate comment): ```js -// Ejemplo -const text = 'Hola mundo'; +// 例 +const text = '你好,世界'; document.querySelector('.hello').innerHTML = text; ``` ❌ DON'T (translate class): ```js -// Ejemplo -const text = 'Hola mundo'; -// ".hello" is a class -// DO NOT TRANSLATE -document.querySelector('.hola').innerHTML = text; +// 例 +const text = '你好,世界'; +// ".hello" 是一个类 +// 不要翻译 +document.querySelector('.你好').innerHTML = text; ``` -### External Links +### 外部链接 -If an external link is to Wikipedia, e.g. `https://en.wikipedia.org/wiki/JavaScript`, and a version of that article exists in your language that is of decent quality, link to that version instead. +如果这个外部链接是指向 Wikipedia 的,如 `https://en.wikipedia.org/wiki/JavaScript`,并且其有质量优良的目标语言的译文,请将链接指向该译文。 -Example: +例: ```md [JavaScript](https://en.wikipedia.org/wiki/JavaScript) is a programming language. ``` -✅ OK (en -> es): +✅ OK (en -> zh): ```md -[JavaScript](https://es.wikipedia.org/wiki/JavaScript) es un lenguaje de programación. +[JavaScript](https://zh.wikipedia.org/wiki/JavaScript) 是一种编程语言。 ``` -For links to MDN, a partially translated version is ok. +对于指向 MDN 的外部链接,可以使用部分翻译的版本。 -If a linked article has no translated version, leave the link "as is". +如果外部链接没有翻译的版本,请不要修改该链接。 -### Metadata +### 元数据 -Some files, usually tasks, have YAML metadata at the top, delimited by `---`: +一些文件,(这些文件通常是任务),以 YAML 的元数据起始。这些元数据以”---“做分隔: ```md importance: 5 @@ -127,27 +127,27 @@ importance: 5 ... ``` -Please don't translate "importance" (and other top metadata). +请不要翻译”importance“ (和其他放置在开头的元数据). ### Anchors -Some headers have `[#anchor]` at the end, e.g. +某些标题以 `[#anchor]` 结尾,如: ```md -## Spread operator [#spread-operator] +## 扩散运算符 [#spread-operator] ``` -Please don't translate or remove the `[#...]` part, it's for URL anchors. +请不要翻译或者去掉 `[#...]` 部分,它是 URL 锚元素所依赖的。 -## Running locally +## 在本地运行 -You can run the tutorial server locally to see how the translation looks. +你可以在本地运行本教程的服务端来预览你的翻译。 -The server and install instructions are at . +运行服务端的教程请见 。 我们希望与大家合作维护本教程。 -本教程的贡献者列表详见:。 +本教程的贡献者列表请见:。 --- From 149ea059ec53a9465025d3dd216a9477a84addcd Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:30:43 -0400 Subject: [PATCH 02/14] =?UTF-8?q?Fix=20typo=20=E6=94=B9=20->=20=E8=AF=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ec2a46b4c..1bb05c69a5 100755 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ - 选择一篇还没有被选走(在[列表](https://github.com/javascript-tutorial/zh.javascript.info/issues/324#issue-433691990)中被人勾选)的文章。 - 在[该 issue](https://github.com/javascript-tutorial/zh.javascript.info/issues/324) 中添加以文章标题为内容的评论,如 `An Introduction to JavaScript`。 - 我们的 bot 会在[列表](https://github.com/javascript-tutorial/zh.javascript.info/issues/324#issue-433691990)中勾选上对应的文章,这样其他人就知道你正在翻译该文章了。 - - 不要在改评论中添加其他说明。 + - 不要在该评论中添加其他说明。 - Fork 此仓库并开始翻译。完成翻译后,请投递一个 PR。 - PR 应以文章标题命名。Bot 会添加更多信息。 From ba4f26e22b60dd607488467377b587b956cc42ce Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:34:29 -0400 Subject: [PATCH 03/14] Use more formal term. Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bb05c69a5..f1ac960747 100755 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ - 在[该 issue](https://github.com/javascript-tutorial/zh.javascript.info/issues/324) 中添加以文章标题为内容的评论,如 `An Introduction to JavaScript`。 - 我们的 bot 会在[列表](https://github.com/javascript-tutorial/zh.javascript.info/issues/324#issue-433691990)中勾选上对应的文章,这样其他人就知道你正在翻译该文章了。 - 不要在该评论中添加其他说明。 -- Fork 此仓库并开始翻译。完成翻译后,请投递一个 PR。 +- Fork 此仓库并开始翻译。完成翻译后,请提交一个 PR。 - PR 应以文章标题命名。Bot 会添加更多信息。 请给维护者时间来审核和 merge 你的翻译,或者提出对其的修改意见。 From 04edde5a12f7100a00261c24fda4f8973e508732 Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:35:19 -0400 Subject: [PATCH 04/14] Eliminate ambiguity. Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f1ac960747..5d24e76d47 100755 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ - Fork 此仓库并开始翻译。完成翻译后,请提交一个 PR。 - PR 应以文章标题命名。Bot 会添加更多信息。 -请给维护者时间来审核和 merge 你的翻译,或者提出对其的修改意见。 +请给维护者时间来审核和 merge 你的翻译,或者提出对应的修改意见。 如果维护者没能回复,或者你想成为一个维护者,请在[主仓库给我们提新 issue](https://github.com/javascript-tutorial/en.javascript.info/issues/new)。 From e95680e9677d73ef6886b13134c0c083f355ffb9 Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:35:46 -0400 Subject: [PATCH 05/14] =?UTF-8?q?Add=20link=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d24e76d47..862a3332d1 100755 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ 🎉 非常感谢! -翻译版本上线后,我们会在“关于本项目“页面写上你的名字和贡献。 +翻译版本上线后,我们会在“[关于本项目](https://zh.javascript.info/about)”页面写上你的名字和贡献。 注: 罗列了完整的语言列表。 From 659f9129f4a0ea0ef2cb57509971925b72a63c62 Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:36:38 -0400 Subject: [PATCH 06/14] =?UTF-8?q?=E5=88=97=E5=87=BA=20->=20=E7=BD=97?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 862a3332d1..ebe150826f 100755 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ 翻译版本上线后,我们会在“[关于本项目](https://zh.javascript.info/about)”页面写上你的名字和贡献。 -注: 罗列了完整的语言列表。 +注: 列出了完整的语言列表。 ## 文件结构 From 12700880a54234cdaf86039b36b176570ea2f0ab Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:37:48 -0400 Subject: [PATCH 07/14] Change English punctuation mark to Chinese Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ebe150826f..f1b1f23030 100755 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ ### 专有词 - 一些具体的专有词不应被翻译。如”Function Declaration“。 -- 对于其他专有词,如 `resolved promise`, `slash`, `regexp` 等,请使用一个你的语言中的同义词。如果没有意思足够相近的词,请使用教程(如:[MDN](https://developer.mozilla.org/en-US/))中的翻译。 +- 对于其他专有词,如 `resolved promise`、`slash` 和 `regexp` 等,请使用一个你的语言中的同义词。如果没有意思足够相近的词,请使用教程(如:[MDN](https://developer.mozilla.org/en-US/))中的翻译。 ### 代码块中的文本 From 590a88426a7a313b7c7c77c76680c9ac49e8d8e8 Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:38:28 -0400 Subject: [PATCH 08/14] Change English punctuation mark to Chinese. Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f1b1f23030..fdc8e331bd 100755 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ - 不要翻译变量,类等标识符。 - 确保翻译后的代码可以正常运行。 :) -例: +例: ```js // Example From 6ca377210654140bbf31060cc1474011a2c9c503 Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:38:54 -0400 Subject: [PATCH 09/14] Change English punctuation mark to Chinese. Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fdc8e331bd..2e3d4405ba 100755 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ document.querySelector('.你好').innerHTML = text; 如果这个外部链接是指向 Wikipedia 的,如 `https://en.wikipedia.org/wiki/JavaScript`,并且其有质量优良的目标语言的译文,请将链接指向该译文。 -例: +例: ```md [JavaScript](https://en.wikipedia.org/wiki/JavaScript) is a programming language. From ca73d4e98dc55599172819f1ea4ebbe78a236b9c Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:39:39 -0400 Subject: [PATCH 10/14] Swap quotation mark. Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e3d4405ba..f84274d85a 100755 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ document.querySelector('.你好').innerHTML = text; ### 元数据 -一些文件,(这些文件通常是任务),以 YAML 的元数据起始。这些元数据以”---“做分隔: +一些文件,(这些文件通常是任务),以 YAML 的元数据起始。这些元数据以“---”做分隔: ```md importance: 5 From 2548741583f572d0209f06022e4af303cd0e403e Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 08:40:08 -0400 Subject: [PATCH 11/14] Swap quotation marks. Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f84274d85a..a726372152 100755 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ importance: 5 ... ``` -请不要翻译”importance“ (和其他放置在开头的元数据). +请不要翻译“importance”(和其他放置在开头的元数据)。 ### Anchors From 299e8a052597a9c4ee40faca63272ca5689206bf Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 09:42:58 -0400 Subject: [PATCH 12/14] =?UTF-8?q?=E9=83=A8=E5=88=86=20->=20=E7=AB=A0?= =?UTF-8?q?=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a726372152..55439dfb72 100755 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ 这个文件夹含有以下一种文件: -- `index.md` 对应一个部分, +- `index.md` 对应一个章节, - `article.md` 对应一个文章, - `task.md` 对应一个任务 (如果有答案的话还会有 `solution.md` 这个文件)。 From 671d1462d7f296c49847aa01b6dba8b9b74686d5 Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 09:45:01 -0400 Subject: [PATCH 13/14] Use Chinese symbols. Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 55439dfb72..8589b23b66 100755 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ - `index.md` 对应一个章节, - `article.md` 对应一个文章, -- `task.md` 对应一个任务 (如果有答案的话还会有 `solution.md` 这个文件)。 +- `task.md` 对应一个任务(如果有答案的话还会有 `solution.md` 这个文件)。 每一个文件都以 `# 标题` 开始,然后是类 Markdown 格式的文本。一个简单的文字编辑器就可以编辑该文件。 From dfa53118e25a0f42e0ed3d1b83840c009b3d38c4 Mon Sep 17 00:00:00 2001 From: fakeinc Date: Tue, 4 Jun 2019 09:45:29 -0400 Subject: [PATCH 14/14] Use Chinese symbols. Co-Authored-By: LeviDing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8589b23b66..ad0387c65d 100755 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ ### 专有词 -- 一些具体的专有词不应被翻译。如”Function Declaration“。 +- 一些具体的专有词不应被翻译。如“Function Declaration”。 - 对于其他专有词,如 `resolved promise`、`slash` 和 `regexp` 等,请使用一个你的语言中的同义词。如果没有意思足够相近的词,请使用教程(如:[MDN](https://developer.mozilla.org/en-US/))中的翻译。 ### 代码块中的文本