mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-31 11:01:46 +02:00
ko: refresh translation for generics (#929)
* ko: refresh translation for generics Part of #925. * Apply suggestions from code review Co-authored-by: Jiyong Park <55639800+jiyongp@users.noreply.github.com> * ko: move translation back to where it belongs This paragraph is likely outdated, but moving it here helps avoid conflicts. The outdated paragraph can be cleaned up with `msgmerge` at a later point. --------- Co-authored-by: Jiyong Park <55639800+jiyongp@users.noreply.github.com>
This commit is contained in:
parent
15f5ced5f9
commit
acd1c41f07
62
po/ko.po
62
po/ko.po
@ -9206,6 +9206,29 @@ msgid ""
|
||||
"}\n"
|
||||
"```"
|
||||
msgstr ""
|
||||
"```rust,editable\n"
|
||||
"#[derive(Debug)]\n"
|
||||
"struct Point<T> {\n"
|
||||
" x: T,\n"
|
||||
" y: T,\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"fn main() {\n"
|
||||
" let integer = Point { x: 5, y: 10 };\n"
|
||||
" let float = Point { x: 1.0, y: 4.0 };\n"
|
||||
" println!(\"{integer:?} and {float:?}\");\n"
|
||||
"}\n"
|
||||
"```"
|
||||
|
||||
#: src/generics/data-types.md:21
|
||||
msgid ""
|
||||
"* Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`.\n"
|
||||
"\n"
|
||||
"* Fix the code to allow points that have elements of different types."
|
||||
msgstr ""
|
||||
"* 새 변수 `let p = Point { x: 5, y: 10.0 };`를 선언해 보세요.\n"
|
||||
"\n"
|
||||
"* `Point`가 서로 다른 타입의 값들으로 이루어져도 컴파일 되도록 코드를 수정해 보세요."
|
||||
|
||||
#: src/generics/methods.md:1
|
||||
msgid "# Generic Methods"
|
||||
@ -9235,6 +9258,23 @@ msgid ""
|
||||
"}\n"
|
||||
"```"
|
||||
msgstr ""
|
||||
"```rust,editable\n"
|
||||
"#[derive(Debug)]\n"
|
||||
"struct Point<T>(T, T);\n"
|
||||
"\n"
|
||||
"impl<T> Point<T> {\n"
|
||||
" fn x(&self) -> &T {\n"
|
||||
" &self.0 // + 10\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" // fn set_x(&mut self, x: T)\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"fn main() {\n"
|
||||
" let p = Point(5, 10);\n"
|
||||
" println!(\"p.x = {}\", p.x());\n"
|
||||
"}\n"
|
||||
"```"
|
||||
|
||||
#: src/generics/methods.md:25
|
||||
msgid ""
|
||||
@ -9508,6 +9548,12 @@ msgid ""
|
||||
"}\n"
|
||||
"```"
|
||||
msgstr ""
|
||||
"```rust,editable\n"
|
||||
"fn main() {\n"
|
||||
" let integer = Some(5);\n"
|
||||
" let float = Some(5.0);\n"
|
||||
"}\n"
|
||||
"```"
|
||||
|
||||
#: src/generics/monomorphization.md:12
|
||||
msgid "behaves as if you wrote"
|
||||
@ -9532,6 +9578,22 @@ msgid ""
|
||||
"}\n"
|
||||
"```"
|
||||
msgstr ""
|
||||
"```rust,editable\n"
|
||||
"enum Option_i32 {\n"
|
||||
" Some(i32),\n"
|
||||
" None,\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"enum Option_f64 {\n"
|
||||
" Some(f64),\n"
|
||||
" None,\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"fn main() {\n"
|
||||
" let integer = Option_i32::Some(5);\n"
|
||||
" let float = Option_f64::Some(5.0);\n"
|
||||
"}\n"
|
||||
"```"
|
||||
|
||||
#: src/generics/monomorphization.md:31
|
||||
msgid ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user