Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit cd0f5ce

Browse files
committed
Use Chinese quotation marks in zh-CN version, and fix some translation issues
1 parent 9713a3c commit cd0f5ce

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

zh-CN/community.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Rust 有一个社区驱动的开发过程,大多数决策都是通过公开的
140140

141141
* [语言设计团队][language_team]负责设计新的语言特性。
142142

143-
* [库团队][library_team]负责 Rust 标准库、rust-lang 包装箱,及公约。
143+
* [库团队][library_team]负责 Rust 标准库、rust-lang ,及公约。
144144

145145
* [编译器团队][compiler_team]负责编译器内部和优化。
146146

zh-CN/contribute-libs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ title: 为 Rust 出力 — 库 · Rust 程序设计语言
1212
决定写些什么更有乐趣和影响力是一个常见的问题。这里有些想法供你参考:
1313

1414
* 阅读和参与 [/r/rust][users.rust-lang.org]
15-
每周的本周每个人都在做什么("what's everyone working on
15+
每周的本周每个人都在做什么("what's everyone working on
1616
this week")主题。那些包含来自其他需要合作者的 Rust 程序员的激动人心的通知。
1717
* 通过 [awesome-rust][libs.rs] 亲自熟悉最好的 Rust 库。
1818
* Some larger projects, including the web browser [Servo], the HTTP

zh-CN/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ title: Rust 语言文档 · Rust 程序设计语言
1919

2020
[学习 Rust][rust-learning]:由社区维护、收集的学习 Rust 资料合集。
2121

22-
[常见问题][faq]
22+
[常见问题解答][faq]
2323

2424
[book]: https://kaisery.gitbooks.io/rust-book-chinese/content/
2525
[rbe]: https://rustwiki.org/rust-by-example/

zh-CN/faq.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
layout: zh-CN/faq
3-
title: 常被问到的问题 · Rust 程序设计语言
3+
title: 常见问题解答 · Rust 程序设计语言
44
---
55

6-
# 常被问到的问题
6+
# 常见问题解答
77

88
<p class="faq-intro">
99
此页面回答了有关 Rust 编程语言的常见问题。它不是这个语言的完整指南,也不是教学该语言的工具。这是 Rust 社区常遇到的人们重复提问的回答,及澄清了 Rust 某些设计决策幕后的理由。
@@ -78,7 +78,7 @@ Rust 由一个从全局角度出发,为项目设定愿景和优先事项的核
7878
2. 我们不会夸奖其他目标的表现力、极简主义或优雅。这些是可取的,但不是主要目标。
7979
3. 我们不打算覆盖 C++ 或任何其他语言的完整功能集。Rust 应提供较常使用功能。
8080
4. 我们不打算一切都是100%静态,100%安全,100%反思或任何其他意义上的太教条。存在权衡。
81-
5. 我们不打算使 Rust 能在每个可能的平台上运行。它必须没有不必要的妥协,最终适用于广泛使用的硬件和软件平台。
81+
5. 我们不打算使 Rust 能在每个可能的平台上运行。它必须没有不必要的妥协,最终适用于广泛使用的硬件和软件平台。
8282

8383
<h3><a href="#how-does-mozilla-use-rust" name="how-does-mozilla-use-rust">
8484
Mozilla 的哪些项目使用 Rust?
@@ -125,17 +125,17 @@ TODO: Write this answer.
125125
为什么 Rust 随时间推移在大幅变化?
126126
</a></h3>
127127

128-
Rust 起步的目标是创建一个安全且合用的系统编程语言。为了追求这个目标,它探索了很多想法,其中一些(生命周期、traits)被保留,而其他则被丢弃(类型体系系统、绿色线程)。 Also, in the run up to 1.0 a lot of the standard library was rewritten as early designs were updated to best use Rust's features and provide quality, consistent cross-platform APIs. 现在的 Rust 已达到了 1.0,语言保证为“稳定”(stable);虽然它可能继续演变,但对于目前的 Rust 来说,代码在未来的发行版本上能继续工作。
128+
Rust 起步的目标是创建一个安全且合用的系统编程语言。为了追求这个目标,它探索了很多想法,其中一些(生命周期、traits)被保留,而其他则被丢弃(类型体系系统、绿色线程)。 Also, in the run up to 1.0 a lot of the standard library was rewritten as early designs were updated to best use Rust's features and provide quality, consistent cross-platform APIs. 现在的 Rust 已达到了 1.0,语言保证为「稳定」(stable);虽然它可能继续演变,但对于目前的 Rust 来说,代码在未来的发行版本上能继续工作。
129129

130130
<h3><a href="#how-does-rust-language-versioning-work" name="how-does-rust-language-versioning-work">
131131
Rust 语言的版本控制是怎样的?
132132
</a></h3>
133133

134134
Rust 的语言版本遵循 [SemVer](http://semver.org/),如果更改修复了编译器错误、补丁安全漏洞,或更改调度或类型推断需要附加注明,则稳定 API 的向后不兼容更改允许在次要版本中出现。次要版本更改的更详细指南可以在[语言](https://github.com/rust-lang/rfcs/blob/master/text/1122-language-semver.md)[标准库](https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md)的已批准 RFC 中找到。
135135

136-
Rust 维护三个发行频道:稳定版(stable)、测试版(beta)和每夜版(nightly)。稳定版和测试版每六周更新一次,而在那时的每夜版会变为新的测试版,测试版变为新的稳定版。标记为不稳定或者隐藏在特性门控后的语言和标准库特性只能在每夜版上使用,新特性定位为不稳定,一旦被核心团队和相关的子团队批准的话是无门控的,这种方法允许实验性变更,并同时为稳定频道提供强有力的向后兼容保证。
136+
Rust 维护三个发行频道:稳定版(stable)、测试版(beta)和每夜版(nightly)。稳定版和测试版每六周更新一次,而在那时的每夜版会变为新的测试版,测试版变为新的稳定版。标记为不稳定或者隐藏在特性门控后的语言和标准库特性只能在每夜版上使用,新特性定位为不稳定,一旦被核心团队和相关的子团队批准的话是无门控的,这种方法允许实验性变更,并同时为稳定频道提供强有力的向后兼容保证。
137137

138-
就相关的其他详细信息,请阅读 Rust 博客["Stability as a Deliverable."](http://blog.rust-lang.org/2014/10/30/Stability.html)
138+
就相关的其他详细信息,请阅读 Rust 博客 ["Stability as a Deliverable."](http://blog.rust-lang.org/2014/10/30/Stability.html)
139139

140140
<h3><a href="#can-i-use-unstable-features-on-the-beta-or-stable-channel" name="can-i-use-unstable-features-on-the-beta-or-stable-channel">
141141
我可以在 Beta 或稳定频道上使用不稳定的功能吗?
@@ -147,10 +147,10 @@ Rust 维护三个“发行频道”:稳定版(stable)、测试版(beta
147147

148148

149149
<h3><a href="#what-are-feature-gates" name="what-are-feature-gates">
150-
什么是特性门控(Feature Gates)?
150+
什么是特性门控(Feature Gates)?
151151
</a></h3>
152152

153-
特性门控(Feature Gates)是 Rust 用来稳定编译器、语言和标准库特性的机制。 A feature that is "gated" is accessible only on the nightly release channel, and then only when it has been explicitly enabled through `#[feature]` attributes or the `-Z unstable-options` command line argument. When a feature is stabilized it becomes available on the stable release channel, and does not need to be explicitly enabled. At that point the feature is considered "ungated". Feature gates allow developers to test experimental features while they are under development, before they are available in the stable language.
153+
特性门控(Feature Gates)是 Rust 用来稳定编译器、语言和标准库特性的机制。 A feature that is "gated" is accessible only on the nightly release channel, and then only when it has been explicitly enabled through `#[feature]` attributes or the `-Z unstable-options` command line argument. When a feature is stabilized it becomes available on the stable release channel, and does not need to be explicitly enabled. At that point the feature is considered "ungated". Feature gates allow developers to test experimental features while they are under development, before they are available in the stable language.
154154

155155
<h3><a href="#why-a-dual-mit-asl2-license" name="why-a-dual-mit-asl2-license">
156156
为什么采用 MIT/ASL2 双许可证?
@@ -218,7 +218,7 @@ Rust 编译似乎很慢。这是为什么?
218218

219219
首先,Rust 有中等复杂类型的系统,并且必须花费不可忽略的编译时间来强制在运行时使 Rust 安全的约束。
220220

221-
其次,Rust 编译器遭受着长期的技术债务,特别是生成质量差的LLVM IR,而LLVM必须花时间“修复”。这有希望在未来[基于MIR](https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md)优化和转换传递来减轻 Rust 编译器在 LLVM 上的负担。
221+
其次,Rust 编译器遭受着长期的技术债务,特别是生成质量差的LLVM IR,而LLVM必须花时间「修复」。这有希望在未来[基于MIR](https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md)优化和转换传递来减轻 Rust 编译器在 LLVM 上的负担。
222222

223223
第三,Rust 使用的 LLVM 代码生成是一把双刃剑:虽然它能够使 Rust 具有世界一流的运行时性能,但 LLVM 是一个不重视编译时性能的大型框架,特别是在使用较差输入质量时。
224224

@@ -578,7 +578,7 @@ These are different terms for the same thing. In all cases, it means the value h
578578
如果一个类型实现了 [`Copy`][Copy] 特征,则它将在传递到一个函数时被复制。Rust 中的所有数字类型都实现了 [`Copy`][Copy],但结构类型默认并未实现 [`Copy`][Copy],因此它们是被移动。这意味着结构体不能在其他地方重用,除非它是通过 return 从函数中移出。
579579

580580
<h3><a href="#how-do-you-deal-with-a-use-of-moved-value-error" name="how-do-you-deal-with-a-use-of-moved-value-error">
581-
如何处理use of moved value错误?
581+
如何处理use of moved value错误?
582582
</a></h3>
583583

584584
This error means that the value you're trying to use has been moved to a new owner. The first thing to check is whether the move in question was necessary: if it moved into a function, it may be possible to rewrite the function to use a reference, rather than moving. Otherwise if the type being moved implements [`Clone`][Clone], then calling `clone()` on it before moving will move a copy of it, leaving the original still available for further use. Note though that cloning a value should typically be the last resort since cloning can be expensive, causing further allocations.
@@ -721,7 +721,7 @@ it explicitly. The rules are as follows:
721721
If these rules result in compilation errors, the Rust compiler will provide an error message indicating the error caused, and suggesting a potential solution based on which step of the inference process caused the error.
722722

723723
<h3><a href="#how-can-rust-guarantee-no-null-pointers" name="how-can-rust-guarantee-no-null-pointers">
724-
Rust 如何保证无空指针”和“无悬挂指针
724+
Rust 如何保证无空指针」和「无悬挂指针
725725
</a></h3>
726726

727727
The only way to construct a value of type `&Foo` or `&mut Foo` is to specify an existing value of type `Foo` that the reference points to. The reference "borrows" the original value for a given region of code (the lifetime of the reference), and the value being borrowed from cannot be moved or destroyed for the duration of the borrow.
@@ -735,7 +735,7 @@ You can do that with the [`Option`][Option] type, which can either be `Some(T)`
735735
<h2 id="generics">泛型</h2>
736736

737737
<h3><a href="#what-is-monomorphisation" name="what-is-monomorphisation">
738-
什么是单态化
738+
什么是单态化
739739
</a></h3>
740740

741741
Monomorphisation specializes each use of a generic function (or structure) with specific instance,
@@ -1115,7 +1115,7 @@ pub fn f() {
11151115
如何配置 Cargo 使用代理服务器?
11161116
</a></h3>
11171117

1118-
正如 Cargo 的[配置文档](http://doc.crates.io/config.html)所说,您可以设置配置文件中 `[http]` 下的proxy变量使 Cargo 使用一个代理服务器。
1118+
正如 Cargo 的[配置文档](http://doc.crates.io/config.html)所说,您可以设置配置文件中 `[http]` 下的proxy变量使 Cargo 使用一个代理服务器。
11191119

11201120
<h3><a href="#why-cant-the-compile-find-method-implementations" name="why-cant-the-compile-find-method-implementations">
11211121
为什么编译器找不到方法实现,即使我已经 <code>use</code> 包装箱?
@@ -1250,7 +1250,7 @@ To define procedural constants that can't be defined via these mechanisms, use t
12501250
我可以在 main 发生前运行初始化代码吗?
12511251
</a></h3>
12521252

1253-
Rust 没有`main` 之前的概念。你想找到的最接近的可能是 [`lazy-static`](https://github.com/Kimundi/lazy-static.rs) 包装箱,它在初次使用时通过懒惰初始化静态变量做到类似在main之前
1253+
Rust 没有`main` 之前的概念。你想找到的最接近的可能是 [`lazy-static`](https://github.com/Kimundi/lazy-static.rs) 包装箱,它在初次使用时通过懒惰初始化静态变量做到类似在main之前
12541254

12551255
<!--
12561256
@@ -1335,7 +1335,7 @@ __标准库__
13351335

13361336
The Rust standard library includes libbacktrace and libunwind, which may be undesirable in some programs. Using `#![no_std]` can thus result in smaller binaries, but will also usually result in substantial changes to the sort of Rust code you're writing. Note that using Rust without the standard library is often functionally closer to the equivalent C code.
13371337

1338-
作为一个例子,下列 C 程序读入一个名称,并向该名称的人说Hello
1338+
作为一个例子,下列 C 程序读入一个名称,并向该名称的人说Hello
13391339

13401340
```c
13411341
#include <stdio.h>

zh-CN/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ <h2>特点</h2>
2828
<li>转移语义</li>
2929
<li>保证内存安全</li>
3030
<li>线程无数据竞争</li>
31-
<li>trait 泛型</li>
31+
<li>基于 trait 的泛型</li>
3232
<li>模式匹配</li>
3333
<li>类型推断</li>
3434
<li>极小运行时</li>
35-
<li>高效C绑定</li>
35+
<li>高效 C 绑定</li>
3636
</ul>
3737
</div>
3838
<div class="col-md-8">

zh-CN/install.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h1 class="rustup">安装 Rust</h1>
8484
<br>
8585

8686
<a id="platform-button" style="display: none;" href="#">
87-
点击或按下 “n” 键更换平台
87+
点击或按下 「n」 键更换平台
8888
</a>
8989
</div>
9090
</div>
@@ -157,7 +157,7 @@ <h3>Windows 注意事项</h3>
157157
</a>
158158
。或者,你可以
159159
<a href="https://www.visualstudio.com/downloads/">安装</a>
160-
Visual Studio 2015 或 Visual Studio 2013 并在安装过程中选择安装 C++ 工具
160+
Visual Studio 2015 或 Visual Studio 2013 并在安装过程中选择安装 C++ 工具
161161
</p>
162162

163163
<p>

zh-CN/legal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ profits benefit the Rust project.
180180
## 帮助我们
181181

182182
作为 Rust 社区的成员,请留意用途成疑的
183-
Rust 标志和Rust字样。您可以将潜在的滥用报告到
183+
Rust 标志和Rust字样。您可以将潜在的滥用报告到
184184
[[email protected]](mailto:[email protected])。我们将评估每个事例并采取适当的行动。
185185

186186
请不要接触被投诉的商标使用人。这应该留给 Mozilla 及其代表处理。

zh-CN/other-installers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Rust 工具链的工具,从而为多个平台提供一致的 Rust 支持。
2828
开发者有时喜欢用他们平台的软件包管理器来安装 Rust。
2929
- `curl | sh`。在 Unix 上,我们通常通过 `curl` 运行一个 shell 脚本来安装 `rustup`。有些人可能担心这样做的安全性,而更愿意手动下载和运行安装程序。
3030
- 验证签名。尽管 `rustup` 通过 HTTPS 完成下载,但目前验证 Rust 安装程序的签名的唯一方式是手动验证独立安装包。
31-
- Windows 上的图形化添加/删除程序`rustup` 在控制台中运行,并且不像典型的 Windows 程序那样注册其安装。如果您偏好典型的 GUI 安装,我们有独立的 `.msi` 安装包。在未来,
31+
- Windows 上的图形化添加/删除程序`rustup` 在控制台中运行,并且不像典型的 Windows 程序那样注册其安装。如果您偏好典型的 GUI 安装,我们有独立的 `.msi` 安装包。在未来,
3232
`rustup` 也将有 Windows 上的 GUI 安装程序。
3333

3434
Rust 的平台支持定义共有[三层],这与可用的安装方法密切相关:

0 commit comments

Comments
 (0)