1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-15 06:20:32 +02:00

ko: refresh translation for ownership (#944)

Part of #925.
This commit is contained in:
Martin Geisler 2023-07-14 11:41:49 +02:00 committed by GitHub
parent d7da4ad8fe
commit 5bb2dc81a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

152
po/ko.po
View File

@ -3748,6 +3748,14 @@ msgid ""
"}\n" "}\n"
"```" "```"
msgstr "" msgstr ""
"```rust,editable\n"
"fn main() {\n"
" let s1: String = String::from(\"Hello!\");\n"
" let s2: String = s1;\n"
" println!(\"s2: {s2}\");\n"
" // println!(\"s1: {s1}\");\n"
"}\n"
"```"
#: src/ownership/move-semantics.md:14 #: src/ownership/move-semantics.md:14
msgid "" msgid ""
@ -3786,6 +3794,12 @@ msgid ""
"}\n" "}\n"
"```" "```"
msgstr "" msgstr ""
"```rust,editable\n"
"fn main() {\n"
" let s1: String = String::from(\"Rust\");\n"
" let s2: String = s1;\n"
"}\n"
"```"
#: src/ownership/moved-strings-rust.md:10 #: src/ownership/moved-strings-rust.md:10
msgid "" msgid ""
@ -3816,6 +3830,20 @@ msgid ""
"`- - - - - - - - - - - - - -'\n" "`- - - - - - - - - - - - - -'\n"
"```" "```"
msgstr "" msgstr ""
"```bob\n"
" Stack Heap\n"
".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - -.\n"
": : : :\n"
": s1 : : :\n"
": +-----------+-------+ : : +----+----+----+----+ :\n"
": | ptr | o---+---+-----+-->| R | u | s | t | :\n"
": | len | 4 | : : +----+----+----+----+ :\n"
": | capacity | 4 | : : :\n"
": +-----------+-------+ : : :\n"
": : `- - - - - - - - - - - - - -'\n"
": :\n"
"`- - - - - - - - - - - - - -'\n"
"```"
#: src/ownership/moved-strings-rust.md:30 #: src/ownership/moved-strings-rust.md:30
msgid "After move to `s2`:" msgid "After move to `s2`:"
@ -3844,6 +3872,26 @@ msgid ""
"`- - - - - - - - - - - - - -'\n" "`- - - - - - - - - - - - - -'\n"
"```" "```"
msgstr "" msgstr ""
"```bob\n"
" Stack Heap\n"
".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - -.\n"
": : : :\n"
": s1 \"(inaccessible)\" : : :\n"
": +-----------+-------+ : : +----+----+----+----+ :\n"
": | ptr | o---+---+--+--+-->| R | u | s | t | :\n"
": | len | 4 | : | : +----+----+----+----+ :\n"
": | capacity | 4 | : | : :\n"
": +-----------+-------+ : | : :\n"
": : | `- - - - - - - - - - - - - -'\n"
": s2 : |\n"
": +-----------+-------+ : |\n"
": | ptr | o---+---+--'\n"
": | len | 4 | :\n"
": | capacity | 4 | :\n"
": +-----------+-------+ :\n"
": :\n"
"`- - - - - - - - - - - - - -'\n"
"```"
#: src/ownership/double-free-modern-cpp.md:1 #: src/ownership/double-free-modern-cpp.md:1
msgid "# Double Frees in Modern C++" msgid "# Double Frees in Modern C++"
@ -3860,6 +3908,10 @@ msgid ""
"std::string s2 = s1; // Duplicate the data in s1.\n" "std::string s2 = s1; // Duplicate the data in s1.\n"
"```" "```"
msgstr "" msgstr ""
"```c++\n"
"std::string s1 = \"Cpp\";\n"
"std::string s2 = s1; // s1의 데이터를 복제합니다.\n"
"```"
#: src/ownership/double-free-modern-cpp.md:10 #: src/ownership/double-free-modern-cpp.md:10
msgid "" msgid ""
@ -3889,6 +3941,19 @@ msgid ""
"`- - - - - - - - - - - - - -'\n" "`- - - - - - - - - - - - - -'\n"
"```" "```"
msgstr "" msgstr ""
"```bob\n"
" Stack Heap\n"
".- - - - - - - - - - - - - -. .- - - - - - - - - - - -.\n"
": : : :\n"
": s1 : : :\n"
": +-----------+-------+ : : +----+----+----+ :\n"
": | ptr | o---+---+--+--+-->| C | p | p | :\n"
": | len | 3 | : : +----+----+----+ :\n"
": | capacity | 3 | : : :\n"
": +-----------+-------+ : : :\n"
": : `- - - - - - - - - - - -'\n"
"`- - - - - - - - - - - - - -'\n"
"```"
#: src/ownership/double-free-modern-cpp.md:30 #: src/ownership/double-free-modern-cpp.md:30
msgid "After copy-assignment:" msgid "After copy-assignment:"
@ -3917,6 +3982,26 @@ msgid ""
"`- - - - - - - - - - - - - -'\n" "`- - - - - - - - - - - - - -'\n"
"```" "```"
msgstr "" msgstr ""
"```bob\n"
" Stack Heap\n"
".- - - - - - - - - - - - - -. .- - - - - - - - - - - -.\n"
": : : :\n"
": s1 : : :\n"
": +-----------+-------+ : : +----+----+----+ :\n"
": | ptr | o---+---+--+--+-->| C | p | p | :\n"
": | len | 3 | : : +----+----+----+ :\n"
": | capacity | 3 | : : :\n"
": +-----------+-------+ : : :\n"
": : : :\n"
": s2 : : :\n"
": +-----------+-------+ : : +----+----+----+ :\n"
": | ptr | o---+---+-----+-->| C | p | p | :\n"
": | len | 3 | : : +----+----+----+ :\n"
": | capacity | 3 | : : :\n"
": +-----------+-------+ : : :\n"
": : `- - - - - - - - - - - -'\n"
"`- - - - - - - - - - - - - -'\n"
"```"
#: src/ownership/moves-function-calls.md:1 #: src/ownership/moves-function-calls.md:1
msgid "# Moves in Function Calls" msgid "# Moves in Function Calls"
@ -3942,6 +4027,17 @@ msgid ""
"}\n" "}\n"
"```" "```"
msgstr "" msgstr ""
"```rust,editable\n"
"fn say_hello(name: String) {\n"
" println!(\"Hello {name}\")\n"
"}\n"
"\n"
"fn main() {\n"
" let name = String::from(\"Alice\");\n"
" say_hello(name);\n"
" // say_hello(name);\n"
"}\n"
"```"
#: src/ownership/moves-function-calls.md:20 #: src/ownership/moves-function-calls.md:20
msgid "" msgid ""
@ -3976,6 +4072,14 @@ msgid ""
"}\n" "}\n"
"```" "```"
msgstr "" msgstr ""
"```rust,editable\n"
"fn main() {\n"
" let x = 42;\n"
" let y = x;\n"
" println!(\"x: {x}\");\n"
" println!(\"y: {y}\");\n"
"}\n"
"```"
#: src/ownership/copy-clone.md:14 #: src/ownership/copy-clone.md:14
msgid "These types implement the `Copy` trait." msgid "These types implement the `Copy` trait."
@ -4083,6 +4187,21 @@ msgid ""
"}\n" "}\n"
"```" "```"
msgstr "" msgstr ""
"```rust,editable\n"
"#[derive(Debug)]\n"
"struct Point(i32, i32);\n"
"\n"
"fn add(p1: &Point, p2: &Point) -> Point {\n"
" Point(p1.0 + p2.0, p1.1 + p2.1)\n"
"}\n"
"\n"
"fn main() {\n"
" let p1 = Point(3, 4);\n"
" let p2 = Point(10, 20);\n"
" let p3 = add(&p1, &p2);\n"
" println!(\"{p1:?} + {p2:?} = {p3:?}\");\n"
"}\n"
"```"
#: src/ownership/borrowing.md:22 #: src/ownership/borrowing.md:22
msgid "" msgid ""
@ -4254,6 +4373,21 @@ msgid ""
"}\n" "}\n"
"```" "```"
msgstr "" msgstr ""
"```rust,editable\n"
"#[derive(Debug)]\n"
"struct Point(i32, i32);\n"
"\n"
"fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point {\n"
" if p1.0 < p2.0 { p1 } else { p2 }\n"
"}\n"
"\n"
"fn main() {\n"
" let p1: Point = Point(10, 10);\n"
" let p2: Point = Point(20, 20);\n"
" let p3: &Point = left_most(&p1, &p2);\n"
" println!(\"left-most point: {:?}\", p3);\n"
"}\n"
"```"
#: src/ownership/lifetimes-function-calls.md:21 #: src/ownership/lifetimes-function-calls.md:21
msgid "" msgid ""
@ -4354,6 +4488,24 @@ msgid ""
"}\n" "}\n"
"```" "```"
msgstr "" msgstr ""
"```rust,editable\n"
"#[derive(Debug)]\n"
"struct Highlight<'doc>(&'doc str);\n"
"\n"
"fn erase(text: String) {\n"
" println!(\"Bye {text}!\");\n"
"}\n"
"\n"
"fn main() {\n"
" let text = String::from(\"The quick brown fox jumps over the lazy dog."
"\");\n"
" let fox = Highlight(&text[4..19]);\n"
" let dog = Highlight(&text[35..43]);\n"
" // erase(text);\n"
" println!(\"{fox:?}\");\n"
" println!(\"{dog:?}\");\n"
"}\n"
"```"
#: src/ownership/lifetimes-data-structures.md:25 #: src/ownership/lifetimes-data-structures.md:25
msgid "" msgid ""