├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rust 文档翻译指引 2 | > Rust Translation Guide 3 | 4 | 本文给出翻译 Rust 官方相关文档的一些建议和具体指导操作,内容由 [rust-lang-cn](https://github.com/rust-lang-cn) 项目组编写,如有不合理或错误的地方,随时欢迎指出纠正,谢谢! 5 | 6 | ## 中文翻译宗旨 7 | 8 | 本文将在统一一个地方汇总所有官方相关的文档,提供最完善的 Rust 的中文指引,服务于社区和新人。本项目鼓励分享、奉献、无私、合作、注重版权(按惯例遵循官方的原授权),欢迎大家踊跃参与 Rust 文档的翻译工作,推动 Rust 在中国蓬勃发展,让更多未来的学习者更友好方便地学习 Rust 的知识。 9 | 10 | ## 统一翻译术语和固定用语 11 | 12 | 文档在翻译过程中,有些词汇或短语可能会反复遇到,有一些是英语的固有的短语或常见表述,在翻译成中文时,应该在文章中保持一致,比如: 13 | 14 | - see also:参见,参考 15 | - up to:取决于 16 | 17 | 此类内容后续会不断整理更新。 18 | 19 | 除了固有短语外,还有一类是和 Rust 或计算机相关的科技术语,在翻译过程中应使用正确的术语,参见[《Rust 语言术语中英文对照表》](https://github.com/rust-lang-cn/english-chinese-glossary-of-rust/blob/master/rust-glossary.md)。 20 | 21 | ## Rust 官方文档 22 | 23 | Rust 语言的学习或参考文档大都列在 [**Rust 学习指引页**](https://www.rust-lang.org/learn) 和 [**Rust 官方文档主页**](https://doc.rust-lang.org/) 上,目前 Rust 官方团队已经将相关文档拆分到不同的仓库上: 24 | 25 | - [《Rust 程序设计语言》(The Rust Programming Language)](https://doc.rust-lang.org/book/),对应 [GitHub 仓库](https://github.com/rust-lang/book) 26 | - [《通过例子学 Rust》(Rust by Example)](https://doc.rust-lang.org/stable/rust-by-example/),对应 [GitHub 仓库](https://github.com/rust-lang/rust-by-example) 27 | - [Rust 版本指南(The Edition Guide)](https://doc.rust-lang.org/edition-guide/index.html),对应 [GitHub 仓库](https://github.com/rust-lang-nursery/edition-guide) 28 | - [Cargo 帮助文档](https://doc.rust-lang.org/cargo/index.html),对应 [GitHub 仓库源文件](https://github.com/rust-lang/cargo/tree/master/src/doc/src) 29 | - [rustdoc 帮助文档](https://doc.rust-lang.org/rustdoc/index.html),对应 [GitHub 仓库源文件](https://github.com/rust-lang/rust/tree/master/src/doc/rustdoc) 30 | - [rustc 帮助文档](https://doc.rust-lang.org/rustc/index.html),对应 [GitHub 仓库源文件](https://github.com/rust-lang/rust/tree/master/src/doc/rustc) 31 | - [Rust 编译错误索引](https://doc.rust-lang.org/error-index.html),对应 [GitHub 仓库源代码](https://github.com/rust-lang/rust/blob/master/src/librustc_mir/error_codes.rs) 32 | - [《Rust 语言参考》(The Rust Reference)](https://doc.rust-lang.org/reference/index.html),对应 [GitHub 仓库](https://github.com/rust-lang-nursery/reference) 33 | - [The Rustonomicon](https://doc.rust-lang.org/nomicon/),对应 [GitHub 仓库](https://github.com/rust-lang-nursery/nomicon) 34 | 35 | 以上文档优先处理,这些文档都循序渐进翻译成中文文档。还有其他更多官方或其他非官方相关的文档: 36 | 37 | - [使用 Rust 编写命令行应用](https://rust-lang-nursery.github.io/cli-wg/),对应 [GitHub 仓库地址](https://github.com/rust-lang-nursery/cli-wg) 38 | - [Rust 和 WebAssembly 教程(WebAssembly Book)](https://rustwasm.github.io/docs/book/),对应 [GitHub 仓库](https://github.com/rustwasm/book) 39 | - [嵌入式 Rust 教程](https://rust-embedded.github.io/book/),对应 [GitHub 仓库](https://github.com/rust-embedded/book) 40 | - [A Rust Cookbook](https://rust-lang-nursery.github.io/rust-cookbook/),对应 [GitHub 仓库](https://github.com/rust-lang-nursery/rust-cookbook) 41 | - [The Unstable Book](https://doc.rust-lang.org/nightly/unstable-book/),对应 [GitHub 仓库源代码](https://github.com/rust-lang/rust/tree/master/src/doc/unstable-book) 42 | - [rustc 指引——Rust 编译器的工作原理及如何参与贡献(rustc-guide)](https://rust-lang.github.io/rustc-guide/),对应 [GitHub 仓库](https://github.com/rust-lang/rustc-guide) 43 | - [rustup 命令说明](https://github.com/rust-lang/rustup.rs),本翻译项目会将 `rustup` 的相关说明翻译成中文 44 | - [Rust RFC——Rust 发展相关制定的文稿](https://rust-lang.github.io/rfcs/),对应 [GitHub 仓库](https://github.com/rust-lang/rfcs) 45 | - [mdBook 使用手册](https://rust-lang-nursery.github.io/mdBook/),对应 [GitHub 仓库](https://github.com/rust-lang-nursery/mdBook) 46 | - [Rust API 指导原则](https://rust-lang-nursery.github.io/api-guidelines/),对应 [GitHub 仓库](https://github.com/rust-lang-nursery/api-guidelines) 47 | - [async-book](https://rust-lang.github.io/async-book/),对应 [GitHub 仓库](https://github.com/rust-lang/async-book) 48 | 49 | 上述文档的源文件有些是放在 [rust](https://github.com/rust-lang/rust) 和 [cargo](https://github.com/rust-lang/cargo) 的仓库的子目录中:[Rust 文档](https://github.com/rust-lang/rust/tree/master/src/doc) 和 [cargo 文档](https://github.com/rust-lang/cargo/tree/master/src/doc)。 50 | 51 | 另外除了 `README.md` 文件外,还可以创建 `CONTRIBUTING.md` 和 `CONTRIBUTORS.md` 文件,前者是介绍如何参与项目的指南文件,后者可以列出参与项目的贡献者名单。这两份文件上,可以保留原文件基础上,再加上如何翻译的介绍和翻译者等信息。 52 | 53 | [rust-lang-cn](https://github.com/rust-lang-cn) 项目组已经翻译好的 [《通过例子学 Rust》](https://github.com/rust-lang-cn/rust-by-example-cn)就是按照这些原则进行的。 54 | 55 | ## 总体建议 56 | 57 | 对于官方文档的翻译,我们建议中文版的仓库的目录结构保持一致,原则上官方原仓库的每一个更新,中文版都应该跟随着更新,比如 `README.md` 文件,以及配套的编译文档的工具都要随着官方英文文档更新而同步更新。 58 | 59 | 还有授权协议也和官方文档保持一致,Rust 官方对项目的授权大都是双协议(Apache 和 MIT协议)授权,而且让使用者自由从这两个协议中任选一个协议进行重新授权。所以建议文档的中文翻译仓库采取和官方相同的授权方式。 60 | 61 | `README.md` 说明文件尽可能和官方同步,也可加上中文额外的内容。官方的文档 `README.md` 写的一般会比较详尽,包括 `git clone` 项目到文档项目的编译到最终的预览方式都给出详尽说明。中文的翻译项目同样建议保持一样的内容,让读者 `clone` 整个中文的项目也可以按照指引运行起来。 62 | 63 | ## 文字排版 64 | 65 | Rust 的相关文档主要以网页的形式呈现出来,为了让翻译后文档规范且易于阅读,这里也给出一定排版规则(此处列出常见且重要的几点): 66 | 67 | - 汉字,字母,数字等之间以一个空格隔开 68 | - 汉语的表达的段落不换行,即一行表示整个段落(和英文不同,在 `Markdown` 中若是 80 个字符就换行会导致在 `Chrome` 等浏览器上预览的行末文字和行首文字带着一个空格,除了 `Firefox` 浏览器支持 `CSS3` 的最新文字换行标准外,其他浏览器都未遵循) 69 | - 英文专有词汇注意大小写,如 *Rust* 不应该写成 *rust* 或 *RUST* 70 | - 表示强调: 71 | - 汉字中的强调使用加粗,不应该斜体,在 `Markdown` 中使用 `**` 将内容包含起来,如:`**语言**` 效果为 **语言** 72 | - 英文中使用斜体,在 `Markdown` 中使用 `*` 将内容包含起来,如:`*Rust*` 效果为 *Rust* 73 | - 翻译文档中主要使用中文标点符号,中文符号遵循国家符号标准,在保持英文的内容上,使用英文标点符号 74 | 75 | 更多排版注意内容可参考[《中文排版指南》](https://github.com/aaranxu/chinese-copywriting-guidelines)。 76 | 77 | ## 语句表达 78 | 79 | - 忠于英文原文,不增删内容,若英文原文本身有误,向原文提交错误修改 80 | - 翻译后内容注意语句通顺,符合中文语言习惯,比如英文中特别喜欢用 “You” 来承上启下,但中文不一定出现 “你” 这个人称(可考虑去掉人称代词) 81 | - 对专有名词或 Rust 术语,建议在翻译中文词汇后面加上英文词汇,用小括号括起来 82 | - 对英文表述暂时无法翻译清晰的语句,建议在括号后面加上原英文句子。 83 | 84 | ## 翻译流程 85 | 86 | TODO... 87 | 88 | ## 有关参考 89 | 90 | - 维基百科: 科技条目翻译指引 http://zh.wikipedia.org/wiki/Wikipedia:%E7%A7%91%E6%8A%80%E6%9D%A1%E7%9B%AE%E7%BF%BB%E8%AF%91%E6%8C%87%E5%BC%95 91 | 92 | ## 授权协议 93 | [![CC0](https://licensebuttons.net/p/zero/1.0/80x15.png)](https://creativecommons.org/publicdomain/zero/1.0/) Rust 文档翻译指引属于公有领域作品。 94 | --------------------------------------------------------------------------------