1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-05 16:10:31 +02:00

zh-Hans: Translation of hello-world.md (#694)

* zh-hans translation of hello-world.md

---------

Co-authored-by: wnghl <wnghilin@gmail.com>
This commit is contained in:
jasminewu229 2023-05-28 09:22:26 +08:00 committed by GitHub
parent ae705b274c
commit d93e71fb6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2002,13 +2002,14 @@ msgstr ""
#: src/hello-world.md:1
msgid "# Hello World!"
msgstr ""
msgstr "# Hello World!"
#: src/hello-world.md:3
msgid ""
"Let us jump into the simplest possible Rust program, a classic Hello World\n"
"program:"
msgstr ""
"让我们进入最简单的 Rust 程序,一个经典的 Hello World 程序:"
#: src/hello-world.md:6
msgid ""
@ -2018,10 +2019,16 @@ msgid ""
"}\n"
"```"
msgstr ""
"```rust,editable\n"
"fn main() {\n"
" println!(\"Hello 🌍!\");\n"
"}\n"
"```"
#: src/hello-world.md:12
msgid "What you see:"
msgstr ""
msgstr "你看到的:"
#: src/hello-world.md:14
msgid ""
@ -2031,6 +2038,11 @@ msgid ""
"* Rust has hygienic macros, `println!` is an example of this.\n"
"* Rust strings are UTF-8 encoded and can contain any Unicode character."
msgstr ""
"* 函数以 `fn` 开头。\n"
"* 像 C 和 C++ 一样,块由花括号分隔。\n"
"* main 函数是程序的入口。\n"
"* Rust 有卫生宏 (hygienic macros),`println!` 就是一个例子。\n"
"* Rust 字符串是 UTF-8 编码的,可以包含任何 Unicode 字符。"
#: src/hello-world.md:22
msgid ""
@ -2038,7 +2050,8 @@ msgid ""
"see\n"
"a ton of it over the next four days so we start small with something "
"familiar."
msgstr ""
msgstr "这张幻灯片试图让学生们熟悉 Rust 代码。在接下来的四天里,他们会看到很多 Rust 代码, 所以我们从一些熟悉的东西开始。"
#: src/hello-world.md:27
msgid ""
@ -2059,6 +2072,11 @@ msgid ""
" [partially hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/"
"hygiene.html)."
msgstr ""
"* Rust 非常像 C/C++/Java 等其他传统语言。它是指令式语言(而非函数式),而且除非绝对必要,它不会尝试重新发明新的概念。\n"
"* Rust 是一种现代编程语言,它完全支持 Unicode 等特性。\n"
"* 在需要处理可变数量的参数的情况下,Rust 使用宏(没有函数[重载](basic-syntax/functions-interlude.md))。\n"
"* 宏是“卫生的”意味着它们不会意外地捕获它们所在作用域中的标识符。Rust 的宏实际上只是[部分卫生](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html)"
#: src/hello-world/small-example.md:1
msgid "# Small Example"