Skip to content

Fix a typo and make a minor improvement #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 206 commits into
base: ja
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
443fc03
Remove awkward match in if_let
gepbird Jul 5, 2023
5b1e946
Revert "Remove awkward match in if_let"
gepbird Jul 5, 2023
7442728
Remove unnecessary block in awkward match
gepbird Jul 5, 2023
7e68ba5
Edit grammatical mistake
progalgo Mar 24, 2024
7e4b2ce
Fix an external link to absolute
dalance May 7, 2024
7133f4c
Fix some broken links in ja.po
dalance May 14, 2024
50b7013
Merge pull request #1842 from dalance/fix_link
marioidival May 14, 2024
c84e386
Merge pull request #1844 from dalance/fix_broken_links
marioidival May 14, 2024
d748b47
Add explicit section link
dalance May 17, 2024
6b9f38b
Update mdbook version in CI
dalance May 17, 2024
b8052df
Adjust translation build on CI
dalance May 17, 2024
b03d0d3
Merge pull request #1848 from dalance/update_mdbook
marioidival May 18, 2024
1ca1352
Merge pull request #1849 from dalance/update_translation_build
marioidival May 18, 2024
3d902f8
Merge pull request #1847 from dalance/explicit_section_name
marioidival May 18, 2024
65f37d5
Update ja.po
dalance May 19, 2024
0d22813
Merge pull request #1850 from dalance/update_ja
marioidival May 19, 2024
0a2ab00
Clarify interchangability for From and Into
xpcoffee May 19, 2024
2caac6e
Fix import
xpcoffee May 19, 2024
2048289
Merge pull request #1851 from xpcoffee/clarify-from-into
marioidival May 20, 2024
a813cde
Update paragraph in src/fn/diverging.md
ruanswanepoel May 23, 2024
0fc15da
Fix minor typo in from_into.md
mckzm May 26, 2024
fe5aa22
Add precision on From/Into asymmetry to from_into.md
mckzm May 26, 2024
98b1928
Merge pull request #1855 from mckzm/src/conversion-/from_into.md-into…
marioidival May 27, 2024
dc164e0
Fix CI failure
dalance May 27, 2024
7eb2f5a
Merge pull request #1856 from dalance/fix_ci_failure
marioidival May 27, 2024
cfc5719
Update mdbook-i18n-helpers to 0.3.3
dalance May 27, 2024
4840dca
Merge pull request #1857 from dalance/update_mdbook_i18n
marioidival May 28, 2024
1d5fd89
changed incorrect variable name
931573 May 30, 2024
ccbd7b2
changed comment
931573 May 31, 2024
69cfca0
Update instruction to add language entry of TRANSLATING.md
dalance Jun 6, 2024
f62bf53
Merge pull request #1858 from 931573/master
marioidival Jun 6, 2024
d45c1d3
Merge pull request #1860 from dalance/update_translating
marioidival Jun 6, 2024
120b5ff
Fix typo
Makonede Jun 9, 2024
6b93dff
Merge pull request #1861 from Makonede/patch-1
marioidival Jun 12, 2024
80facb3
Update ja.po and mdbook-i18n-helpers
dalance Jun 17, 2024
b1d97bd
Merge pull request #1863 from dalance/update_ja
marioidival Jun 17, 2024
48ddc5a
Merge pull request #1854 from mckzm/src/conversion-/from_into.md-fix_…
marioidival Jun 30, 2024
d7fe070
Merge pull request #1853 from ruanswanepoel/patch-1
marioidival Jun 30, 2024
e6d32ac
Merge pull request #1830 from progalgo/patch-1
marioidival Jun 30, 2024
658c6c2
Merge pull request #1725 from gepbird/remove-awkward-match
marioidival Jun 30, 2024
01b3ebd
Update option_result.md
stefnotch Jul 11, 2024
89aecb6
Merge pull request #1864 from stefnotch/patch-1
marioidival Jul 11, 2024
39bf14f
Add an example of implementing the FromStr trait for Circles.
leon-matthews Jul 13, 2024
76ea853
Merge pull request #1865 from leon-matthews/fromstr-example
marioidival Jul 16, 2024
e25486f
Remove the link to Japanese translation
dalance Jul 26, 2024
e691ace
Merge pull request #1868 from dalance/update_readme
marioidival Jul 26, 2024
5ad879d
Update lifetime_bounds.md
samliok Aug 5, 2024
8f94061
Merge pull request #1869 from samliok/patch-1
marioidival Aug 6, 2024
1d24c69
Initial setup zh translation
Binlogo Aug 17, 2024
edb8c57
Translate: `src/SUMMARY.md` part
Binlogo Aug 17, 2024
26e21c4
Translate: `src/index.md` part
Binlogo Aug 17, 2024
98c95ab
Translate: `src/hello.md`
Binlogo Aug 17, 2024
e9f39d8
Translate(zh): src/hello/comment.md
Binlogo Aug 17, 2024
799660d
Translate(zh): src/hello/print.md
Binlogo Aug 18, 2024
5fc0d83
Translate(zh): src/hello/print/print_debug.md
Binlogo Aug 18, 2024
aec12e5
Translate(zh): src/hello/print/print_display.md
Binlogo Aug 18, 2024
b74bad7
Translate(zh): src/hello/print/*.md
Binlogo Aug 18, 2024
77397be
Translate(zh): `src/primitives/*.md`
Binlogo Aug 18, 2024
dd6c166
Translate(zh): `src/custom_types/structs.md`
Binlogo Aug 18, 2024
baef7a0
Translate(zh): src/custom_types/enum.md
Binlogo Aug 18, 2024
485add2
Translate(zh): `src/custom_types/enum/*.md`
Binlogo Aug 18, 2024
db8de94
Translate(zh): `src/variable_bindings/*.md`
Binlogo Aug 18, 2024
6b58e52
Translation:(zh): `src/types/*.md`
Binlogo Aug 18, 2024
6267553
Translate(zh): `src/conversion/*.md`
Binlogo Aug 18, 2024
7fe6da6
Translate(zh): `src/flow_control/*.md` - 1/n
Binlogo Aug 19, 2024
39b796b
Translate(zh): `src/flow_control/match/destructuring/*.md`
Binlogo Aug 19, 2024
5cd0fff
Translate(zh): `src/flow_control/match/*.md`
Binlogo Aug 19, 2024
e598673
Translate(zh): `src/flow_control/*.md` end
Binlogo Aug 20, 2024
863e9b5
Translate(zh): `src/fn/*/*.md`
Binlogo Aug 21, 2024
95c93b9
Translate(zh): `src/mod/**/*.md`
Binlogo Aug 21, 2024
5d50f5a
Translate(zh): `src/crates/**/*.rs`
Binlogo Aug 21, 2024
203cee6
Translate(zh): `src/cargo/deps&conventions.md`
Binlogo Aug 21, 2024
79ec054
Translate(zh): `src/cargo/*/*.md`
Binlogo Aug 22, 2024
c7dbcd8
Translate(zh): `src/attribute/**/*.md`
Binlogo Aug 22, 2024
c64dc27
Translate(zh): `src/generics/*` - 1/n
Binlogo Aug 23, 2024
e99dffb
Translate(zh): `src/generics/*`
Binlogo Aug 24, 2024
da409ca
Translate(zh): `src/scope/*`
Binlogo Aug 24, 2024
d632011
Translate(zh): `src/trait`
Binlogo Aug 25, 2024
afc67da
update primitives.md with example of array and tuple
psyklopp Aug 25, 2024
f848229
update primitives.md with example of array and tuple
psyklopp Aug 25, 2024
3c3d699
Translate(zh): `src/error/*`
Binlogo Aug 25, 2024
b54bf04
Translate(zh): `src/std/*`
Binlogo Aug 25, 2024
7bf3ae8
Fix README.md - add workflow status badge
psyklopp Aug 25, 2024
859786c
Merge pull request #1878 from psyklopp/master
marioidival Aug 26, 2024
e6dfc62
Translate(zh): `src/std/*` - continue
Binlogo Aug 27, 2024
3a9cbdb
Translate(zh): `src/std/*` - end
Binlogo Aug 28, 2024
0ad8199
Translate(zh): `src/std_misc/*` begin
Binlogo Aug 28, 2024
ec3c99c
Translate(zh): `src/std_misc/*` continue
Binlogo Aug 29, 2024
054864d
Translate(zh): `src/std_misc/*` continue
Binlogo Aug 30, 2024
e106989
Translate(zh): `src/std_misc/*` end
Binlogo Aug 31, 2024
974ec30
Translate(zh): `src/testing/*`
Binlogo Aug 31, 2024
f38015d
Translate(zh): finish 🎉
Binlogo Aug 31, 2024
901c3bb
Add TRANSLATING_ZH.md
Binlogo Aug 31, 2024
8a8b0c0
Translate(zh): update "See also"
Binlogo Aug 31, 2024
9f8948e
Translate(zh): optimize index.md
Binlogo Aug 31, 2024
5ec8443
Translation(zh): optimize continue
Binlogo Aug 31, 2024
1fa384a
Translation(zh): optimize continue
Binlogo Aug 31, 2024
4e7e3d8
Fix typo in conversion/from_into
tniessen Sep 6, 2024
1d3572c
Corrected x values for example rectangle
cyrts Sep 7, 2024
70aa7ae
Merge pull request #1884 from cyrts/issue-1883
marioidival Sep 8, 2024
c79ec34
Merge pull request #1882 from tniessen/patch-1
marioidival Sep 8, 2024
12fdafb
Translation(zh): optimize continue (:3331)
Binlogo Sep 8, 2024
c18b7d9
Translation(zh): optimize continue (:3436)
Binlogo Sep 9, 2024
3314ea6
Fix ambiguous comment on primitives > Arrays and Slices
maple19out Sep 9, 2024
3a8664e
Translation(zh): optimize continue (:3628)
Binlogo Sep 10, 2024
2ebc28a
Translation(zh): optimize continue (:4994)
Binlogo Sep 10, 2024
a96c788
Translation(zh): optimize continue (:5194)
Binlogo Sep 11, 2024
79b6a28
Translation(zh): optimize continue (:6751)
Binlogo Sep 11, 2024
1c2dd10
Translation(zh): optimize continue (:8826)
Binlogo Sep 11, 2024
dd361e2
Translation(zh): optimize continue (:9216)
Binlogo Sep 13, 2024
789576c
Translation(zh): optimize continue (:9811)
Binlogo Sep 15, 2024
76a4821
Translation(zh): optimize continue (:12478)
Binlogo Sep 15, 2024
7cfc730
Translation(zh): optimize end
Binlogo Sep 16, 2024
7fa8a2c
Prepare to add translation Chinese(zh) into official repository
Binlogo Sep 20, 2024
a138631
Merge branch 'rust-lang:master' into zh
Binlogo Sep 20, 2024
ebdc1a3
Translate(zh): fix broken link issues
Binlogo Sep 21, 2024
1d06bc7
docs(zh): fix known issues
YangFong Sep 23, 2024
c7305e6
Update iter.md
Flamenco Sep 29, 2024
00be0f9
Add .vscode/ to .gitignore
ShapelessCat Sep 29, 2024
0e22153
Improve docs
ShapelessCat Sep 29, 2024
6e0146a
Merge pull request #1886 from rust-lang-cn/zh
marioidival Sep 30, 2024
4dafcae
Merge pull request #1887 from Flamenco/patch-1
marioidival Sep 30, 2024
8bede1b
Merge pull request #1888 from ShapelessCat/minor-improvements
marioidival Sep 30, 2024
04fb7f3
`read_lines`: Use `. filter_map(Result::ok)` instead of `.flatten()`.
lgarron Oct 17, 2024
682eed9
Merge pull request #2 from rust-lang-cn/fix/doc
Binlogo Oct 17, 2024
6a65177
Fix typo in generics/new_types
breitwan Oct 25, 2024
69c0e9b
Merge pull request #1890 from lgarron/patch-1
marioidival Oct 26, 2024
2892dfa
Merge pull request #1891 from rust-lang-cn/zh
marioidival Oct 26, 2024
54cc32a
Merge pull request #1892 from breitwan/typo-fix
marioidival Oct 26, 2024
4e3881e
Merge pull request #1885 from maple19out/master
marioidival Oct 26, 2024
8bb30b9
fix(doc): correct small errors in pipes.md
bepri Oct 30, 2024
9db7860
Merge pull request #1894 from bepri/patch-1
marioidival Oct 31, 2024
9bc6832
Upgrade actions/upload-artifact action
jdno Nov 6, 2024
90a8b26
Merge pull request #1896 from jdno/upgrade-action
marioidival Nov 7, 2024
1174efc
Update mdbook theme for newer version
ehuss Nov 7, 2024
e1d1f2c
Merge pull request #1897 from ehuss/fix-theme
marioidival Nov 8, 2024
ecd5114
Fix #1900
zanedp Dec 5, 2024
7640633
Merge pull request #1901 from zanedp/patch-1
marioidival Dec 7, 2024
d2f9fb1
Mention that you're not allowed to partially move Drop types
josephcsible Dec 16, 2024
0933975
Merge pull request #1902 from josephcsible/partial-move-drop
marioidival Dec 18, 2024
7f722c8
Fix typo in static_lifetime.md
hkBst Jan 3, 2025
28b7ec6
Merge pull request #1905 from hkBst/patch-1
marioidival Jan 3, 2025
8e69e36
Fix function name in new_types.md in Japanese
yadokani389 Jan 10, 2025
054259e
Merge pull request #1907 from yadokani389/patch-1
marioidival Jan 13, 2025
658835d
add po/es.po
miguelraz Jan 31, 2025
564e2db
add es to rbe.yml and Spanish button
miguelraz Jan 31, 2025
5bda671
es translation :900
miguelraz Jan 31, 2025
ecc1d51
en to es in index.hbs
miguelraz Jan 31, 2025
7bede22
es translation to 1000
miguelraz Feb 1, 2025
877d151
es translation to 1200
miguelraz Feb 1, 2025
ca21cdb
es translation to 1500
miguelraz Feb 1, 2025
3d4b4e4
es/po.es to :1700
miguelraz Feb 1, 2025
9af042c
es translation to 2100
miguelraz Feb 1, 2025
e56a47b
fix transposed . after ending quotes
miguelraz Feb 1, 2025
021ecec
unbork failing tests
miguelraz Feb 1, 2025
7aacc6b
fix broken macro link
miguelraz Feb 1, 2025
7437669
Merge pull request #1910 from miguelraz/spanish-translation
marioidival Feb 2, 2025
bd234ec
es translation to 2162
miguelraz Feb 3, 2025
d03043f
es translation to :2600
miguelraz Feb 3, 2025
fc2c7e7
correct syntax errors
miguelraz Feb 3, 2025
612b4fd
es translation to 1:3100
miguelraz Feb 3, 2025
a349a04
Merge pull request #1911 from miguelraz/master
marioidival Feb 4, 2025
1fe268a
Add more examples @ drop.md
wowinter13 Feb 5, 2025
66543bb
Merge pull request #1912 from wowinter13/improve-drop-docs
marioidival Feb 6, 2025
64b9734
Update mdbook to 0.4.46
ehuss Mar 9, 2025
6f69823
Merge pull request #1914 from ehuss/update-mdbook
marioidival Mar 9, 2025
f7ce2ac
Grammar
RhysFonville Mar 26, 2025
d5f826a
Merge pull request #1916 from RhysFonville/patch-1
marioidival Mar 29, 2025
efbe25b
Update book.toml rename `author` field to `authors`
szabgab Mar 30, 2025
46a68fe
add example to comment.md
KennedyRichard Apr 6, 2025
e6c8e5d
Rename count to index for clarity
wazawoo Apr 7, 2025
0d7964d
Merge pull request #1920 from wazawoo/improve-clarity-on-testcase-list
marioidival Apr 7, 2025
3914d41
docs: mark illustrative 'static lifetime example with `ignore`
santoshxshrestha Apr 22, 2025
fbbf20a
Merge pull request #1923 from santoshxshrestha/patch-1
marioidival Apr 22, 2025
76cac7d
Non-tail recursive call note in testcase_linked_list
ViggoC Apr 27, 2025
53b14f4
Merge pull request #1924 from ViggoC/patch-1
marioidival Apr 29, 2025
af68928
The example is not meant to be compiled. Changed the code block ann…
santoshxshrestha Apr 29, 2025
8a8918c
Merge pull request #1926 from santoshxshrestha/patch-1
marioidival Apr 30, 2025
e6fe4b5
Fix typo in Japanese translation
zyoshoka May 11, 2025
a31d217
fix(docs): standardize on `no_run` attribute for documentation examples
santoshxshrestha May 12, 2025
c83a739
Merge pull request #1928 from zyoshoka/fix-typo-assoc-items-ja
marioidival May 13, 2025
c9d151f
Merge pull request #1929 from santoshxshrestha/patch-1
marioidival May 13, 2025
4623b5f
The example is not meant to be compiled with out passing arguments.
santoshxshrestha May 14, 2025
7898fcf
added a shorthand for the #[should_panic(expected = "msg")
santoshxshrestha May 14, 2025
4458911
Merge pull request #1931 from santoshxshrestha/patch-2
marioidival May 29, 2025
4e4a37e
Merge pull request #1930 from santoshxshrestha/patch-1
marioidival May 29, 2025
dfce4ad
Merge pull request #1919 from KennedyRichard/patch-1
marioidival May 29, 2025
21f4e32
Merge pull request #1917 from szabgab/patch-1
marioidival May 29, 2025
8a63d8b
fix(#1656): update doc tests to use `playground` as the crate name
mautamu May 30, 2025
d5ea5c6
ci: use latest mdbook
ryzhak Jun 5, 2025
17fb2b8
Merge pull request #1934 from mautamu/fix-1904
marioidival Jun 10, 2025
885cd01
Merge pull request #1935 from ryzhak/fix/1933
marioidival Jun 10, 2025
3c216f6
introduce new @media query to set a higher content width on ultra wid…
Christoph-Harms Jun 11, 2025
e579162
refactor: replace "18/9" by "2", because math
Christoph-Harms Jun 11, 2025
44afaef
doc: add doc comment
Christoph-Harms Jun 11, 2025
9baa9e8
Merge pull request #1937 from Christoph-Harms/fix/1936
marioidival Jun 11, 2025
95d44ec
Revert "introduce new @media query to set a higher content width on u…
Christoph-Harms Jun 17, 2025
05c7d8b
Merge pull request #1939 from Christoph-Harms/revert-1937-fix/1936
marioidival Jun 18, 2025
07cddd6
allow easy fixes
tshepang Jun 20, 2025
288b4e4
Merge pull request #1941 from tshepang/patch-2
marioidival Jun 25, 2025
ea92ad0
Update Chinese translations and metadata in `zh.po` file
Binlogo Jul 3, 2025
05c06d7
Update Chinese translations in `zh.po` file
Binlogo Jul 3, 2025
2dec150
Update README.md to include link for Chinese translation guide
Binlogo Jul 3, 2025
5633506
Add tracking translation progress section in TRANSLATING.md
Binlogo Jul 3, 2025
e386be5
Merge pull request #1943 from rust-lang-cn/zh
marioidival Jul 4, 2025
561cdb8
Fix typo in Japanese translation
noritada Jul 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Translate(zh): src/cargo/deps&conventions.md
  • Loading branch information
Binlogo committed Aug 21, 2024
commit 203cee60f81c55a59813befb4c95cc37c642bd35
57 changes: 46 additions & 11 deletions po/zh.po
Original file line number Diff line number Diff line change
Expand Up @@ -6820,26 +6820,29 @@ msgid ""
"`cargo` is the official Rust package management tool. It has lots of really "
"useful features to improve code quality and developer velocity! These include"
msgstr ""
"`cargo` 是 Rust 的官方包管理工具。它有许多非常有用的功能来提高代码质量和开发效率!这些功能包括"

#: src/cargo.md:6
msgid ""
"Dependency management and integration with [crates.io](https://crates.io) "
"(the official Rust package registry)"
msgstr ""
"依赖管理和与 [crates.io](https://crates.io)(官方 Rust 包注册中心)的集成"

#: src/cargo.md:8
msgid "Awareness of unit tests"
msgstr ""
msgstr "支持单元测试"

#: src/cargo.md:9
msgid "Awareness of benchmarks"
msgstr ""
msgstr "支持基准测试"

#: src/cargo.md:11
msgid ""
"This chapter will go through some quick basics, but you can find the "
"comprehensive docs in [The Cargo Book](https://doc.rust-lang.org/cargo/)."
msgstr ""
"本章将快速介绍一些基础知识,不过你可以在 [Cargo 手册](https://doc.rust-lang.org/cargo/) 中找到更全面的文档。"

#: src/cargo/deps.md:3
msgid ""
Expand All @@ -6848,35 +6851,38 @@ msgid ""
"Rust ecosystem comes standard with `cargo`! `cargo` can manage dependencies "
"for a project."
msgstr ""
"大多数程序都依赖于一些库。如果你曾经手动管理过依赖,你就知道这有多痛苦。幸运的是,Rust 生态系统标配了 `cargo` 工具!`cargo` 可以为项目管理依赖。"

#: src/cargo/deps.md:8
msgid "To create a new Rust project,"
msgstr ""
msgstr "创建一个新的 Rust 项目,"

#: src/cargo/deps.md:11
msgid "# A binary\n"
msgstr ""
msgstr "# 二进制程序\n"

#: src/cargo/deps.md:13
msgid "# A library\n"
msgstr ""
msgstr "# 库\n"

#: src/cargo/deps.md:18
msgid ""
"For the rest of this chapter, let's assume we are making a binary, rather "
"than a library, but all of the concepts are the same."
msgstr ""
"在本章的剩余部分,我们假设我们正在创建一个二进制程序,而不是一个库,但所有的概念都是相同的。"

#: src/cargo/deps.md:21
msgid "After the above commands, you should see a file hierarchy like this:"
msgstr ""
msgstr "执行上述命令后,应该会得到这样的文件层次结构:"

#: src/cargo/deps.md:35
msgid ""
"The `main.rs` is the root source file for your new `foo` project -- nothing "
"new there. The `Cargo.toml` is the config file for `cargo` for this project. "
"If you look inside it, you should see something like this:"
msgstr ""
"`main.rs` 是新的 `foo` 项目的入口源文件 —— 这没什么新鲜的。`Cargo.toml` 是这个项目的 `cargo` 配置文件。如果你查看它的内容,你应该看到类似这样的内容:"

#: src/cargo/deps.md:39
msgid ""
Expand All @@ -6889,27 +6895,37 @@ msgid ""
"[dependencies]\n"
"```"
msgstr ""
"```toml\n"
"[package]\n"
"name = \"foo\"\n"
"version = \"0.1.0\"\n"
"authors = [\"mark\"]\n"
"\n"
"[dependencies]\n"
"```"

#: src/cargo/deps.md:48
msgid ""
"The `name` field under `[package]` determines the name of the project. This "
"is used by `crates.io` if you publish the crate (more later). It is also the "
"name of the output binary when you compile."
msgstr ""
"`[package]` 下的 `name` 字段决定了项目的名称。如果你发布 crate(稍后会详细介绍),这个名称将被 `crates.io` 使用。这也是编译时输出的二进制文件的名称。"

#: src/cargo/deps.md:52
msgid ""
"The `version` field is a crate version number using [Semantic Versioning]"
"(http://semver.org/)."
msgstr ""
"`version` 字段是使用 [语义化版本控制](http://semver.org/) 的 crate 版本号。"

#: src/cargo/deps.md:55
msgid "The `authors` field is a list of authors used when publishing the crate."
msgstr ""
msgstr "`authors` 字段是发布 crate 时使用的作者列表。"

#: src/cargo/deps.md:57
msgid "The `[dependencies]` section lets you add dependencies for your project."
msgstr ""
msgstr "`[dependencies]` 部分用来为项目添加依赖。"

#: src/cargo/deps.md:59
msgid ""
Expand All @@ -6921,12 +6937,14 @@ msgid ""
"to our `Cargo.toml` under `[dependencies]`: `clap = \"2.27.1\"`. And that's "
"it! You can start using `clap` in your program."
msgstr ""
"例如,假设我们希望我们的程序有一个出色的命令行界面(CLI)。你可以在 [crates.io](https://crates.io)(官方的 Rust 包注册中心)上找到许多优秀的包。一个受欢迎的选择是 [clap](https://crates.io/crates/clap)。在撰写本文时,`clap` 最新发布的版本是 `2.27.1`。要在我们的程序中添加依赖,我们只需在 `Cargo.toml` 的 `[dependencies]` 下添加以下内容:`clap = \"2.27.1\"`。就是这样!你现在可以在你的程序中开始使用 `clap` 了。"

#: src/cargo/deps.md:67
msgid ""
"`cargo` also supports [other types of dependencies](https://doc.rust-lang.org/"
"cargo/reference/specifying-dependencies.html). Here is just a small sampling:"
msgstr ""
"`cargo` 还支持 [其他类型的依赖](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html)。这里只是一个小示例:"

#: src/cargo/deps.md:70
msgid ""
Expand All @@ -6943,13 +6961,25 @@ msgid ""
"bar = { path = \"../bar\" } # from a path in the local filesystem\n"
"```"
msgstr ""
"```toml\n"
"[package]\n"
"name = \"foo\"\n"
"version = \"0.1.0\"\n"
"authors = [\"mark\"]\n"
"\n"
"[dependencies]\n"
"clap = \"2.27.1\" # 来自 crates.io\n"
"rand = { git = \"https://github.com/rust-lang-nursery/rand\" } # 来自在线仓库\n"
"bar = { path = \"../bar\" } # 来自本地文件系统中的路径\n"
"```"

#: src/cargo/deps.md:82
msgid ""
"`cargo` is more than a dependency manager. All of the available configuration "
"options are listed in the [format specification](https://doc.rust-lang.org/"
"cargo/reference/manifest.html) of `Cargo.toml`."
msgstr ""
"`cargo` 不仅仅是一个依赖管理器。所有可用的配置选项都列在 `Cargo.toml` 的 [格式规范](https://doc.rust-lang.org/cargo/reference/manifest.html) 中。"

#: src/cargo/deps.md:86
msgid ""
Expand All @@ -6959,45 +6989,50 @@ msgid ""
"crates if needed, and build everything, including your crate. (Note that it "
"only rebuilds what it has not already built, similar to `make`)."
msgstr ""
"要构建我们的项目,我们可以在项目目录的任何位置(包括子目录!)执行 `cargo build`。我们也可以使用 `cargo run` 来构建并运行。注意,这些命令会解析所有依赖,如果需要的话下载 crate,并构建所有内容,包括你的 crate。(注意,它只会重新构建尚未构建的部分,类似于 `make`)。"

#: src/cargo/deps.md:92
msgid "Voila! That's all there is to it!"
msgstr ""
msgstr "瞧!就是这么简单!"

#: src/cargo/conventions.md:3
msgid "In the previous chapter, we saw the following directory hierarchy:"
msgstr ""
msgstr "在上一章中,我们看到了以下目录层次结构:"

#: src/cargo/conventions.md:12
msgid ""
"Suppose that we wanted to have two binaries in the same project, though. What "
"then?"
msgstr ""
"假设我们想在同一个项目中有两个二进制文件。那该怎么办呢?"

#: src/cargo/conventions.md:15
msgid ""
"It turns out that `cargo` supports this. The default binary name is `main`, "
"as we saw before, but you can add additional binaries by placing them in a "
"`bin/` directory:"
msgstr ""
"事实证明,`cargo` 支持这一点。默认的二进制文件名是 `main`,就像我们之前看到的那样,但你可以通过将额外的二进制文件放在 `bin/` 目录中来添加它们:"

#: src/cargo/conventions.md:28
msgid ""
"To tell `cargo` to only compile or run this binary, we just pass `cargo` the "
"`--bin my_other_bin` flag, where `my_other_bin` is the name of the binary we "
"want to work with."
msgstr ""
"要告诉 `cargo` 只编译或运行这个二进制文件,我们只需要给 `cargo` 传递 `--bin my_other_bin` 标志,其中 `my_other_bin` 是我们想要处理的二进制文件的名称。"

#: src/cargo/conventions.md:32
msgid ""
"In addition to extra binaries, `cargo` supports [more features](https://doc."
"rust-lang.org/cargo/guide/project-layout.html) such as benchmarks, tests, and "
"examples."
msgstr ""
"除了额外的二进制文件,`cargo` 还支持 [更多功能](https://doc.rust-lang.org/cargo/guide/project-layout.html),如基准测试、测试和示例。"

#: src/cargo/conventions.md:35
msgid "In the next chapter, we will look more closely at tests."
msgstr ""
msgstr "在下一章中,我们将更仔细地看看测试。"

#: src/cargo/test.md:3
msgid ""
Expand Down