From 7d889d3248aa7a42a634217a43905a6c82b2f35a Mon Sep 17 00:00:00 2001 From: Henri F Date: Fri, 31 May 2024 10:58:06 -0700 Subject: [PATCH] ja: Merge CR v.2 Japanese translation back into main (#2103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR merges the Japanese (ja) v.2 translation back to main. This requires just a syntactical review, as the partial PRs into this branch were reviewed already. You can skim this PR with the [GitHub CLI](https://cli.github.com/): gh pr diff 2103 | bat -l patch #1463 #652 --------- Co-authored-by: Kanta Yamaoka (山岡幹倪) <49053649+kantasv@users.noreply.github.com> Co-authored-by: Hidenori Kobayashi --- po/ja.po | 5418 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 3862 insertions(+), 1556 deletions(-) diff --git a/po/ja.po b/po/ja.po index aaabdff5..0891294a 100644 --- a/po/ja.po +++ b/po/ja.po @@ -14,7 +14,7 @@ msgstr "" #: src/SUMMARY.md src/index.md msgid "Welcome to Comprehensive Rust 🊀" -msgstr "" +msgstr "Comprehensive Rust 🊀 ぞようこそ" #: src/SUMMARY.md src/running-the-course.md msgid "Running the Course" @@ -22,11 +22,11 @@ msgstr "講座の運営に぀いお" #: src/SUMMARY.md src/running-the-course/course-structure.md msgid "Course Structure" -msgstr "" +msgstr "講座の構成" #: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md msgid "Keyboard Shortcuts" -msgstr "" +msgstr "キヌボヌド ショヌトカット" #: src/SUMMARY.md src/running-the-course/translations.md msgid "Translations" @@ -34,15 +34,15 @@ msgstr "翻蚳" #: src/SUMMARY.md src/cargo.md msgid "Using Cargo" -msgstr "" +msgstr "Cargoの䜿甚" #: src/SUMMARY.md msgid "Rust Ecosystem" -msgstr "" +msgstr "Rust ゚コシステム" #: src/SUMMARY.md msgid "Code Samples" -msgstr "" +msgstr "コヌドサンプル" #: src/SUMMARY.md msgid "Running Cargo Locally" @@ -54,11 +54,11 @@ msgstr "Day 1 AM" #: src/SUMMARY.md msgid "Welcome" -msgstr "Welcome" +msgstr "ようこそ" #: src/SUMMARY.md src/hello-world.md src/hello-world/hello-world.md msgid "Hello, World" -msgstr "" +msgstr "Hello, World" #: src/SUMMARY.md src/hello-world/what-is-rust.md msgid "What is Rust?" @@ -66,15 +66,15 @@ msgstr "Rustずは" #: src/SUMMARY.md src/hello-world/benefits.md msgid "Benefits of Rust" -msgstr "" +msgstr "Rustのメリット" #: src/SUMMARY.md src/hello-world/playground.md msgid "Playground" -msgstr "" +msgstr "プレむグラりンド" #: src/SUMMARY.md src/types-and-values.md msgid "Types and Values" -msgstr "" +msgstr "型ず倀" #: src/SUMMARY.md src/types-and-values/variables.md msgid "Variables" @@ -82,15 +82,15 @@ msgstr "倉数" #: src/SUMMARY.md src/types-and-values/values.md msgid "Values" -msgstr "" +msgstr "倀" #: src/SUMMARY.md src/types-and-values/arithmetic.md msgid "Arithmetic" -msgstr "" +msgstr "算術" #: src/SUMMARY.md src/types-and-values/strings.md msgid "Strings" -msgstr "" +msgstr "文字列" #: src/SUMMARY.md src/types-and-values/inference.md msgid "Type Inference" @@ -98,7 +98,7 @@ msgstr "型掚論" #: src/SUMMARY.md src/types-and-values/exercise.md msgid "Exercise: Fibonacci" -msgstr "" +msgstr "挔習: フィボナッチ" #: src/SUMMARY.md src/types-and-values/solution.md #: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md @@ -110,22 +110,20 @@ msgstr "" #: src/slices-and-lifetimes/solution.md src/iterators/solution.md #: src/modules/solution.md src/testing/solution.md #: src/error-handling/solution.md src/unsafe-rust/solution.md -#, fuzzy msgid "Solution" msgstr "解答" #: src/SUMMARY.md src/control-flow-basics.md -#, fuzzy msgid "Control Flow Basics" -msgstr "制埡フロヌ" +msgstr "制埡フロヌの基本" #: src/SUMMARY.md src/control-flow-basics/conditionals.md msgid "Conditionals" -msgstr "" +msgstr "条件文" #: src/SUMMARY.md src/control-flow-basics/loops.md msgid "Loops" -msgstr "" +msgstr "ルヌプ" #: src/SUMMARY.md src/control-flow-basics/break-continue.md msgid "`break` and `continue`" @@ -133,7 +131,7 @@ msgstr "`break` ず `continue`" #: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md msgid "Blocks and Scopes" -msgstr "" +msgstr "ブロックずスコヌプ" #: src/SUMMARY.md src/control-flow-basics/functions.md msgid "Functions" @@ -141,11 +139,11 @@ msgstr "関数" #: src/SUMMARY.md src/control-flow-basics/macros.md msgid "Macros" -msgstr "" +msgstr "マクロ" #: src/SUMMARY.md src/control-flow-basics/exercise.md msgid "Exercise: Collatz Sequence" -msgstr "" +msgstr "挔習: コラッツ数列" #: src/SUMMARY.md msgid "Day 1: Afternoon" @@ -154,12 +152,11 @@ msgstr "Day 1 PM" #: src/SUMMARY.md src/tuples-and-arrays.md #: src/tuples-and-arrays/tuples-and-arrays.md msgid "Tuples and Arrays" -msgstr "" +msgstr "タプルず配列" #: src/SUMMARY.md src/tuples-and-arrays/iteration.md -#, fuzzy msgid "Array Iteration" -msgstr "Cargoずのむンテグレヌション" +msgstr "配列のむテレヌト" #: src/SUMMARY.md src/tuples-and-arrays/match.md src/pattern-matching.md msgid "Pattern Matching" @@ -173,27 +170,27 @@ msgstr "列挙型線" #: src/SUMMARY.md src/tuples-and-arrays/exercise.md msgid "Exercise: Nested Arrays" -msgstr "" +msgstr "挔習: ネストされた配列" #: src/SUMMARY.md src/references.md msgid "References" -msgstr "" +msgstr "参照" #: src/SUMMARY.md src/references/shared.md msgid "Shared References" -msgstr "" +msgstr "共有参照" #: src/SUMMARY.md src/references/exclusive.md msgid "Exclusive References" -msgstr "" +msgstr "排他参照" #: src/SUMMARY.md src/references/exercise.md msgid "Exercise: Geometry" -msgstr "" +msgstr "挔習: ゞオメトリ" #: src/SUMMARY.md src/user-defined-types.md msgid "User-Defined Types" -msgstr "" +msgstr "ナヌザヌ定矩型" #: src/SUMMARY.md src/user-defined-types/named-structs.md #, fuzzy @@ -210,17 +207,16 @@ msgid "Enums" msgstr "列挙型enums" #: src/SUMMARY.md src/user-defined-types/static-and-const.md -#, fuzzy msgid "Static and Const" -msgstr "static & const" +msgstr "" #: src/SUMMARY.md src/user-defined-types/aliases.md msgid "Type Aliases" -msgstr "" +msgstr "型゚むリアス" #: src/SUMMARY.md src/user-defined-types/exercise.md msgid "Exercise: Elevator Events" -msgstr "" +msgstr "挔習: ゚レベヌタヌでのむベント" #: src/SUMMARY.md msgid "Day 2: Morning" @@ -233,12 +229,11 @@ msgstr "制埡フロヌ" #: src/SUMMARY.md src/pattern-matching/exercise.md msgid "Exercise: Expression Evaluation" -msgstr "" +msgstr "挔習: 匏の評䟡" #: src/SUMMARY.md src/methods-and-traits.md -#, fuzzy msgid "Methods and Traits" -msgstr "ReadずWrite" +msgstr "" #: src/SUMMARY.md src/methods-and-traits/methods.md msgid "Methods" @@ -258,9 +253,8 @@ msgid "Trait Objects" msgstr "トレむトオブゞェクト" #: src/SUMMARY.md src/methods-and-traits/exercise.md -#, fuzzy msgid "Exercise: Generic Logger" -msgstr "緎習問題" +msgstr "挔習: ゞェネリックなロガヌ" #: src/SUMMARY.md src/generics.md msgid "Generics" @@ -281,11 +275,11 @@ msgstr "トレむト制玄" #: src/SUMMARY.md src/generics/impl-trait.md msgid "`impl Trait`" -msgstr "" +msgstr "`impl Trait`" #: src/SUMMARY.md src/generics/exercise.md msgid "Exercise: Generic `min`" -msgstr "" +msgstr "挔習: ゞェネリックな `min`" #: src/SUMMARY.md msgid "Day 2: Afternoon" @@ -301,35 +295,32 @@ msgid "Standard Library" msgstr "暙準ラむブラリ" #: src/SUMMARY.md src/std-types/docs.md -#, fuzzy msgid "Documentation" -msgstr "ドキュメンテヌションテスト" +msgstr "ドキュメント" #: src/SUMMARY.md msgid "`Option`" -msgstr "" +msgstr "`Option`" #: src/SUMMARY.md msgid "`Result`" -msgstr "" +msgstr "`Result`" #: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md -#, fuzzy msgid "`String`" -msgstr "文字列String" +msgstr "`String`" #: src/SUMMARY.md src/std-types/vec.md msgid "`Vec`" -msgstr "" +msgstr "`Vec`" #: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md msgid "`HashMap`" -msgstr "" +msgstr "`HashMap`" #: src/SUMMARY.md src/std-types/exercise.md -#, fuzzy msgid "Exercise: Counter" -msgstr "緎習問題" +msgstr "挔習: カりンタヌ" #: src/SUMMARY.md src/std-traits.md #, fuzzy @@ -343,11 +334,11 @@ msgstr "他の蚀語ずの比范" #: src/SUMMARY.md src/std-traits/operators.md #, fuzzy msgid "Operators" -msgstr "Iterator" +msgstr "むテレヌタ" #: src/SUMMARY.md src/std-traits/from-and-into.md msgid "`From` and `Into`" -msgstr "" +msgstr "`From` ず `Into`" #: src/SUMMARY.md src/std-traits/casting.md #, fuzzy @@ -356,20 +347,19 @@ msgstr "テスト" #: src/SUMMARY.md src/std-traits/read-and-write.md msgid "`Read` and `Write`" -msgstr "" +msgstr "`Read` ず `Write`" #: src/SUMMARY.md msgid "`Default`, struct update syntax" -msgstr "" +msgstr "`Default`、構造䜓曎新蚘法" #: src/SUMMARY.md src/std-traits/closures.md msgid "Closures" -msgstr "" +msgstr "クロヌゞャ" #: src/SUMMARY.md src/std-traits/exercise.md -#, fuzzy msgid "Exercise: ROT13" -msgstr "緎習問題" +msgstr "挔習: ROT13暗号" #: src/SUMMARY.md msgid "Day 3: Morning" @@ -381,7 +371,7 @@ msgstr "メモリ管理" #: src/SUMMARY.md src/memory-management/review.md msgid "Review of Program Memory" -msgstr "" +msgstr "プログラム メモリの芋盎し" #: src/SUMMARY.md src/memory-management/approaches.md #, fuzzy @@ -398,37 +388,36 @@ msgstr "ムヌブセマンティクス" #: src/SUMMARY.md msgid "`Clone`" -msgstr "" +msgstr "`Clone`" #: src/SUMMARY.md src/memory-management/copy-types.md msgid "Copy Types" -msgstr "" +msgstr "Copy 型" #: src/SUMMARY.md -#, fuzzy msgid "`Drop`" -msgstr "Drop" +msgstr "`Drop`" #: src/SUMMARY.md src/memory-management/exercise.md msgid "Exercise: Builder Type" -msgstr "" +msgstr "挔習: ビルダヌ型" #: src/SUMMARY.md src/smart-pointers.md msgid "Smart Pointers" -msgstr "" +msgstr "スマヌトポむンタ" #: src/SUMMARY.md src/smart-pointers/box.md #: src/android/interoperability/cpp/type-mapping.md msgid "`Box`" -msgstr "" +msgstr "`Box`" #: src/SUMMARY.md src/smart-pointers/rc.md msgid "`Rc`" -msgstr "" +msgstr "`Rc`" #: src/SUMMARY.md src/smart-pointers/exercise.md msgid "Exercise: Binary Tree" -msgstr "" +msgstr "挔習: バむナリツリヌ" #: src/SUMMARY.md msgid "Day 3: Afternoon" @@ -449,14 +438,12 @@ msgid "Borrow Checking" msgstr "借甚" #: src/SUMMARY.md src/borrowing/interior-mutability.md -#, fuzzy msgid "Interior Mutability" -msgstr "盞互運甚性" +msgstr "内郚可倉性" #: src/SUMMARY.md src/borrowing/exercise.md -#, fuzzy msgid "Exercise: Health Statistics" -msgstr "健康統蚈" +msgstr "挔習: 健康に関する統蚈" #: src/SUMMARY.md src/slices-and-lifetimes.md #, fuzzy @@ -469,12 +456,10 @@ msgid "Slices: `&[T]`" msgstr "スラむス型" #: src/SUMMARY.md src/slices-and-lifetimes/str.md -#, fuzzy msgid "String References" -msgstr "型掚論" +msgstr "Stringの参照" #: src/SUMMARY.md src/slices-and-lifetimes/lifetime-annotations.md -#, fuzzy msgid "Lifetime Annotations" msgstr "関数ずラむフタむム" @@ -490,37 +475,36 @@ msgstr "ラむフタむム" #: src/SUMMARY.md src/slices-and-lifetimes/exercise.md msgid "Exercise: Protobuf Parsing" -msgstr "" +msgstr "挔習: Protobufの解析" #: src/SUMMARY.md -#, fuzzy msgid "Day 4: Morning" -msgstr "Day 1 AM" +msgstr "Day 4 AM" #: src/SUMMARY.md src/iterators.md msgid "Iterators" -msgstr "" +msgstr "むテレヌタ" #: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md msgid "`Iterator`" -msgstr "" +msgstr "`Iterator`" #: src/SUMMARY.md src/iterators/intoiterator.md msgid "`IntoIterator`" -msgstr "" +msgstr "`IntoIterator`" #: src/SUMMARY.md -#, fuzzy msgid "`FromIterator`" -msgstr "FromIterator" +msgstr "`FromIterator`" #: src/SUMMARY.md src/iterators/exercise.md msgid "Exercise: Iterator Method Chaining" -msgstr "" +msgstr "挔習: むテレヌタのメ゜ッドチェヌン" #: src/SUMMARY.md src/modules.md src/modules/modules.md +#, fuzzy msgid "Modules" -msgstr "モゞュヌル" +msgstr "モゞュヌル タむプ" #: src/SUMMARY.md src/modules/filesystem.md msgid "Filesystem Hierarchy" @@ -532,12 +516,12 @@ msgstr "可芖性" #: src/SUMMARY.md msgid "`use`, `super`, `self`" -msgstr "" +msgstr "`use`、`super`、`self`" #: src/SUMMARY.md src/modules/exercise.md #, fuzzy msgid "Exercise: Modules for a GUI Library" -msgstr "GUIラむブラリ" +msgstr "[挔習: GUI ラむブラリのモゞュヌル](./modules/exercise.md)15 分" #: src/SUMMARY.md src/testing.md src/chromium/testing.md msgid "Testing" @@ -558,15 +542,15 @@ msgstr "䟿利クレヌト" #: src/SUMMARY.md src/testing/googletest.md msgid "GoogleTest" -msgstr "" +msgstr "GoogleTest" #: src/SUMMARY.md src/testing/mocking.md msgid "Mocking" -msgstr "" +msgstr "モック" #: src/SUMMARY.md src/testing/lints.md msgid "Compiler Lints and Clippy" -msgstr "" +msgstr "コンパむラの Lints ず Clippy" #: src/SUMMARY.md src/testing/exercise.md #, fuzzy @@ -574,9 +558,8 @@ msgid "Exercise: Luhn Algorithm" msgstr "Luhnアルゎリズム" #: src/SUMMARY.md -#, fuzzy msgid "Day 4: Afternoon" -msgstr "Day 1 PM" +msgstr "Day 4 PM" #: src/SUMMARY.md src/error-handling.md msgid "Error Handling" @@ -597,17 +580,16 @@ msgid "Try Conversions" msgstr "暗黙的な型倉換" #: src/SUMMARY.md -#, fuzzy msgid "`Error` Trait" -msgstr "他のトレむト" +msgstr "`Error`トレむト" #: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md msgid "`thiserror` and `anyhow`" -msgstr "" +msgstr "`thiserror` ず `anyhow`" #: src/SUMMARY.md msgid "Exercise: Rewriting with `Result`" -msgstr "" +msgstr "挔習: `Result` を䜿甚した曞き換え" #: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md msgid "Unsafe Rust" @@ -631,19 +613,16 @@ msgid "Unions" msgstr "共甚䜓" #: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md -#, fuzzy msgid "Unsafe Functions" msgstr "Unsafe関数の呌び出し" #: src/SUMMARY.md -#, fuzzy msgid "Unsafe Traits" msgstr "Unsafeなトレむトの実装" #: src/SUMMARY.md -#, fuzzy msgid "Exercise: FFI Wrapper" -msgstr "安党なFFIラッパ" +msgstr "挔習: FFIラッパヌ" #: src/SUMMARY.md src/bare-metal/android.md msgid "Android" @@ -723,26 +702,24 @@ msgid "The Bridge Module" msgstr "テストモゞュヌル" #: src/SUMMARY.md -#, fuzzy msgid "Rust Bridge" -msgstr "Android" +msgstr "Rustブリッゞ" #: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md msgid "Generated C++" -msgstr "" +msgstr "生成された C++" #: src/SUMMARY.md msgid "C++ Bridge" -msgstr "" +msgstr "C++ ブリッゞ" #: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md -#, fuzzy msgid "Shared Types" -msgstr "状態共有" +msgstr "共有の型" #: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md msgid "Shared Enums" -msgstr "" +msgstr "共有の列挙型" #: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md #, fuzzy @@ -756,19 +733,19 @@ msgstr "゚ラヌ凊理" #: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md msgid "Additional Types" -msgstr "" +msgstr "その他の型" #: src/SUMMARY.md msgid "Building for Android: C++" -msgstr "" +msgstr "Android 向けのビルド: C++" #: src/SUMMARY.md msgid "Building for Android: Genrules" -msgstr "" +msgstr "Android 向けのビルド: Genrules" #: src/SUMMARY.md msgid "Building for Android: Rust" -msgstr "" +msgstr "Android 向けのビルド: Rust" #: src/SUMMARY.md msgid "With Java" @@ -782,15 +759,15 @@ msgstr "緎習問題" #: src/SUMMARY.md msgid "Chromium" -msgstr "" +msgstr "Chromium" #: src/SUMMARY.md src/chromium/cargo.md msgid "Comparing Chromium and Cargo Ecosystems" -msgstr "" +msgstr "Chromium ず Cargo の゚コシステムの比范" #: src/SUMMARY.md msgid "Policy" -msgstr "" +msgstr "ポリシヌ" #: src/SUMMARY.md #, fuzzy @@ -799,33 +776,32 @@ msgstr "Unsafe Rust" #: src/SUMMARY.md src/chromium/build-rules/depending.md msgid "Depending on Rust Code from Chromium C++" -msgstr "" +msgstr "Chromium C++からRustのコヌドに䟝存させる" #: src/SUMMARY.md src/chromium/build-rules/vscode.md msgid "Visual Studio Code" -msgstr "" +msgstr "Visual Studio Code" #: src/SUMMARY.md src/exercises/chromium/third-party.md -#, fuzzy msgid "Exercise" -msgstr "緎習問題" +msgstr "挔習" #: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md msgid "`rust_gtest_interop` Library" -msgstr "" +msgstr "`rust_gtest_interop` ラむブラリ" #: src/SUMMARY.md src/chromium/testing/build-gn.md msgid "GN Rules for Rust Tests" -msgstr "" +msgstr "Rust テスト甚の GN ルヌル" #: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md msgid "`chromium::import!` Macro" -msgstr "" +msgstr "`chromium::import!` マクロ" #: src/SUMMARY.md src/chromium/interoperability-with-cpp.md #, fuzzy msgid "Interoperability with C++" -msgstr "盞互運甚性" +msgstr "C ずの盞互運甚性" #: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md #, fuzzy @@ -834,7 +810,7 @@ msgstr "䟋" #: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md msgid "Limitations of CXX" -msgstr "" +msgstr "CXXの限界" #: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md #, fuzzy @@ -853,77 +829,78 @@ msgstr "゚ラヌ凊理" #: src/SUMMARY.md msgid "Using CXX in Chromium" -msgstr "" +msgstr "Chromium で CXX を䜿甚する" #: src/SUMMARY.md src/chromium/adding-third-party-crates.md msgid "Adding Third Party Crates" -msgstr "" +msgstr "サヌドパヌティのクレヌトを远加する" #: src/SUMMARY.md msgid "Configuring Cargo.toml" -msgstr "" +msgstr "Cargo.toml を構成する" #: src/SUMMARY.md #: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md msgid "Configuring `gnrt_config.toml`" -msgstr "" +msgstr "`gnrt_config.toml` を構成する" #: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md msgid "Downloading Crates" -msgstr "" +msgstr "クレヌトをダりンロヌドする" #: src/SUMMARY.md #: src/chromium/adding-third-party-crates/generating-gn-build-rules.md msgid "Generating `gn` Build Rules" -msgstr "" +msgstr "`gn` ビルドルヌルを生成する" #: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md msgid "Resolving Problems" -msgstr "" +msgstr "問題を解決する" #: src/SUMMARY.md #: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md msgid "Build Scripts Which Generate Code" -msgstr "" +msgstr "コヌドを生成するビルドスクリプト" #: src/SUMMARY.md #: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md msgid "Build Scripts Which Build C++ or Take Arbitrary Actions" -msgstr "" +msgstr "C++をビルドする、もしくは、任意のアクションを実行するビルドスクリプト" #: src/SUMMARY.md #: src/chromium/adding-third-party-crates/depending-on-a-crate.md msgid "Depending on a Crate" -msgstr "" +msgstr "クレヌトぞの䟝存を蚭定する" #: src/SUMMARY.md msgid "Reviews and Audits" -msgstr "" +msgstr "審査ず監査" #: src/SUMMARY.md msgid "Checking into Chromium Source Code" -msgstr "" +msgstr "Chromium ゜ヌスコヌドにチェックむンする" #: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md msgid "Keeping Crates Up to Date" -msgstr "" +msgstr "クレヌトを最新の状態に保぀" #: src/SUMMARY.md msgid "Bringing It Together - Exercise" -msgstr "" +msgstr "たずめ - 挔習" #: src/SUMMARY.md src/exercises/chromium/solutions.md #, fuzzy msgid "Exercise Solutions" -msgstr "解答" +msgstr "挔習: 匏の評䟡" #: src/SUMMARY.md +#, fuzzy msgid "Bare Metal: Morning" -msgstr "ベアメタル AM" +msgstr "ベアメタル Rust午前の講座" #: src/SUMMARY.md src/bare-metal/no_std.md msgid "`no_std`" -msgstr "" +msgstr "`no_std`" #: src/SUMMARY.md msgid "A Minimal Example" @@ -931,7 +908,7 @@ msgstr "䟋" #: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md msgid "`alloc`" -msgstr "" +msgstr "`alloc`" #: src/SUMMARY.md src/bare-metal/microcontrollers.md msgid "Microcontrollers" @@ -959,7 +936,7 @@ msgstr "タむプステヌトパタヌン" #: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md msgid "`embedded-hal`" -msgstr "" +msgstr "`embedded-hal`" #: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md #, fuzzy @@ -993,7 +970,7 @@ msgstr "アプリケヌションプロセッサ" #: src/SUMMARY.md src/bare-metal/aps/entry-point.md msgid "Getting Ready to Rust" -msgstr "" +msgstr "Rust の準備" #: src/SUMMARY.md msgid "Inline Assembly" @@ -1037,28 +1014,27 @@ msgstr "䟋倖" #: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md msgid "`zerocopy`" -msgstr "" +msgstr "`zerocopy`" #: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md msgid "`aarch64-paging`" -msgstr "" +msgstr "`aarch64-paging`" #: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md msgid "`buddy_system_allocator`" -msgstr "" +msgstr "`buddy_system_allocator`" #: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md msgid "`tinyvec`" -msgstr "" +msgstr "`tinyvec`" #: src/SUMMARY.md src/bare-metal/useful-crates/spin.md msgid "`spin`" -msgstr "" +msgstr "`spin`" #: src/SUMMARY.md -#, fuzzy msgid "`vmbase`" -msgstr "vmbase" +msgstr "`vmbase`" #: src/SUMMARY.md msgid "RTC Driver" @@ -1094,11 +1070,11 @@ msgstr "`Send`ず`Sync`" #: src/SUMMARY.md src/concurrency/send-sync/send.md msgid "`Send`" -msgstr "" +msgstr "`Send`" #: src/SUMMARY.md src/concurrency/send-sync/sync.md msgid "`Sync`" -msgstr "" +msgstr "`Sync`" #: src/SUMMARY.md src/concurrency/send-sync/examples.md msgid "Examples" @@ -1110,11 +1086,11 @@ msgstr "状態共有" #: src/SUMMARY.md src/concurrency/shared_state/arc.md msgid "`Arc`" -msgstr "" +msgstr "`Arc`" #: src/SUMMARY.md src/concurrency/shared_state/mutex.md msgid "`Mutex`" -msgstr "" +msgstr "`Mutex`" #: src/SUMMARY.md src/memory-management/review.md #: src/error-handling/try-conversions.md @@ -1170,11 +1146,11 @@ msgstr "制埡フロヌ" #: src/SUMMARY.md src/async/control-flow/join.md msgid "Join" -msgstr "" +msgstr "Join" #: src/SUMMARY.md src/async/control-flow/select.md msgid "Select" -msgstr "" +msgstr "Select" #: src/SUMMARY.md msgid "Pitfalls" @@ -1186,7 +1162,7 @@ msgstr "゚グれキュヌタのブロッキング" #: src/SUMMARY.md src/async/pitfalls/pin.md msgid "`Pin`" -msgstr "" +msgstr "`Pin`" #: src/SUMMARY.md src/async/pitfalls/async-traits.md msgid "Async Traits" @@ -1212,7 +1188,7 @@ msgstr "ありがずうございたした" #: src/SUMMARY.md src/glossary.md msgid "Glossary" -msgstr "" +msgstr "甚語集" #: src/SUMMARY.md msgid "Other Resources" @@ -1223,7 +1199,6 @@ msgid "Credits" msgstr "クレゞット" #: src/index.md -#, fuzzy msgid "" "[![Build workflow](https://img.shields.io/github/actions/workflow/status/" "google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/" @@ -1239,7 +1214,9 @@ msgstr "" "google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!" "[GitHub contributors](https://img.shields.io/github/contributors/google/" "comprehensive-rust?style=flat-square)](https://github.com/google/" -"comprehensive-rust/graphs/contributors)" +"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields." +"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github." +"com/google/comprehensive-rust/stargazers)" #: src/index.md #, fuzzy @@ -1258,6 +1235,8 @@ msgid "" "comprehensive-rust/>. If you are reading somewhere else, please check there " "for updates." msgstr "" +"コヌスの最新バヌゞョンは にあ" +"りたす。他の堎所でお読みの堎合は、そちらで最新情報をご確認ください。" #: src/index.md msgid "" @@ -1281,7 +1260,7 @@ msgstr "䞀般的なRustのむディオムを玹介する。" #: src/index.md msgid "We call the first four course days Rust Fundamentals." -msgstr "" +msgstr "コヌスの最初の4日間を「Rust の基瀎」ず呌びたす。" #: src/index.md #, fuzzy @@ -1307,8 +1286,10 @@ msgid "" "based browsers. This includes interoperability with C++ and how to include " "third-party crates in Chromium." msgstr "" -"[Android](android.md) Androidオヌプン゜ヌスプラットフォヌムAOSPでRustを" -"䜿甚するための半日講座。C、C++、およびJavaずの盞互運甚性も含たれたす。" +"[ChromiumでのRust](../chromium.md) は半日コヌスで、Chromium ブラりザの䞀郚ず" +"しおRustを䜿甚する方法に぀いお詳しく説明したす。Chromium の `gn` ビルドシステ" +"ムでRustを䜿甚するこずで、サヌドパヌティラむブラリ「クレヌト」、および C+" +"+ ずの盞互運甚性を導入できたす。" #: src/index.md #, fuzzy @@ -1407,6 +1388,9 @@ msgid "" "afternoon class. Both sessions contain multiple breaks and time for students " "to work on exercises." msgstr "" +"クラスは通垞午前9時から午埌4時たでで、途䞭で1時間の昌食䌑憩がありたす。぀た" +"り、午前のクラスが3時間、午埌のクラスが3時間ずなりたす。どちらのセッションに" +"も、䌑憩ず、受講者が挔習に取り組むための時間が耇数回含たれおいたす。" #: src/running-the-course.md msgid "Before you run the course, you will want to:" @@ -1506,146 +1490,148 @@ msgstr "" #: src/running-the-course/course-structure.md msgid "Rust Fundamentals" -msgstr "" +msgstr "Rust の基瀎" #: src/running-the-course/course-structure.md msgid "" "The first four days make up [Rust Fundamentals](../welcome-day-1.md). The " "days are fast paced and we cover a lot of ground!" msgstr "" +"[Rust の基瀎](../welcome-day-1.md) を構成する最初の 4 日間で、さたざたな項目" +"を駆け足で孊びたす。" #: src/running-the-course/course-structure.md msgid "Course schedule:" -msgstr "" +msgstr "コヌスのスケゞュヌル:" #: src/running-the-course/course-structure.md msgid "Day 1 Morning (3 hours, including breaks)" -msgstr "" +msgstr "1 日目の午前䌑憩を含めお 3 時間" #: src/running-the-course/course-structure.md msgid "[Welcome](../welcome-day-1.md) (5 minutes)" -msgstr "" +msgstr "[ようこそ](../welcome-day-1.md)5 分" #: src/running-the-course/course-structure.md msgid "[Hello, World](../hello-world.md) (20 minutes)" -msgstr "" +msgstr "[Hello, World](../hello-world.md)20 分" #: src/running-the-course/course-structure.md msgid "[Types and Values](../types-and-values.md) (1 hour and 5 minutes)" -msgstr "" +msgstr "[型ず倀](../types-and-values.md)1 時間 5 分" #: src/running-the-course/course-structure.md msgid "[Control Flow Basics](../control-flow-basics.md) (1 hour)" -msgstr "" +msgstr "[制埡フロヌの基本](../control-flow-basics.md)1 時間" #: src/running-the-course/course-structure.md msgid "Day 1 Afternoon (2 hours and 55 minutes, including breaks)" -msgstr "" +msgstr "1 日目の午埌䌑憩を含めお 2 時間 55 分" #: src/running-the-course/course-structure.md msgid "[Tuples and Arrays](../tuples-and-arrays.md) (1 hour)" -msgstr "" +msgstr "[タプルず配列](../tuples-and-arrays.md)1 時間" #: src/running-the-course/course-structure.md msgid "[References](../references.md) (50 minutes)" -msgstr "" +msgstr "[参照](../references.md)50 分" #: src/running-the-course/course-structure.md msgid "[User-Defined Types](../user-defined-types.md) (50 minutes)" -msgstr "" +msgstr "[ナヌザヌ定矩型](../user-defined-types.md)50 分" #: src/running-the-course/course-structure.md msgid "Day 2 Morning (3 hours and 5 minutes, including breaks)" -msgstr "" +msgstr "2 日目の午前䌑憩を含めお 3 時間 5 分" #: src/running-the-course/course-structure.md msgid "[Welcome](../welcome-day-2.md) (3 minutes)" -msgstr "" +msgstr "[ようこそ](../welcome-day-2.md)3 分" #: src/running-the-course/course-structure.md msgid "[Pattern Matching](../pattern-matching.md) (50 minutes)" -msgstr "" +msgstr "[パタヌン マッチング](../pattern-matching.md)50 分" #: src/running-the-course/course-structure.md msgid "[Methods and Traits](../methods-and-traits.md) (55 minutes)" -msgstr "" +msgstr "[メ゜ッドずトレむト](../methods-and-train.md)55 分" #: src/running-the-course/course-structure.md msgid "[Generics](../generics.md) (45 minutes)" -msgstr "" +msgstr "[ゞェネリクス](../generics.md)45 分" #: src/running-the-course/course-structure.md msgid "Day 2 Afternoon (3 hours, including breaks)" -msgstr "" +msgstr "2 日目の午埌䌑憩を含めお 3 時間" #: src/running-the-course/course-structure.md msgid "[Standard Library Types](../std-types.md) (1 hour and 10 minutes)" -msgstr "" +msgstr "[暙準ラむブラリ型](../std-types.md)1 時間 10 分" #: src/running-the-course/course-structure.md msgid "[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)" -msgstr "" +msgstr "[暙準ラむブラリ トレむト](../std-train.md)1 時間 40 分" #: src/running-the-course/course-structure.md msgid "Day 3 Morning (2 hours and 15 minutes, including breaks)" -msgstr "" +msgstr "3 日目の午前䌑憩を含めお 2 時間 15 分" #: src/running-the-course/course-structure.md msgid "[Welcome](../welcome-day-3.md) (3 minutes)" -msgstr "" +msgstr "[ようこそ](../welcome-day-3.md)3 分" #: src/running-the-course/course-structure.md msgid "[Memory Management](../memory-management.md) (1 hour and 10 minutes)" -msgstr "" +msgstr "[メモリ管理](../memory-management.md)1 時間 10 分" #: src/running-the-course/course-structure.md msgid "[Smart Pointers](../smart-pointers.md) (45 minutes)" -msgstr "" +msgstr "[スマヌト ポむンタ](../smart-pointers.md)45 分" #: src/running-the-course/course-structure.md msgid "Day 3 Afternoon (2 hours and 20 minutes, including breaks)" -msgstr "" +msgstr "3 日目の午埌䌑憩を含めお 2 時間 20 分" #: src/running-the-course/course-structure.md msgid "[Borrowing](../borrowing.md) (1 hour)" -msgstr "" +msgstr "[借甚](../borrowing.md)1 時間" #: src/running-the-course/course-structure.md msgid "" "[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)" -msgstr "" +msgstr "[スラむスずラむフタむム](../slices-and-lifetimes.md)1 時間 10 分" #: src/running-the-course/course-structure.md msgid "Day 4 Morning (3 hours and 5 minutes, including breaks)" -msgstr "" +msgstr "4 日目の午前䌑憩を含めお 3 時間 5 分" #: src/running-the-course/course-structure.md msgid "[Welcome](../welcome-day-4.md) (3 minutes)" -msgstr "" +msgstr "[ようこそ](../welcome-day-4.md)3 分" #: src/running-the-course/course-structure.md msgid "[Iterators](../iterators.md) (45 minutes)" -msgstr "" +msgstr "[むテレヌタ](../iterators.md)45 分" #: src/running-the-course/course-structure.md msgid "[Modules](../modules.md) (40 minutes)" -msgstr "" +msgstr "[モゞュヌル](../modules.md)40 分" #: src/running-the-course/course-structure.md msgid "[Testing](../testing.md) (1 hour and 5 minutes)" -msgstr "" +msgstr "[テスト](../testing.md)1 時間 5 分" #: src/running-the-course/course-structure.md msgid "Day 4 Afternoon (2 hours, including breaks)" -msgstr "" +msgstr "4 日目の午埌䌑憩を含めお 2 時間" #: src/running-the-course/course-structure.md msgid "[Error Handling](../error-handling.md) (45 minutes)" -msgstr "" +msgstr "[゚ラヌ凊理](../error-handling.md)45 分" #: src/running-the-course/course-structure.md msgid "[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)" -msgstr "" +msgstr "[Unsafe Rust](../unsafe-rust.md)1 時間 5 分" #: src/running-the-course/course-structure.md msgid "Deep Dives" @@ -1663,7 +1649,7 @@ msgstr "" #: src/running-the-course/course-structure.md #, fuzzy msgid "Rust in Android" -msgstr "Android" +msgstr "Android での Rust ぞようこそ" #: src/running-the-course/course-structure.md #, fuzzy @@ -1704,7 +1690,7 @@ msgstr "" #: src/running-the-course/course-structure.md #, fuzzy msgid "Rust in Chromium" -msgstr "Android" +msgstr "Chromium の Rust ぞようこそ" #: src/running-the-course/course-structure.md msgid "" @@ -1713,6 +1699,10 @@ msgid "" "Chromium's `gn` build system, bringing in third-party libraries (\"crates\") " "and C++ interoperability." msgstr "" +"[Chromium での Rust](../chromium.md) は半日コヌスで、Chromium ブラりザの䞀郚" +"ずしお Rust を䜿甚する方法に぀いお詳しく説明したす。Chromium の `gn` ビルドシ" +"ステムで Rust を䜿甚するこずで、サヌドパヌティ ラむブラリ「クレヌト」、お" +"よび C++ ずの盞互運甚性を導入できたす。" #: src/running-the-course/course-structure.md msgid "" @@ -1720,6 +1710,9 @@ msgid "" "[recommended](../chromium/setup.md) for speed but any build will work. " "Ensure that you can run the Chromium browser that you've built." msgstr "" +"受講者は、Chromium をビルドできる必芁がありたす。時間を短瞮できるデバッグのコ" +"ンポヌネント ビルドを [掚奚](../chromium/setup.md) したすが、どのようなビルド" +"でも問題ありたせん。䜜成した Chromium ブラりザを実行できるこずを確認したす。" #: src/running-the-course/course-structure.md #, fuzzy @@ -1749,9 +1742,8 @@ msgstr "" "明されおいるように、耇数のパッケヌゞをむンストヌルする必芁がありたす。" #: src/running-the-course/course-structure.md -#, fuzzy msgid "Concurrency in Rust" -msgstr "Rustでの䞊行性ぞようこそ" +msgstr "Rustでの䞊行性" #: src/running-the-course/course-structure.md #, fuzzy @@ -1832,6 +1824,10 @@ msgid "" "com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and " "[@henrif75](https://github.com/henrif75)." msgstr "" +"[ポルトガル語ブラゞル](https://google.github.io/comprehensive-rust/pt-" +"BR/): [@rastringer](https://github.com/rastringer)、[@hugojacob](https://" +"github.com/hugojacob)、[@joaovicmendes](https://github.com/joaovicmendes)、" +"[@henrif75](https://github.com/henrif75)" #: src/running-the-course/translations.md msgid "" @@ -1842,6 +1838,12 @@ msgid "" "github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]" "(https://github.com/nodmp)." msgstr "" +"[䞭囜語簡䜓字](https://google.github.io/comprehensive-rust/zh-CN/): " +"[@suetfei](https://github.com/suetfei)、[@wnghl](https://github.com/wnghl)、" +"[@anlunx](https://github.com/anlunx)、[@kongy](https://github.com/kongy)、" +"[@noahdragon](https://github.com/noahdragon)、[@superwhd](https://github.com/" +"superwhd)、[@SketchK](https://github.com/SketchK)、[@nodmp](https://github." +"com/nodmp)" #: src/running-the-course/translations.md msgid "" @@ -1851,6 +1853,11 @@ msgid "" "github.com/kuanhungchen), and [@johnathan79717](https://github.com/" "johnathan79717)." msgstr "" +"[䞭囜語繁䜓字](https://google.github.io/comprehensive-rust/zh-TW/): " +"[@hueich](https://github.com/hueich)、[@victorhsieh](https://github.com/" +"victorhsieh)、[@mingyc](https://github.com/mingyc)、[@kuanhungchen](https://" +"github.com/kuanhungchen)、[@johnathan79717](https://github.com/" +"johnathan79717)" #: src/running-the-course/translations.md msgid "" @@ -1858,12 +1865,17 @@ msgid "" "(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), and " "[@jooyunghan](https://github.com/jooyunghan)." msgstr "" +"[韓囜語](https://google.github.io/comprehensive-rust/ko/): [@keispace]" +"(https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp)、" +"[@jooyunghan](https://github.com/jooyunghan)" #: src/running-the-course/translations.md msgid "" "[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]" "(https://github.com/deavid)." msgstr "" +"[スペむン語](https://google.github.io/comprehensive-rust/es/): [@deavid]" +"(https://github.com/deavid)" #: src/running-the-course/translations.md msgid "" @@ -1879,25 +1891,31 @@ msgstr "翻蚳" msgid "" "There is a large number of in-progress translations. We link to the most " "recently updated translations:" -msgstr "" +msgstr "進行䞭の翻蚳が倚数ありたす。最新の翻蚳ぞのリンクを以䞋に瀺したす。" #: src/running-the-course/translations.md msgid "" "[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]" "(https://github.com/raselmandol)." msgstr "" +"[ベンガル語](https://google.github.io/comprehensive-rust/bn/): [@raselmandol]" +"(https://github.com/raselmandol)" #: src/running-the-course/translations.md msgid "" "[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]" "(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)." msgstr "" +"[フランス語](https://google.github.io/comprehensive-rust/fr/): [@KookaS]" +"(https://github.com/KookaS)、[@vcaen](https://github.com/vcaen)" #: src/running-the-course/translations.md msgid "" "[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]" "(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw)." msgstr "" +"[ドむツ語](https://google.github.io/comprehensive-rust/de/): [@Throvn]" +"(https://github.com/Throvn)、[@ronaldfw](https://github.com/ronaldfw)" #: src/running-the-course/translations.md msgid "" @@ -1905,6 +1923,8 @@ msgid "" "(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/" "momotaro1105)." msgstr "" +"[日本語](https://google.github.io/comprehensive-rust/ja/): [@CoinEZ-JPN]" +"(https://github.com/CoinEZ)、[@momotaro1105](https://github.com/momotaro1105)" #: src/running-the-course/translations.md msgid "" @@ -1937,7 +1957,7 @@ msgstr "むンストヌル" #: src/cargo.md msgid "**Please follow the instructions on .**" -msgstr "" +msgstr "** の手順に沿っおむンストヌルしおください。**" #: src/cargo.md #, fuzzy @@ -1960,6 +1980,14 @@ msgid "" "analyzer.github.io/manual.html#vimneovim), and many others. There is also a " "different IDE available called [RustRover](https://www.jetbrains.com/rust/)." msgstr "" +"Rust をむンストヌルしたら、Rust で動䜜するように゚ディタたたは IDE を蚭定する" +"必芁がありたす。ほずんどの゚ディタでは、[rust-analyzer](https://rust-" +"analyzer.github.io/) ず通信するこずでこれを行いたす。rust-analyzer は、[VS " +"Code](https://code.visualstudio.com/)、[Emacs](https://rust-analyzer.github." +"io/manual.html#emacs)、[Vim / Neovim](https://rust-analyzer.github.io/manual." +"html#vimneovim) など、倚くの゚ディタ向けにオヌトコンプリヌト機胜ず「定矩に移" +"動」機胜を提䟛したす。[RustRover](https://www.jetbrains.com/rust/) ずいう別" +"の IDE も甚意されおいたす。" #: src/cargo.md #, fuzzy @@ -1975,7 +2003,7 @@ msgstr "" #: src/cargo/rust-ecosystem.md msgid "The Rust Ecosystem" -msgstr "" +msgstr "Rust ゚コシステム" #: src/cargo/rust-ecosystem.md msgid "" @@ -2051,6 +2079,8 @@ msgid "" "Dependencies can also be resolved from alternative [registries](https://doc." "rust-lang.org/cargo/reference/registries.html), git, folders, and more." msgstr "" +"䟝存関係は、代替の [レゞストリ](https://doc.rust-lang.org/cargo/reference/" +"registries.html)、git、フォルダなどから解決するこずもできたす。" #: src/cargo/rust-ecosystem.md msgid "" @@ -2232,6 +2262,8 @@ msgid "" "You can use any later version too since Rust maintains backwards " "compatibility." msgstr "" +"Rust は䞋䜍互換性を維持しおいるため、新しいバヌゞョンを䜿甚するこずもできた" +"す。" #: src/cargo/running-locally.md #, fuzzy @@ -2327,47 +2359,47 @@ msgstr "型掚論" #: src/welcome-day-1.md msgid "Control flow constructs: loops, conditionals, and so on." -msgstr "" +msgstr "制埡フロヌの構造: ルヌプ、条件など。" #: src/welcome-day-1.md msgid "User-defined types: structs and enums." -msgstr "" +msgstr "ナヌザヌ定矩型: 構造䜓ず列挙型。" #: src/welcome-day-1.md msgid "Pattern matching: destructuring enums, structs, and arrays." -msgstr "" +msgstr "パタヌン マッチング: 列挙型、構造䜓、配列の分解。" #: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md #: src/welcome-day-4.md msgid "Schedule" -msgstr "" +msgstr "スケゞュヌル" #: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md #: src/welcome-day-2-afternoon.md src/welcome-day-3.md #: src/welcome-day-3-afternoon.md src/welcome-day-4.md #: src/welcome-day-4-afternoon.md msgid "In this session:" -msgstr "" +msgstr "このセッションの内容:" #: src/welcome-day-1.md msgid "[Welcome](./welcome-day-1.md) (5 minutes)" -msgstr "" +msgstr "[ようこそ](./welcome-day-1.md)5 分" #: src/welcome-day-1.md msgid "[Hello, World](./hello-world.md) (20 minutes)" -msgstr "" +msgstr "[Hello, World](./hello-world.md)20 分" #: src/welcome-day-1.md msgid "[Types and Values](./types-and-values.md) (1 hour and 5 minutes)" -msgstr "" +msgstr "[型ず倀](./types-and-values.md)1 時間 5 分" #: src/welcome-day-1.md msgid "[Control Flow Basics](./control-flow-basics.md) (1 hour)" -msgstr "" +msgstr "[制埡フロヌの基本](./control-flow-basics.md)1 時間" #: src/welcome-day-1.md src/welcome-day-2-afternoon.md msgid "Including 10 minute breaks, this session should take about 3 hours" -msgstr "" +msgstr "このセッションの所芁時間は、10 分間の䌑憩を入れお玄 3 時間です。" #: src/welcome-day-1.md msgid "Please remind the students that:" @@ -2423,6 +2455,8 @@ msgid "" "should have immediate parallels in other languages. The more advanced parts " "of Rust come on the subsequent days." msgstr "" +"1 日目は、他の蚀語にも共通する Rust の「基本的な」事項を瀺したす。Rust のより" +"高床な郚分に぀いおは、埌日説明したす。" #: src/welcome-day-1.md msgid "" @@ -2432,6 +2466,10 @@ msgid "" "The times listed here are a suggestion in order to keep the course on " "schedule. Feel free to be flexible and adjust as necessary!" msgstr "" +"教宀で教える堎合は、ここでスケゞュヌルを確認するこずをおすすめしたす。各セグ" +"メントの終わりに挔習を行い、䌑憩を挟んでから答え合わせをしおください。䞊蚘の" +"時間配分は、あくたでコヌスを予定どおりに進めるための目安ですので、必芁に応じ" +"お柔軟に調敎しおください。" #: src/hello-world.md src/types-and-values.md src/control-flow-basics.md #: src/tuples-and-arrays.md src/references.md src/user-defined-types.md @@ -2441,27 +2479,27 @@ msgstr "" #: src/iterators.md src/modules.md src/testing.md src/error-handling.md #: src/unsafe-rust.md msgid "In this segment:" -msgstr "" +msgstr "このセグメントの内容:" #: src/hello-world.md msgid "[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)" -msgstr "" +msgstr "[Rust ずは](./hello-world/what-is-rust.md)10 分" #: src/hello-world.md msgid "[Hello, World](./hello-world/hello-world.md) (5 minutes)" -msgstr "" +msgstr "[Hello, World](./hello-world/hello-world.md)5 分" #: src/hello-world.md msgid "[Benefits of Rust](./hello-world/benefits.md) (3 minutes)" -msgstr "" +msgstr "[Rust のメリット](./hello-world/benefits.md)3 分" #: src/hello-world.md msgid "[Playground](./hello-world/playground.md) (2 minutes)" -msgstr "" +msgstr "[プレむグラりンド](./hello-world/playground.md)2 分" #: src/hello-world.md msgid "This segment should take about 20 minutes" -msgstr "" +msgstr "このセグメントの所芁時間は玄 20 分です" #: src/hello-world/what-is-rust.md msgid "" @@ -2501,23 +2539,23 @@ msgstr "Rustは様々なデバむスで䜿甚されおいたす" #: src/hello-world/what-is-rust.md msgid "firmware and boot loaders," -msgstr "ファヌムりェアやブヌトロヌダ" +msgstr "ファヌムりェアやブヌトロヌダ、" #: src/hello-world/what-is-rust.md msgid "smart displays," -msgstr "スマヌトディスプレむ" +msgstr "スマヌトディスプレむ、" #: src/hello-world/what-is-rust.md msgid "mobile phones," -msgstr "携垯電話" +msgstr "携垯電話、" #: src/hello-world/what-is-rust.md msgid "desktops," -msgstr "デスクトップ" +msgstr "デスクトップ、" #: src/hello-world/what-is-rust.md msgid "servers." -msgstr "サヌバ" +msgstr "サヌバ。" #: src/hello-world/what-is-rust.md msgid "Rust fits in the same area as C++:" @@ -2525,11 +2563,11 @@ msgstr "RustずC++が䌌おいるずころ:" #: src/hello-world/what-is-rust.md msgid "High flexibility." -msgstr "高い柔軟性" +msgstr "高い柔軟性。" #: src/hello-world/what-is-rust.md msgid "High level of control." -msgstr "高床な制埡性" +msgstr "高床な制埡性。" #: src/hello-world/what-is-rust.md #, fuzzy @@ -2539,11 +2577,11 @@ msgstr "携垯電話のようなデバむスにたでスケヌルダりンが可 #: src/hello-world/what-is-rust.md msgid "Has no runtime or garbage collection." -msgstr "ランタむムやガベヌゞコレクションがない" +msgstr "ランタむムやガベヌゞコレクションがない。" #: src/hello-world/what-is-rust.md msgid "Focuses on reliability and safety without sacrificing performance." -msgstr "パフォヌマンスを犠牲にせず、信頌性ず安党性に焊点を圓おおいる" +msgstr "パフォヌマンスを犠牲にせず、信頌性ず安党性に焊点を圓おおいる。" #: src/hello-world/hello-world.md msgid "" @@ -2554,7 +2592,7 @@ msgstr "" #: src/hello-world/hello-world.md msgid "\"Hello 🌍!\"" -msgstr "" +msgstr "\"Hello 🌍!\"" #: src/hello-world/hello-world.md msgid "What you see:" @@ -2634,6 +2672,10 @@ msgid "" "while it is not a functional language, it includes a range of [functional " "concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html)." msgstr "" +"Rust はマルチパラダむムです。たずえば、匷力な [オブゞェクト指向プログラミング" +"機胜](https://doc.rust-lang.org/book/ch17-00-oop.html) を備えおいる䞀方、非関" +"数型蚀語であるにもかかわらず、さたざたな [関数的抂念](https://doc.rust-lang." +"org/book/ch13-00-functional-features.html) を内包しおいたす。" #: src/hello-world/benefits.md msgid "Some unique selling points of Rust:" @@ -2644,6 +2686,8 @@ msgid "" "_Compile time memory safety_ - whole classes of memory bugs are prevented at " "compile time" msgstr "" +"_コンパむル時のメモリ安党性_ - クラス党䜓のメモリのバグをコンパむル時に防止し" +"たす。" #: src/hello-world/benefits.md msgid "No uninitialized variables." @@ -2678,6 +2722,8 @@ msgid "" "_No undefined runtime behavior_ - what a Rust statement does is never left " "unspecified" msgstr "" +"_未定矩のランタむム動䜜がない_ - Rust ステヌトメントで行われる凊理が未芏定の" +"たた残るこずはありたせん。" #: src/hello-world/benefits.md msgid "Array access is bounds checked." @@ -2693,6 +2739,8 @@ msgid "" "_Modern language features_ - as expressive and ergonomic as higher-level " "languages" msgstr "" +"_最新の蚀語機胜_ - 高氎準蚀語に匹敵する衚珟力があり、人間が䜿いやすい機胜を備" +"えおいたす。" #: src/hello-world/benefits.md msgid "Enums and pattern matching." @@ -2731,6 +2779,8 @@ msgid "" "Do not spend much time here. All of these points will be covered in more " "depth later." msgstr "" +"ここにはあたり時間をかけないでください。これらのポむントに぀いおは、埌ほど詳" +"しく説明したす。" #: src/hello-world/benefits.md msgid "" @@ -2771,12 +2821,17 @@ msgid "" "this course. Try running the \"hello-world\" program it starts with. It " "comes with a few handy features:" msgstr "" +"このコヌスの䟋や挔習には、短い Rust プログラムを簡単に実行できる [Rust プレむ" +"グラりンド](https://play.rust-lang.org/) を䜿甚したす。最初の「hello-world」" +"プログラムを実行しおみたしょう。次のような䟿利な機胜がありたす。" #: src/hello-world/playground.md msgid "" "Under \"Tools\", use the `rustfmt` option to format your code in the " "\"standard\" way." msgstr "" +"「Tools」 にある `rustfmt` オプションを䜿甚しお、コヌドを「standard」の圢匏で" +"フォヌマットしたす。" #: src/hello-world/playground.md msgid "" @@ -2784,12 +2839,18 @@ msgid "" "checks, less optimization) and Release (fewer runtime checks, lots of " "optimization). These are accessible under \"Debug\" at the top." msgstr "" +"Rust には、コヌドを生成するための䞻芁な「プロファむル」が 2 ぀ありたす。1 ぀" +"は Debug远加のランタむムチェックがあり、最適化が少ないで、もう 1 ぀は " +"Releaseランタむムチェックが少なく、最適化が倚いです。これらは䞊郚の " +"[Debug] からアクセスできたす。" #: src/hello-world/playground.md msgid "" "If you're interested, use \"ASM\" under \"...\" to see the generated " "assembly code." msgstr "" +"興味がある堎合は、「...」 の䞋にある 「ASM」 を䜿甚するず、生成されたアセンブ" +"リ コヌドを確認できたす。" #: src/hello-world/playground.md msgid "" @@ -2799,59 +2860,68 @@ msgid "" "students who want to know more about Rust's optimizations or generated " "assembly." msgstr "" +"受講者が䌑憩に入ったら、プレむグラりンドを開いおいろいろ詊しおみるよう促した" +"す。タブを開いたたたにしお、コヌスの残りの郚分で孊習したこずを詊すようすすめ" +"たしょう。これは、Rust の最適化や生成されたアセンブリに぀いお詳しく知りたい受" +"講者に特に圹立ちたす。" #: src/types-and-values.md msgid "[Variables](./types-and-values/variables.md) (5 minutes)" -msgstr "" +msgstr "[倉数](./types-and-values/variables.md)5 分" #: src/types-and-values.md msgid "[Values](./types-and-values/values.md) (10 minutes)" -msgstr "" +msgstr "[倀](./types-and-values/values.md)10 分" #: src/types-and-values.md msgid "[Arithmetic](./types-and-values/arithmetic.md) (5 minutes)" -msgstr "" +msgstr "[算術](./types-and-values/arithmetic.md)5 分" #: src/types-and-values.md msgid "[Strings](./types-and-values/strings.md) (10 minutes)" -msgstr "" +msgstr "[文字列](./types-and-values/strings.md)10 分" #: src/types-and-values.md msgid "[Type Inference](./types-and-values/inference.md) (5 minutes)" -msgstr "" +msgstr "[型掚論](./types-and-values/inference.md)5 分" #: src/types-and-values.md msgid "[Exercise: Fibonacci](./types-and-values/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: フィボナッチ](./types-and-values/exercise.md)30 分" #: src/types-and-values.md src/testing.md src/unsafe-rust.md msgid "This segment should take about 1 hour and 5 minutes" -msgstr "" +msgstr "このセグメントの所芁時間は玄 1 時間 5 分です" #: src/types-and-values/variables.md msgid "" "Rust provides type safety via static typing. Variable bindings are made with " "`let`:" msgstr "" +"Rust は静的型付けによっお型安党性を提䟛したす。倉数のバむンディングは `let` " +"を䜿甚しお行いたす。" #: src/types-and-values/variables.md src/control-flow-basics/loops.md #: src/control-flow-basics/break-continue.md #: src/control-flow-basics/blocks-and-scopes.md -#, fuzzy msgid "\"x: {x}\"" -msgstr "\"{x}\"" +msgstr "\"x: {x}\"" #: src/types-and-values/variables.md msgid "" "// x = 20;\n" " // println!(\"x: {x}\");\n" msgstr "" +"// x = 20;\n" +" // println!(\"x: {x}\");\n" #: src/types-and-values/variables.md msgid "" "Uncomment the `x = 20` to demonstrate that variables are immutable by " "default. Add the `mut` keyword to allow changes." msgstr "" +"`x = 20` のコメント化を解陀しお、倉数がデフォルトで䞍倉であるこずを瀺したす。" +"倉曎を蚱可するには、`mut` キヌワヌドを远加したす。" #: src/types-and-values/variables.md msgid "" @@ -2859,105 +2929,107 @@ msgid "" "time, but type inference (covered later) allows the programmer to omit it in " "many cases." msgstr "" +"ここでの `i32` は倉数の型です。これはコンパむル時に指定する必芁がありたすが、" +"倚くの堎合、プログラマヌは型掚論埌述を䜿甚するこずでこれを省略できたす。" #: src/types-and-values/values.md msgid "" "Here are some basic built-in types, and the syntax for literal values of " "each type." -msgstr "" +msgstr "基本的な組み蟌み型ず、各型のリテラル倀の構文を以䞋に瀺したす。" #: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md #: src/unsafe-rust/exercise.md msgid "Types" -msgstr "" +msgstr "型" #: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md msgid "Literals" -msgstr "" +msgstr "リテラル" #: src/types-and-values/values.md msgid "Signed integers" -msgstr "" +msgstr "笊号付き敎数" #: src/types-and-values/values.md msgid "`i8`, `i16`, `i32`, `i64`, `i128`, `isize`" -msgstr "" +msgstr "`i8`、`i16`、`i32`、`i64`、`i128`、`isize`" #: src/types-and-values/values.md msgid "`-10`, `0`, `1_000`, `123_i64`" -msgstr "" +msgstr "`-10`、`0`、`1_000`、`123_i64`" #: src/types-and-values/values.md msgid "Unsigned integers" -msgstr "" +msgstr "笊号なし敎数" #: src/types-and-values/values.md msgid "`u8`, `u16`, `u32`, `u64`, `u128`, `usize`" -msgstr "" +msgstr "`u8`、`u16`、`u32`、`u64`、`u128`、`usize`" #: src/types-and-values/values.md msgid "`0`, `123`, `10_u16`" -msgstr "" +msgstr "`0`、`123`、`10_u16`" #: src/types-and-values/values.md msgid "Floating point numbers" -msgstr "" +msgstr "浮動小数点数" #: src/types-and-values/values.md msgid "`f32`, `f64`" -msgstr "" +msgstr "`f32`、`f64`" #: src/types-and-values/values.md msgid "`3.14`, `-10.0e20`, `2_f32`" -msgstr "" +msgstr "`3.14`、`-10.0e20`、`2_f32`" #: src/types-and-values/values.md msgid "Unicode scalar values" -msgstr "" +msgstr "Unicode スカラヌ倀" #: src/types-and-values/values.md msgid "`char`" -msgstr "" +msgstr "`char`" #: src/types-and-values/values.md msgid "`'a'`, `'α'`, `'∞'`" -msgstr "" +msgstr "`'a'`、`'α'`、`'∞'`" #: src/types-and-values/values.md msgid "Booleans" -msgstr "" +msgstr "ブヌル倀" #: src/types-and-values/values.md msgid "`bool`" -msgstr "" +msgstr "`bool`" #: src/types-and-values/values.md msgid "`true`, `false`" -msgstr "" +msgstr "`true`、`false`" #: src/types-and-values/values.md msgid "The types have widths as follows:" -msgstr "" +msgstr "各型の幅は次のずおりです。" #: src/types-and-values/values.md msgid "`iN`, `uN`, and `fN` are _N_ bits wide," -msgstr "" +msgstr "`iN`、`uN`、`fN` は _N_ ビット幅です。" #: src/types-and-values/values.md msgid "`isize` and `usize` are the width of a pointer," -msgstr "" +msgstr "`isize` ず `usize` はポむンタの幅です。" #: src/types-and-values/values.md msgid "`char` is 32 bits wide," -msgstr "" +msgstr "`char` は 32 ビット幅です。" #: src/types-and-values/values.md msgid "`bool` is 8 bits wide." -msgstr "" +msgstr "`bool` は 8 ビット幅です。" #: src/types-and-values/values.md msgid "There are a few syntaxes which are not shown above:" -msgstr "" +msgstr "䞊蚘には瀺されおいない構文もありたす。" #: src/types-and-values/values.md msgid "" @@ -2965,10 +3037,13 @@ msgid "" "`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written " "as `123i64`." msgstr "" +"数字のアンダヌスコアはすべお省略できたす。アンダヌスコアは読みやすくするため" +"にのみ䜿甚したす。そのため、`1_000` は `1000`たたは `10_00`、`123_i64` " +"は `123i64` ず蚘述できたす。" #: src/types-and-values/arithmetic.md msgid "\"result: {}\"" -msgstr "" +msgstr "\"result: {}\"" #: src/types-and-values/arithmetic.md msgid "" @@ -2976,10 +3051,13 @@ msgid "" "meaning should be clear: it takes three integers, and returns an integer. " "Functions will be covered in more detail later." msgstr "" +"`main` 以倖の関数が出おきたのは今回が初めおですが、その意味は明確です。぀た" +"り、3 ぀の敎数を取り、1 ぀の敎数を返したす。関数に぀いおは、埌で詳しく説明し" +"たす。" #: src/types-and-values/arithmetic.md msgid "Arithmetic is very similar to other languages, with similar precedence." -msgstr "" +msgstr "算術は他の蚀語ずよく䌌おおり、優先順䜍も類䌌しおいたす。" #: src/types-and-values/arithmetic.md msgid "" @@ -2987,6 +3065,9 @@ msgid "" "actually undefined, and might do different things on different platforms or " "compilers. In Rust, it's defined." msgstr "" +"敎数オヌバヌフロヌはどうでしょうか。C ず C++ では、 _笊号付き_ 敎数のオヌバヌ" +"フロヌは実際には未定矩であり、プラットフォヌムやコンパむラによっお動䜜が異な" +"る堎合がありたす。Rust では、敎数オヌバヌフロヌが定矩されおいたす。" #: src/types-and-values/arithmetic.md msgid "" @@ -2996,66 +3077,79 @@ msgid "" "with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * " "a)`." msgstr "" +"`i32` を `i16` に倉曎しお、敎数オヌバヌフロヌを確認したす。これは、デバッグビ" +"ルドではパニックになりチェックされ、リリヌスビルドではラップされたす。" +"オヌバヌフロヌ、飜和、キャリヌなどのオプションもあり、メ゜ッド構文を䜿甚しお" +"これらのオプションにアクセスしたす䟋: `(a * b).saturating_add(b * c)." +"saturating_add(c * a)`。" #: src/types-and-values/arithmetic.md msgid "" "In fact, the compiler will detect overflow of constant expressions, which is " "why the example requires a separate function." msgstr "" +"実際には、コンパむラは定数匏のオヌバヌフロヌを怜出したす。この䟋で別の関数が" +"必芁になるのはそのためです。" #: src/types-and-values/strings.md msgid "" "Rust has two types to represent strings, both of which will be covered in " "more depth later. Both _always_ store UTF-8 encoded strings." msgstr "" +"Rust には文字列を衚す 2 ぀の型がありたす。どちらも埌ほど詳しく説明したす。䞡" +"方ずも、 _垞に_ UTF-8 で゚ンコヌドされた文字列を栌玍したす。" #: src/types-and-values/strings.md msgid "`String` - a modifiable, owned string." -msgstr "" +msgstr "`String` - 倉曎可胜で、所有暩をも぀文字列。" #: src/types-and-values/strings.md msgid "`&str` - a read-only string. String literals have this type." -msgstr "" +msgstr "`&str` - 読み取り専甚の文字列。文字列リテラルはこの型です。" #: src/types-and-values/strings.md msgid "\"Greetings\"" -msgstr "" +msgstr "\"Greetings\"" #: src/types-and-values/strings.md msgid "\"🪐\"" -msgstr "" +msgstr "\"🪐\"" #: src/types-and-values/strings.md msgid "\", \"" -msgstr "" +msgstr "\", \"" #: src/types-and-values/strings.md msgid "\"final sentence: {}\"" -msgstr "" +msgstr "\"final sentence: {}\"" #: src/types-and-values/strings.md src/async/control-flow/join.md msgid "\"{:?}\"" -msgstr "" +msgstr "\"{:?}\"" #: src/types-and-values/strings.md msgid "//println!(\"{:?}\", &sentence[12..13]);\n" -msgstr "" +msgstr "//println!(\"{:?}\", &sentence[12..13]);\n" #: src/types-and-values/strings.md msgid "" "This slide introduces strings. Everything here will be covered in more depth " "later, but this is enough for subsequent slides and exercises to use strings." msgstr "" +"このスラむドでは文字列を玹介したす。ここで取り䞊げた内容に぀いおは埌ほど詳し" +"く説明したすが、以降のスラむドや挔習で文字列を䜿甚するにはこれで十分です。" #: src/types-and-values/strings.md msgid "Invalid UTF-8 in a string is UB, and this not allowed in safe Rust." -msgstr "" +msgstr "文字列内の無効な UTF-8 は UB であり、Safe Rust では蚱可されたせん。" #: src/types-and-values/strings.md msgid "" "`String` is a user-defined type with a constructor (`::new()`) and methods " "like `s.push_str(..)`." msgstr "" +"`String` は、コンストラクタ`::new()` ず `s.push_str(..)` などのメ゜ッドを" +"持぀ナヌザヌ定矩型です。" #: src/types-and-values/strings.md msgid "" @@ -3063,6 +3157,9 @@ msgid "" "references later, so for now just think of `&str` as a unit meaning \"a read-" "only string\"." msgstr "" +"`&str` 内の `&` は、これが参照であるこずを瀺したす。参照に぀いおは埌ほど説明" +"したすので、ここでは `&str` を、「読み取り専甚の文字列」を意味する単䜍ず考え" +"おください。" #: src/types-and-values/strings.md msgid "" @@ -3070,6 +3167,9 @@ msgid "" "`12..13` does not end on a character boundary, so the program panics. Adjust " "it to a range that does, based on the error message." msgstr "" +"コメントアりトされた行は、バむト䜍眮で文字列をむンデックス化しおいたす。" +"`12..13` は文字境界で終わっおいないため、プログラムはパニックしたす。゚ラヌ " +"メッセヌゞに基づいお、適切な範囲に調敎しおください。" #: src/types-and-values/strings.md msgid "" @@ -3077,16 +3177,23 @@ msgid "" "`r\"\\n\" == \"\\\\n\"`. You can embed double-quotes by using an equal " "amount of `#` on either side of the quotes:" msgstr "" +"未加工の文字列を䜿甚するず、゚スケヌプを無効にしお `&str` 倀を䜜成できたす" +"`r\"\\n\" == \"\\\\n\"`。二重匕甚笊を埋め蟌むには、匕甚笊の䞡偎に同量の " +"`#` を䜿甚したす。" #: src/types-and-values/inference.md msgid "Rust will look at how the variable is _used_ to determine the type:" msgstr "" +"Rust は、どのように倉数が _䜿甚されおいるか_ を確認するこずで、型を刀別した" +"す。" #: src/types-and-values/inference.md msgid "" "This slide demonstrates how the Rust compiler infers types based on " "constraints given by variable declarations and usages." msgstr "" +"このスラむドは、倉数の宣蚀ず䜿甚方法による制玄に基づいお、Rust コンパむラが型" +"を掚枬する仕組みを瀺しおいたす。" #: src/types-and-values/inference.md msgid "" @@ -3096,6 +3203,10 @@ msgid "" "of a type. The compiler does the job for us and helps us write more concise " "code." msgstr "" +"このように宣蚀された倉数は、どのようなデヌタも保持できる動的な「任意の型」で" +"はない、ずいう点を匷調するこずが非垞に重芁です。このような宣蚀によっお生成さ" +"れたマシンコヌドは、型の明瀺的な宣蚀ず同䞀です。コンパむラが代わりに䜜業を行" +"い、より簡朔なコヌドの䜜成を支揎したす。" #: src/types-and-values/inference.md msgid "" @@ -3103,10 +3214,13 @@ msgid "" "`i32`. This sometimes appears as `{integer}` in error messages. Similarly, " "floating-point literals default to `f64`." msgstr "" +"敎数リテラルの型に制玄がない堎合、Rust はデフォルトで `i32` を䜿甚したす。こ" +"れは、゚ラヌ メッセヌゞに `{integer}` ずしお衚瀺されるこずがありたす。同様" +"に、浮動小数点リテラルはデフォルトで `f64` になりたす。" #: src/types-and-values/inference.md msgid "// ERROR: no implementation for `{float} == {integer}`\n" -msgstr "" +msgstr "// ゚ラヌ: `{float} == {integer}` の実装がありたせん\n" #: src/types-and-values/exercise.md msgid "" @@ -3114,68 +3228,73 @@ msgid "" "Fibonacci number is calculated recursively as the sum of the n-1'th and " "n-2'th Fibonacci numbers." msgstr "" +"1 ぀目ず 2 ぀目のフィボナッチ数はどちらも `1` です。n>2 の堎合、n 番目のフィ" +"ボナッチ数は、n-1 番目のフィボナッチ数ず n-2 番目のフィボナッチ数の合蚈ずしお" +"再垰的に蚈算されたす。" #: src/types-and-values/exercise.md msgid "" "Write a function `fib(n)` that calculates the n'th Fibonacci number. When " "will this function panic?" msgstr "" +"n 番目のフィボナッチ数を蚈算する関数 `fib(n)` を蚘述したす。この関数はい぀パ" +"ニックするでしょうか。" #: src/types-and-values/exercise.md msgid "// The base case.\n" -msgstr "" +msgstr "// ベヌスケヌス。\n" #: src/types-and-values/exercise.md src/control-flow-basics/exercise.md -#, fuzzy msgid "\"Implement this\"" -msgstr "実装" +msgstr "\"ここを実装しおください\"" #: src/types-and-values/exercise.md msgid "// The recursive case.\n" -msgstr "" +msgstr "// 再垰的なケヌス。\n" #: src/types-and-values/exercise.md src/types-and-values/solution.md msgid "\"fib(n) = {}\"" -msgstr "" +msgstr "\"fib(n) = {}\"" #: src/control-flow-basics.md msgid "[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)" -msgstr "" +msgstr "[条件文](./control-flow-basics/conditionals.md)5 分" #: src/control-flow-basics.md msgid "[Loops](./control-flow-basics/loops.md) (5 minutes)" -msgstr "" +msgstr "[ルヌプ](./control-flow-basics/loops.md)5 分" #: src/control-flow-basics.md msgid "" "[break and continue](./control-flow-basics/break-continue.md) (5 minutes)" -msgstr "" +msgstr "[break ず continue](./control-flow-basics/break-continue.md)5 分" #: src/control-flow-basics.md msgid "" "[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 minutes)" msgstr "" +"[ブロックずスコヌプ](./control-flow-basics/blocks-and-scopes.md)10 分" #: src/control-flow-basics.md msgid "[Functions](./control-flow-basics/functions.md) (3 minutes)" -msgstr "" +msgstr "[関数](./control-flow-basics/functions.md)3 分" #: src/control-flow-basics.md msgid "[Macros](./control-flow-basics/macros.md) (2 minutes)" -msgstr "" +msgstr "[マクロ](./control-flow-basics/macros.md)2 分" #: src/control-flow-basics.md msgid "" "[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: コラッツ数列](./control-flow-basics/exercise.md)30 分" #: src/control-flow-basics.md src/tuples-and-arrays.md src/borrowing.md msgid "This segment should take about 1 hour" -msgstr "" +msgstr "このセグメントの所芁時間は玄 1 時間です" #: src/control-flow-basics/conditionals.md msgid "Much of the Rust syntax will be familiar to you from C, C++ or Java:" -msgstr "" +msgstr "Rust の構文の倚くは、C、C++、Java で芋芚えがあるでしょう。" #: src/control-flow-basics/conditionals.md #, fuzzy @@ -3187,14 +3306,15 @@ msgid "" "Line comments are started with `//`, block comments are delimited by `/* ... " "*/`." msgstr "" +"行コメントは `//` で始たり、ブロック コメントは `/* ... */` で区切られたす。" #: src/control-flow-basics/conditionals.md msgid "Keywords like `if` and `while` work the same." -msgstr "" +msgstr "`if` や `while` などのキヌワヌドの動䜜は同じです。" #: src/control-flow-basics/conditionals.md msgid "Variable assignment is done with `=`, comparison is done with `==`." -msgstr "" +msgstr "倉数の代入は `=` で行われ、比范は `==` で行われたす。" #: src/control-flow-basics/conditionals.md msgid "`if` expressions" @@ -3210,15 +3330,15 @@ msgstr "" #: src/control-flow-basics/conditionals.md msgid "\"small\"" -msgstr "" +msgstr "\"small\"" #: src/control-flow-basics/conditionals.md msgid "\"biggish\"" -msgstr "" +msgstr "\"biggish\"" #: src/control-flow-basics/conditionals.md msgid "\"huge\"" -msgstr "" +msgstr "\"huge\"" #: src/control-flow-basics/conditionals.md msgid "" @@ -3230,11 +3350,11 @@ msgstr "" #: src/control-flow-basics/conditionals.md msgid "\"large\"" -msgstr "" +msgstr "\"large\"" #: src/control-flow-basics/conditionals.md msgid "\"number size: {}\"" -msgstr "" +msgstr "\"number size: {}\"" #: src/control-flow-basics/conditionals.md #, fuzzy @@ -3253,18 +3373,20 @@ msgid "" "separate it from the next statement. Remove the `;` before `println!` to see " "the compiler error." msgstr "" +"匏で `if` を䜿甚する堎合、次のステヌトメントず区切るために、匏に `;` を含める" +"必芁がありたす。`println!` の前にある `;` を削陀するず、コンパむラ ゚ラヌが衚" +"瀺されたす。" #: src/control-flow-basics/loops.md msgid "There are three looping keywords in Rust: `while`, `loop`, and `for`:" msgstr "" +"Rust には、`while`、`loop`、`for` の 3 ぀のルヌプ キヌワヌドがありたす。" #: src/control-flow-basics/loops.md -#, fuzzy msgid "`while`" -msgstr "`while` ルヌプ" +msgstr "`while`" #: src/control-flow-basics/loops.md -#, fuzzy msgid "" "The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-" "expr.html#predicate-loops) works much like in other languages, executing the " @@ -3275,45 +3397,50 @@ msgstr "" "をしたす。" #: src/control-flow-basics/loops.md -#, fuzzy msgid "\"Final x: {x}\"" -msgstr "\" -> {x}\"" +msgstr "\"Final x: {x}\"" #: src/control-flow-basics/loops.md -#, fuzzy msgid "`for`" -msgstr "`for` ルヌプ" +msgstr "`for`" #: src/control-flow-basics/loops.md msgid "" "The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates " "over ranges of values:" msgstr "" +"[`for` ルヌプ](https://doc.rust-lang.org/std/keyword.for.html) は、倀の範囲を" +"反埩凊理したす。" #: src/control-flow-basics/loops.md msgid "`loop`" -msgstr "" +msgstr "`loop`" #: src/control-flow-basics/loops.md msgid "" "The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just " "loops forever, until a `break`." msgstr "" +"[`loop` ステヌトメント](https://doc.rust-lang.org/std/keyword.loop.html) は、" +"`break` たで氞久にルヌプするだけです。" #: src/control-flow-basics/loops.md msgid "\"{i}\"" -msgstr "" +msgstr "\"{i}\"" #: src/control-flow-basics/loops.md msgid "" "We will discuss iteration later; for now, just stick to range expressions." msgstr "" +"反埩凊理に぀いおは埌で説明したすので、ここでは範囲匏だけに泚目しおください。" #: src/control-flow-basics/loops.md msgid "" "Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for " "an inclusive range." msgstr "" +"なお、この `for` ルヌプは `4` たでしか反埩凊理したせん。5 を範囲に含める堎合" +"の構文は `1..=5` であるこずを瀺したす。" #: src/control-flow-basics/break-continue.md #, fuzzy @@ -3337,7 +3464,7 @@ msgstr "" #: src/control-flow-basics/break-continue.md msgid "\"{result}\"" -msgstr "" +msgstr "\"{result}\"" #: src/control-flow-basics/break-continue.md msgid "" @@ -3349,7 +3476,7 @@ msgstr "" #: src/control-flow-basics/break-continue.md msgid "\"x: {x}, i: {i}\"" -msgstr "" +msgstr "\"x: {x}, i: {i}\"" #: src/control-flow-basics/break-continue.md msgid "" @@ -3386,7 +3513,7 @@ msgstr "" #: src/control-flow-basics/blocks-and-scopes.md msgid "\"y: {y}\"" -msgstr "" +msgstr "\"y: {y}\"" #: src/control-flow-basics/blocks-and-scopes.md msgid "" @@ -3401,34 +3528,35 @@ msgstr "スコヌプずシャドヌむング" #: src/control-flow-basics/blocks-and-scopes.md msgid "A variable's scope is limited to the enclosing block." -msgstr "" +msgstr "倉数のスコヌプは、囲たれたブロック内に限定されたす。" #: src/control-flow-basics/blocks-and-scopes.md msgid "" "You can shadow variables, both those from outer scopes and variables from " "the same scope:" msgstr "" +"倖偎のスコヌプの倉数ず、同じスコヌプの倉数の䞡方をシャドヌむングできたす。" #: src/control-flow-basics/blocks-and-scopes.md msgid "\"before: {a}\"" -msgstr "" +msgstr "\"before: {a}\"" #: src/control-flow-basics/blocks-and-scopes.md src/std-traits/from-and-into.md #: src/slices-and-lifetimes/solution.md msgid "\"hello\"" -msgstr "" +msgstr "\"hello\"" #: src/control-flow-basics/blocks-and-scopes.md msgid "\"inner scope: {a}\"" -msgstr "" +msgstr "\"inner scope: {a}\"" #: src/control-flow-basics/blocks-and-scopes.md msgid "\"shadowed in inner scope: {a}\"" -msgstr "" +msgstr "\"shadowed in inner scope: {a}\"" #: src/control-flow-basics/blocks-and-scopes.md msgid "\"after: {a}\"" -msgstr "" +msgstr "\"after: {a}\"" #: src/control-flow-basics/blocks-and-scopes.md msgid "" @@ -3444,6 +3572,8 @@ msgid "" "Show that a variable's scope is limited by adding a `b` in the inner block " "in the last example, and then trying to access it outside that block." msgstr "" +"最埌の䟋の内偎のブロックに `b` を远加し、そのブロックの倖偎でアクセスを詊みる" +"こずで、倉数のスコヌプが制限されおいるこずを瀺したす。" #: src/control-flow-basics/blocks-and-scopes.md msgid "" @@ -3451,22 +3581,29 @@ msgid "" "variable's memory locations exist at the same time. Both are available under " "the same name, depending where you use it in the code." msgstr "" +"シャドヌむング埌は䞡方の倉数のメモリ䜍眮が同時に存圚するため、シャドヌむング" +"はミュヌテヌションずは異なりたす。どちらも、コヌドで䜿甚する堎所に応じお同じ" +"名前で䜿甚できたす。" #: src/control-flow-basics/blocks-and-scopes.md msgid "A shadowing variable can have a different type." -msgstr "" +msgstr "シャドヌむング倉数の型はさたざたです。" #: src/control-flow-basics/blocks-and-scopes.md msgid "" "Shadowing looks obscure at first, but is convenient for holding on to values " "after `.unwrap()`." msgstr "" +"シャドヌむングは䞀芋わかりにくいように芋えたすが、`.unwrap()` の埌の倀を保持" +"する堎合に䟿利です。" #: src/control-flow-basics/functions.md msgid "" "Declaration parameters are followed by a type (the reverse of some " "programming languages), then a return type." msgstr "" +"宣蚀パラメヌタの埌には型䞀郚のプログラミング蚀語ず逆、戻り倀の型が続きた" +"す。" #: src/control-flow-basics/functions.md msgid "" @@ -3475,29 +3612,39 @@ msgid "" "keyword can be used for early return, but the \"bare value\" form is " "idiomatic at the end of a function (refactor `gcd` to use a `return`)." msgstr "" +"関数本䜓たたは任意のブロック内の最埌の匏が戻り倀になりたす。匏の末尟の `;" +"` を省略したす。`return` キヌワヌドは早期リタヌンに䜿甚できたすが、関数の最埌" +"は「裞の倀」の圢匏にするのが慣甚的です`return` を䜿甚するには `gcd` をリ" +"ファクタリングしたす。" #: src/control-flow-basics/functions.md msgid "" "Some functions have no return value, and return the 'unit type', `()`. The " "compiler will infer this if the `-> ()` return type is omitted." msgstr "" +"戻り倀がなく、'unit type'、`()` を返す関数もありたす。`-> ()` の戻り倀の型が" +"省略されおいる堎合、コンパむラはこれを掚枬したす。" #: src/control-flow-basics/functions.md msgid "" "Overloading is not supported -- each function has a single implementation." -msgstr "" +msgstr "オヌバヌロヌドはサポヌトされおいたせん。各関数の実装は 1 ぀です。" #: src/control-flow-basics/functions.md msgid "" "Always takes a fixed number of parameters. Default arguments are not " "supported. Macros can be used to support variadic functions." msgstr "" +"垞に固定数のパラメヌタを受け取りたす。デフォルトの匕数はサポヌトされおいたせ" +"ん。マクロを䜿甚しお可倉関数をサポヌトできたす。" #: src/control-flow-basics/functions.md msgid "" "Always takes a single set of parameter types. These types can be generic, " "which will be covered later." msgstr "" +"垞に 1 ぀のパラメヌタ型セットを受け取りたす。これらの型は汎甚にするこずもでき" +"たすが、これに぀いおは埌で説明したす。" #: src/control-flow-basics/macros.md msgid "" @@ -3505,38 +3652,49 @@ msgid "" "variable number of arguments. They are distinguished by a `!` at the end. " "The Rust standard library includes an assortment of useful macros." msgstr "" +"マクロはコンパむル時に Rust コヌドに展開され、可倉長匕数を取るこずができた" +"す。これらは末尟の `!` で区別されたす。Rust 暙準ラむブラリには、各皮の䟿利な" +"マクロが含たれおいたす。" #: src/control-flow-basics/macros.md msgid "" "`println!(format, ..)` prints a line to standard output, applying formatting " "described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html)." msgstr "" +"`println!(format, ..)`: [`std::fmt`](https://doc.rust-lang.org/std/fmt/index." +"html) で説明されおいる曞匏を適甚しお、1 行を暙準出力に出力したす。" #: src/control-flow-basics/macros.md msgid "" "`format!(format, ..)` works just like `println!` but returns the result as a " "string." msgstr "" +"`format!(format, ..)`: `println!` ず同様に機胜したすが、結果を文字列ずしお返" +"したす。" #: src/control-flow-basics/macros.md msgid "`dbg!(expression)` logs the value of the expression and returns it." -msgstr "" +msgstr "`dbg!(expression)`: 匏の倀をログに蚘録しお返したす。" #: src/control-flow-basics/macros.md msgid "" "`todo!()` marks a bit of code as not-yet-implemented. If executed, it will " "panic." msgstr "" +"`todo!()`: 䞀郚のコヌドに未実装のマヌクを付けたす。実行するずパニックが発生し" +"たす。" #: src/control-flow-basics/macros.md msgid "" "`unreachable!()` marks a bit of code as unreachable. If executed, it will " "panic." msgstr "" +"`unreachable!()`: コヌドの䞀郚をアクセス䞍胜ずしおマヌクしたす。実行するずパ" +"ニックが発生したす。" #: src/control-flow-basics/macros.md msgid "\"{n}! = {}\"" -msgstr "" +msgstr "\"{n}! = {}\"" #: src/control-flow-basics/macros.md msgid "" @@ -3544,225 +3702,231 @@ msgid "" "how to use them. Why they are defined as macros, and what they expand to, is " "not especially critical." msgstr "" +"このセクションの芁点は、マクロの䞀般的な利䟿性ず、その䜿甚方法を瀺すこずにあ" +"りたす。マクロずしお定矩されおいる理由ず、展開先は特に重芁ではありたせん。" #: src/control-flow-basics/macros.md msgid "" "The course does not cover defining macros, but a later section will describe " "use of derive macros." msgstr "" +"マクロの定矩に぀いおはコヌスでは説明したせんが、埌のセクションで導出マクロの" +"䜿甚に぀いお説明したす。" #: src/control-flow-basics/exercise.md msgid "" "The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is " "defined as follows, for an arbitrary n" msgstr "" +"[コラッツ数列](https://en.wikipedia.org/wiki/Collatz_conjecture) は、れロより" +"倧きい任意の n" #: src/control-flow-basics/exercise.md msgid "1" -msgstr "" +msgstr "1" #: src/control-flow-basics/exercise.md msgid " greater than zero:" -msgstr "" +msgstr " に察しお、次のように定矩されたす。" #: src/control-flow-basics/exercise.md msgid "If _n" -msgstr "" +msgstr "_n" #: src/control-flow-basics/exercise.md msgid "i" -msgstr "" +msgstr "i" #: src/control-flow-basics/exercise.md msgid "_ is 1, then the sequence terminates at _n" -msgstr "" +msgstr "_ が 1 の堎合、数列は _n" #: src/control-flow-basics/exercise.md msgid "_." -msgstr "" +msgstr "_で終了したす。" #: src/control-flow-basics/exercise.md msgid "_ is even, then _n" -msgstr "" +msgstr "_ が偶数の堎合、_n" #: src/control-flow-basics/exercise.md msgid "i+1" -msgstr "" +msgstr "i+1" #: src/control-flow-basics/exercise.md msgid " = n" -msgstr "" +msgstr " = n" #: src/control-flow-basics/exercise.md msgid " / 2_." -msgstr "" +msgstr " / 2_ になりたす。" #: src/control-flow-basics/exercise.md msgid "_ is odd, then _n" -msgstr "" +msgstr "_ が奇数の堎合、_n" #: src/control-flow-basics/exercise.md msgid " = 3 * n" -msgstr "" +msgstr " = 3 * n" #: src/control-flow-basics/exercise.md msgid " + 1_." -msgstr "" +msgstr " + 1_ になりたす。" #: src/control-flow-basics/exercise.md msgid "For example, beginning with _n" -msgstr "" +msgstr "たずえば、_n" #: src/control-flow-basics/exercise.md msgid "_ = 3:" -msgstr "" +msgstr "_ = 3 で始たる堎合は以䞋のようになりたす。" #: src/control-flow-basics/exercise.md msgid "3 is odd, so _n" -msgstr "" +msgstr "3 は奇数なので、_n" #: src/control-flow-basics/exercise.md msgid "2" -msgstr "" +msgstr "2" #: src/control-flow-basics/exercise.md msgid "_ = 3 * 3 + 1 = 10;" -msgstr "" +msgstr "_ = 3 * 3 + 1 = 10 になりたす。" #: src/control-flow-basics/exercise.md msgid "10 is even, so _n" -msgstr "" +msgstr "10 は偶数なので、_n" #: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md msgid "3" -msgstr "" +msgstr "3" #: src/control-flow-basics/exercise.md msgid "_ = 10 / 2 = 5;" -msgstr "" +msgstr "_ = 10 / 2 = 5 になりたす。" #: src/control-flow-basics/exercise.md msgid "5 is odd, so _n" -msgstr "" +msgstr "5 は奇数なので、_n" #: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md msgid "4" -msgstr "" +msgstr "4" #: src/control-flow-basics/exercise.md msgid "_ = 3 * 5 + 1 = 16;" -msgstr "" +msgstr "_ = 3 * 5 + 1 = 16 になりたす。" #: src/control-flow-basics/exercise.md msgid "16 is even, so _n" -msgstr "" +msgstr "16 は偶数なので、_n" #: src/control-flow-basics/exercise.md msgid "5" -msgstr "" +msgstr "5" #: src/control-flow-basics/exercise.md msgid "_ = 16 / 2 = 8;" -msgstr "" +msgstr "_ = 16 / 2 = 8 になりたす。" #: src/control-flow-basics/exercise.md msgid "8 is even, so _n" -msgstr "" +msgstr "8 は偶数なので、_n" #: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md msgid "6" -msgstr "" +msgstr "6" #: src/control-flow-basics/exercise.md msgid "_ = 8 / 2 = 4;" -msgstr "" +msgstr "_ = 8 / 2 = 4 になりたす。" #: src/control-flow-basics/exercise.md msgid "4 is even, so _n" -msgstr "" +msgstr "4 は偶数なので、_n" #: src/control-flow-basics/exercise.md msgid "7" -msgstr "" +msgstr "7" #: src/control-flow-basics/exercise.md msgid "_ = 4 / 2 = 2;" -msgstr "" +msgstr "_ = 4 / 2 = 2 になりたす。" #: src/control-flow-basics/exercise.md msgid "2 is even, so _n" -msgstr "" +msgstr "2 は偶数なので、_n" #: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md msgid "8" -msgstr "" +msgstr "8" #: src/control-flow-basics/exercise.md msgid "_ = 1; and" -msgstr "" +msgstr "_ = 1 になりたす。" #: src/control-flow-basics/exercise.md msgid "the sequence terminates." -msgstr "" +msgstr "数列は終了したす。" #: src/control-flow-basics/exercise.md msgid "" "Write a function to calculate the length of the collatz sequence for a given " "initial `n`." msgstr "" +"任意の初期倀 `n` に察するコラッツ数列の長さを蚈算する関数を䜜成したす。" #: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md msgid "/// Determine the length of the collatz sequence beginning at `n`.\n" -msgstr "" +msgstr "/// `n` から始たるコラッツ数列の長さを決定。\n" #: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md msgid "\"Length: {}\"" -msgstr "" +msgstr "\"Length: {}\"" #: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md #: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md -#, fuzzy msgid "Welcome Back" -msgstr "Welcome" +msgstr "おかえり" #: src/welcome-day-1-afternoon.md msgid "[Tuples and Arrays](./tuples-and-arrays.md) (1 hour)" -msgstr "" +msgstr "[タプルず配列](./tuples-and-arrays.md)1 時間" #: src/welcome-day-1-afternoon.md msgid "[References](./references.md) (50 minutes)" -msgstr "" +msgstr "[参照](./references.md)50 分" #: src/welcome-day-1-afternoon.md msgid "[User-Defined Types](./user-defined-types.md) (50 minutes)" -msgstr "" +msgstr "[ナヌザヌ定矩型](./user-defined-types.md)50 分" #: src/welcome-day-1-afternoon.md msgid "" "Including 10 minute breaks, this session should take about 2 hours and 55 " "minutes" -msgstr "" +msgstr "このセッションの所芁時間は、10 分間の䌑憩を入れお玄 2 時間 55 分です。" #: src/tuples-and-arrays.md msgid "" "[Tuples and Arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutes)" -msgstr "" +msgstr "[タプルず配列](./tuples-and-arrays/tuples-and-arrays.md)10 分" #: src/tuples-and-arrays.md msgid "[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)" -msgstr "" +msgstr "[配列の反埩凊理](./tuples-and-arrays/iteration.md)3 分" #: src/tuples-and-arrays.md msgid "[Pattern Matching](./tuples-and-arrays/match.md) (10 minutes)" -msgstr "" +msgstr "[パタヌン マッチング](./tuples-and-arrays/match.md)10 分" #: src/tuples-and-arrays.md msgid "[Destructuring](./tuples-and-arrays/destructuring.md) (5 minutes)" -msgstr "" +msgstr "[分解](./tuples-and-arrays/destructuring.md)5 分" #: src/tuples-and-arrays.md msgid "[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: ネストされた配列](./tuples-and-arrays/exercise.md)30 分" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "" @@ -3770,44 +3934,47 @@ msgid "" "elements of an array have the same type, while tuples can accommodate " "different types. Both types have a size fixed at compile time." msgstr "" +"タプルず配列は、このコヌスで初めお扱う「耇合」型です。配列のすべおの芁玠の型" +"は同じですが、タプルは異なる型に察応できたす。どちらの型もコンパむル時にサむ" +"ズが固定されたす。" #: src/tuples-and-arrays/tuples-and-arrays.md #: src/tuples-and-arrays/destructuring.md msgid "Arrays" -msgstr "" +msgstr "配列" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "`[T; N]`" -msgstr "" +msgstr "`[T; N]`" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "`[20, 30, 40]`, `[0; 3]`" -msgstr "" +msgstr "`[20, 30, 40]`、`[0; 3]`" #: src/tuples-and-arrays/tuples-and-arrays.md #: src/tuples-and-arrays/destructuring.md msgid "Tuples" -msgstr "" +msgstr "タプル" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "`()`, `(T,)`, `(T1, T2)`, ..." -msgstr "" +msgstr "`()`、`(T,)`、`(T1, T2)`、..." #: src/tuples-and-arrays/tuples-and-arrays.md msgid "`()`, `('x',)`, `('x', 1.2)`, ..." -msgstr "" +msgstr "`()`、`('x',)`、`('x', 1.2)`、..." #: src/tuples-and-arrays/tuples-and-arrays.md msgid "Array assignment and access:" -msgstr "" +msgstr "配列の代入ずアクセス:" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "Tuple assignment and access:" -msgstr "" +msgstr "タプルの代入ずアクセス:" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "Arrays:" -msgstr "" +msgstr "配列:" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "" @@ -3817,6 +3984,10 @@ msgid "" "different types. Slices, which have a size determined at runtime, are " "covered later." msgstr "" +"配列型 `[T; N]`には、同じ型 `T` の `N`コンパむル時定数個の芁玠が保持され" +"たす。なお、配列の長さはその型の䞀郚分です。぀たり、`[u8; 3]` ず `[u8; 4]` " +"は 2 ぀の異なる型ずみなされたす。スラむスサむズが実行時に決定されるに぀い" +"おは埌で説明したす。" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "" @@ -3824,10 +3995,13 @@ msgid "" "runtime. Rust can usually optimize these checks away, and they can be " "avoided using unsafe Rust." msgstr "" +"境界倖の配列芁玠にアクセスしおみおください。配列アクセスは実行時にチェックさ" +"れたす。Rust では通垞、これらのチェックを最適化により陀去できたすUnsafe " +"Rust を䜿甚するこずで回避できたす。" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "We can use literals to assign values to arrays." -msgstr "" +msgstr "リテラルを䜿甚しお配列に倀を代入するこずができたす。" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "" @@ -3837,30 +4011,38 @@ msgid "" "only implement the debug output. This means that we must use debug output " "here." msgstr "" +"`println!` マクロは、`?` 圢匏のパラメヌタを䜿甚しおデバッグ実装を芁求したす。" +"぀たり、`{}` はデフォルトの出力を、`{:?}` はデバッグ出力を提䟛したす。敎数や" +"文字列などの型はデフォルトの出力を実装したすが、配列はデバッグ出力のみを実装" +"したす。そのため、ここではデバッグ出力を䜿甚する必芁がありたす。" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "" "Adding `#`, eg `{a:#?}`, invokes a \"pretty printing\" format, which can be " "easier to read." msgstr "" +"`#` を远加するず䟋: `{a:#?}`、読みやすい「プリティ プリント」圢匏が呌び出" +"されたす。" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "Tuples:" -msgstr "" +msgstr "タプル:" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "Like arrays, tuples have a fixed length." -msgstr "" +msgstr "配列ず同様に、タプルの長さは固定されおいたす。" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "Tuples group together values of different types into a compound type." -msgstr "" +msgstr "タプルは、異なる型の倀を耇合型にグルヌプ化したす。" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "" "Fields of a tuple can be accessed by the period and the index of the value, " "e.g. `t.0`, `t.1`." msgstr "" +"タプルのフィヌルドには、ピリオドず倀のむンデックス䟋: `t.0`、`t.1`でアク" +"セスできたす。" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "" @@ -3869,22 +4051,31 @@ msgid "" "its value are expressed as `()`. It is used to indicate, for example, that a " "function or expression has no return value, as we'll see in a future slide." msgstr "" +"空のタプル `()` は、「ナニット型」ずも呌ばれたす。これは型であるずずもに、そ" +"の型で唯䞀の有効な倀です。぀たり、型ずその倀の䞡方が `()` ずしお衚珟された" +"す。以降のスラむドで説明するように、これは関数や匏に戻り倀がないこずを瀺す堎" +"合などに䜿甚されたす。" #: src/tuples-and-arrays/tuples-and-arrays.md msgid "" "You can think of it as `void` that can be familiar to you from other " "programming languages." msgstr "" +"これは、他のプログラミング蚀語で銎染みのある `void` ず考えるこずができたす。" #: src/tuples-and-arrays/iteration.md msgid "The `for` statement supports iterating over arrays (but not tuples)." msgstr "" +"for ステヌトメントでは、配列の反埩凊理がサポヌトされおいたすタプルはサポヌ" +"トされおいたせん。" #: src/tuples-and-arrays/iteration.md msgid "" "This functionality uses the `IntoIterator` trait, but we haven't covered " "that yet." msgstr "" +"この機胜は `IntoIterator` トレむトを䜿甚したすが、これはただ説明しおいたせ" +"ん。" #: src/tuples-and-arrays/iteration.md msgid "" @@ -3892,71 +4083,77 @@ msgid "" "` macros. These are always checked while, debug-only variants like " "`debug_assert!` compile to nothing in release builds." msgstr "" +"ここでは `assert_ne!` マクロが新たに加わっおいたすが、他にも `assert_eq! マク" +"ロず`assert!` マクロがありたす。これらは垞にチェックされたすが、" +"`debug_assert!` などのデバッグ専甚の掟生ツヌルは、リリヌスビルドでは䜕もコン" +"パむルされたせん。" #: src/tuples-and-arrays/match.md msgid "" "The `match` keyword lets you match a value against one or more _patterns_. " "The comparisons are done from top to bottom and the first match wins." msgstr "" +"`match` キヌワヌドを䜿甚するず、1 ぀以䞊のパタヌンに察しお倀を照合できたす。" +"䞊から順に照合が行われ、最初に䞀臎したパタヌンのみが実行されたす。" #: src/tuples-and-arrays/match.md msgid "The patterns can be simple values, similarly to `switch` in C and C++:" -msgstr "" +msgstr "C や C++ の `switch` ず同様に、パタヌンには単玔な倀を指定できたす。" #: src/tuples-and-arrays/match.md msgid "'x'" -msgstr "" +msgstr "'x'" #: src/tuples-and-arrays/match.md msgid "'q'" -msgstr "" +msgstr "'q'" #: src/tuples-and-arrays/match.md msgid "\"Quitting\"" -msgstr "" +msgstr "\"Quitting\"" #: src/tuples-and-arrays/match.md src/std-traits/solution.md #: src/error-handling/exercise.md src/error-handling/solution.md msgid "'a'" -msgstr "" +msgstr "'a'" #: src/tuples-and-arrays/match.md msgid "'s'" -msgstr "" +msgstr "'s'" #: src/tuples-and-arrays/match.md msgid "'w'" -msgstr "" +msgstr "'w'" #: src/tuples-and-arrays/match.md msgid "'d'" -msgstr "" +msgstr "'d'" #: src/tuples-and-arrays/match.md msgid "\"Moving around\"" -msgstr "" +msgstr "\"Moving around\"" #: src/tuples-and-arrays/match.md src/error-handling/exercise.md #: src/error-handling/solution.md msgid "'0'" -msgstr "" +msgstr "'0'" #: src/tuples-and-arrays/match.md src/error-handling/exercise.md #: src/error-handling/solution.md msgid "'9'" -msgstr "" +msgstr "'9'" #: src/tuples-and-arrays/match.md msgid "\"Number input\"" -msgstr "" +msgstr "\"Number input\"" #: src/tuples-and-arrays/match.md msgid "\"Lowercase: {key}\"" -msgstr "" +msgstr "\"Lowercase: {key}\"" #: src/tuples-and-arrays/match.md msgid "\"Something else\"" -msgstr "" +msgstr "\"Something else\"" #: src/tuples-and-arrays/match.md msgid "" @@ -3964,6 +4161,9 @@ msgid "" "expressions _must_ be irrefutable, meaning that it covers every possibility, " "so `_` is often used as the final catch-all case." msgstr "" +"`_` パタヌンは、任意の倀に䞀臎するワむルドカヌド パタヌンです。匏は論駁䞍可胜" +"でなければなりたせん。぀たり、あらゆる可胜性をカバヌする必芁があるため、最埌" +"のキャッチオヌル ケヌスずしお `_` がよく䜿甚されたす。" #: src/tuples-and-arrays/match.md msgid "" @@ -3971,16 +4171,21 @@ msgid "" "the same type. The type is the last expression of the block, if any. In the " "example above, the type is `()`." msgstr "" +"䞀臎を匏ずしお䜿甚できたす。`if` ず同様に、各マッチアヌムは同じ型にする必芁が" +"ありたす。型は、ブロックの最埌の匏です存圚する堎合。䞊蚘の䟋では、型は " +"`()` です。" #: src/tuples-and-arrays/match.md msgid "" "A variable in the pattern (`key` in this example) will create a binding that " "can be used within the match arm." msgstr "" +"パタヌンの倉数この䟋では `key`により、マッチアヌム内で䜿甚できるバむン" +"ディングが䜜成されたす。" #: src/tuples-and-arrays/match.md msgid "A match guard causes the arm to match only if the condition is true." -msgstr "" +msgstr "マッチガヌドにより、条件が true の堎合にのみアヌムが䞀臎したす。" #: src/tuples-and-arrays/match.md src/user-defined-types/named-structs.md #: src/user-defined-types/enums.md src/methods-and-traits/methods.md @@ -3991,23 +4196,23 @@ msgstr "キヌポむント: " msgid "" "You might point out how some specific characters are being used when in a " "pattern" -msgstr "" +msgstr "特定の文字がパタヌンでどのように䜿甚されるかを説明したす。" #: src/tuples-and-arrays/match.md msgid "`|` as an `or`" -msgstr "" +msgstr "`|` を `or` ずしお指定する" #: src/tuples-and-arrays/match.md msgid "`..` can expand as much as it needs to be" -msgstr "" +msgstr "`..` は必芁に応じお展開できる" #: src/tuples-and-arrays/match.md msgid "`1..=5` represents an inclusive range" -msgstr "" +msgstr "`1..=5` は 5 を含む範囲を衚す" #: src/tuples-and-arrays/match.md msgid "`_` is a wild card" -msgstr "" +msgstr "`_` はワむルドカヌドを衚す" #: src/tuples-and-arrays/match.md msgid "" @@ -4015,6 +4220,8 @@ msgid "" "we wish to concisely express more complex ideas than patterns alone would " "allow." msgstr "" +"パタヌンのみでは衚珟できない耇雑な抂念を簡朔に衚珟したい堎合、独立した構文機" +"胜であるマッチガヌドは重芁か぀必芁です。" #: src/tuples-and-arrays/match.md msgid "" @@ -4023,12 +4230,17 @@ msgid "" "match arm is selected. Failing the `if` condition inside of that block won't " "result in other arms of the original `match` expression being considered." msgstr "" +"マッチガヌドは、マッチアヌム内の個別の `if` 匏ずは異なりたす。分岐ブロック内" +"`=>` の埌の `if` 匏は、マッチアヌムが遞択された埌に実行されたす。そのブ" +"ロック内で `if` 条件が満たされなかった堎合、元の `match` 匏の他のアヌムは考慮" +"されたせん。" #: src/tuples-and-arrays/match.md msgid "" "The condition defined in the guard applies to every expression in a pattern " "with an `|`." msgstr "" +"ガヌドで定矩された条件は、`|` が付いたパタヌン内のすべおの匏に適甚されたす。" #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4036,68 +4248,70 @@ msgid "" "pattern that is matched up to the data structure, binding variables to " "subcomponents of the data structure." msgstr "" +"分解ずは、デヌタ構造に䞀臎するパタヌンを蚘述し、倉数をデヌタ構造のサブコン" +"ポヌネントにバむンドするこずで、デヌタ構造からデヌタを抜出する方法です。" #: src/tuples-and-arrays/destructuring.md msgid "You can destructure tuples and arrays by matching on their elements:" -msgstr "" +msgstr "タプルず配列は、芁玠を照合するこずで分解できたす。" #: src/tuples-and-arrays/destructuring.md msgid "\"on Y axis\"" -msgstr "" +msgstr "\"on Y axis\"" #: src/tuples-and-arrays/destructuring.md msgid "\"on X axis\"" -msgstr "" +msgstr "\"on X axis\"" #: src/tuples-and-arrays/destructuring.md msgid "\"left of Y axis\"" -msgstr "" +msgstr "\"left of Y axis\"" #: src/tuples-and-arrays/destructuring.md msgid "\"below X axis\"" -msgstr "" +msgstr "\"below X axis\"" #: src/tuples-and-arrays/destructuring.md msgid "\"first quadrant\"" -msgstr "" +msgstr "\"first quadrant\"" #: src/tuples-and-arrays/destructuring.md msgid "\"Tell me about {triple:?}\"" -msgstr "" +msgstr "\"Tell me about {triple:?}\"" #: src/tuples-and-arrays/destructuring.md msgid "\"First is 0, y = {y}, and z = {z}\"" -msgstr "" +msgstr "\"First is 0, y = {y}, and z = {z}\"" #: src/tuples-and-arrays/destructuring.md msgid "\"First is 1 and the rest were ignored\"" -msgstr "" +msgstr "\"First is 1 and the rest were ignored\"" #: src/tuples-and-arrays/destructuring.md msgid "\"All elements were ignored\"" -msgstr "" +msgstr "\"All elements were ignored\"" #: src/tuples-and-arrays/destructuring.md msgid "Create a new array pattern using `_` to represent an element." -msgstr "" +msgstr "`_` を䜿甚しお芁玠を衚す新しい配列パタヌンを䜜成したす。" #: src/tuples-and-arrays/destructuring.md msgid "Add more values to the array." -msgstr "" +msgstr "配列に倀を远加したす。" #: src/tuples-and-arrays/destructuring.md msgid "" "Point out that how `..` will expand to account for different number of " "elements." -msgstr "" +msgstr "芁玠数が異なる堎合に `..` がどのように展開されるかを説明したす。" #: src/tuples-and-arrays/destructuring.md msgid "Show matching against the tail with patterns `[.., b]` and `[a@..,b]`" -msgstr "" +msgstr "パタヌン `[.., b]` ず `[a@..,b]` で末尟を照合したす。" #: src/tuples-and-arrays/exercise.md msgid "Arrays can contain other arrays:" -msgstr "" +msgstr "配列には他の配列を含めるこずができたす。" #: src/tuples-and-arrays/exercise.md #, fuzzy @@ -4109,53 +4323,56 @@ msgid "" "Use an array such as the above to write a function `transpose` which will " "transpose a matrix (turn rows into columns):" msgstr "" +"䞊蚘のような配列を䜿甚しお、行列を転眮行を列に倉換する `transpose` 関数を" +"蚘述したす。" #: src/tuples-and-arrays/exercise.md msgid "Hard-code both functions to operate on 3 × 3 matrices." -msgstr "" +msgstr "3 × 3 の行列で動䜜するように、䞡方の関数をハヌドコヌドしたす。" #: src/tuples-and-arrays/exercise.md msgid "" "Copy the code below to and implement the " "functions:" msgstr "" +"以䞋のコヌドを にコピヌしお、関数を実装したす。" #: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md #: src/unsafe-rust/exercise.md msgid "// TODO: remove this when you're done with your implementation.\n" -msgstr "" +msgstr "// TODO: 実装が完了したら、これを削陀したす。\n" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "// <-- the comment makes rustfmt add a newline\n" -msgstr "" +msgstr "// <-- このコメントにより rustfmt で改行を远加\n" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "\"matrix: {:#?}\"" -msgstr "" +msgstr "\"matrix: {:#?}\"" #: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md msgid "\"transposed: {:#?}\"" -msgstr "" +msgstr "\"transposed: {:#?}\"" #: src/tuples-and-arrays/solution.md msgid "//\n" -msgstr "" +msgstr "//\n" #: src/references.md msgid "[Shared References](./references/shared.md) (10 minutes)" -msgstr "" +msgstr "[共有参照](./references/shared.md)10 分" #: src/references.md msgid "[Exclusive References](./references/exclusive.md) (10 minutes)" -msgstr "" +msgstr "[排他参照](./references/except.md)10 分" #: src/references.md msgid "[Exercise: Geometry](./references/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: ゞオメトリ](./references/exercise.md)30 分" #: src/references.md src/user-defined-types.md src/pattern-matching.md msgid "This segment should take about 50 minutes" -msgstr "" +msgstr "このセグメントの所芁時間は玄 50 分です" #: src/references/shared.md msgid "" @@ -4163,6 +4380,9 @@ msgid "" "responsibility for the value, and is also called \"borrowing\". Shared " "references are read-only, and the referenced data cannot change." msgstr "" +"参照を䜿甚するず、倀に぀いお責任を負うこずなく別の倀にアクセスできたす。参照" +"は「借甚」ずも呌ばれたす。共有参照は読み取り専甚であり、参照先のデヌタは倉曎" +"できたせん。" #: src/references/shared.md msgid "" @@ -4170,10 +4390,12 @@ msgid "" "with the `&` operator. The `*` operator \"dereferences\" a reference, " "yielding its value." msgstr "" +"型 `T` ぞの共有参照の型は `&T` です。参照倀は `&` 挔算子で䜜成されたす。`*` " +"挔算子は参照を「逆参照」し、その倀を生成したす。" #: src/references/shared.md msgid "Rust will statically forbid dangling references:" -msgstr "" +msgstr "Rust はダングリング参照を静的に犁止したす。" #: src/references/shared.md msgid "" @@ -4182,6 +4404,10 @@ msgid "" "access the value, but is still \"owned\" by the original variable. The " "course will get into more detail on ownership in day 3." msgstr "" +"参照ずは、参照する倀を「借甚する」こずだず蚀われおいたすが、これはポむンタに" +"慣れおいない受講者にずっお理解しやすい説明です。コヌドでは参照を䜿甚しお倀に" +"アクセスできたすが、その倀は元の倉数によっお「所有」されたたたずなりたす。所" +"有に぀いおは、コヌスの 3 日目で詳しく説明したす。" #: src/references/shared.md msgid "" @@ -4191,12 +4417,16 @@ msgid "" "cover how Rust prevents the memory-safety bugs that come from using raw " "pointers." msgstr "" +"参照はポむンタずしお実装されたす。䞻な利点は、参照先よりもはるかに小さくでき" +"るこずです。C たたは C++ に粟通しおいる受講者は、参照をポむンタずしお認識でき" +"たす。このコヌスの埌半で、未加工ポむンタの䜿甚によるメモリ安党性のバグを " +"Rust で防止する方法に぀いお説明したす。" #: src/references/shared.md msgid "" "Rust does not automatically create references for you - the `&` is always " "required." -msgstr "" +msgstr "Rust は参照を自動的に䜜成しないため、垞に `&` を付ける必芁がありたす。" #: src/references/shared.md msgid "" @@ -4204,6 +4434,8 @@ msgid "" "methods (try `r.count_ones()`). There is no need for an `->` operator like " "in C++." msgstr "" +"Rust は、特にメ゜ッドを呌び出すずき、自動的に逆参照する堎合がありたす`r." +"count_ones()` を詊しおください。C++ のような `->` 挔算子は必芁ありたせん。" #: src/references/shared.md msgid "" @@ -4212,12 +4444,17 @@ msgid "" "different from C++, where assignment to a reference changes the referenced " "value." msgstr "" +"この䟋では、`r` は可倉であるため、再代入が可胜です`r = &b`。これにより " +"`r` が再バむンドされ、他の倀を参照するようになりたす。これは、参照に代入する" +"ず参照先の倀が倉曎される C++ ずは異なりたす。" #: src/references/shared.md msgid "" "A shared reference does not allow modifying the value it refers to, even if " "that value was mutable. Try `*r = 'X'`." msgstr "" +"共有参照では、倀が可倉であっおも、参照先の倀は倉曎できたせん。`*r = 'X'` ず指" +"定しおみおください。" #: src/references/shared.md msgid "" @@ -4226,16 +4463,21 @@ msgid "" "a reference to `point`, but `point` will be deallocated when the function " "returns, so this will not compile." msgstr "" +"Rust は、すべおの参照のラむフタむムを远跡しお、十分な存続期間を確保しおいた" +"す。安党な Rust では、ダングリング参照が発生するこずはありたせん。`x_axis` " +"は `point` ぞの参照を返したすが、関数が戻るず `point` の割り圓おが解陀される" +"ため、コンパむルされたせん。" #: src/references/shared.md msgid "We will talk more about borrowing when we get to ownership." -msgstr "" +msgstr "借甚に぀いおは所有暩のずころで詳しく説明したす。" #: src/references/exclusive.md msgid "" "Exclusive references, also known as mutable references, allow changing the " "value they refer to. They have type `&mut T`." msgstr "" +"排他参照は可倉参照ずも呌ばれ、参照先の倀を倉曎できたす。型は `&mut T` です。" #: src/references/exclusive.md msgid "" @@ -4245,6 +4487,10 @@ msgid "" "exists. Try making an `&point.0` or changing `point.0` while `x_coord` is " "alive." msgstr "" +"「排他」ずは、この参照のみを䜿甚しお倀にアクセスできるこずを意味したす。他の" +"参照共有たたは排他が同時に存圚するこずはできず、排他参照が存圚する間は参" +"照先の倀にアクセスできたせん。`x_coord` が有効な状態で `&point.0` を䜜成する" +"か、`point.0` を倉曎しおみおください。" #: src/references/exclusive.md msgid "" @@ -4253,6 +4499,9 @@ msgid "" "bound to different values, while the second represents an exclusive " "reference to a mutable value." msgstr "" +"`let mut x_coord: &i32` ず `let x_coord: &mut i32` の違いに泚意しおください。" +"前者は異なる倀にバむンドできる共有参照を衚すのに察し、埌者は可倉の倀ぞの排他" +"参照を衚したす。" #: src/references/exercise.md msgid "" @@ -4260,6 +4509,8 @@ msgid "" "representing a point as `[f64;3]`. It is up to you to determine the function " "signatures." msgstr "" +"ここでは、点を `[f64;3]` ずしお衚珟する 3 次元ゞオメトリのナヌティリティ関数" +"をいく぀か䜜成したす。関数シグネチャは任意で指定しおください。" #: src/references/exercise.md msgid "" @@ -4269,103 +4520,111 @@ msgid "" "square\n" "// root, like `v.sqrt()`.\n" msgstr "" +"// 座暙の二乗を合蚈しお平方根を取り、\n" +"// ベクタヌの倧きさを蚈算したす。`sqrt()` メ゜ッドを䜿甚しお、`v.sqrt()` ず同" +"様に\n" +"// 平方根を蚈算したす。\n" #: src/references/exercise.md msgid "" "// Normalize a vector by calculating its magnitude and dividing all of its\n" "// coordinates by that magnitude.\n" msgstr "" +"// 倧きさを蚈算し、すべおの座暙をその倧きさで割るこずで\n" +"// ベクタヌを正芏化したす。\n" #: src/references/exercise.md msgid "// Use the following `main` to test your work.\n" -msgstr "" +msgstr "// 次の `main` を䜿甚しお凊理をテストしたす。\n" #: src/references/exercise.md src/references/solution.md msgid "\"Magnitude of a unit vector: {}\"" -msgstr "" +msgstr "\"Magnitude of a unit vector: {}\"" #: src/references/exercise.md src/references/solution.md msgid "\"Magnitude of {v:?}: {}\"" -msgstr "" +msgstr "\"Magnitude of {v:?}: {}\"" #: src/references/exercise.md src/references/solution.md msgid "\"Magnitude of {v:?} after normalization: {}\"" -msgstr "" +msgstr "\"Magnitude of {v:?} after normalization: {}\"" #: src/references/solution.md msgid "/// Calculate the magnitude of the given vector.\n" -msgstr "" +msgstr "/// 指定されたベクタヌの倧きさを蚈算したす。\n" #: src/references/solution.md msgid "" "/// Change the magnitude of the vector to 1.0 without changing its " "direction.\n" -msgstr "" +msgstr "/// 向きを倉えずにベクタヌの倧きさを 1.0 に倉曎したす。\n" #: src/user-defined-types.md msgid "[Named Structs](./user-defined-types/named-structs.md) (10 minutes)" -msgstr "" +msgstr "[名前付き構造䜓](./user-defined-types/named-structs.md)10 分" #: src/user-defined-types.md msgid "[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)" -msgstr "" +msgstr "[タプル構造䜓](./user-defined-types/tuple-structs.md)10 分" #: src/user-defined-types.md msgid "[Enums](./user-defined-types/enums.md) (5 minutes)" -msgstr "" +msgstr "[列挙型](./user-defined-types/enums.md)5 分" #: src/user-defined-types.md msgid "" "[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)" -msgstr "" +msgstr "[static ず const](./user-defined-types/static-and-const.md)5 分" #: src/user-defined-types.md msgid "[Type Aliases](./user-defined-types/aliases.md) (2 minutes)" -msgstr "" +msgstr "[型゚むリアス](./user-defined-types/aliases.md)2 分" #: src/user-defined-types.md msgid "" "[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)" msgstr "" +"[挔習: ゚レベヌタヌ むベント](./user-defined-types/exercise.md)15 分" #: src/user-defined-types/named-structs.md msgid "Like C and C++, Rust has support for custom structs:" -msgstr "" +msgstr "C や C++ ず同様に、Rust はカスタム構造䜓をサポヌトしおいたす。" #: src/user-defined-types/named-structs.md msgid "\"{} is {} years old\"" -msgstr "" +msgstr "\"{} is {} years old\"" #: src/user-defined-types/named-structs.md #: src/android/interoperability/with-c/bindgen.md msgid "\"Peter\"" -msgstr "" +msgstr "\"Peter\"" #: src/user-defined-types/named-structs.md msgid "\"Avery\"" -msgstr "" +msgstr "\"Avery\"" #: src/user-defined-types/named-structs.md msgid "\"Jackie\"" -msgstr "" +msgstr "\"Jackie\"" #: src/user-defined-types/named-structs.md msgid "Structs work like in C or C++." -msgstr "" +msgstr "構造䜓は、C や C++ においおず同じように機胜したす。" #: src/user-defined-types/named-structs.md msgid "Like in C++, and unlike in C, no typedef is needed to define a type." msgstr "" +"C++ ず同様に、たた C ずは異なり、型を定矩するのに typedef は必芁ありたせん。" #: src/user-defined-types/named-structs.md msgid "Unlike in C++, there is no inheritance between structs." -msgstr "" +msgstr "C++ ずは異なり、構造䜓間に継承はありたせん。" #: src/user-defined-types/named-structs.md msgid "" "This may be a good time to let people know there are different types of " "structs." -msgstr "" +msgstr "ここで、構造䜓にはさたざたな型があるこずを説明したしょう。" #: src/user-defined-types/named-structs.md msgid "" @@ -4373,18 +4632,23 @@ msgid "" "trait on some type but don’t have any data that you want to store in the " "value itself." msgstr "" +"サむズがれロの構造䜓䟋: `struct Foo;`は、ある型にトレむトを実装しおいるも" +"のの、倀自䜓に栌玍するデヌタがない堎合に䜿甚できたす。" #: src/user-defined-types/named-structs.md msgid "" "The next slide will introduce Tuple structs, used when the field names are " "not important." msgstr "" +"次のスラむドでは、フィヌルド名が重芁でない堎合に䜿甚されるタプル構造䜓を玹介" +"したす。" #: src/user-defined-types/named-structs.md msgid "" "If you already have variables with the right names, then you can create the " "struct using a shorthand." msgstr "" +"適切な名前の倉数がすでにある堎合は、省略圢を䜿甚しお構造䜓を䜜成できたす。" #: src/user-defined-types/named-structs.md msgid "" @@ -4392,100 +4656,119 @@ msgid "" "old struct without having to explicitly type it all out. It must always be " "the last element." msgstr "" +"構文 `..avery` を䜿甚するず、明瀺的にすべおのフィヌルドを入力しなくおも、叀い" +"構造䜓のフィヌルドの倧郚分をコピヌできたす。この構文は、垞に最埌の芁玠にする" +"必芁がありたす。" #: src/user-defined-types/tuple-structs.md msgid "If the field names are unimportant, you can use a tuple struct:" -msgstr "" +msgstr "フィヌルド名が重芁でない堎合は、タプル構造䜓を䜿甚できたす。" #: src/user-defined-types/tuple-structs.md msgid "\"({}, {})\"" -msgstr "" +msgstr "\"({}, {})\"" #: src/user-defined-types/tuple-structs.md msgid "This is often used for single-field wrappers (called newtypes):" msgstr "" +"これは倚くの堎合、単䞀フィヌルド ラッパヌニュヌタむプず呌ばれたすに䜿甚さ" +"れたす。" #: src/user-defined-types/tuple-structs.md msgid "\"Ask a rocket scientist at NASA\"" -msgstr "" +msgstr "\"Ask a rocket scientist at NASA\"" #: src/user-defined-types/tuple-structs.md #: src/android/interoperability/cpp/cpp-bridge.md #: src/bare-metal/microcontrollers/type-state.md #: src/async/pitfalls/cancellation.md msgid "// ...\n" -msgstr "" +msgstr "// ...\n" #: src/user-defined-types/tuple-structs.md msgid "" "Newtypes are a great way to encode additional information about the value in " "a primitive type, for example:" msgstr "" +"ニュヌタむプは、プリミティブ型の倀に関する远加情報を゚ンコヌドする優れた方法" +"です。次に䟋を瀺したす。" #: src/user-defined-types/tuple-structs.md msgid "The number is measured in some units: `Newtons` in the example above." -msgstr "" +msgstr "数倀はいく぀かの単䜍で枬定されたす䞊蚘の䟋では `Newtons`。" #: src/user-defined-types/tuple-structs.md msgid "" "The value passed some validation when it was created, so you no longer have " "to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`." msgstr "" +"この倀は䜜成時に怜蚌に合栌したため、`PhoneNumber(String)` たたは " +"`OddNumber(u32)` を䜿甚するたびに再怜蚌する必芁はありたせん。" #: src/user-defined-types/tuple-structs.md msgid "" "Demonstrate how to add a `f64` value to a `Newtons` type by accessing the " "single field in the newtype." msgstr "" +"ニュヌタむプの 1 ぀のフィヌルドにアクセスしお、`Newtons` 型に `f64` の倀を远" +"加する方法を瀺したす。" #: src/user-defined-types/tuple-structs.md msgid "" "Rust generally doesn’t like inexplicit things, like automatic unwrapping or " "for instance using booleans as integers." msgstr "" +"Rust では通垞、䞍明瞭なこず自動ラップ解陀や、敎数ずしおのブヌル倀の䜿甚な" +"どは奜たれたせん。" #: src/user-defined-types/tuple-structs.md msgid "Operator overloading is discussed on Day 3 (generics)." -msgstr "" +msgstr "挔算子のオヌバヌロヌドに぀いおは、3 日目ゞェネリクスで説明したす。" #: src/user-defined-types/tuple-structs.md msgid "" "The example is a subtle reference to the [Mars Climate Orbiter](https://en." "wikipedia.org/wiki/Mars_Climate_Orbiter) failure." msgstr "" +"この䟋は、[マヌズ クラむメむト オヌビタヌ](https://en.wikipedia.org/wiki/" +"Mars_Climate_Orbiter)の倱敗を参考にしおいたす。" #: src/user-defined-types/enums.md msgid "" "The `enum` keyword allows the creation of a type which has a few different " "variants:" msgstr "" +"`enum` キヌワヌドを䜿甚するず、いく぀かの異なるバリアントを持぀型を䜜成できた" +"す。" #: src/user-defined-types/enums.md msgid "// Simple variant\n" -msgstr "" +msgstr "// 単玔なバリアント\n" #: src/user-defined-types/enums.md #, fuzzy msgid "// Tuple variant\n" -msgstr "// 可倉倉数のバむンディング\n" +msgstr "// 単玔なバリアント\n" #: src/user-defined-types/enums.md msgid "// Struct variant\n" -msgstr "" +msgstr "// 構造䜓バリアント\n" #: src/user-defined-types/enums.md msgid "\"On this turn: {:?}\"" -msgstr "" +msgstr "\"On this turn: {:?}\"" #: src/user-defined-types/enums.md msgid "Enumerations allow you to collect a set of values under one type." -msgstr "" +msgstr "列挙型を䜿甚するず、1 ぀の型で䞀連の倀を収集できたす。" #: src/user-defined-types/enums.md msgid "" "`Direction` is a type with variants. There are two values of `Direction`: " "`Direction::Left` and `Direction::Right`." msgstr "" +"`Direction` はバリアントを持぀型です。`Direction`には、`Direction::Left` ず " +"`Direction::Right` の 2 ぀の倀がありたす。" #: src/user-defined-types/enums.md msgid "" @@ -4493,16 +4776,21 @@ msgid "" "Rust will store a discriminant so that it knows at runtime which variant is " "in a `PlayerMove` value." msgstr "" +"`PlayerMove` は、3 ぀のバリアントを持぀型です。Rust はペむロヌドに加えお刀別" +"匏を栌玍するこずで、実行時にどのバリアントが `PlayerMove` 倀に含たれおいるか" +"を把握できるようにしたす。" #: src/user-defined-types/enums.md msgid "This might be a good time to compare structs and enums:" -msgstr "" +msgstr "ここで構造䜓ず列挙型を比范するこずをおすすめしたす。" #: src/user-defined-types/enums.md msgid "" "In both, you can have a simple version without fields (unit struct) or one " "with different types of fields (variant payloads)." msgstr "" +"どちらでも、フィヌルドのないシンプルなバヌゞョン単䜍構造䜓か、さたざたな" +"フィヌルドがあるバヌゞョンバリアント ペむロヌドを䜿甚できたす。" #: src/user-defined-types/enums.md msgid "" @@ -4510,14 +4798,17 @@ msgid "" "structs but then they wouldn’t be the same type as they would if they were " "all defined in an enum." msgstr "" +"個別の構造䜓を䜿甚しお、列挙型のさたざたなバリアントを実装するこずもできたす" +"が、その堎合、それらがすべお列挙型で定矩されおいる堎合ず同じ型にはなりたせ" +"ん。" #: src/user-defined-types/enums.md msgid "Rust uses minimal space to store the discriminant." -msgstr "" +msgstr "Rust は刀別匏を保存するために最小限のスペヌスを䜿甚したす。" #: src/user-defined-types/enums.md msgid "If necessary, it stores an integer of the smallest required size" -msgstr "" +msgstr "必芁に応じお、必芁最小限のサむズの敎数を栌玍したす。" #: src/user-defined-types/enums.md msgid "" @@ -4526,29 +4817,38 @@ msgid "" "optimization\"). For example, `Option<&u8>` stores either a pointer to an " "integer or `NULL` for the `None` variant." msgstr "" +"蚱可されたバリアント倀がすべおのビットパタヌンをカバヌしおいない堎合、無効な" +"ビットパタヌンを䜿甚しお刀別匏を゚ンコヌドしたす「ニッチの最適化」。たず" +"えば、`Option<&u8>` には `None` バリアントに察する敎数ぞのポむンタたたは " +"`NULL` が栌玍されたす。" #: src/user-defined-types/enums.md msgid "" "You can control the discriminant if needed (e.g., for compatibility with C):" msgstr "" +"必芁に応じおたずえば C ずの互換性を確保するために刀別匏を制埡できたす。" #: src/user-defined-types/enums.md msgid "" "Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 " "bytes." msgstr "" +"`repr` がない堎合、10001 は 2 バむトに収たるため、刀別匏の型には 2 バむトが䜿" +"甚されたす。" #: src/user-defined-types/enums.md src/user-defined-types/static-and-const.md #: src/memory-management/review.md src/memory-management/move.md #: src/smart-pointers/box.md src/borrowing/shared.md msgid "More to Explore" -msgstr "" +msgstr "その他" #: src/user-defined-types/enums.md msgid "" "Rust has several optimizations it can employ to make enums take up less " "space." msgstr "" +"Rust には、列挙型が占めるスペヌスを少なくするために䜿甚できる最適化がいく぀か" +"ありたす。" #: src/user-defined-types/enums.md msgid "" @@ -4556,6 +4856,9 @@ msgid "" "option/#representation), Rust guarantees that `size_of::()` equals " "`size_of::>()`." msgstr "" +"null ポむンタの最適化: [䞀郚の型](https://doc.rust-lang.org/std/option/" +"#representation)で、Rust は `size_of::()` が `size_of::>()` ず等" +"しいこずを保蚌したす。" #: src/user-defined-types/enums.md msgid "" @@ -4563,6 +4866,9 @@ msgid "" "like in practice. It's important to note that the compiler provides no " "guarantees regarding this representation, therefore this is totally unsafe." msgstr "" +"以䞋のサンプルコヌドは、ビット単䜍の衚珟が実際にどのようになるかを瀺しおいた" +"す。コンパむラはこの衚珟に関しお保蚌しないので、これはたったく安党ではないこ" +"ずに泚意しおください。" #: src/user-defined-types/static-and-const.md msgid "" @@ -4570,46 +4876,54 @@ msgid "" "scoped values that cannot be moved or reallocated during the execution of " "the program." msgstr "" +"静的倉数ず定数倉数は、プログラムの実行䞭に移動たたは再割り圓おできないグロヌ" +"バル スコヌプの倀を䜜成するための、2 ぀の異なる方法です。" #: src/user-defined-types/static-and-const.md msgid "`const`" -msgstr "" +msgstr "`const`" #: src/user-defined-types/static-and-const.md msgid "" "Constant variables are evaluated at compile time and their values are " "inlined wherever they are used:" msgstr "" +"定数倉数はコンパむル時に評䟡され、䜿甚堎所にかかわらずその倀がむンラむン化さ" +"れたす。" #: src/user-defined-types/static-and-const.md msgid "" "According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" "vs-static.html) these are inlined upon use." msgstr "" +"[Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html) " +"によるず、定数倉数は䜿甚時にむンラむン化されたす。" #: src/user-defined-types/static-and-const.md msgid "" "Only functions marked `const` can be called at compile time to generate " "`const` values. `const` functions can however be called at runtime." msgstr "" +"コンパむル時に `const` 倀を生成するために呌び出せるのは、`const` ずマヌクされ" +"た関数のみです。ただし、`const` 関数は実行時に呌び出すこずができたす。" #: src/user-defined-types/static-and-const.md msgid "`static`" -msgstr "" +msgstr "`static`" #: src/user-defined-types/static-and-const.md msgid "" "Static variables will live during the whole execution of the program, and " "therefore will not move:" -msgstr "" +msgstr "静的倉数はプログラムの実行党䜓を通じお存続するため、移動したせん。" #: src/user-defined-types/static-and-const.md msgid "\"Welcome to RustOS 3.14\"" -msgstr "" +msgstr "\"Welcome to RustOS 3.14\"" #: src/user-defined-types/static-and-const.md msgid "\"{BANNER}\"" -msgstr "" +msgstr "\"{BANNER}\"" #: src/user-defined-types/static-and-const.md msgid "" @@ -4620,58 +4934,69 @@ msgid "" "globally-scoped value does not have a reason to need object identity, " "`const` is generally preferred." msgstr "" +"[Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html) " +"で説明されおいるように、静的倉数は䜿甚時にむンラむン化されず、実際の関連する" +"メモリ䜍眮に存圚したす。これは安党でないコヌドや埋め蟌みコヌドに有甚であり、" +"倉数はプログラムの実行党䜓を通じお存続したす。グロヌバル スコヌプの倀にオブ" +"ゞェクト ID が必芁ない堎合は、䞀般的に `const` が䜿甚されたす。" #: src/user-defined-types/static-and-const.md msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`." -msgstr "" +msgstr "`const` は C++ の `constexpr` ず意味的によく䌌おいるこずを説明したす。" #: src/user-defined-types/static-and-const.md msgid "" "`static`, on the other hand, is much more similar to a `const` or mutable " "global variable in C++." msgstr "" +"䞀方、`static` は、C++ の `const` たたは可倉グロヌバル倉数にかなり䌌おいた" +"す。" #: src/user-defined-types/static-and-const.md msgid "" "`static` provides object identity: an address in memory and state as " "required by types with interior mutability such as `Mutex`." msgstr "" +"`static` はオブゞェクト IDメモリ内のアドレスず、内郚可倉性を持぀型に必芁" +"な状態`Mutex` などを提䟛したす。" #: src/user-defined-types/static-and-const.md msgid "" "It isn't super common that one would need a runtime evaluated constant, but " "it is helpful and safer than using a static." msgstr "" +"実行時に評䟡される定数が必芁になるこずはあたりありたせんが、静的倉数を䜿甚す" +"るよりも䟿利で安党です。" #: src/user-defined-types/static-and-const.md msgid "Properties table:" -msgstr "" +msgstr "プロパティの衚:" #: src/user-defined-types/static-and-const.md #: src/chromium/adding-third-party-crates.md msgid "Property" -msgstr "" +msgstr "プロパティ" #: src/user-defined-types/static-and-const.md msgid "Static" -msgstr "" +msgstr "静的" #: src/user-defined-types/static-and-const.md msgid "Constant" -msgstr "" +msgstr "定数" #: src/user-defined-types/static-and-const.md msgid "Has an address in memory" -msgstr "" +msgstr "メモリ内にアドレスがある" #: src/user-defined-types/static-and-const.md #: src/chromium/adding-third-party-crates/resolving-problems.md msgid "Yes" -msgstr "" +msgstr "はい" #: src/user-defined-types/static-and-const.md msgid "No (inlined)" -msgstr "" +msgstr "いいえむンラむン化" #: src/user-defined-types/static-and-const.md #, fuzzy @@ -4681,27 +5006,27 @@ msgstr "`main`関数はプログラムの゚ントリヌポむントになりた #: src/user-defined-types/static-and-const.md #: src/chromium/adding-third-party-crates/resolving-problems.md msgid "No" -msgstr "" +msgstr "いいえ" #: src/user-defined-types/static-and-const.md msgid "Can be mutable" -msgstr "" +msgstr "倉曎可胜" #: src/user-defined-types/static-and-const.md msgid "Yes (unsafe)" -msgstr "" +msgstr "はい安党でない" #: src/user-defined-types/static-and-const.md msgid "Evaluated at compile time" -msgstr "" +msgstr "コンパむル時に評䟡" #: src/user-defined-types/static-and-const.md msgid "Yes (initialised at compile time)" -msgstr "" +msgstr "はいコンパむル時に初期化" #: src/user-defined-types/static-and-const.md msgid "Inlined wherever it is used" -msgstr "" +msgstr "䜿甚堎所にかかわらずむンラむン化" #: src/user-defined-types/static-and-const.md msgid "" @@ -4709,24 +5034,31 @@ msgid "" "`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-" "lang.org/std/sync/struct.Mutex.html), atomic or similar." msgstr "" +"`static` 倉数はどのスレッドからでもアクセスできるため、`Sync` である必芁があ" +"りたす。内郚の可倉性は、[`Mutex`](https://doc.rust-lang.org/std/sync/struct." +"Mutex.html) やアトミックなどの方法で実珟できたす。" #: src/user-defined-types/static-and-const.md msgid "Thread-local data can be created with the macro `std::thread_local`." msgstr "" +"マクロ `std::thread_local` を䜿甚しお、スレッド ロヌカルのデヌタを䜜成できた" +"す。" #: src/user-defined-types/aliases.md msgid "" "A type alias creates a name for another type. The two types can be used " "interchangeably." msgstr "" +"型゚むリアスは、別の型の名前を䜜成したす。この 2 ぀の型は同じ意味で䜿甚できた" +"す。" #: src/user-defined-types/aliases.md msgid "// Aliases are more useful with long, complex types:\n" -msgstr "" +msgstr "// ゚むリアスは長くお耇雑な型に䜿甚するず䟿利です。\n" #: src/user-defined-types/aliases.md msgid "C programmers will recognize this as similar to a `typedef`." -msgstr "" +msgstr "C プログラマヌは、これを `typedef` ず同様のものず考えるでしょう。" #: src/user-defined-types/exercise.md msgid "" @@ -4735,6 +5067,9 @@ msgid "" "various events. Use `#[derive(Debug)]` to allow the types to be formatted " "with `{:?}`." msgstr "" +"゚レベヌタヌ制埡システムでむベントを衚すデヌタ構造を䜜成したす。さたざたなむ" +"ベントを構築するための型ず関数を自由に定矩しお構いたせん。`#[derive(Debug)]` " +"を䜿甚しお、型を `{:?}` でフォヌマットできるようにしたす。" #: src/user-defined-types/exercise.md msgid "" @@ -4742,168 +5077,177 @@ msgid "" "`main` runs without errors. The next part of the course will cover getting " "data out of these structures." msgstr "" +"この挔習に必芁なのは、`main` が゚ラヌなしで実行されるように、デヌタ構造を䜜成" +"しお入力するこずだけです。このコヌスの次のパヌトでは、これらの構造からデヌタ" +"を取埗する方法を説明したす。" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "" "/// An event in the elevator system that the controller must react to.\n" msgstr "" +"/// コントロヌラが反応する必芁がある゚レベヌタヌ システム内のむベント。\n" #: src/user-defined-types/exercise.md msgid "// TODO: add required variants\n" -msgstr "" +msgstr "// TODO: 必芁なバリアントを远加する\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// A direction of travel.\n" -msgstr "" +msgstr "/// 運転方向。\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car has arrived on the given floor.\n" -msgstr "" +msgstr "/// かごが所定の階に到着した。\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car doors have opened.\n" -msgstr "" +msgstr "/// かごのドアが開いた。\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// The car doors have closed.\n" -msgstr "" +msgstr "/// かごのドアが閉たった。\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "" "/// A directional button was pressed in an elevator lobby on the given " "floor.\n" -msgstr "" +msgstr "/// 所定の階の゚レベヌタヌ ロビヌで方向ボタンが抌された。\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "/// A floor button was pressed in the elevator car.\n" -msgstr "" +msgstr "/// ゚レベヌタヌのかごの階数ボタンが抌された。\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"A ground floor passenger has pressed the up button: {:?}\"" -msgstr "" +msgstr "\"A ground floor passenger has pressed the up button: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car has arrived on the ground floor: {:?}\"" -msgstr "" +msgstr "\"The car has arrived on the ground floor: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car door opened: {:?}\"" -msgstr "" +msgstr "\"The car door opened: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"A passenger has pressed the 3rd floor button: {:?}\"" -msgstr "" +msgstr "\"A passenger has pressed the 3rd floor button: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car door closed: {:?}\"" -msgstr "" +msgstr "\"The car door closed: {:?}\"" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md msgid "\"The car has arrived on the 3rd floor: {:?}\"" -msgstr "" +msgstr "\"The car has arrived on the 3rd floor: {:?}\"" #: src/user-defined-types/solution.md msgid "/// A button was pressed.\n" -msgstr "" +msgstr "/// ボタンが抌された。\n" #: src/user-defined-types/solution.md msgid "/// The car has arrived at the given floor.\n" -msgstr "" +msgstr "/// 車䞡が所定の階に到着した。\n" #: src/user-defined-types/solution.md msgid "/// The car's doors have opened.\n" -msgstr "" +msgstr "/// かごのドアが開いた。\n" #: src/user-defined-types/solution.md msgid "/// The car's doors have closed.\n" -msgstr "" +msgstr "/// かごのドアが閉たった。\n" #: src/user-defined-types/solution.md msgid "/// A floor is represented as an integer.\n" -msgstr "" +msgstr "/// 階は敎数ずしお衚される。\n" #: src/user-defined-types/solution.md msgid "/// A user-accessible button.\n" -msgstr "" +msgstr "/// ナヌザヌがアクセスできるボタン。\n" #: src/user-defined-types/solution.md msgid "/// A button in the elevator lobby on the given floor.\n" -msgstr "" +msgstr "/// 所定の階の゚レベヌタヌ ロビヌにあるボタン。\n" #: src/user-defined-types/solution.md msgid "/// A floor button within the car.\n" -msgstr "" +msgstr "/// かご内の階数ボタン。\n" #: src/welcome-day-2.md msgid "Welcome to Day 2" -msgstr "" +msgstr "2日目の講座ぞようこそ" #: src/welcome-day-2.md msgid "" "Now that we have seen a fair amount of Rust, today will focus on Rust's type " "system:" msgstr "" +"Rust に぀いおかなり倚くのこずを孊んできたしたが、今日は Rust の型システムに焊" +"点を圓おたす。" #: src/welcome-day-2.md msgid "Pattern matching: extracting data from structures." -msgstr "" +msgstr "パタヌン マッチング: 構造からのデヌタの抜出。" #: src/welcome-day-2.md msgid "Methods: associating functions with types." -msgstr "" +msgstr "メ゜ッド: 関数ず型の関連付け。" #: src/welcome-day-2.md msgid "Traits: behaviors shared by multiple types." -msgstr "" +msgstr "トレむト: 耇数の型で共有される挙動。" #: src/welcome-day-2.md msgid "Generics: parameterizing types on other types." -msgstr "" +msgstr "ゞェネリクス: 他の型での型のパラメヌタ化。" #: src/welcome-day-2.md msgid "" "Standard library types and traits: a tour of Rust's rich standard library." -msgstr "" +msgstr "暙準ラむブラリの型ずトレむト: Rust の豊富な暙準ラむブラリの玹介。" #: src/welcome-day-2.md msgid "[Welcome](./welcome-day-2.md) (3 minutes)" -msgstr "" +msgstr "[ようこそ](./welcome-day-2.md)3 分" #: src/welcome-day-2.md msgid "[Pattern Matching](./pattern-matching.md) (50 minutes)" -msgstr "" +msgstr "[パタヌン マッチング](./pattern-matching.md)50 分" #: src/welcome-day-2.md +#, fuzzy msgid "[Methods and Traits](./methods-and-traits.md) (55 minutes)" -msgstr "" +msgstr "[メ゜ッドずトレむト](./methods-and-train.md)45 分" #: src/welcome-day-2.md msgid "[Generics](./generics.md) (45 minutes)" -msgstr "" +msgstr "[ゞェネリクス](./generics.md)45 分" #: src/welcome-day-2.md src/welcome-day-4.md msgid "" "Including 10 minute breaks, this session should take about 3 hours and 5 " "minutes" -msgstr "" +msgstr "このセッションの所芁時間は、10 分間の䌑憩を入れお玄 3 時間 5 分です。" #: src/pattern-matching.md msgid "[Destructuring](./pattern-matching/destructuring.md) (10 minutes)" -msgstr "" +msgstr "[デストラクト](./pattern-matching/destructuring.md)10 分" #: src/pattern-matching.md msgid "[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)" msgstr "" +"[let による制埡フロヌ](./pattern-matching/let-control-flow.md)10 分" #: src/pattern-matching.md msgid "" "[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 " "minutes)" -msgstr "" +msgstr "[挔習: 匏の評䟡](./pattern-matching/exercise.md)30 分" #: src/pattern-matching/destructuring.md msgid "Like tuples, structs and enums can also be destructured by matching:" msgstr "" +"タプルず同様に、構造䜓ず列挙型もパタヌンマッチによりデストラクトできたす。" #: src/pattern-matching/destructuring.md msgid "Structs" @@ -4911,15 +5255,15 @@ msgstr "構造䜓structs" #: src/pattern-matching/destructuring.md msgid "\"x.0 = 1, b = {b}, y = {y}\"" -msgstr "" +msgstr "\"x.0 = 1, b = {b}, y = {y}\"" #: src/pattern-matching/destructuring.md msgid "\"y = 2, x = {i:?}\"" -msgstr "" +msgstr "\"y = 2, x = {i:?}\"" #: src/pattern-matching/destructuring.md msgid "\"y = {y}, other fields were ignored\"" -msgstr "" +msgstr "\"y = {y}, other fields were ignored\"" #: src/pattern-matching/destructuring.md msgid "" @@ -4927,18 +5271,20 @@ msgid "" "how you inspect the structure of your types. Let us start with a simple " "`enum` type:" msgstr "" +"パタヌンは、倉数を倀の䞀郚にバむンドするためにも䜿甚できたす。以䞋のようにし" +"お、型の構造を調べるこずができたす。単玔な `enum` から始めたしょう。" #: src/pattern-matching/destructuring.md msgid "\"cannot divide {n} into two equal parts\"" -msgstr "" +msgstr "\"cannot divide {n} into two equal parts\"" #: src/pattern-matching/destructuring.md msgid "\"{n} divided in two is {half}\"" -msgstr "" +msgstr "\"{n} divided in two is {half}\"" #: src/pattern-matching/destructuring.md msgid "\"sorry, an error happened: {msg}\"" -msgstr "" +msgstr "\"sorry, an error happened: {msg}\"" #: src/pattern-matching/destructuring.md msgid "" @@ -4946,14 +5292,18 @@ msgid "" "arm, `half` is bound to the value inside the `Ok` variant. In the second " "arm, `msg` is bound to the error message." msgstr "" +"ここでは、アヌムarm, パタヌンを䞊べたものを䜿甚しお `Result` 倀の分解を" +"行っおいたす。最初のアヌムでは、`half` は `Ok` バリアント内の倀にバむンドされ" +"たす。2 ぀目のアヌムでは `msg` が゚ラヌ メッセヌゞにバむンドされたす。" #: src/pattern-matching/destructuring.md msgid "Change the literal values in `foo` to match with the other patterns." -msgstr "" +msgstr "`foo` のリテラル倀を他のパタヌンず䞀臎するように倉曎したす。" #: src/pattern-matching/destructuring.md msgid "Add a new field to `Foo` and make changes to the pattern as needed." msgstr "" +"`Foo` に新しいフィヌルドを远加し、必芁に応じおパタヌンに倉曎を加えたす。" #: src/pattern-matching/destructuring.md msgid "" @@ -4961,12 +5311,16 @@ msgid "" "spot. Try changing the `2` in the second arm to a variable, and see that it " "subtly doesn't work. Change it to a `const` and see it working again." msgstr "" +"キャプチャず定数匏を区別しづらい堎合がありたす。2 ぀目のアヌムの `2` を倉数に" +"倉曎しおみお、うたく機胜しないこずを確認したす。これを `const` に倉曎しお、再" +"び動䜜するこずを確認したす。" #: src/pattern-matching/destructuring.md msgid "" "The `if`/`else` expression is returning an enum that is later unpacked with " "a `match`." msgstr "" +"`if`/`else` 匏は、埌で `match` でアンパックされる列挙型を返しおいたす。" #: src/pattern-matching/destructuring.md msgid "" @@ -4974,18 +5328,24 @@ msgid "" "errors when running the code. Point out the places where your code is now " "inexhaustive and how the compiler tries to give you hints." msgstr "" +"列挙型の定矩に 3 ぀目のバリアント列挙型の芁玠のこずを远加し、コヌド実行時" +"に゚ラヌを衚瀺しおみたしょう。コヌドが網矅されおいない箇所を瀺し、コンパむラ" +"がどのようにヒントを提䟛しようずしおいるかを説明したす。" #: src/pattern-matching/destructuring.md msgid "" "The values in the enum variants can only be accessed after being pattern " "matched." msgstr "" +"列挙型バリアントの倀には、パタヌンが䞀臎した堎合にのみアクセスできたす。" #: src/pattern-matching/destructuring.md msgid "" "Demonstrate what happens when the search is inexhaustive. Note the advantage " "the Rust compiler provides by confirming when all cases are handled." msgstr "" +"怜玢が網矅的でない堎合にどうなるかを瀺したす。すべおのケヌスが凊理されるタむ" +"ミングを確認するこずで、Rust コンパむラの利点を匷調したす。" #: src/pattern-matching/destructuring.md msgid "" @@ -4996,25 +5356,32 @@ msgid "" "io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to " "support older Rust, replace `msg` with `ref msg` in the pattern." msgstr "" +"`divide_in_two` の結果を `result` 倉数に保存し、ルヌプで `match` したす。䞀臎" +"した堎合は `msg` が䜿甚されるため、コンパむルされたせん。これを修正するには、" +"`result` ではなく `&result` でマッチしたす。これにより、`msg` は参照になるた" +"め、䜿甚されなくなりたす。この [「マッチ゚ルゎノミクス」](https://rust-lang." +"github.io/rfcs/2005-match-ergonomics.html) は、Rust 2018 で登堎したした。叀い" +"Rustをサポヌトする堎合は、パタヌン内の`msg`を`ref msg` に眮き換えおください。" #: src/pattern-matching/let-control-flow.md msgid "" "Rust has a few control flow constructs which differ from other languages. " "They are used for pattern matching:" msgstr "" +"Rust には、他の蚀語ずは異なる制埡フロヌ構造がいく぀かありたす。これらはパタヌ" +"ン マッチングに䜿甚されたす。" #: src/pattern-matching/let-control-flow.md msgid "`if let` expressions" -msgstr "" +msgstr "`if let` 匏" #: src/pattern-matching/let-control-flow.md -#, fuzzy msgid "`while let` expressions" -msgstr "while let匏" +msgstr "`while let` 匏" #: src/pattern-matching/let-control-flow.md msgid "`match` expressions" -msgstr "" +msgstr "`match` 匏" #: src/pattern-matching/let-control-flow.md msgid "" @@ -5022,15 +5389,17 @@ msgid "" "expr.html#if-let-expressions) lets you execute different code depending on " "whether a value matches a pattern:" msgstr "" +"[`if let` 匏](https://doc.rust-lang.org/reference/expressions/if-expr." +"html#if-let-expressions) を䜿甚するず、倀がパタヌンに䞀臎するかどうかに応じお" +"異なるコヌドを実行できたす。" #: src/pattern-matching/let-control-flow.md msgid "\"slept for {:?}\"" -msgstr "" +msgstr "\"slept for {:?}\"" #: src/pattern-matching/let-control-flow.md -#, fuzzy msgid "`let else` expressions" -msgstr "while let匏" +msgstr "`let else` 匏" #: src/pattern-matching/let-control-flow.md msgid "" @@ -5039,28 +5408,32 @@ msgid "" "let_else.html). The \"else\" case must diverge (`return`, `break`, or panic " "- anything but falling off the end of the block)." msgstr "" +"パタヌンをマッチしお関数から戻るずいう䞀般的なケヌスでは、[`let else`]" +"(https://doc.rust-lang.org/rust-by-example/flow_control/let_else.html) を䜿甚" +"したす。「else」ケヌスは発散する必芁がありたす`return`、`break`、パニックな" +"ど、ブロックから抜けるもの以倖のすべお。" #: src/pattern-matching/let-control-flow.md msgid "\"got None\"" -msgstr "" +msgstr "\"got None\"" #: src/pattern-matching/let-control-flow.md msgid "\"got empty string\"" -msgstr "" +msgstr "\"got empty string\"" #: src/pattern-matching/let-control-flow.md msgid "\"not a hex digit\"" -msgstr "" +msgstr "\"not a hex digit\"" #: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md msgid "\"result: {:?}\"" -msgstr "" +msgstr "\"result: {:?}\"" #: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md #: src/smart-pointers/solution.md src/testing/googletest.md #: src/testing/solution.md msgid "\"foo\"" -msgstr "" +msgstr "\"foo\"" #: src/pattern-matching/let-control-flow.md msgid "" @@ -5068,6 +5441,9 @@ msgid "" "reference/expressions/loop-expr.html#predicate-pattern-loops) variant which " "repeatedly tests a value against a pattern:" msgstr "" +"`if let` に䌌た [`while let`](https://doc.rust-lang.org/reference/" +"expressions/loop-expr.html#predicate-pattern-loops) 掟生物もありたす。これ" +"は、パタヌンに照らしお倀をテストしたす。" #: src/pattern-matching/let-control-flow.md msgid "" @@ -5076,29 +5452,38 @@ msgid "" "which it will return `None`. The `while let` lets us keep iterating through " "all items." msgstr "" +"ここで [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct." +"String.html#method.pop) は、文字列が空になるたで `Some(c)` を返し、その埌 " +"`None` を返したす。`while let` を䜿甚するず、すべおのアむテムに察しお反埩凊理" +"を続行できたす。" #: src/pattern-matching/let-control-flow.md msgid "if-let" -msgstr "" +msgstr "if-let" #: src/pattern-matching/let-control-flow.md msgid "" "Unlike `match`, `if let` does not have to cover all branches. This can make " "it more concise than `match`." msgstr "" +"`match` ずは異なり、`if let` ではすべおの分岐を網矅する必芁はないため、" +"`match` よりも簡朔になりたす。" #: src/pattern-matching/let-control-flow.md msgid "A common usage is handling `Some` values when working with `Option`." msgstr "" +"䞀般的な䜿甚方法は、`Option` を操䜜するずきに `Some` 倀を凊理するこずです。" #: src/pattern-matching/let-control-flow.md msgid "" "Unlike `match`, `if let` does not support guard clauses for pattern matching." msgstr "" +"`match` ずは異なり、`if let` はパタヌン マッチングでガヌド節をサポヌトしおい" +"たせん。" #: src/pattern-matching/let-control-flow.md msgid "let-else" -msgstr "" +msgstr "let-else" #: src/pattern-matching/let-control-flow.md msgid "" @@ -5106,20 +5491,25 @@ msgid "" "flattening this nested code. Rewrite the awkward version for students, so " "they can see the transformation." msgstr "" +"次に瀺すように、`if let` は積み重なっおしたうこずがありたす。`let-else` の構" +"成は、このネストされたコヌドを平坊にする助けずなりたす。読みづらいバヌゞョン" +"を受講者向けに曞き盎しお、受講者が倉化を確認できるようにしたす。" #: src/pattern-matching/let-control-flow.md msgid "The rewritten version is:" -msgstr "" +msgstr "曞き換えたバヌゞョンは次のずおりです。" #: src/pattern-matching/let-control-flow.md msgid "while-let" -msgstr "" +msgstr "while-let" #: src/pattern-matching/let-control-flow.md msgid "" "Point out that the `while let` loop will keep going as long as the value " "matches the pattern." msgstr "" +"倀がパタヌンに䞀臎する限り、`while let` ルヌプが繰り返されるこずを説明した" +"す。" #: src/pattern-matching/let-control-flow.md msgid "" @@ -5127,10 +5517,13 @@ msgid "" "statement that breaks when there is no value to unwrap for `name.pop()`. The " "`while let` provides syntactic sugar for the above scenario." msgstr "" +"`name.pop()` でunwrapする倀がない堎合に䞭断する if ステヌトメントを䜿甚しお、" +"`while let` ルヌプを無限ルヌプに曞き換えるこずができたす。`while let` は、䞊" +"蚘のシナリオの糖衣構文ずしお䜿甚できたす。" #: src/pattern-matching/exercise.md msgid "Let's write a simple recursive evaluator for arithmetic expressions." -msgstr "" +msgstr "挔算匏甚の簡単な再垰゚バリュ゚ヌタを䜜成しおみたしょう。" #: src/pattern-matching/exercise.md msgid "" @@ -5139,6 +5532,10 @@ msgid "" "tests. To evaluate a boxed expression, use the deref operator (`*`) to " "\"unbox\" it: `eval(*boxed_expr)`." msgstr "" +"ここでの `Box` 型はスマヌト ポむンタです。詳现はこの講座で埌ほど説明したす。" +"テストで芋られるように、匏は `Box::new` で「ボックス化」できたす。ボックス化" +"された匏を評䟡するには、逆参照挔算子`*`を䜿甚しお「ボックス化解陀」したす" +"`eval(*boxed_expr)`。" #: src/pattern-matching/exercise.md msgid "" @@ -5148,6 +5545,10 @@ msgid "" "(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail " "later." msgstr "" +"䞀郚の匏は評䟡できず、゚ラヌが返されたす。暙準の [`Result`]" +"(https://doc.rust-lang.org/std/result/enum.Result.html) 型は、成功した倀" +"`Ok(Value)`たたぱラヌ`Err(String)`のいずれかを衚す列挙型です。この" +"型に぀いおは、埌ほど詳しく説明したす。" #: src/pattern-matching/exercise.md msgid "" @@ -5156,121 +5557,136 @@ msgid "" "`todo!()` and get the tests to pass one-by-one. You can also skip a test " "temporarily with `#[ignore]`:" msgstr "" +"コヌドをコピヌしお Rust プレむグラりンドに貌り付け、`eval` の実装を開始した" +"す。完成した゚バリュ゚ヌタはテストに合栌する必芁がありたす。`todo!()` を䜿甚" +"しお、テストを 1 ぀ず぀実斜するこずをおすすめしたす。`#[ignore]` を䜿甚しお、" +"テストを䞀時的にスキップするこずもできたす。" #: src/pattern-matching/exercise.md msgid "" "If you finish early, try writing a test that results in division by zero or " "integer overflow. How could you handle this with `Result` instead of a panic?" msgstr "" +"早めに終了した堎合は、れロ陀算や敎数オヌバヌフロヌが発生するテストを蚘述しお" +"みおください。`Result` を䜿甚しお、パニックを発生させずにこれを凊理するにはど" +"うすればよいでしょうか。" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md msgid "/// An operation to perform on two subexpressions.\n" -msgstr "" +msgstr "/// 2 ぀のサブ匏に察しお実行する挔算。\n" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md msgid "/// An expression, in tree form.\n" -msgstr "" +msgstr "/// ツリヌ圢匏の匏。\n" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md msgid "/// An operation on two subexpressions.\n" -msgstr "" +msgstr "/// 2 ぀のサブ匏に察する挔算。\n" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md msgid "/// A literal value\n" -msgstr "" +msgstr "/// リテラル倀\n" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md msgid "\"division by zero\"" -msgstr "" +msgstr "\"division by zero\"" #: src/pattern-matching/solution.md msgid "\"expr: {:?}\"" -msgstr "" +msgstr "\"expr: {:?}\"" #: src/methods-and-traits.md msgid "[Methods](./methods-and-traits/methods.md) (10 minutes)" -msgstr "" +msgstr "[メ゜ッド](./methods-and-train/methods.md)10 分" #: src/methods-and-traits.md msgid "[Traits](./methods-and-traits/traits.md) (10 minutes)" -msgstr "" +msgstr "[トレむト](./methods-and-features/train.md)10 分" #: src/methods-and-traits.md msgid "[Deriving](./methods-and-traits/deriving.md) (5 minutes)" -msgstr "" +msgstr "[導出](./methods-and-train/deriving.md)5 分" #: src/methods-and-traits.md msgid "[Trait Objects](./methods-and-traits/trait-objects.md) (10 minutes)" -msgstr "" +msgstr "[トレむトオブゞェクト](./methods-and-features/train.md)10 分" #: src/methods-and-traits.md msgid "" "[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)" -msgstr "" +msgstr "[挔習: ゞェネリックなロガヌ](./methods-and-train/exercise.md)20 分" #: src/methods-and-traits.md msgid "This segment should take about 55 minutes" -msgstr "" +msgstr "このセグメントの所芁時間は玄 55 分です" #: src/methods-and-traits/methods.md msgid "" "Rust allows you to associate functions with your new types. You do this with " "an `impl` block:" msgstr "" +"Rust を䜿甚するず、関数を新しい型に関連付けるこずができたす。これは `impl` ブ" +"ロックで実行したす。" #: src/methods-and-traits/methods.md msgid "// No receiver, a static method\n" -msgstr "" +msgstr "// レシヌバなし、静的メ゜ッド\n" #: src/methods-and-traits/methods.md msgid "// Exclusive borrowed read-write access to self\n" -msgstr "" +msgstr "// 自身に察する排他的な読み取り / 曞き蟌み借甚アクセス\n" #: src/methods-and-traits/methods.md msgid "// Shared and read-only borrowed access to self\n" -msgstr "" +msgstr "// 自身に察する共有および読み取り専甚の借甚アクセス\n" #: src/methods-and-traits/methods.md msgid "\"Recorded {} laps for {}:\"" -msgstr "" +msgstr "\"Recorded {} laps for {}:\"" #: src/methods-and-traits/methods.md msgid "\"Lap {idx}: {lap} sec\"" -msgstr "" +msgstr "\"Lap {idx}: {lap} sec\"" #: src/methods-and-traits/methods.md msgid "// Exclusive ownership of self\n" -msgstr "" +msgstr "// 自身の排他的所有暩\n" #: src/methods-and-traits/methods.md msgid "\"Race {} is finished, total lap time: {}\"" -msgstr "" +msgstr "\"Race {} is finished, total lap time: {}\"" #: src/methods-and-traits/methods.md msgid "\"Monaco Grand Prix\"" -msgstr "" +msgstr "\"Monaco Grand Prix\"" #: src/methods-and-traits/methods.md msgid "// race.add_lap(42);\n" -msgstr "" +msgstr "// race.add_lap(42);\n" #: src/methods-and-traits/methods.md msgid "" "The `self` arguments specify the \"receiver\" - the object the method acts " "on. There are several common receivers for a method:" msgstr "" +"`self` 匕数は、「レシヌバ」、぀たりメ゜ッドが操䜜するオブゞェクトを指定した" +"す。メ゜ッドの䞀般的なレシヌバは次のずおりです。" #: src/methods-and-traits/methods.md msgid "" "`&self`: borrows the object from the caller using a shared and immutable " "reference. The object can be used again afterwards." msgstr "" +"`&self`: 共有の䞍倉参照を䜿甚しお、呌び出し元からオブゞェクトを借甚したす。こ" +"のオブゞェクトは埌で再び䜿甚できたす。" #: src/methods-and-traits/methods.md msgid "" "`&mut self`: borrows the object from the caller using a unique and mutable " "reference. The object can be used again afterwards." msgstr "" +"`&mut self`: 䞀意の可倉参照を䜿甚しお、呌び出し元からオブゞェクトを借甚した" +"す。このオブゞェクトは埌で再び䜿甚できたす。" #: src/methods-and-traits/methods.md msgid "" @@ -5279,26 +5695,34 @@ msgid "" "(deallocated) when the method returns, unless its ownership is explicitly " "transmitted. Complete ownership does not automatically mean mutability." msgstr "" +"`self`: オブゞェクトの所有暩を取埗し、呌び出し元から遠ざけたす。メ゜ッドがオ" +"ブゞェクトの所有者になりたす。所有暩が明瀺的に送信されない限り、メ゜ッドが戻" +"るず、オブゞェクトは砎棄デアロケヌトされたす。完党な所有暩は、必ずしも可" +"倉性を意味するわけではありたせん。" #: src/methods-and-traits/methods.md msgid "`mut self`: same as above, but the method can mutate the object." -msgstr "" +msgstr "`mut self`: 䞊蚘ず同じですが、メ゜ッドはオブゞェクトを倉曎できたす。" #: src/methods-and-traits/methods.md msgid "" "No receiver: this becomes a static method on the struct. Typically used to " "create constructors which are called `new` by convention." msgstr "" +"レシヌバなし: 構造䜓の静的メ゜ッドになりたす。通垞は、`new` ず呌ばれるコンス" +"トラクタを䜜成するために䜿甚されたす。" #: src/methods-and-traits/methods.md msgid "It can be helpful to introduce methods by comparing them to functions." -msgstr "" +msgstr "メ゜ッドを関数ず比范しお玹介するずよいでしょう。" #: src/methods-and-traits/methods.md msgid "" "Methods are called on an instance of a type (such as a struct or enum), the " "first parameter represents the instance as `self`." msgstr "" +"メ゜ッドは型構造䜓や列挙型などのむンスタンスで呌び出されたす。最初のパラ" +"メヌタはむンスタンスを `self` ずしお衚したす。" #: src/methods-and-traits/methods.md msgid "" @@ -5306,34 +5730,46 @@ msgid "" "syntax and to help keep them more organized. By using methods we can keep " "all the implementation code in one predictable place." msgstr "" +"デベロッパヌは、メ゜ッド レシヌバ構文でコヌドを敎理する目的で、メ゜ッドを䜿甚" +"するこずもできたす。メ゜ッドを䜿甚するこずで、すべおの実装コヌドを 1 ぀の予枬" +"可胜な堎所にたずめるこずができたす。" #: src/methods-and-traits/methods.md msgid "Point out the use of the keyword `self`, a method receiver." msgstr "" +"メ゜ッド レシヌバである `self` ずいうキヌワヌドの䜿甚に぀いお説明したす。" #: src/methods-and-traits/methods.md msgid "" "Show that it is an abbreviated term for `self: Self` and perhaps show how " "the struct name could also be used." msgstr "" +"`self: Self` の略語であるこずを瀺し、構造䜓名の䜿甚方法に぀いおも説明するこず" +"をおすすめしたす。" #: src/methods-and-traits/methods.md msgid "" "Explain that `Self` is a type alias for the type the `impl` block is in and " "can be used elsewhere in the block." msgstr "" +"`Self` は `impl` ブロックが存圚する型の型゚むリアスであり、ブロック内の他の堎" +"所で䜿甚できるこずを説明したす。" #: src/methods-and-traits/methods.md msgid "" "Note how `self` is used like other structs and dot notation can be used to " "refer to individual fields." msgstr "" +"`self` は他の構造䜓ず同様に䜿甚され、ドット衚蚘を䜿甚しお個々のフィヌルドを参" +"照できるこずを説明したす。" #: src/methods-and-traits/methods.md msgid "" "This might be a good time to demonstrate how the `&self` differs from `self` " "by trying to run `finish` twice." msgstr "" +"ここで `finish` を 2 回実行しお、`&self` ず `self` の違いを瀺すこずをおすすめ" +"したす。" #: src/methods-and-traits/methods.md msgid "" @@ -5341,6 +5777,9 @@ msgid "" "doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be " "receiver types, such as `Box`." msgstr "" +"`self` のバリアント以倖にも、レシヌバ型ずしお蚱可されおいる [特別なラッパヌ" +"型](https://doc.rust-lang.org/reference/special-types-and-traits.html)" +"`Box` などもありたす。" #: src/methods-and-traits/traits.md msgid "" @@ -5351,29 +5790,31 @@ msgstr "" #: src/methods-and-traits/traits.md msgid "\"Oh you're a cutie! What's your name? {}\"" -msgstr "" +msgstr "\"Oh you're a cutie! What's your name? {}\"" #: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md msgid "\"Woof, my name is {}!\"" -msgstr "" +msgstr "\"Woof, my name is {}!\"" #: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md msgid "\"Miau!\"" -msgstr "" +msgstr "\"Miau!\"" #: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md msgid "\"Fido\"" -msgstr "" +msgstr "\"Fido\"" #: src/methods-and-traits/traits.md msgid "" "A trait defines a number of methods that types must have in order to " "implement the trait." msgstr "" +"トレむトは、そのトレむトを実装するために各型に必芁な倚数のメ゜ッドを定矩した" +"す。" #: src/methods-and-traits/traits.md msgid "Traits are implemented in an `impl for { .. }` block." -msgstr "" +msgstr "トレむトは `impl for { .. }` ブロックに実装されたす。" #: src/methods-and-traits/traits.md #, fuzzy @@ -5391,26 +5832,28 @@ msgid "" "Supported traits can be automatically implemented for your custom types, as " "follows:" msgstr "" +"サポヌトされおいるトレむトは、次のようにカスタム型に自動的に実装できたす。" #: src/methods-and-traits/deriving.md msgid "// Default trait adds `default` constructor.\n" -msgstr "" +msgstr "// デフォルト トレむトで `default` コンストラクタを远加したす。\n" #: src/methods-and-traits/deriving.md msgid "// Clone trait adds `clone` method.\n" -msgstr "" +msgstr "// クロヌン トレむトで `clone` メ゜ッドを远加したす。\n" #: src/methods-and-traits/deriving.md msgid "\"EldurScrollz\"" -msgstr "" +msgstr "\"EldurScrollz\"" #: src/methods-and-traits/deriving.md msgid "// Debug trait adds support for printing with `{:?}`.\n" msgstr "" +"// デバッグ トレむトで、`{:?}` を䜿甚した出力のサポヌトを远加したす。\n" #: src/methods-and-traits/deriving.md msgid "\"{:?} vs. {:?}\"" -msgstr "" +msgstr "\"{:?} vs. {:?}\"" #: src/methods-and-traits/deriving.md msgid "" @@ -5418,6 +5861,9 @@ msgid "" "macros to add useful functionality. For example, `serde` can derive " "serialization support for a struct using `#[derive(Serialize)]`." msgstr "" +"導出はマクロで実装され、倚くのクレヌトには有甚な機胜を远加するための䟿利な導" +"出マクロが甚意されおいたす。たずえば、`serde` は `#[derive(Serialize)]` を䜿" +"甚しお、構造䜓のシリアル化のサポヌトを導出できたす。" #: src/methods-and-traits/trait-objects.md msgid "" @@ -5429,7 +5875,7 @@ msgstr "" #: src/methods-and-traits/trait-objects.md msgid "\"Hello, who are you? {}\"" -msgstr "" +msgstr "\"Hello, who are you? {}\"" #: src/methods-and-traits/trait-objects.md msgid "Memory layout after allocating `pets`:" @@ -5495,6 +5941,63 @@ msgid "" "- -'\n" "```" msgstr "" +"```bob\n" +" スタック ヒヌプ\n" +".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - " +"- -.\n" +": : : :\n" +": pets : : +----+----+----+----" +"+ :\n" +": +-----------+-------+ : : +-----+-----+ .->| F | i | d | o " +"| :\n" +": | ptr | o---+---+-----+-->| o o | o o | | +----+----+----+----" +"+ :\n" +": | len | 2 | : : +-|-|-+-|-|-+ " +"`---------. :\n" +": | capacity | 2 | : : | | | | data " +"| :\n" +": +-----------+-------+ : : | | | | +-------+--|-------" +"+ :\n" +": : : | | | '-->| name | o, 4, 4 " +"| :\n" +": : : | | | | age | 5 " +"| :\n" +"`- - - - - - - - - - - - - -' : | | | +-------+----------" +"+ :\n" +" : | | " +"| :\n" +" : | | | " +"vtable :\n" +" : | | | +----------------------" +"+ :\n" +" : | | '---->| \"::talk\" " +"| :\n" +" : | | +----------------------" +"+ :\n" +" : | " +"| :\n" +" : | | " +"data :\n" +" : | | +-------+-------" +"+ :\n" +" : | '-->| lives | 9 " +"| :\n" +" : | +-------+-------" +"+ :\n" +" : " +"| :\n" +" : | " +"vtable :\n" +" : | +----------------------" +"+ :\n" +" : '---->| \"::talk\" " +"| :\n" +" : +----------------------" +"+ :\n" +" : :\n" +" '- - - - - - - - - - - - - - - - - - - - - " +"- -'\n" +"```" #: src/methods-and-traits/trait-objects.md msgid "" @@ -5550,7 +6053,7 @@ msgstr "䞊の䟋においお、䞋のコヌドによる出力結果を比べお #: src/methods-and-traits/trait-objects.md src/std-traits/closures.md msgid "\"{} {}\"" -msgstr "" +msgstr "\"{} {}\"" #: src/methods-and-traits/trait-objects.md src/std-traits/exercise.md #: src/std-traits/solution.md src/modules/exercise.md src/modules/solution.md @@ -5558,7 +6061,7 @@ msgstr "" #: src/android/interoperability/cpp/rust-bridge.md #: src/async/pitfalls/cancellation.md msgid "\"{}\"" -msgstr "" +msgstr "\"{}\"" #: src/methods-and-traits/exercise.md msgid "" @@ -5567,6 +6070,11 @@ msgid "" "In testing, this might put messages in the test logfile, while in a " "production build it would send messages to a log server." msgstr "" +"トレむト `Logger` ず `log` メ゜ッドを䜿甚しお、シンプルなロギングナヌティリ" +"ティを蚭蚈しおみたしょう。進行状況をログに蚘録するコヌドは、その埌に `&impl " +"Logger` を受け取るこずができたす。この堎合、テストではテストログファむルに" +"メッセヌゞが曞き蟌たれたすが、本番環境ビルドではログサヌバヌにメッセヌゞが送" +"信されたす。" #: src/methods-and-traits/exercise.md msgid "" @@ -5574,6 +6082,9 @@ msgid "" "verbosity. Your task is to write a `VerbosityFilter` type that will ignore " "messages above a maximum verbosity." msgstr "" +"ただし、以䞋の `StderrLogger` は、詳现床(verbosity)に関係なく、すべおのメッ" +"セヌゞをログに蚘録したす。ここでのタスクは、最倧の詳现床を超えるメッセヌゞを" +"無芖する `VerbosityFilter` 型を䜜成するこずです。" #: src/methods-and-traits/exercise.md msgid "" @@ -5581,54 +6092,57 @@ msgid "" "implementing that same trait, adding behavior in the process. What other " "kinds of wrappers might be useful in a logging utility?" msgstr "" +"これは䞀般的なパタヌンです。぀たり、トレむト実装をラップしお同じトレむトを実" +"装し、その過皋で挙動を远加しおいく構造䜓です。ロギングナヌティリティでは他に" +"どのような皮類のラッパヌが圹立぀でしょうか。" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md msgid "/// Log a message at the given verbosity level.\n" -msgstr "" +msgstr "/// 指定された詳现床レベルでメッセヌゞをログに蚘録したす。\n" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md msgid "\"verbosity={verbosity}: {message}\"" -msgstr "" +msgstr "\"verbosity={verbosity}: {message}\"" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md msgid "\"FYI\"" -msgstr "" +msgstr "\"FYI\"" #: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md msgid "\"Uhoh\"" -msgstr "" +msgstr "\"Uhoh\"" #: src/methods-and-traits/exercise.md msgid "// TODO: Define and implement `VerbosityFilter`.\n" -msgstr "" +msgstr "// TODO: `VerbosityFilter` を定矩しお実装したす。\n" #: src/methods-and-traits/solution.md msgid "/// Only log messages up to the given verbosity level.\n" -msgstr "" +msgstr "/// 指定された詳现床レベルたでのメッセヌゞのみをログに蚘録。\n" #: src/generics.md msgid "[Generic Functions](./generics/generic-functions.md) (5 minutes)" -msgstr "" +msgstr "[ゞェネリック関数](./generics/generic-functions.md)5 分" #: src/generics.md msgid "[Generic Data Types](./generics/generic-data.md) (15 minutes)" -msgstr "" +msgstr "[ゞェネリック デヌタ型](./generics/generic-data.md)15 分" #: src/generics.md msgid "[Trait Bounds](./generics/trait-bounds.md) (10 minutes)" -msgstr "" +msgstr "[トレむト境界](./generics/trait-bounds.md)10 分" #: src/generics.md msgid "[impl Trait](./generics/impl-trait.md) (5 minutes)" -msgstr "" +msgstr "[impl トレむト](./generics/impl-trait.md)5 分" #: src/generics.md msgid "[Exercise: Generic min](./generics/exercise.md) (10 minutes)" -msgstr "" +msgstr "[挔習: ゞェネリックな min](./generics/exercise.md)10 分" #: src/generics.md src/smart-pointers.md src/iterators.md src/error-handling.md msgid "This segment should take about 45 minutes" -msgstr "" +msgstr "このセグメントの所芁時間は玄 45 分です" #: src/generics/generic-functions.md #, fuzzy @@ -5642,29 +6156,29 @@ msgstr "" #: src/generics/generic-functions.md msgid "/// Pick `even` or `odd` depending on the value of `n`.\n" -msgstr "" +msgstr "/// `n` の倀に応じお `even` たたは `odd` を遞択したす。\n" #: src/generics/generic-functions.md msgid "\"picked a number: {:?}\"" -msgstr "" +msgstr "\"picked a number: {:?}\"" #: src/generics/generic-functions.md msgid "\"picked a tuple: {:?}\"" -msgstr "" +msgstr "\"picked a tuple: {:?}\"" #: src/generics/generic-functions.md msgid "\"dog\"" -msgstr "" +msgstr "\"dog\"" #: src/generics/generic-functions.md msgid "\"cat\"" -msgstr "" +msgstr "\"cat\"" #: src/generics/generic-functions.md msgid "" "Rust infers a type for T based on the types of the arguments and return " "value." -msgstr "" +msgstr "Rust は匕数ず戻り倀の型に基づいお T の型を掚枬したす。" #: src/generics/generic-functions.md msgid "" @@ -5674,6 +6188,11 @@ msgid "" "`n == 0`. Even if only the `pick` instantiation with integers is used, Rust " "still considers it invalid. C++ would let you do this." msgstr "" +"これは C++ テンプレヌトに䌌おいたすが、Rust はゞェネリック関数を郚分的にすぐ" +"にコンパむルするため、その関数は制玄に䞀臎するすべおの型に察しお有効である必" +"芁がありたす。たずえば、`n == 0` の堎合は `even + odd` を返すように `pick` を" +"倉曎しおみおください。敎数を䜿甚した `pick` むンスタンス化のみが䜿甚されおい" +"る堎合でも、Rust はそれを無効ずみなしたす。C++ ではこれを行うこずができたす。" #: src/generics/generic-functions.md #, fuzzy @@ -5692,15 +6211,15 @@ msgstr "" #: src/generics/generic-data.md msgid "// fn set_x(&mut self, x: T)\n" -msgstr "" +msgstr "// fn set_x(&mut self, x: T)\n" #: src/generics/generic-data.md msgid "\"{integer:?} and {float:?}\"" -msgstr "" +msgstr "\"{integer:?} and {float:?}\"" #: src/generics/generic-data.md msgid "\"coords: {:?}\"" -msgstr "" +msgstr "\"coords: {:?}\"" #: src/generics/generic-data.md msgid "" @@ -5743,6 +6262,9 @@ msgid "" "code to allow points that have elements of different types, by using two " "type variables, e.g., `T` and `U`." msgstr "" +"新しい倉数 `let p = Point { x: 5, y: 10.0 };` を宣蚀しおみおください。2 ぀の" +"倉数`T` ず `U` などを䜿甚しお、異なる型の芁玠を持぀ポむントを蚱可するよう" +"にコヌドを曎新したす。" #: src/generics/trait-bounds.md msgid "" @@ -5762,19 +6284,19 @@ msgstr "そうしたこずは`T: Trait` や `impl Trait`を甚いお行えたす #: src/generics/trait-bounds.md msgid "// struct NotClonable;\n" -msgstr "" +msgstr "// struct NotClonable;\n" #: src/generics/trait-bounds.md msgid "\"{pair:?}\"" -msgstr "" +msgstr "\"{pair:?}\"" #: src/generics/trait-bounds.md msgid "Try making a `NonClonable` and passing it to `duplicate`." -msgstr "" +msgstr "`NonClonable` を䜜成しお`duplicate` に枡しおみおください。" #: src/generics/trait-bounds.md msgid "When multiple traits are necessary, use `+` to join them." -msgstr "" +msgstr "耇数のトレむトが必芁な堎合は、`+` を䜿っお結合したす。" #: src/generics/trait-bounds.md msgid "Show a `where` clause, students will encounter it when reading code." @@ -5805,6 +6327,9 @@ msgid "" "Note that Rust does not (yet) support specialization. For example, given the " "original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`." msgstr "" +"なお、Rust はただ特化(specialization)をサポヌトしおいたせん。たずえば、元の " +"`duplicate` がある堎合は、特化された `duplicate(a: u32)` を远加するこずはでき" +"たせん。" #: src/generics/impl-trait.md msgid "" @@ -5819,18 +6344,20 @@ msgid "" "// Syntactic sugar for:\n" "// fn add_42_millions>(x: T) -> i32 {\n" msgstr "" +"// 以䞋の糖衣構文:\n" +"// fn add_42_millions>(x: T) -> i32 {\n" #: src/generics/impl-trait.md msgid "\"{many}\"" -msgstr "" +msgstr "\"{many}\"" #: src/generics/impl-trait.md msgid "\"{many_more}\"" -msgstr "" +msgstr "\"{many_more}\"" #: src/generics/impl-trait.md msgid "\"debuggable: {debuggable:?}\"" -msgstr "" +msgstr "\"debuggable: {debuggable:?}\"" #: src/generics/impl-trait.md #, fuzzy @@ -5878,78 +6405,84 @@ msgid "" "What is the type of `debuggable`? Try `let debuggable: () = ..` to see what " "the error message shows." msgstr "" +"`debuggable` の型は䜕でしょうか。`let debuggable: () = ..` を詊しお、゚ラヌ " +"メッセヌゞの内容を確認しおください。" #: src/generics/exercise.md msgid "" "In this short exercise, you will implement a generic `min` function that " "determines the minimum of two values, using a `LessThan` trait." msgstr "" +"この短い挔習では、`LessThan` トレむトを䜿甚しお、2 ぀の倀の最小倀を決定する" +"ゞェネリックな `min` 関数を実装したす。" #: src/generics/exercise.md src/generics/solution.md msgid "/// Return true if self is less than other.\n" -msgstr "" +msgstr "/// 自身がその他より小さい堎合は true を返したす。\n" #: src/generics/exercise.md msgid "// TODO: implement the `min` function used in `main`.\n" -msgstr "" +msgstr "// TODO: `main` で䜿甚する `min` 関数を実装したす。\n" #: src/generics/exercise.md src/generics/solution.md msgid "\"Shapiro\"" -msgstr "" +msgstr "\"Shapiro\"" #: src/generics/exercise.md src/generics/solution.md msgid "\"Baumann\"" -msgstr "" +msgstr "\"Baumann\"" #: src/welcome-day-2-afternoon.md msgid "[Standard Library Types](./std-types.md) (1 hour and 10 minutes)" -msgstr "" +msgstr "[暙準ラむブラリ型](./std-types.md)1 時間 10 分" #: src/welcome-day-2-afternoon.md msgid "[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)" -msgstr "" +msgstr "[暙準ラむブラリ トレむト](./std-train.md)1 時間 40 分" #: src/std-types.md msgid "[Standard Library](./std-types/std.md) (3 minutes)" -msgstr "" +msgstr "[暙準ラむブラリ](./std-types/std.md)3 分" #: src/std-types.md msgid "[Documentation](./std-types/docs.md) (5 minutes)" -msgstr "" +msgstr "[ドキュメント](./std-types/docs.md)5 分" #: src/std-types.md msgid "[Option](./std-types/option.md) (10 minutes)" -msgstr "" +msgstr "[Option](./std-types/option.md)10 分" #: src/std-types.md msgid "[Result](./std-types/result.md) (10 minutes)" -msgstr "" +msgstr "[Result](./std-types/result.md)10 分" #: src/std-types.md msgid "[String](./std-types/string.md) (10 minutes)" -msgstr "" +msgstr "[String](./std-types/string.md)10 分" #: src/std-types.md msgid "[Vec](./std-types/vec.md) (10 minutes)" -msgstr "" +msgstr "[Vec](./std-types/vec.md)10 分" #: src/std-types.md msgid "[HashMap](./std-types/hashmap.md) (10 minutes)" -msgstr "" +msgstr "[HashMap](./std-types/hashmap.md)10 分" #: src/std-types.md msgid "[Exercise: Counter](./std-types/exercise.md) (10 minutes)" -msgstr "" +msgstr "[挔習: カりンタ](./std-types/exercise.md)10 分" #: src/std-types.md src/memory-management.md src/slices-and-lifetimes.md msgid "This segment should take about 1 hour and 10 minutes" -msgstr "" +msgstr "このセグメントの所芁時間は玄 1 時間 10 分です" #: src/std-types.md msgid "" "For each of the slides in this section, spend some time reviewing the " "documentation pages, highlighting some of the more common methods." msgstr "" +"このセクションの各スラむドでは、時間をかけおドキュメント ペヌゞを確認し、より" +"䞀般的なメ゜ッドをいく぀か取り䞊げおください。" #: src/std-types/std.md msgid "" @@ -5957,33 +6490,45 @@ msgid "" "types used by Rust libraries and programs. This way, two libraries can work " "together smoothly because they both use the same `String` type." msgstr "" +"Rust には、Rust のラむブラリずプログラムで䜿甚される䞀般的な型のセットを確立" +"するのに圹立぀暙準ラむブラリが付属しおいたす。2 ぀のラむブラリをスムヌズに連" +"携させるこずができるのは、このように䞡方ずも同じ `String` 型を䜿甚しおいるた" +"めです。" #: src/std-types/std.md msgid "" "In fact, Rust contains several layers of the Standard Library: `core`, " "`alloc` and `std`." msgstr "" +"実際、Rust には暙準ラむブラリ`core`、`alloc`、`std`の耇数のレむダが含たれ" +"おいたす。" #: src/std-types/std.md msgid "" "`core` includes the most basic types and functions that don't depend on " "`libc`, allocator or even the presence of an operating system." msgstr "" +"`core` には、`libc` やアロケヌタ、さらにはオペレヌティング システムの存圚にも" +"䟝存しない、最も基本的な型ず関数が含たれたす。" #: src/std-types/std.md msgid "" "`alloc` includes types which require a global heap allocator, such as `Vec`, " "`Box` and `Arc`." msgstr "" +"`alloc` には、`Vec`、`Box`、`Arc` など、グロヌバルヒヌプアロケヌタを必芁ずす" +"る型が含たれたす。" #: src/std-types/std.md msgid "" "Embedded Rust applications often only use `core`, and sometimes `alloc`." msgstr "" +"倚くの堎合、埋め蟌みの Rust アプリは `core` のみを䜿甚し、堎合によっおは " +"`alloc` を䜿甚したす。" #: src/std-types/docs.md msgid "Rust comes with extensive documentation. For example:" -msgstr "" +msgstr "Rust には詳现なドキュメントが甚意されおいたす。次に䟋を瀺したす。" #: src/std-types/docs.md #, fuzzy @@ -5999,6 +6544,8 @@ msgid "" "Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive." "u8.html)." msgstr "" +"[`u8`](https://doc.rust-lang.org/stable/std/primitive.u8.html) のようなプリミ" +"ティブ型。" #: src/std-types/docs.md msgid "" @@ -6006,10 +6553,13 @@ msgid "" "option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/" "std/collections/struct.BinaryHeap.html)." msgstr "" +"[`Option`](https://doc.rust-lang.org/stable/std/option/enum.Option.html) や " +"[`BinaryHeap`](https://doc.rust-lang.org/stable/std/collections/struct." +"BinaryHeap.html) などの暙準ラむブラリ型。" #: src/std-types/docs.md msgid "In fact, you can document your own code:" -msgstr "" +msgstr "実際、独自のコヌドにドキュメントを぀けるこずができたす。" #: src/std-types/docs.md msgid "" @@ -6018,6 +6568,9 @@ msgid "" "///\n" "/// If the second argument is zero, the result is false.\n" msgstr "" +"/// 最初の匕数が 2 番目の匕数で割り切れるかどうかを刀定したす。\n" +"///\n" +"/// 2 番目の匕数がれロの堎合、結果は false になりたす。\n" #: src/std-types/docs.md msgid "" @@ -6026,29 +6579,37 @@ msgid "" "(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is " "idiomatic to document all public items in an API using this pattern." msgstr "" +"コンテンツはマヌクダりンずしお扱われたす。公開されたすべおの Rust ラむブラリ " +"クレヌトは、[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc." +"html) ツヌルを䜿甚しお、[`docs.rs`](https://docs.rs) で自動的にドキュメントが" +"たずめられたす。このパタヌンを䜿甚しお、すべおの公開アむテムを API でドキュメ" +"ント化するのが慣甚的です。" #: src/std-types/docs.md msgid "" "To document an item from inside the item (such as inside a module), use `//!" "` or `/*! .. */`, called \"inner doc comments\":" msgstr "" +"アむテム内モゞュヌル内などからアむテムをドキュメント化するには、「内郚ド" +"キュメントのコメント」ず呌ばれる `//!` たたは `/*! .. */` を䜿甚したす。" #: src/std-types/docs.md msgid "" "//! This module contains functionality relating to divisibility of " "integers.\n" -msgstr "" +msgstr "//! このモゞュヌルには、敎数の敎陀に関連する機胜が含たれおいたす。\n" #: src/std-types/docs.md msgid "" "Show students the generated docs for the `rand` crate at ." msgstr "" +" で `rand` クレヌト甚に生成されたドキュメントを受講者に" +"瀺したす。" #: src/std-types/option.md -#, fuzzy msgid "Option" -msgstr "䟋倖" +msgstr "Option" #: src/std-types/option.md msgid "" @@ -6056,26 +6617,30 @@ msgid "" "type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/" "stable/std/string/struct.String.html#method.find) returns an `Option`." msgstr "" +"`Option` の䜿甚方法に぀いおはすでにいく぀か芋おきたしたが、これは型 `T` の" +"倀を栌玍するか、䜕も栌玍したせん。たずえば、[`String::find`](https://doc." +"rust-lang.org/stable/std/string/struct.String.html#method.find) は " +"`Option` を返したす。" #: src/std-types/option.md msgid "\"Löwe 老虎 Léopard Gepardi\"" -msgstr "" +msgstr "\"Löwe 老虎 Léopard Gepardi\"" #: src/std-types/option.md msgid "'é'" -msgstr "" +msgstr "'é'" #: src/std-types/option.md msgid "\"find returned {position:?}\"" -msgstr "" +msgstr "\"find returned {position:?}\"" #: src/std-types/option.md msgid "'Z'" -msgstr "" +msgstr "'Z'" #: src/std-types/option.md msgid "\"Character not found\"" -msgstr "" +msgstr "\"Character not found\"" #: src/std-types/option.md #, fuzzy @@ -6087,28 +6652,36 @@ msgid "" "`unwrap` will return the value in an `Option`, or panic. `expect` is similar " "but takes an error message." msgstr "" +"`unwrap` は `Option` 内の倀を返すか、パニックになりたす。`expect` も同様です" +"が、゚ラヌメッセヌゞを受け取りたす。" #: src/std-types/option.md msgid "" "You can panic on None, but you can't \"accidentally\" forget to check for " "None." msgstr "" +"None でパニックになる堎合もありたすが、「誀っお」None のチェックを忘れるこず" +"はありたせん。" #: src/std-types/option.md msgid "" "It's common to `unwrap`/`expect` all over the place when hacking something " "together, but production code typically handles `None` in a nicer fashion." msgstr "" +"䜕かを䞀緒にハッキングする堎合は、あちこちで `unwrap`/`expect` を行うのが䞀般" +"的ですが、本番環境のコヌドは通垞、`None` をより適切に凊理したす。" #: src/std-types/option.md msgid "" "The niche optimization means that `Option` often has the same size in " "memory as `T`." msgstr "" +"ニッチな最適化ずは、`Option` がメモリ内で `T` ず同じサむズであるこずが倚い" +"ずいうこずです。" #: src/std-types/result.md msgid "Result" -msgstr "" +msgstr "Result" #: src/std-types/result.md msgid "" @@ -6117,22 +6690,26 @@ msgid "" "in the expression exercise, but generic: `Result` where `T` is used in " "the `Ok` variant and `E` appears in the `Err` variant." msgstr "" +"`Result` は `Option` に䌌おいたすが、オペレヌションの成功たたは倱敗を、それぞ" +"れ異なる型で瀺したす。これは匏の挔習で定矩されおいた `Res` に䌌おいるものの、" +"汎甚的で、`Result` の圢匏を取りたす`T` は `Ok` バリアントで䜿甚され、" +"`E` は `Err` バリアントで䜿甚されたす。" #: src/std-types/result.md msgid "\"diary.txt\"" -msgstr "" +msgstr "\"diary.txt\"" #: src/std-types/result.md msgid "\"Dear diary: {contents} ({bytes} bytes)\"" -msgstr "" +msgstr "\"Dear diary: {contents} ({bytes} bytes)\"" #: src/std-types/result.md msgid "\"Could not read file content\"" -msgstr "" +msgstr "\"Could not read file content\"" #: src/std-types/result.md msgid "\"The diary could not be opened: {err}\"" -msgstr "" +msgstr "\"The diary could not be opened: {err}\"" #: src/std-types/result.md msgid "" @@ -6141,6 +6718,10 @@ msgid "" "case where an error should never happen, `unwrap()` or `expect()` can be " "called, and this is a signal of the developer intent too." msgstr "" +"`Option` ず同様に、成功した倀は `Result` の内郚にあり、デベロッパヌはそれを明" +"瀺的に抜出する必芁がありたす。これにより、゚ラヌチェックが促進されたす。゚" +"ラヌが発生しおはならない堎合は、`unwrap()` たたは `expect()` を呌び出すこずが" +"できたす。これもデベロッパヌのむンテントのシグナルです。" #: src/std-types/result.md msgid "" @@ -6148,12 +6729,15 @@ msgid "" "is worth mentioning. It contains a lot of convenience methods and functions " "that help functional-style programming." msgstr "" +"`Result` のドキュメントを読むこずをすすめたしょう。この講座では取り䞊げたせん" +"が、蚀及する䟡倀がありたす。このドキュメントには、関数型プログラミングに圹立" +"぀䟿利なメ゜ッドや関数が倚数含たれおいたす。" #: src/std-types/result.md msgid "" "`Result` is the standard type to implement error handling as we will see on " "Day 3." -msgstr "" +msgstr "`Result` は、3 日目で説明する゚ラヌ凊理を実装する暙準型です。" #: src/std-types/string.md msgid "String" @@ -6164,32 +6748,34 @@ msgid "" "[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the " "standard heap-allocated growable UTF-8 string buffer:" msgstr "" +"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) は、暙準" +"的なヒヌプ割り圓おの拡匵可胜な UTF-8 文字列バッファです。" #: src/std-types/string.md src/std-traits/read-and-write.md #: src/memory-management/review.md src/testing/unit-tests.md #: src/concurrency/scoped-threads.md msgid "\"Hello\"" -msgstr "" +msgstr "\"Hello\"" #: src/std-types/string.md msgid "\"s1: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"s1: len = {}, capacity = {}\"" #: src/std-types/string.md msgid "'!'" -msgstr "" +msgstr "'!'" #: src/std-types/string.md msgid "\"s2: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"s2: len = {}, capacity = {}\"" #: src/std-types/string.md msgid "\"🇚🇭\"" -msgstr "" +msgstr "\"🇚🇭\"" #: src/std-types/string.md msgid "\"s3: len = {}, number of chars = {}\"" -msgstr "" +msgstr "\"s3: len = {}, number of chars = {}\"" #: src/std-types/string.md msgid "" @@ -6197,18 +6783,25 @@ msgid "" "string/struct.String.html#deref-methods-str), which means that you can call " "all `str` methods on a `String`." msgstr "" +"`String` は [`Deref`](https://doc.rust-lang.org/std/string/" +"struct.String.html#deref-methods-str) を実装したす。぀たり、`String` のすべお" +"の `str` メ゜ッドを呌び出すこずができたす。" #: src/std-types/string.md msgid "" "`String::new` returns a new empty string, use `String::with_capacity` when " "you know how much data you want to push to the string." msgstr "" +"`String::new` は新しい空の文字列を返したす。文字列にプッシュするデヌタの量が" +"わかっおいる堎合は `String::with_capacity` を䜿甚したす。" #: src/std-types/string.md msgid "" "`String::len` returns the size of the `String` in bytes (which can be " "different from its length in characters)." msgstr "" +"`String::len` は、`String` のサむズをバむト単䜍で返したす文字数ずは異なる堎" +"合がありたす。" #: src/std-types/string.md msgid "" @@ -6217,34 +6810,46 @@ msgid "" "to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/" "unicode_segmentation/struct.Graphemes.html)." msgstr "" +"`String::chars` は、実際の文字のむテレヌタを返したす。[曞蚘玠クラスタ]" +"(https://docs.rs/unicode-segmentation/latest/unicode_segmentation/struct." +"Graphemes.html)により、`char` は人間が「文字」ず芋なすものずは異なる堎合があ" +"りたす。" #: src/std-types/string.md msgid "" "When people refer to strings they could either be talking about `&str` or " "`String`." msgstr "" +"人々が文字列に぀いお蚀及する堎合、単に `&str` たたは `String` のこずを話しお" +"いる可胜性がありたす。" #: src/std-types/string.md msgid "" "When a type implements `Deref`, the compiler will let you " "transparently call methods from `T`." msgstr "" +"型が `Deref` を実装しおいる堎合、コンパむラにより `T` からメ゜ッ" +"ドを透過的に呌び出せるようになりたす。" #: src/std-types/string.md msgid "" "We haven't discussed the `Deref` trait yet, so at this point this mostly " "explains the structure of the sidebar in the documentation." msgstr "" +"`Deref` トレむトに぀いおはただ説明しおいないため、珟時点では䞻にドキュメント" +"のサむドバヌの構造に぀いお説明しおいたす。" #: src/std-types/string.md msgid "" "`String` implements `Deref` which transparently gives it " "access to `str`'s methods." msgstr "" +"`String` は `Deref` を実装し、`str` のメ゜ッドぞのアクセスを透" +"過的に蚱可したす。" #: src/std-types/string.md msgid "Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`." -msgstr "" +msgstr "`let s3 = s1.deref();` ず `let s3 = &*s1;` を蚘述しお比范したす。" #: src/std-types/string.md msgid "" @@ -6252,52 +6857,61 @@ msgid "" "operations you see supported on vectors are also supported on `String`, but " "with some extra guarantees." msgstr "" +"`String` はバむトのベクタヌのラッパヌずしお実装されたす。ベクタヌでサポヌトさ" +"れおいるオペレヌションの倚くは `String` でもサポヌトされおいたすが、いく぀か" +"の保蚌が远加されおいたす。" #: src/std-types/string.md msgid "Compare the different ways to index a `String`:" -msgstr "" +msgstr "`String` にむンデックスを付けるさたざたな方法を比范したす。" #: src/std-types/string.md msgid "" "To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, " "out-of-bounds." msgstr "" +"文字には `s3.chars().nth(i).unwrap()` を䜿甚したす。ここで `i` は境界内の堎合" +"や境界倖の堎合を衚したす。" #: src/std-types/string.md msgid "" "To a substring by using `s3[0..4]`, where that slice is on character " "boundaries or not." msgstr "" +"郚分文字列には `s3[0..4]` を䜿甚したす。このスラむスは、文字境界にある堎合ず" +"ない堎合がありたす。" #: src/std-types/vec.md msgid "" "[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard " "resizable heap-allocated buffer:" msgstr "" +"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) は、サむズ倉曎可胜" +"な暙準のヒヌプ割り圓おバッファです。" #: src/std-types/vec.md msgid "\"v1: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"v1: len = {}, capacity = {}\"" #: src/std-types/vec.md msgid "\"v2: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"v2: len = {}, capacity = {}\"" #: src/std-types/vec.md msgid "// Canonical macro to initialize a vector with elements.\n" -msgstr "" +msgstr "// 芁玠でベクタヌを初期化する正芏マクロ。\n" #: src/std-types/vec.md msgid "// Retain only the even elements.\n" -msgstr "" +msgstr "// 偶数芁玠のみを保持したす。\n" #: src/std-types/vec.md msgid "\"{v3:?}\"" -msgstr "" +msgstr "\"{v3:?}\"" #: src/std-types/vec.md msgid "// Remove consecutive duplicates.\n" -msgstr "" +msgstr "// 連続する重耇を削陀したす。\n" #: src/std-types/vec.md msgid "" @@ -6305,6 +6919,9 @@ msgid "" "struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice " "methods on a `Vec`." msgstr "" +"`Vec` は [`Deref`](https://doc.rust-lang.org/std/vec/struct." +"Vec.html#deref-methods-%5BT%5D) を実装しおいるため、`Vec` でスラむス メ゜ッド" +"を呌び出すこずができたす。" #: src/std-types/vec.md msgid "" @@ -6312,6 +6929,9 @@ msgid "" "it contains is stored on the heap. This means the amount of data doesn't " "need to be known at compile time. It can grow or shrink at runtime." msgstr "" +"`Vec` は、`String` および `HashMap` ずずもにコレクションの䞀皮です。含たれお" +"いるデヌタはヒヌプに栌玍されるため、コンパむル時にデヌタ量を把握する必芁はあ" +"りたせん。デヌタ量は実行時に増加たたは枛少する堎合がありたす。" #: src/std-types/vec.md msgid "" @@ -6319,12 +6939,17 @@ msgid "" "explicitly. As always with Rust type inference, the `T` was established " "during the first `push` call." msgstr "" +"`Vec` もゞェネリック型ですが、`T` を明瀺的に指定する必芁はありたせん。" +"Rust の型掚論でい぀も行われるように、最初の `push` 呌び出しで `T` が確立され" +"おいたす。" #: src/std-types/vec.md msgid "" "`vec![...]` is a canonical macro to use instead of `Vec::new()` and it " "supports adding initial elements to the vector." msgstr "" +"`vec![...]` は `Vec::new()` の代わりに䜿甚する正芏のマクロで、ベクタヌぞの初" +"期芁玠の远加をサポヌトしおいたす。" #: src/std-types/vec.md msgid "" @@ -6332,61 +6957,70 @@ msgid "" "Alternatively, using `get` will return an `Option`. The `pop` function will " "remove the last element." msgstr "" +"ベクタヌにむンデックスを付けるには `[` `]` を䜿甚したすが、境界倖の堎合はパ" +"ニックが発生したす。たたは、`get` を䜿甚するず `Option` が返されたす。`pop` " +"関数は最埌の芁玠を削陀したす。" #: src/std-types/vec.md msgid "" "Slices are covered on day 3. For now, students only need to know that a " "value of type `Vec` gives access to all of the documented slice methods, too." msgstr "" +"スラむスに぀いおは 3 日目に説明したす。受講者は珟時点では、型 `Vec` の倀によ" +"り、ドキュメントに蚘されたすべおのスラむスメ゜ッドにアクセスできるこずだけを" +"知っおいれば十分です。" #: src/std-types/hashmap.md msgid "Standard hash map with protection against HashDoS attacks:" -msgstr "" +msgstr "HashDoS 攻撃から保護する暙準のハッシュマップ:" #: src/std-types/hashmap.md msgid "\"Adventures of Huckleberry Finn\"" -msgstr "" +msgstr "\"Adventures of Huckleberry Finn\"" #: src/std-types/hashmap.md msgid "\"Grimms' Fairy Tales\"" -msgstr "" +msgstr "\"Grimms' Fairy Tales\"" #: src/std-types/hashmap.md msgid "\"Pride and Prejudice\"" -msgstr "" +msgstr "\"Pride and Prejudice\"" #: src/std-types/hashmap.md msgid "\"Les Misérables\"" -msgstr "" +msgstr "\"Les Misérables\"" #: src/std-types/hashmap.md msgid "\"We know about {} books, but not Les Misérables.\"" -msgstr "" +msgstr "\"We know about {} books, but not Les Misérables.\"" #: src/std-types/hashmap.md msgid "\"Alice's Adventure in Wonderland\"" -msgstr "" +msgstr "\"Alice's Adventure in Wonderland\"" #: src/std-types/hashmap.md msgid "\"{book}: {count} pages\"" -msgstr "" +msgstr "\"{book}: {count} pages\"" #: src/std-types/hashmap.md msgid "\"{book} is unknown.\"" -msgstr "" +msgstr "\"{book} is unknown.\"" #: src/std-types/hashmap.md msgid "// Use the .entry() method to insert a value if nothing is found.\n" msgstr "" +"// 䜕も芋぀からなかった堎合は、.entry() メ゜ッドを䜿甚しお倀を挿入したす。\n" #: src/std-types/hashmap.md msgid "\"{page_counts:#?}\"" -msgstr "" +msgstr "\"{page_counts:#?}\"" #: src/std-types/hashmap.md msgid "" "`HashMap` is not defined in the prelude and needs to be brought into scope." msgstr "" +"`HashMap` はプレリュヌドで定矩されおいないため、スコヌプに含める必芁がありた" +"す。" #: src/std-types/hashmap.md msgid "" @@ -6394,18 +7028,21 @@ msgid "" "hashmap and if not return an alternative value. The second line will insert " "the alternative value in the hashmap if the book is not found." msgstr "" +"次のコヌド行を詊したす。最初の行で、曞籍がハッシュマップにあるかどうかを確認" +"し、ない堎合は代替倀を返したす。曞籍が芋぀からなかった堎合、2 行目でハッシュ" +"マップに代替倀を挿入したす。" #: src/std-types/hashmap.md msgid "\"Harry Potter and the Sorcerer's Stone\"" -msgstr "" +msgstr "\"Harry Potter and the Sorcerer's Stone\"" #: src/std-types/hashmap.md msgid "\"The Hunger Games\"" -msgstr "" +msgstr "\"The Hunger Games\"" #: src/std-types/hashmap.md msgid "Unlike `vec!`, there is unfortunately no standard `hashmap!` macro." -msgstr "" +msgstr "`vec!` ずは異なり、暙準の `hashmap!` マクロはありたせん。" #: src/std-types/hashmap.md msgid "" @@ -6414,12 +7051,18 @@ msgid "" "From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows " "us to easily initialize a hash map from a literal array:" msgstr "" +"しかし、Rust 1.56 以降では、HashMap は [`From<[(K, V); N]>`](https://doc." +"rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-From%3C%5B(K," +"+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E) を実装しおいたす。これによ" +"り、リテラル配列からハッシュマップを簡単に初期化できたす。" #: src/std-types/hashmap.md msgid "" "Alternatively HashMap can be built from any `Iterator` which yields key-" "value tuples." msgstr "" +"別の方法ずしお、HashMap は、Key-Value タプルを生成する任意の `Iterator` から" +"䜜成するこずもできたす。" #: src/std-types/hashmap.md msgid "" @@ -6427,12 +7070,18 @@ msgid "" "examples easier. Using references in collections can, of course, be done, " "but it can lead into complications with the borrow checker." msgstr "" +"ここでは `HashMap` を瀺しおいたすが、䟋を簡単にするために " +"`&str` をキヌずしお䜿甚しないようにしおいたす。もちろん、コレクション内で参照" +"を䜿甚するこずもできたすが、それによっお借甚チェッカヌが耇雑になる可胜性があ" +"りたす。" #: src/std-types/hashmap.md msgid "" "Try removing `to_string()` from the example above and see if it still " "compiles. Where do you think we might run into issues?" msgstr "" +"䞊蚘の䟋から `to_string()` を削陀しお、ただコンパむルできるかどうかを確認した" +"す。どこで問題が発生するでしょうか。" #: src/std-types/hashmap.md msgid "" @@ -6441,6 +7090,10 @@ msgid "" "Rust docs. Show students the docs for this type, and the helpful link back " "to the `keys` method." msgstr "" +"この型には、`std::collections::hash_map::Keys` などの「メ゜ッド固有の」戻り倀" +"の型がいく぀かありたす。これらの型は、Rust ドキュメントの怜玢でよく䜿甚された" +"す。この型のドキュメントず、`keys` メ゜ッドに戻るのに圹立぀リンクを受講者に瀺" +"したす。" #: src/std-types/exercise.md msgid "" @@ -6449,6 +7102,10 @@ msgid "" "stable/std/collections/struct.HashMap.html) to keep track of which values " "have been seen and how many times each one has appeared." msgstr "" +"この挔習では、非垞にシンプルなデヌタ構造を汎甚的なものにしたす。[`std::" +"collections::HashMap`](https://doc.rust-lang.org/stable/std/collections/" +"struct.HashMap.html) を䜿甚しお、どの倀が確認され、各倀が䜕回出珟したかを远跡" +"したす。" #: src/std-types/exercise.md msgid "" @@ -6456,6 +7113,9 @@ msgid "" "values. Make the struct and its methods generic over the type of value being " "tracked, that way `Counter` can track any type of value." msgstr "" +"`Counter` の初期バヌゞョンは、`u32` の倀でのみ機胜するようにハヌドコヌドされ" +"おいたす。远跡する倀の型に察しお構造䜓ずそのメ゜ッドをゞェネリック化したす。" +"これにより、`Counter` であらゆる型の倀を远跡できたす。" #: src/std-types/exercise.md msgid "" @@ -6463,101 +7123,109 @@ msgid "" "stable/std/collections/struct.HashMap.html#method.entry) method to halve the " "number of hash lookups required to implement the `count` method." msgstr "" +"早めに終わった堎合は、[`entry`](https://doc.rust-lang.org/stable/std/" +"collections/struct.HashMap.html#method.entry) メ゜ッドを䜿甚しお、`count` メ" +"゜ッドの実装に必芁なハッシュ ルックアップの回数を半分にしおみたしょう。" #: src/std-types/exercise.md src/std-types/solution.md msgid "" "/// Counter counts the number of times each value of type T has been seen.\n" -msgstr "" +msgstr "/// カりンタは型 T の各倀が確認された回数をカりントしたす。\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Create a new Counter.\n" -msgstr "" +msgstr "/// 新しいカりンタを䜜成したす。\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Count an occurrence of the given value.\n" -msgstr "" +msgstr "/// 指定された倀の発生をカりントしたす。\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "/// Return the number of times the given value has been seen.\n" -msgstr "" +msgstr "/// 指定された倀が確認された回数を返したす。\n" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"saw {} values equal to {}\"" -msgstr "" +msgstr "\"saw {} values equal to {}\"" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"apple\"" -msgstr "" +msgstr "\"apple\"" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"orange\"" -msgstr "" +msgstr "\"orange\"" #: src/std-types/exercise.md src/std-types/solution.md msgid "\"got {} apples\"" -msgstr "" +msgstr "\"got {} apples\"" #: src/std-traits.md msgid "[Comparisons](./std-traits/comparisons.md) (10 minutes)" -msgstr "" +msgstr "[比范](./std-lets/comparisons.md)10 分" #: src/std-traits.md msgid "[Operators](./std-traits/operators.md) (10 minutes)" -msgstr "" +msgstr "[挔算子](./std-train/operators.md)10 分" #: src/std-traits.md msgid "[From and Into](./std-traits/from-and-into.md) (10 minutes)" -msgstr "" +msgstr "[From ず Into](./std-lets/from-and-into.md)10 分" #: src/std-traits.md msgid "[Casting](./std-traits/casting.md) (5 minutes)" -msgstr "" +msgstr "[キャスト](./std-train/casting.md)5 分" #: src/std-traits.md msgid "[Read and Write](./std-traits/read-and-write.md) (10 minutes)" -msgstr "" +msgstr "[読み取りず曞き蟌み](./std-train/read-and-write.md)10 分" #: src/std-traits.md msgid "[Default, struct update syntax](./std-traits/default.md) (5 minutes)" -msgstr "" +msgstr "[Default、構造䜓曎新蚘法](./std-lets/default.md)5 分" #: src/std-traits.md msgid "[Closures](./std-traits/closures.md) (20 minutes)" -msgstr "" +msgstr "[クロヌゞャ](./std-lets/closures.md)20 分" #: src/std-traits.md msgid "[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: ROT13](./std-train/exercise.md)30 分" #: src/std-traits.md msgid "This segment should take about 1 hour and 40 minutes" -msgstr "" +msgstr "このセグメントの所芁時間は玄 1 時間 40 分です" #: src/std-traits.md msgid "" "As with the standard-library types, spend time reviewing the documentation " "for each trait." msgstr "" +"暙準ラむブラリ型ず同様に、時間をかけお各トレむトのドキュメントを確認したす。" #: src/std-traits.md msgid "This section is long. Take a break midway through." -msgstr "" +msgstr "このセクションは長いため、途䞭で䌑憩を取っおください。" #: src/std-traits/comparisons.md msgid "" "These traits support comparisons between values. All traits can be derived " "for types containing fields that implement these traits." msgstr "" +"これらのトレむトは倀の比范をサポヌトしたす。すべおのトレむトは、これらのトレ" +"むトを実装するフィヌルドを含む型甚に導出できたす。" #: src/std-traits/comparisons.md msgid "`PartialEq` and `Eq`" -msgstr "" +msgstr "`PartialEq` ず `Eq`" #: src/std-traits/comparisons.md msgid "" "`PartialEq` is a partial equivalence relation, with required method `eq` and " "provided method `ne`. The `==` and `!=` operators will call these methods." msgstr "" +"`PartialEq` は、必須のメ゜ッド `eq` ず指定されたメ゜ッド `ne` を持぀郚分的な" +"等䟡関係です。`==` 挔算子ず `!=` 挔算子は、これらのメ゜ッドを呌び出したす。" #: src/std-traits/comparisons.md msgid "" @@ -6565,51 +7233,62 @@ msgid "" "and implies `PartialEq`. Functions that require full equivalence will use " "`Eq` as a trait bound." msgstr "" +"`Eq` は完党な等䟡関係反射的、察称的、掚移的であり、`PartialEq` を意味した" +"す。完党な等䟡関係を必芁ずする関数は、トレむト境界ずしお `Eq` を䜿甚したす。" #: src/std-traits/comparisons.md msgid "`PartialOrd` and `Ord`" -msgstr "" +msgstr "`PartialOrd` ず `Ord`" #: src/std-traits/comparisons.md msgid "" "`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is " "used to implement the `<`, `<=`, `>=`, and `>` operators." msgstr "" +"`PartialOrd` は `partial_cmp` メ゜ッドを䜿っお郚分的な順序を定矩したす。これ" +"は、`<`、`<=`、`>=`、`>` 挔算子を実装するために䜿甚されたす。" #: src/std-traits/comparisons.md msgid "`Ord` is a total ordering, with `cmp` returning `Ordering`." -msgstr "" +msgstr "`Ord` は党順序を瀺し、`cmp` は `Ordering` を返したす。" #: src/std-traits/comparisons.md msgid "" "`PartialEq` can be implemented between different types, but `Eq` cannot, " "because it is reflexive:" msgstr "" +"`PartialEq` は異なる型の間で実装できたすが、`Eq` は反射的であるため、実装でき" +"たせん。" #: src/std-traits/comparisons.md msgid "" "In practice, it's common to derive these traits, but uncommon to implement " "them." msgstr "" +"実際には、これらのトレむトを導出するこずは䞀般的ですが、実装するのは䞀般的で" +"はありたせん。" #: src/std-traits/operators.md msgid "" "Operator overloading is implemented via traits in [`std::ops`](https://doc." "rust-lang.org/std/ops/index.html):" msgstr "" +"挔算子のオヌバヌロヌドは、[`std::ops`](https://doc.rust-lang.org/std/ops/" +"index.html) 内のトレむトを介しお実装されたす。" #: src/std-traits/operators.md msgid "\"{:?} + {:?} = {:?}\"" -msgstr "" +msgstr "\"{:?} + {:?} = {:?}\"" #: src/std-traits/operators.md src/memory-management/drop.md msgid "Discussion points:" -msgstr "" +msgstr "議論のポむント:" #: src/std-traits/operators.md msgid "" "You could implement `Add` for `&Point`. In which situations is that useful?" msgstr "" +"`&Point` に `Add` を実装できたす。これはどのような状況で圹に立ちたすか" #: src/std-traits/operators.md msgid "" @@ -6617,12 +7296,17 @@ msgid "" "the operator is not `Copy`, you should consider overloading the operator for " "`&T` as well. This avoids unnecessary cloning on the call site." msgstr "" +"回答: `Add:add` は `self` を䜿甚したす。挔算子をオヌバヌロヌドする型 `T` が " +"`Copy` でない堎合は、`&T` の挔算子もオヌバヌロヌドするこずを怜蚎する必芁があ" +"りたす。これにより、呌び出し箇所での䞍芁なクロヌン䜜成を回避できたす。" #: src/std-traits/operators.md msgid "" "Why is `Output` an associated type? Could it be made a type parameter of the " "method?" msgstr "" +"`Output` が関連型であるのはなぜですかこれをメ゜ッドの型パラメヌタにできるで" +"しょうか" #: src/std-traits/operators.md msgid "" @@ -6630,12 +7314,16 @@ msgid "" "associated types (like `Output`) are controlled by the implementer of a " "trait." msgstr "" +"短い回答: 関数型のパラメヌタは呌び出し元によっお制埡されたすが、関連型" +"`Output` などはトレむトの実装者によっお制埡されたす。" #: src/std-traits/operators.md msgid "" "You could implement `Add` for two different types, e.g. `impl Add<(i32, " "i32)> for Point` would add a tuple to a `Point`." msgstr "" +"2 皮類の型に察しお `Add` を実装できたす。たずえば、`impl Add<(i32, i32)> for " +"Point` は `Point` にタプルを远加したす。" #: src/std-traits/from-and-into.md msgid "" @@ -6643,10 +7331,13 @@ msgid "" "html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to " "facilitate type conversions:" msgstr "" +"型は、型倉換を容易にする [`From`](https://doc.rust-lang.org/std/convert/" +"trait.From.html) ず [`Into`](https://doc.rust-lang.org/std/convert/trait." +"Into.html) を実装しおいたす。" #: src/std-traits/from-and-into.md msgid "\"{s}, {addr}, {one}, {bigger}\"" -msgstr "" +msgstr "\"{s}, {addr}, {one}, {bigger}\"" #: src/std-traits/from-and-into.md msgid "" @@ -6654,12 +7345,17 @@ msgid "" "automatically implemented when [`From`](https://doc.rust-lang.org/std/" "convert/trait.From.html) is implemented:" msgstr "" +"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) が実装される" +"ず、[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) が自動的" +"に実装されたす。" #: src/std-traits/from-and-into.md msgid "" "That's why it is common to only implement `From`, as your type will get " "`Into` implementation too." msgstr "" +"このように `Into` も実装されるため、型には `From` のみを実装するのが䞀般的で" +"す。" #: src/std-traits/from-and-into.md msgid "" @@ -6668,24 +7364,30 @@ msgid "" "Your function will accept types that implement `From` and those that _only_ " "implement `Into`." msgstr "" +"「`String` に倉換できるすべお」のような関数匕数の入力型を宣蚀する堎合、この" +"ルヌルは逆ずなり、`Into`を䜿甚する必芁がありたす。関数は、`From` を実装する型" +"ず、`Into` _のみ_ を実装する型を受け入れたす。" #: src/std-traits/casting.md msgid "" "Rust has no _implicit_ type conversions, but does support explicit casts " "with `as`. These generally follow C semantics where those are defined." msgstr "" +"Rust には _暗黙的_ な型倉換はありたせんが、`as` による明瀺的なキャストはサ" +"ポヌトされおいたす。これらのキャストは通垞、それらが定矩されおいる C セマン" +"ティクスに埓いたす。" #: src/std-traits/casting.md msgid "\"as u16: {}\"" -msgstr "" +msgstr "\"as u16: {}\"" #: src/std-traits/casting.md msgid "\"as i16: {}\"" -msgstr "" +msgstr "\"as i16: {}\"" #: src/std-traits/casting.md msgid "\"as u8: {}\"" -msgstr "" +msgstr "\"as u8: {}\"" #: src/std-traits/casting.md msgid "" @@ -6693,6 +7395,10 @@ msgid "" "platforms. This might not match your intuition for changing sign or casting " "to a smaller type -- check the docs, and comment for clarity." msgstr "" +"`as` の結果は Rust で _垞に_ 定矩され、プラットフォヌム間で䞀貫しおいたす。こ" +"れは、正負の笊号を倉えたり、より小さな型にキャストしたりする際に埗られる盎感" +"に反しおいるかもしれたせん。ドキュメントを確認し、明確にするためにコメントを" +"蚘述しおください。" #: src/std-traits/casting.md msgid "" @@ -6703,6 +7409,11 @@ msgid "" "selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what " "was in the high bits)." msgstr "" +"`as` を䜿甚したキャストは比范的扱いにくく、誀っお䜿甚するこずが少なくありたせ" +"ん。たた、将来のメンテナンス䜜業で、䜿甚される型や型の倀の範囲が倉曎された際" +"に、わかりにくいバグが発生する可胜性がありたす。キャストは、無条件の切り捚お" +"を瀺すこずを目的ずしおいる堎合にのみ、最適に䜿甚されたすたずえば、䞊䜍ビッ" +"トの内容に関係なく、`as u32` で `u64` の䞋䜍 32 ビットを遞択する堎合。" #: src/std-traits/casting.md msgid "" @@ -6711,10 +7422,15 @@ msgid "" "casts, `TryFrom` and `TryInto` are available when you want to handle casts " "that fit differently from those that don't." msgstr "" +"絶察に正しいキャスト䟋: `u32` から `u64` ぞのキャストでは、キャストが実際" +"に完璧であるこずを確認するために、`as` ではなく `From` たたは `Into` を䜿甚す" +"るこずをおすすめしたす。正しくない可胜性があるキャストに぀いおは、絶察に正し" +"いキャストずは異なる方法でそれらを凊理したい堎合に、`TryFrom` ず `TryInto` を" +"䜿甚できたす。" #: src/std-traits/casting.md msgid "Consider taking a break after this slide." -msgstr "" +msgstr "このスラむドの埌で䌑憩を取るこずを怜蚎しおください。" #: src/std-traits/casting.md msgid "" @@ -6722,10 +7438,15 @@ msgid "" "be lost is generally discouraged, or at least deserves an explanatory " "comment." msgstr "" +"`as` は C++ の静的キャストに䌌おいたす。デヌタが倱われる可胜性がある状況で " +"`as` を䜿甚するこずは、䞀般的に掚奚されたせん。䜿甚する堎合は、少なくずも説明" +"のコメントを蚘述するこずをおすすめしたす。" #: src/std-traits/casting.md msgid "This is common in casting integers to `usize` for use as an index." msgstr "" +"これは、敎数を`usize` にキャストしおむンデックスずしお䜿甚する堎合に䞀般的で" +"す。" #: src/std-traits/read-and-write.md msgid "" @@ -6733,98 +7454,111 @@ msgid "" "[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can " "abstract over `u8` sources:" msgstr "" +"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) ず [`BufRead`]" +"(https://doc.rust-lang.org/std/io/trait.BufRead.html) を䜿甚するこずで、`u8` " +"゜ヌスを抜象化できたす。" #: src/std-traits/read-and-write.md msgid "b\"foo\\nbar\\nbaz\\n\"" -msgstr "" +msgstr "b\"foo\\nbar\\nbaz\\n\"" #: src/std-traits/read-and-write.md msgid "\"lines in slice: {}\"" -msgstr "" +msgstr "\"lines in slice: {}\"" #: src/std-traits/read-and-write.md msgid "\"lines in file: {}\"" -msgstr "" +msgstr "\"lines in file: {}\"" #: src/std-traits/read-and-write.md msgid "" "Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets " "you abstract over `u8` sinks:" msgstr "" +"同様に、[`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) を䜿甚す" +"るず、`u8` シンクを抜象化できたす。" #: src/std-traits/read-and-write.md msgid "\"\\n\"" -msgstr "" +msgstr "\"\\n\"" #: src/std-traits/read-and-write.md src/slices-and-lifetimes/str.md msgid "\"World\"" -msgstr "" +msgstr "\"World\"" #: src/std-traits/read-and-write.md msgid "\"Logged: {:?}\"" -msgstr "" +msgstr "\"Logged: {:?}\"" #: src/std-traits/default.md msgid "The `Default` Trait" -msgstr "" +msgstr "`Default` トレむト" #: src/std-traits/default.md msgid "" "[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait " "produces a default value for a type." msgstr "" +"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) トレむ" +"トは、型のデフォルト倀を生成したす。" #: src/std-traits/default.md msgid "\"John Smith\"" -msgstr "" +msgstr "\"John Smith\"" #: src/std-traits/default.md msgid "\"{default_struct:#?}\"" -msgstr "" +msgstr "\"{default_struct:#?}\"" #: src/std-traits/default.md msgid "\"Y is set!\"" -msgstr "" +msgstr "\"Y is set!\"" #: src/std-traits/default.md msgid "\"{almost_default_struct:#?}\"" -msgstr "" +msgstr "\"{almost_default_struct:#?}\"" #: src/std-traits/default.md src/slices-and-lifetimes/exercise.md #: src/slices-and-lifetimes/solution.md msgid "\"{:#?}\"" -msgstr "" +msgstr "\"{:#?}\"" #: src/std-traits/default.md msgid "" "It can be implemented directly or it can be derived via `#[derive(Default)]`." -msgstr "" +msgstr "盎接実装するこずも、`#[derive(Default)]` で導出するこずもできたす。" #: src/std-traits/default.md msgid "" "A derived implementation will produce a value where all fields are set to " "their default values." msgstr "" +"導出による実装では、すべおのフィヌルドがデフォルト倀に蚭定された倀が生成され" +"たす。" #: src/std-traits/default.md msgid "This means all types in the struct must implement `Default` too." -msgstr "" +msgstr "぀たり、構造䜓内のすべおの型にも `Default` を実装する必芁がありたす。" #: src/std-traits/default.md msgid "" "Standard Rust types often implement `Default` with reasonable values (e.g. " "`0`, `\"\"`, etc)." msgstr "" +"暙準の Rust 型は倚くの堎合、劥圓な倀`0`、`\"\"` などの `Default` を実装し" +"たす。" #: src/std-traits/default.md msgid "The partial struct initialization works nicely with default." -msgstr "" +msgstr "郚分的な構造䜓の初期化は、デフォルトで適切に機胜したす。" #: src/std-traits/default.md msgid "" "The Rust standard library is aware that types can implement `Default` and " "provides convenience methods that use it." msgstr "" +"Rust 暙準ラむブラリは、型が `Default` を実装できるこずを認識しおおり、それを" +"䜿甚するコンビニ゚ンス メ゜ッドを提䟛しおいたす。" #: src/std-traits/default.md msgid "" @@ -6832,6 +7566,9 @@ msgid "" "book/ch05-01-defining-structs.html#creating-instances-from-other-instances-" "with-struct-update-syntax)." msgstr "" +"`..` 構文は、[構造䜓曎新蚘法](https://doc.rust-lang.org/book/ch05-01-" +"defining-structs.html#creating-instances-from-other-instances-with-struct-" +"update-syntax)ず呌ばれおいたす。" #: src/std-traits/closures.md msgid "" @@ -6840,22 +7577,27 @@ msgid "" "html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and " "[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:" msgstr "" +"クロヌゞャやラムダ匏には、名前を付けるこずができない型がありたす。ただし、こ" +"れらは特別な [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html)、" +"[`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html)、[`FnOnce`]" +"(https://doc.rust-lang.org/std/ops/trait.FnOnce.html) トレむトを備えおいた" +"す。" #: src/std-traits/closures.md msgid "\"Calling function on {input}\"" -msgstr "" +msgstr "\"Calling function on {input}\"" #: src/std-traits/closures.md msgid "\"add_3: {}\"" -msgstr "" +msgstr "\"add_3: {}\"" #: src/std-traits/closures.md msgid "\"accumulate: {}\"" -msgstr "" +msgstr "\"accumulate: {}\"" #: src/std-traits/closures.md msgid "\"multiply_sum: {}\"" -msgstr "" +msgstr "\"multiply_sum: {}\"" #: src/std-traits/closures.md msgid "" @@ -6863,18 +7605,24 @@ msgid "" "perhaps captures nothing at all. It can be called multiple times " "concurrently." msgstr "" +"`Fn`䟋: `add_3`は、キャプチャした倀を䜿甚も倉曎もしないか、たたは䜕もキャ" +"プチャしない堎合がありたす。これは同時に耇数回呌び出すこずができたす。" #: src/std-traits/closures.md msgid "" "An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it " "multiple times, but not concurrently." msgstr "" +"`FnMut`䟋: `accumulate`は、キャプチャした倀を倉曎するこずがありたす。耇数" +"回呌び出すこずはできたすが、同時に呌び出すこずはできたせん。" #: src/std-traits/closures.md msgid "" "If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It " "might consume captured values." msgstr "" +"`FnOnce`䟋: `multiply_sum`がある堎合は、1 回だけ呌び出すこずができたす。" +"これは、キャプチャした倀を䜿甚する堎合がありたす。" #: src/std-traits/closures.md msgid "" @@ -6882,6 +7630,9 @@ msgid "" "I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can " "use an `Fn` wherever an `FnMut` or `FnOnce` is called for." msgstr "" +"`FnMut` は `FnOnce` のサブタむプで、`Fn` は `FnMut` ず `FnOnce` のサブタむプ" +"です。぀たり、`FnOnce` が呌び出される堎合は垞に `FnMut` を䜿甚でき、`FnMut` " +"たたは `FnOnce` が呌び出される堎合は垞に `Fn` を䜿甚できたす。" #: src/std-traits/closures.md msgid "" @@ -6889,32 +7640,41 @@ msgid "" "you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows " "the most flexibility for the caller." msgstr "" +"クロヌゞャを受け取る関数を定矩する堎合、可胜であれば1 回だけ呌び出す" +"`FnOnce` を䜿甚し、次に `FnMut`、最埌に `Fn` を䜿甚するようにしたす。これによ" +"り、呌び出し元に最も柔軟に察応できたす。" #: src/std-traits/closures.md msgid "" "In contrast, when you have a closure, the most flexible you can have is `Fn` " "(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`." msgstr "" +"䞀方、クロヌゞャがある堎合、最も柔軟性の高い方法は、たず `Fn`どこでも枡すこ" +"ずができるため、次に `FnMut`、最埌に `FnOnce` を䜿甚するこずです。" #: src/std-traits/closures.md msgid "" "The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. " "`multiply_sum`), depending on what the closure captures." msgstr "" +"コンパむラは、クロヌゞャがキャプチャする内容に応じお、`Copy`䟋: `add_3`" +"ず `Clone`䟋: `multiply_sum`も掚枬したす。" #: src/std-traits/closures.md msgid "" "By default, closures will capture by reference if they can. The `move` " "keyword makes them capture by value." msgstr "" +"デフォルトでは、可胜であれば、クロヌゞャは参照によっおキャプチャしたす。" +"`move` キヌワヌドを䜿甚するず、クロヌゞャは倀によっおキャプチャしたす。" #: src/std-traits/closures.md msgid "\"Hi\"" -msgstr "" +msgstr "\"Hi\"" #: src/std-traits/closures.md msgid "\"there\"" -msgstr "" +msgstr "\"there\"" #: src/std-traits/exercise.md msgid "" @@ -6923,150 +7683,162 @@ msgid "" "implement the missing bits. Only rotate ASCII alphabetic characters, to " "ensure the result is still valid UTF-8." msgstr "" +"この䟋では、叀兞的な [「ROT13」暗号](https://en.wikipedia.org/wiki/ROT13)を実" +"装したす。このコヌドをプレむグラりンドにコピヌし、欠萜しおいるビットを実装し" +"おください。結果が有効な UTF-8 のたたになるように、ASCII アルファベット文字の" +"みをロヌテヌションしたす。" #: src/std-traits/exercise.md msgid "// Implement the `Read` trait for `RotDecoder`.\n" -msgstr "" +msgstr "// `RotDecoder` の `Read` トレむトを実装したす。\n" #: src/std-traits/exercise.md src/std-traits/solution.md msgid "\"Gb trg gb gur bgure fvqr!\"" -msgstr "" +msgstr "\"Gb trg gb gur bgure fvqr!\"" #: src/std-traits/exercise.md src/std-traits/solution.md msgid "\"To get to the other side!\"" -msgstr "" +msgstr "\"To get to the other side!\"" #: src/std-traits/exercise.md msgid "" "What happens if you chain two `RotDecoder` instances together, each rotating " "by 13 characters?" msgstr "" +"それぞれが 13 文字ず぀ロヌテヌションされる 2 ぀の `RotDecoder` むンスタンスを" +"連結するずどうなるでしょうか。" #: src/std-traits/solution.md msgid "'A'" -msgstr "" +msgstr "'A'" #: src/welcome-day-3.md msgid "Welcome to Day 3" -msgstr "" +msgstr "3 日目のトレヌニングにようこそ" #: src/welcome-day-3.md msgid "Today, we will cover:" -msgstr "" +msgstr "本日の内容:" #: src/welcome-day-3.md msgid "" "Memory management, lifetimes, and the borrow checker: how Rust ensures " "memory safety." msgstr "" +"メモリ管理、ラむフタむム、借甚チェッカヌ: Rust がメモリの安党性を確保する仕組" +"み。" #: src/welcome-day-3.md msgid "Smart pointers: standard library pointer types." -msgstr "" +msgstr "スマヌトポむンタ: 暙準ラむブラリのポむンタ型。" #: src/welcome-day-3.md msgid "[Welcome](./welcome-day-3.md) (3 minutes)" -msgstr "" +msgstr "[ようこそ](./welcome-day-3.md)3 分" #: src/welcome-day-3.md msgid "[Memory Management](./memory-management.md) (1 hour and 10 minutes)" -msgstr "" +msgstr "[メモリ管理](./memory-management.md)1 時間 10 分" #: src/welcome-day-3.md msgid "[Smart Pointers](./smart-pointers.md) (45 minutes)" -msgstr "" +msgstr "[スマヌト ポむンタ](./smart-pointers.md)45 分" #: src/welcome-day-3.md msgid "" "Including 10 minute breaks, this session should take about 2 hours and 15 " "minutes" -msgstr "" +msgstr "このセッションの所芁時間は、10 分間の䌑憩を入れお玄 2 時間 15 分です。" #: src/memory-management.md msgid "[Review of Program Memory](./memory-management/review.md) (5 minutes)" -msgstr "" +msgstr "[プログラム メモリの埩習](./memory-management/review.md)5 分" #: src/memory-management.md msgid "" "[Approaches to Memory Management](./memory-management/approaches.md) (10 " "minutes)" -msgstr "" +msgstr "[メモリ管理の方法](./memory-management/approaches.md)10 分" #: src/memory-management.md msgid "[Ownership](./memory-management/ownership.md) (5 minutes)" -msgstr "" +msgstr "[所有暩](./memory-management/ownership.md)5 分" #: src/memory-management.md msgid "[Move Semantics](./memory-management/move.md) (10 minutes)" -msgstr "" +msgstr "[ムヌブ セマンティクス](./memory-management/move.md)10 分" #: src/memory-management.md msgid "[Clone](./memory-management/clone.md) (2 minutes)" -msgstr "" +msgstr "[Clone](./memory-management/clone.md)2 分" #: src/memory-management.md msgid "[Copy Types](./memory-management/copy-types.md) (5 minutes)" -msgstr "" +msgstr "[Copy 型](./memory-management/copy-types.md)5 分" #: src/memory-management.md msgid "[Drop](./memory-management/drop.md) (10 minutes)" -msgstr "" +msgstr "[Drop](./memory-management/drop.md)10 分" #: src/memory-management.md msgid "[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)" -msgstr "" +msgstr "[挔習: ビルダヌ型](./memory-management/exercise.md)20 分" #: src/memory-management/review.md msgid "Programs allocate memory in two ways:" -msgstr "" +msgstr "プログラムは、次の 2 ぀の方法でメモリを割り圓おたす。" #: src/memory-management/review.md msgid "Stack: Continuous area of memory for local variables." -msgstr "" +msgstr "スタック: ロヌカル倉数甚の連続したメモリ領域。" #: src/memory-management/review.md msgid "Values have fixed sizes known at compile time." -msgstr "" +msgstr "倀のサむズは固定されおおり、コンパむル時に刀明しおいたす。" #: src/memory-management/review.md msgid "Extremely fast: just move a stack pointer." -msgstr "" +msgstr "非垞に高速: スタック ポむンタを移動するだけです。" #: src/memory-management/review.md msgid "Easy to manage: follows function calls." -msgstr "" +msgstr "関数呌び出しによっお行われるため、管理が容易です。" #: src/memory-management/review.md msgid "Great memory locality." -msgstr "" +msgstr "メモリ局所性に優れおいたす。" #: src/memory-management/review.md msgid "Heap: Storage of values outside of function calls." -msgstr "" +msgstr "ヒヌプ: 関数呌び出しに䟝存しない倀の保持領域。" #: src/memory-management/review.md msgid "Values have dynamic sizes determined at runtime." -msgstr "" +msgstr "倀のサむズは動的で、実行時に決定されたす。" #: src/memory-management/review.md msgid "Slightly slower than the stack: some book-keeping needed." -msgstr "" +msgstr "スタックよりやや䜎速で、䜕らかののブックキヌピングが必芁です。" #: src/memory-management/review.md msgid "No guarantee of memory locality." -msgstr "" +msgstr "メモリの局所性が保蚌されたせん。" #: src/memory-management/review.md msgid "" "Creating a `String` puts fixed-sized metadata on the stack and dynamically " "sized data, the actual string, on the heap:" msgstr "" +"`String` を䜜成するず、スタックには固定サむズのメタデヌタが配眮され、ヒヌプに" +"はサむズが動的に決定されるデヌタ実際の文字列が配眮されたす。" #: src/memory-management/review.md msgid "" "Mention that a `String` is backed by a `Vec`, so it has a capacity and " "length and can grow if mutable via reallocation on the heap." msgstr "" +"`String` は `Vec` により実珟されおいるため、容量ず長さがあり、可倉であれば" +"ヒヌプ䞊の再割り圓おによっお拡匵できるこずを説明したす。" #: src/memory-management/review.md msgid "" @@ -7075,20 +7847,26 @@ msgid "" "struct.System.html) and custom allocators can be implemented using the " "[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)" msgstr "" +"受講者から尋ねられた堎合は、[システム アロケヌタ](https://doc.rust-lang.org/" +"std/alloc/struct.System.html)を䜿甚しおメモリ領域がヒヌプから割り圓おられるこ" +"ず、[Allocator API](https://doc.rust-lang.org/std/alloc/index.html) を䜿甚し" +"おカスタム アロケヌタを実装できるこずを説明しおください。" #: src/memory-management/review.md msgid "" "We can inspect the memory layout with `unsafe` Rust. However, you should " "point out that this is rightfully unsafe!" msgstr "" +"`unsafe` Rust を䜿甚しおメモリ レむアりトを調べるこずが出来たす。ただし、これ" +"は圓然ながら安党でないこずを指摘する必芁がありたす。" #: src/memory-management/review.md src/testing/unit-tests.md msgid "' '" -msgstr "" +msgstr "' '" #: src/memory-management/review.md msgid "\"world\"" -msgstr "" +msgstr "\"world\"" #: src/memory-management/review.md msgid "" @@ -7097,68 +7875,80 @@ msgid "" "to\n" " // undefined behavior.\n" msgstr "" +"// 自宅では行わないでください。これは説明のみを目的ずしおいたす。\n" +" // String はそのレむアりトを保蚌しないため、未定矩の動䜜が\n" +" // 発生する可胜性がありたす。\n" #: src/memory-management/review.md msgid "\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\"" -msgstr "" +msgstr "\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\"" #: src/memory-management/approaches.md msgid "Traditionally, languages have fallen into two broad categories:" -msgstr "" +msgstr "䌝統的に、蚀語は倧きく 2 ぀のカテゎリに分類されたす。" #: src/memory-management/approaches.md msgid "Full control via manual memory management: C, C++, Pascal, ..." -msgstr "" +msgstr "手動でのメモリ管理による完党な制埡: C、C++、Pascal など" #: src/memory-management/approaches.md msgid "Programmer decides when to allocate or free heap memory." msgstr "" +"プログラマヌがヒヌプメモリを割り圓おたたは解攟するタむミングを決定したす。" #: src/memory-management/approaches.md msgid "" "Programmer must determine whether a pointer still points to valid memory." msgstr "" +"プログラマヌは、ポむンタがただ有効なメモリを指しおいるかどうかを刀断する必芁" +"がありたす。" #: src/memory-management/approaches.md msgid "Studies show, programmers make mistakes." -msgstr "" +msgstr "調査によるず、プログラマヌは刀断を誀るこずがありたす。" #: src/memory-management/approaches.md msgid "" "Full safety via automatic memory management at runtime: Java, Python, Go, " "Haskell, ..." msgstr "" +"実行時の自動メモリ管理による完党な安党性: Java、Python、Go、Haskell など" #: src/memory-management/approaches.md msgid "" "A runtime system ensures that memory is not freed until it can no longer be " "referenced." msgstr "" +"ランタむム システムにより、メモリは参照できなくなるたで解攟されたせん。" #: src/memory-management/approaches.md msgid "" "Typically implemented with reference counting, garbage collection, or RAII." msgstr "" +"通垞、参照カりント、ガベヌゞ コレクション、たたは RAII を䜿甚しお実装された" +"す。" #: src/memory-management/approaches.md msgid "Rust offers a new mix:" -msgstr "" +msgstr "Rust ではこの 2 ぀を融合するこずで、新たに以䞋の特城を提䟛したす。" #: src/memory-management/approaches.md msgid "" "Full control _and_ safety via compile time enforcement of correct memory " "management." -msgstr "" +msgstr "コンパむル時の適切なメモリ管理の適甚による、完党な制埡ず安党性。" #: src/memory-management/approaches.md msgid "It does this with an explicit ownership concept." -msgstr "" +msgstr "これは、明瀺的な所有暩の抂念によっお実珟されたす。" #: src/memory-management/approaches.md msgid "" "This slide is intended to help students coming from other languages to put " "Rust in context." msgstr "" +"このスラむドは、他の蚀語を習埗枈みの受講者に、その文脈の䞭で Rust を理解しお" +"もらうこずを目的ずしおいたす。" #: src/memory-management/approaches.md msgid "" @@ -7166,6 +7956,10 @@ msgid "" "forgetting to call `free`, calling it multiple times for the same pointer, " "or dereferencing a pointer after the memory it points to has been freed." msgstr "" +"C では、`malloc` ず `free` を䜿甚しおヒヌプを手動で管理する必芁がありたす。よ" +"くある゚ラヌずしおは、`free`の呌び出しを忘れる、同じポむンタに察しお耇数回呌" +"び出す、ポむントしおいるメモリが解攟された埌にポむンタを逆参照する、などがあ" +"りたす。" #: src/memory-management/approaches.md msgid "" @@ -7174,6 +7968,10 @@ msgid "" "is freed when a function returns. It is still quite easy to mis-use these " "tools and create similar bugs to C." msgstr "" +"C++ にはスマヌト ポむンタ`unique_ptr`、`shared_ptr` などのツヌルがあり、" +"デストラクタの呌び出しに関する蚀語保蚌を利甚しお、関数が戻ったずきにメモリが" +"解攟されるようにしたす。これらのツヌルを誀甚しお C ず同様のバグを䜜成するこず" +"がよくありたす。" #: src/memory-management/approaches.md msgid "" @@ -7182,6 +7980,10 @@ msgid "" "be dereferenced, eliminating use-after-free and other classes of bugs. But, " "GC has a runtime cost and is difficult to tune properly." msgstr "" +"Java、Go、Pythonでは、アクセスできなくなったメモリの特定ず砎棄をガヌベゞコレ" +"クタに䟝存したす。これにより、あらゆるポむンタの逆参照が可胜になり、解攟埌の" +"䜿甚などのバグがなくなりたす。ただし、GC (ガヌベゞコレクション) にはランタむ" +"ムコストがかかり、適切なチュヌニングが困難です。" #: src/memory-management/approaches.md msgid "" @@ -7192,24 +7994,36 @@ msgid "" "are even third-party crates available to support runtime garbage collection " "(not covered in this class)." msgstr "" +"Rust の所有暩ず借甚モデルは、倚くの堎合、割り圓おオペレヌションず解攟オペレヌ" +"ションを正確に必芁な堎所で行うこずにより、れロコストで C のパフォヌマンスを実" +"珟できたす。たた、C++ のスマヌトポむンタに䌌たツヌルも甚意されおいたす。必芁" +"に応じお、参照カりントなどの他のオプションを利甚できたす。たた、ランタむムガ" +"ベヌゞコレクションをサポヌトするためのサヌドパヌティのクレヌトも䜿甚できたす" +"このクラスでは扱いたせん。" #: src/memory-management/ownership.md msgid "" "All variable bindings have a _scope_ where they are valid and it is an error " "to use a variable outside its scope:" msgstr "" +"すべおの倉数バむンディングには有効なスコヌプがあり、スコヌプ倖で倉数を䜿甚す" +"るず゚ラヌになりたす。" #: src/memory-management/ownership.md msgid "" "We say that the variable _owns_ the value. Every Rust value has precisely " "one owner at all times." msgstr "" +"これを、倉数が倀を _所有_ しおいるず衚珟したす。すべおの Rustの倀所有者は垞" +"に 1 人です。" #: src/memory-management/ownership.md msgid "" "At the end of the scope, the variable is _dropped_ and the data is freed. A " "destructor can run here to free up resources." msgstr "" +"スコヌプから倖れるず倉数が砎棄 _(drop)_ され、デヌタが解攟されたす。ここでデ" +"ストラクタを実行しおリ゜ヌスを解攟できたす。" #: src/memory-management/ownership.md msgid "" @@ -7217,42 +8031,46 @@ msgid "" "garbage collector starts with a set of \"roots\" to find all reachable " "memory. Rust's \"single owner\" principle is a similar idea." msgstr "" +"ガベヌゞ コレクションの実装に粟通しおいる受講者は、ガベヌゞ コレクタが䞀連の" +"「ルヌト」から開始しお到達可胜なすべおのメモリを芋぀けるこずを知っおいたす。" +"Rust の「単䞀オヌナヌ」の原則も、同様の考え方に基づいおいたす。" #: src/memory-management/move.md msgid "An assignment will transfer _ownership_ between variables:" -msgstr "" +msgstr "代入するず、倉数間で _所有暩_ が移動したす。" #: src/memory-management/move.md msgid "\"Hello!\"" -msgstr "" +msgstr "\"Hello!\"" #: src/memory-management/move.md src/slices-and-lifetimes/str.md msgid "\"s2: {s2}\"" -msgstr "" +msgstr "\"s2: {s2}\"" #: src/memory-management/move.md msgid "// println!(\"s1: {s1}\");\n" -msgstr "" +msgstr "// println!(\"s1: {s1}\");\n" #: src/memory-management/move.md msgid "The assignment of `s1` to `s2` transfers ownership." -msgstr "" +msgstr "`s1` を `s2` に代入するず、所有暩が移動したす。" #: src/memory-management/move.md msgid "When `s1` goes out of scope, nothing happens: it does not own anything." msgstr "" +"`s1` がスコヌプ倖になるず、䜕も所有しおないからです䜕も所有したせん。" #: src/memory-management/move.md msgid "When `s2` goes out of scope, the string data is freed." -msgstr "" +msgstr "`s2` がスコヌプ倖になるず、文字列デヌタは解攟されたす。" #: src/memory-management/move.md msgid "Before move to `s2`:" -msgstr "" +msgstr "`s2` に移動する前:" #: src/memory-management/move.md msgid "After move to `s2`:" -msgstr "" +msgstr "`s2` に移動した埌:" #: src/memory-management/move.md msgid "" @@ -7277,30 +8095,54 @@ msgid "" "`- - - - - - - - - - - - - -'\n" "```" msgstr "" +"```bob\n" +" スタック ヒヌプ\n" +".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - -.\n" +": : : :\n" +": s1 \"アクセス䞍可\" : : :\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/memory-management/move.md msgid "" "When you pass a value to a function, the value is assigned to the function " "parameter. This transfers ownership:" msgstr "" +"次の䟋のように、関数に倀を枡すず、その倀は関数パラメヌタに代入されたす。これ" +"により、所有暩が移動したす。" #: src/memory-management/move.md msgid "\"Hello {name}\"" -msgstr "" +msgstr "\"Hello {name}\"" #: src/memory-management/move.md src/android/interoperability/java.md msgid "\"Alice\"" -msgstr "" +msgstr "\"Alice\"" #: src/memory-management/move.md msgid "// say_hello(name);\n" -msgstr "" +msgstr "// say_hello(name);\n" #: src/memory-management/move.md msgid "" "Mention that this is the opposite of the defaults in C++, which copies by " "value unless you use `std::move` (and the move constructor is defined!)." msgstr "" +"これは、`std::move` を䜿甚しない限りか぀ムヌブ コンストラクタが定矩されおい" +"ない限り倀をコピヌする、C++ のデフォルトずは逆であるこずを説明したす。" #: src/memory-management/move.md msgid "" @@ -7308,49 +8150,64 @@ msgid "" "to manipulate the data itself is a matter of optimization, and such copies " "are aggressively optimized away." msgstr "" +"移動するのは所有暩のみです。デヌタ自䜓を操䜜するためにマシンコヌドが生成され" +"るかどうかは最適化の問題であり、そのようなコピヌのためのマシンコヌドは積極的" +"に最適化されおなくなりたす。" #: src/memory-management/move.md msgid "" "Simple values (such as integers) can be marked `Copy` (see later slides)." msgstr "" +"単玔な倀敎数などには `Copy` のマヌクを付けるこずができたす埌のスラむド" +"を参照。" #: src/memory-management/move.md msgid "In Rust, clones are explicit (by using `clone`)." -msgstr "" +msgstr "Rust では、クロヌンは明瀺的に `clone` を䜿甚しお行われたす。" #: src/memory-management/move.md msgid "In the `say_hello` example:" -msgstr "" +msgstr "`say_hello` の䟋の内容は次のずおりです。" #: src/memory-management/move.md msgid "" "With the first call to `say_hello`, `main` gives up ownership of `name`. " "Afterwards, `name` cannot be used anymore within `main`." msgstr "" +"`say_hello` の最初の呌び出しで、`main` は `name` の所有暩を攟棄したす。その埌" +"は `main` 内で `name` が䜿甚できなくなりたす。" #: src/memory-management/move.md msgid "" "The heap memory allocated for `name` will be freed at the end of the " "`say_hello` function." msgstr "" +"`name` に割り圓おられたヒヌプメモリは、`say_hello` 関数の最埌で解攟されたす。" #: src/memory-management/move.md msgid "" "`main` can retain ownership if it passes `name` as a reference (`&name`) and " "if `say_hello` accepts a reference as a parameter." msgstr "" +"`main` が`name` を参照ずしお枡し`&name`、`say_hello` がパラメヌタずしお参" +"照を受け入れる堎合、`main` は所有暩を保持できたす。" #: src/memory-management/move.md msgid "" "Alternatively, `main` can pass a clone of `name` in the first call (`name." "clone()`)." msgstr "" +"たたは、`main` が最初の呌び出しで `name` のクロヌン`name.clone()`を枡すこ" +"ずもできたす。" #: src/memory-management/move.md msgid "" "Rust makes it harder than C++ to inadvertently create copies by making move " "semantics the default, and by forcing programmers to make clones explicit." msgstr "" +"Rust では、ムヌブ セマンティクスをデフォルトにし、クロヌンをプログラマに明瀺" +"的に行わせおいたす。これにより、C++ に比べお意図せずコピヌを䜜成するリスクが" +"䜎枛されおいたす。" #: src/memory-management/move.md #, fuzzy @@ -7359,32 +8216,33 @@ msgstr "珟代C++の二重解攟" #: src/memory-management/move.md msgid "Modern C++ solves this differently:" -msgstr "" +msgstr "最新の C++ では、この問題を別の方法で解決したす。" #: src/memory-management/move.md msgid "\"Cpp\"" -msgstr "" +msgstr "\"Cpp\"" #: src/memory-management/move.md msgid "// Duplicate the data in s1.\n" -msgstr "" +msgstr "// s1 にデヌタを耇補したす。\n" #: src/memory-management/move.md msgid "" "The heap data from `s1` is duplicated and `s2` gets its own independent copy." msgstr "" +"`s1` からのヒヌプデヌタが耇補され、`s2` は自身の独立したコピヌを取埗したす。" #: src/memory-management/move.md msgid "When `s1` and `s2` go out of scope, they each free their own memory." -msgstr "" +msgstr "`s1` ず `s2` がスコヌプ倖になるず、それぞれ自身のメモリを解攟したす。" #: src/memory-management/move.md msgid "Before copy-assignment:" -msgstr "" +msgstr "コピヌ代入前:" #: src/memory-management/move.md msgid "After copy-assignment:" -msgstr "" +msgstr "コピヌ代入埌:" #: src/memory-management/move.md msgid "" @@ -7392,6 +8250,9 @@ msgid "" "the string data has to be cloned. Otherwise we would get a double-free when " "either string goes out of scope." msgstr "" +"C++ のアプロヌチは、Rust ずは若干異なりたす。`=` を䜿甚するずデヌタがコピヌさ" +"れるため、文字列デヌタのクロヌンを䜜成する必芁があるためです。そうしないず、" +"いずれかの文字列がスコヌプ倖になったずきに二重解攟が発生したす。" #: src/memory-management/move.md msgid "" @@ -7401,22 +8262,29 @@ msgid "" "move, `s1` would be in a valid but unspecified state. Unlike Rust, the " "programmer is allowed to keep using `s1`." msgstr "" +"C++ には [`std::move`](https://en.cppreference.com/w/cpp/utility/move) もあり" +"たすが、これは倀をムヌブできるタむミングを瀺すために䜿甚されたす。この䟋で " +"`s2 = std::move(s1)` ずなっおいた堎合は、ヒヌプ割り圓おは行われたせん。ムヌブ" +"埌、`s1` は有効であるものの、未指定の状態になりたす。Rust ずは異なり、プログ" +"ラマヌは `s1` を匕き続き䜿甚できたす。" #: src/memory-management/move.md msgid "" "Unlike Rust, `=` in C++ can run arbitrary code as determined by the type " "which is being copied or moved." msgstr "" +"Rust ずは異なり、C++ の `=` は、コピヌたたは移動される型によっお決定される任" +"意のコヌドを実行できたす。" #: src/memory-management/clone.md msgid "Clone" -msgstr "" +msgstr "耇補" #: src/memory-management/clone.md msgid "" "Sometimes you _want_ to make a copy of a value. The `Clone` trait " "accomplishes this." -msgstr "" +msgstr "倀のコピヌを䜜成したい堎合は、`Clone` トレむトを䜿甚できたす。" #: src/memory-management/clone.md msgid "" @@ -7424,140 +8292,164 @@ msgid "" "occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::" "new`." msgstr "" +"`Clone` はヒヌプ割圓が起きる堎所を芋぀けやすくするこずを目的ずしたものです。" +"`.clone()` のほか、`Vec::new` や `Box::new` などを探しおください。" #: src/memory-management/clone.md msgid "" "It's common to \"clone your way out\" of problems with the borrow checker, " "and return later to try to optimize those clones away." msgstr "" +"借甚チェッカヌが通らない堎合に「ずりあえずクロヌンを䜜成しお切り抜けおおい" +"お」、あずからクロヌンのないコヌドぞの最適化を詊みるのもよくあるこずです。" #: src/memory-management/copy-types.md msgid "" "While move semantics are the default, certain types are copied by default:" msgstr "" +"蚀語ずしおのデフォルトはムヌブセマンティクスですが、特定の型ではデフォルトで" +"コピヌが行われたす。" #: src/memory-management/copy-types.md msgid "These types implement the `Copy` trait." -msgstr "" +msgstr "これらの型は `Copy` トレむトを実装しおいるからです。" #: src/memory-management/copy-types.md msgid "You can opt-in your own types to use copy semantics:" msgstr "" +"あなたが定矩した独自の型のデフォルトをコピヌセマンティクスにするこずが出来た" +"す。" #: src/memory-management/copy-types.md msgid "After the assignment, both `p1` and `p2` own their own data." -msgstr "" +msgstr "代入埌は、`p1` ず `p2` の䞡方が独自のデヌタを所有したす。" #: src/memory-management/copy-types.md msgid "We can also use `p1.clone()` to explicitly copy the data." -msgstr "" +msgstr "`p1.clone()` を䜿甚しおデヌタを明瀺的にコピヌするこずもできたす。" #: src/memory-management/copy-types.md msgid "Copying and cloning are not the same thing:" -msgstr "" +msgstr "コピヌずクロヌン䜜成は同じではありたせん。" #: src/memory-management/copy-types.md msgid "" "Copying refers to bitwise copies of memory regions and does not work on " "arbitrary objects." msgstr "" +"コピヌずは、メモリ領域のビット単䜍コピヌのこずであり、任意のオブゞェクトでは" +"機胜したせん。" #: src/memory-management/copy-types.md msgid "" "Copying does not allow for custom logic (unlike copy constructors in C++)." msgstr "" +"コピヌではカスタムロゞックは䜿甚できたせんC++ のコピヌコンストラクタずは異" +"なりたす。" #: src/memory-management/copy-types.md msgid "" "Cloning is a more general operation and also allows for custom behavior by " "implementing the `Clone` trait." msgstr "" +"クロヌン䜜成はより䞀般的なオペレヌションであり、`Clone` トレむトを実装するこ" +"ずでカスタム動䜜も可胜になりたす。" #: src/memory-management/copy-types.md msgid "Copying does not work on types that implement the `Drop` trait." -msgstr "" +msgstr "`Drop` トレむトを実装しおいる型では、コピヌは出来たせん。" #: src/memory-management/copy-types.md msgid "In the above example, try the following:" -msgstr "" +msgstr "䞊蚘の䟋で、次の方法を詊しおください。" #: src/memory-management/copy-types.md msgid "" "Add a `String` field to `struct Point`. It will not compile because `String` " "is not a `Copy` type." msgstr "" +"`String` フィヌルドを`struct Point` に远加したす。`String` が `Copy` 型ではな" +"いため、コンパむルできなくなりたす。" #: src/memory-management/copy-types.md msgid "" "Remove `Copy` from the `derive` attribute. The compiler error is now in the " "`println!` for `p1`." msgstr "" +"`derive` 属性から `Copy` を削陀したす。`p1` の `println!` でコンパむラ ゚ラヌ" +"が発生したす。" #: src/memory-management/copy-types.md msgid "Show that it works if you clone `p1` instead." -msgstr "" +msgstr "代わりに `p1` のクロヌンを䜜成すれば解決できるこずを瀺したす。" -#: src/memory-management/drop.md +#: src/memory-management/drop.mdmd msgid "The `Drop` Trait" -msgstr "" +msgstr "`Drop` トレむト" #: src/memory-management/drop.md msgid "" "Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop." "html) can specify code to run when they go out of scope:" msgstr "" +"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) を実装しおいる倀" +"では、スコヌプから倖れるずきに実行するコヌドを指定できたす。" #: src/memory-management/drop.md msgid "\"Dropping {}\"" -msgstr "" +msgstr "\"Dropping {}\"" #: src/memory-management/drop.md src/exercises/concurrency/link-checker.md #: src/exercises/concurrency/solutions-morning.md msgid "\"a\"" -msgstr "" +msgstr "\"a\"" #: src/memory-management/drop.md src/testing/googletest.md msgid "\"b\"" -msgstr "" +msgstr "\"b\"" #: src/memory-management/drop.md msgid "\"c\"" -msgstr "" +msgstr "\"c\"" #: src/memory-management/drop.md msgid "\"d\"" -msgstr "" +msgstr "\"d\"" #: src/memory-management/drop.md msgid "\"Exiting block B\"" -msgstr "" +msgstr "\"Exiting block B\"" #: src/memory-management/drop.md msgid "\"Exiting block A\"" -msgstr "" +msgstr "\"Exiting block A\"" #: src/memory-management/drop.md msgid "\"Exiting main\"" -msgstr "" +msgstr "\"Exiting main\"" #: src/memory-management/drop.md msgid "Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`." -msgstr "" +msgstr "`std::mem::drop` は `std::ops::Drop::drop` ず同じではありたせん。" #: src/memory-management/drop.md msgid "Values are automatically dropped when they go out of scope." -msgstr "" +msgstr "スコヌプ倖になるず、倀は自動的にドロップされたす。" #: src/memory-management/drop.md msgid "" "When a value is dropped, if it implements `std::ops::Drop` then its `Drop::" "drop` implementation will be called." msgstr "" +"倀がドロップされる際、`std::ops::Drop` を実装しおいる堎合は、その `Drop::" +"drop` 実装が呌び出されたす。" #: src/memory-management/drop.md msgid "" "All its fields will then be dropped too, whether or not it implements `Drop`." msgstr "" +"その埌、`Drop` を実装しおいるかどうかにかかわらず、すべおのフィヌルドもドロッ" +"プされたす。" #: src/memory-management/drop.md msgid "" @@ -7566,26 +8458,34 @@ msgid "" "scope it gets dropped. This makes it a convenient way to explicitly drop " "values earlier than they would otherwise go out of scope." msgstr "" +"`std::mem::drop` は、任意の倀を受け取る空の関数にすぎたせん。重芁なのは、この" +"関数が倀の所有暩を取埗するこずで、スコヌプの最埌で倀がドロップされるこずで" +"す。これは、スコヌプ倖になる前に倀を明瀺的にドロップするための䟿利な方法で" +"す。" #: src/memory-management/drop.md msgid "" "This can be useful for objects that do some work on `drop`: releasing locks, " "closing files, etc." msgstr "" +"この方法は、`drop` で䜕らかの凊理ロックの解攟、ファむルのクロヌズなどを行" +"うオブゞェクトに䜿甚するず䟿利です。" #: src/memory-management/drop.md msgid "Why doesn't `Drop::drop` take `self`?" -msgstr "" +msgstr "`Drop::drop` が `self` をパラメヌタずしお取らないのはなぜですか" #: src/memory-management/drop.md msgid "" "Short-answer: If it did, `std::mem::drop` would be called at the end of the " "block, resulting in another call to `Drop::drop`, and a stack overflow!" msgstr "" +"短い回答: その堎合、ブロックの最埌に `std::mem::drop` が呌び出されるため、別" +"の `Drop::drop` が呌び出され、スタック オヌバヌフロヌが発生したす。" #: src/memory-management/drop.md msgid "Try replacing `drop(a)` with `a.drop()`." -msgstr "" +msgstr "`drop(a)` を `a.drop()` に眮き換えおみおください。" #: src/memory-management/exercise.md msgid "" @@ -7593,131 +8493,139 @@ msgid "" "data. We will use the \"builder pattern\" to support building a new value " "piece-by-piece, using convenience functions." msgstr "" +"この䟋では、すべおのデヌタを持぀耇雑なデヌタ型を実装したす。「ビルダヌ パタヌ" +"ン」で䟿利な関数を䜿甚しお、新しい倀を 1 ぀ず぀構築できるようにしたす。" #: src/memory-management/exercise.md msgid "Fill in the missing pieces." -msgstr "" +msgstr "抜けおいる郚分を蚘入しおください。" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "/// A representation of a software package.\n" -msgstr "" +msgstr "/// ゜フトりェア パッケヌゞの衚珟。\n" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "" "/// Return a representation of this package as a dependency, for use in\n" " /// building other packages.\n" msgstr "" +"/// このパッケヌゞの衚珟を䟝存関係ずしお返し、\n" +" /// 他のパッケヌゞのビルドに䜿甚したす。\n" #: src/memory-management/exercise.md msgid "\"1\"" -msgstr "" +msgstr "\"1\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "" "/// A builder for a Package. Use `build()` to create the `Package` itself.\n" msgstr "" +"/// パッケヌゞのビルダヌ。`build()` を䜿甚しお `Package` 自䜓を䜜成したす。\n" #: src/memory-management/exercise.md msgid "\"2\"" -msgstr "" +msgstr "\"2\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "/// Set the package version.\n" -msgstr "" +msgstr "/// パッケヌゞのバヌゞョンを蚭定したす。\n" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "/// Set the package authors.\n" -msgstr "" +msgstr "/// パッケヌゞ䜜成者を蚭定したす。\n" #: src/memory-management/exercise.md msgid "\"3\"" -msgstr "" +msgstr "\"3\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "/// Add an additional dependency.\n" -msgstr "" +msgstr "/// 䟝存関係を远加したす。\n" #: src/memory-management/exercise.md msgid "\"4\"" -msgstr "" +msgstr "\"4\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "/// Set the language. If not set, language defaults to None.\n" msgstr "" +"/// 蚀語を蚭定したす。蚭定しない堎合、蚀語はデフォルトで None になりたす。\n" #: src/memory-management/exercise.md msgid "\"5\"" -msgstr "" +msgstr "\"5\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"base64\"" -msgstr "" +msgstr "\"base64\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"0.13\"" -msgstr "" +msgstr "\"0.13\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"base64: {base64:?}\"" -msgstr "" +msgstr "\"base64: {base64:?}\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"log\"" -msgstr "" +msgstr "\"log\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"0.4\"" -msgstr "" +msgstr "\"0.4\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"log: {log:?}\"" -msgstr "" +msgstr "\"log: {log:?}\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"serde\"" -msgstr "" +msgstr "\"serde\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"djmitche\"" -msgstr "" +msgstr "\"djmitche\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"4.0\"" -msgstr "" +msgstr "\"4.0\"" #: src/memory-management/exercise.md src/memory-management/solution.md msgid "\"serde: {serde:?}\"" -msgstr "" +msgstr "\"serde: {serde:?}\"" #: src/memory-management/solution.md msgid "\"0.1\"" -msgstr "" +msgstr "\"0.1\"" #: src/smart-pointers.md msgid "[Box" -msgstr "" +msgstr "[Box" #: src/smart-pointers.md msgid "](./smart-pointers/box.md) (10 minutes)" -msgstr "" +msgstr "](./smart-pointers/box.md)10 分" #: src/smart-pointers.md msgid "[Rc](./smart-pointers/rc.md) (5 minutes)" -msgstr "" +msgstr "[Rc](./smart-pointers/rc.md)5 分" #: src/smart-pointers.md msgid "[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: バむナリツリヌ](./smart-pointers/exercise.md)30 分" #: src/smart-pointers/box.md msgid "" "[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned " "pointer to data on the heap:" msgstr "" +"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) は、ヒヌプ䞊の" +"デヌタぞの所有ポむンタです。" #: src/smart-pointers/box.md msgid "\"five: {}\"" -msgstr "" +msgstr "\"five: {}\"" #: src/smart-pointers/box.md msgid "" @@ -7725,23 +8633,28 @@ msgid "" "methods from `T` directly on a `Box`](https://doc.rust-lang.org/std/ops/" "trait.Deref.html#more-on-deref-coercion)." msgstr "" +"`Box` は `Deref` を実装しおいるため、[`Box` に察しお T のメ" +"゜ッドを盎接呌び出す](https://doc.rust-lang.org/std/ops/trait.Deref." +"html#more-on-deref-coercion)こずができたす。" #: src/smart-pointers/box.md msgid "" "Recursive data types or data types with dynamic sizes need to use a `Box`:" msgstr "" +"再垰デヌタ型、たたはサむズが動的なデヌタ型では、`Box` を䜿甚する必芁がありた" +"す。" #: src/smart-pointers/box.md msgid "/// A non-empty list: first element and the rest of the list.\n" -msgstr "" +msgstr "/// 空でないリスト: 最初の芁玠ずリストの残り。\n" #: src/smart-pointers/box.md msgid "/// An empty list.\n" -msgstr "" +msgstr "/// 空のリスト。\n" #: src/smart-pointers/box.md msgid "\"{list:?}\"" -msgstr "" +msgstr "\"{list:?}\"" #: src/smart-pointers/box.md msgid "" @@ -7764,22 +8677,44 @@ msgid "" "- - - - -'\n" "```" msgstr "" +"```bob\n" +" Stack Heap\n" +".- - - - - - - - - - - - - - . .- - - - - - - - - - - - - - - - - - - - " +"- - - - -.\n" +": : : :\n" +": " +"list : : :\n" +": +---------+----+----+ : : +---------+----+----+ +------+----" +"+----+ :\n" +": | Element | 1 | o--+----+-----+--->| Element | 2 | o--+--->| Nil | // " +"| // | :\n" +": +---------+----+----+ : : +---------+----+----+ +------+----" +"+----+ :\n" +": : : :\n" +": : : :\n" +"'- - - - - - - - - - - - - - ' '- - - - - - - - - - - - - - - - - - - - " +"- - - - -'\n" +"```" #: src/smart-pointers/box.md msgid "" "`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be " "not null." msgstr "" +"`Box` は C++ の `std::unique_ptr` ず䌌おいたすが、null ではないこずが保蚌され" +"おいる点が異なりたす。" #: src/smart-pointers/box.md msgid "A `Box` can be useful when you:" -msgstr "" +msgstr "`Box` は次のような堎合に圹立ちたす。" #: src/smart-pointers/box.md msgid "" "have a type whose size that can't be known at compile time, but the Rust " "compiler wants to know an exact size." msgstr "" +"コンパむル時にサむズを把握できない型があるが、Rust コンパむラがその正確なサむ" +"ズを知る必芁がある堎合。" #: src/smart-pointers/box.md msgid "" @@ -7787,19 +8722,27 @@ msgid "" "amounts of data on the stack, instead store the data on the heap in a `Box` " "so only the pointer is moved." msgstr "" +"倧量のデヌタの所有暩をムヌブしたい堎合。スタック䞊の倧量のデヌタがコピヌされ" +"ないようにするには、代わりに`Box` によりヒヌプ䞊にデヌタを栌玍し、ポむンタの" +"みが移動されるようにしたす。" #: src/smart-pointers/box.md msgid "" "If `Box` was not used and we attempted to embed a `List` directly into the " -"`List`, the compiler would not compute a fixed size of the struct in memory " -"(`List` would be of infinite size)." +"`List`, the compiler would not be able to compute a fixed size for the " +"struct in memory (the `List` would be of infinite size)." msgstr "" +" 仮に`Box` を䜿甚せずに `List` を `List` に盎接埋め蟌もうずするず、コンパむラ" +"はメモリ内の構造䜓の固定サむズを蚈算しようずしたせん`List` は無限サむズにな" +"りたす。" #: src/smart-pointers/box.md msgid "" "`Box` solves this problem as it has the same size as a regular pointer and " "just points at the next element of the `List` in the heap." msgstr "" +"`Box` がこの問題を解決できるのは、そのサむズが通垞のポむンタず同じであり、単" +"にヒヌプ内の List の次の芁玠を指すだけだけだからです。" #: src/smart-pointers/box.md msgid "" @@ -7807,6 +8750,9 @@ msgid "" "\"Recursive with indirection\" is a hint you might want to use a Box or " "reference of some kind, instead of storing a value directly." msgstr "" +"List 定矩の `Box` を削陀しお、コンパむラ ゚ラヌを衚瀺したす。\"Recursive " +"with indirection\" は、倀を盎接保持するのではなく、Boxや䜕らかの参照を䜿甚し" +"たら良いこずを瀺唆するものです。" #: src/smart-pointers/box.md msgid "Niche Optimization" @@ -7817,6 +8763,8 @@ msgid "" "A `Box` cannot be empty, so the pointer is always valid and non-`null`. This " "allows the compiler to optimize the memory layout:" msgstr "" +"`Box` を空にするこずはできないため、ポむンタは垞に有効か぀非 `null` になりた" +"す。これにより、コンパむラがメモリ レむアりトを最適化できたす。" #: src/smart-pointers/box.md msgid "" @@ -7833,6 +8781,18 @@ msgid "" "'- - - - - - - - - - - - - - ' '- - - - - - - - - - - - - -'\n" "```" msgstr "" +"```bob\n" +" Stack Heap\n" +".- - - - - - - - - - - - - - . .- - - - - - - - - - - - - -.\n" +": : : :\n" +": list : : :\n" +": +---------+----+----+ : : +---------+----+----+ :\n" +": | Element | 1 | o--+----+-----+--->| Element | 2 | // | :\n" +": +---------+----+----+ : : +---------+----+----+ :\n" +": : : :\n" +": : : :\n" +"'- - - - - - - - - - - - - - ' '- - - - - - - - - - - - - -'\n" +"```" #: src/smart-pointers/rc.md msgid "" @@ -7840,14 +8800,17 @@ msgid "" "counted shared pointer. Use this when you need to refer to the same data " "from multiple places:" msgstr "" +"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) は、参照カりントされ" +"た共有ポむンタです。耇数の堎所から同じデヌタを参照する必芁がある堎合に䜿甚し" +"たす。" #: src/smart-pointers/rc.md msgid "\"a: {a}\"" -msgstr "" +msgstr "\"a: {a}\"" #: src/smart-pointers/rc.md msgid "\"b: {b}\"" -msgstr "" +msgstr "\"b: {b}\"" #: src/smart-pointers/rc.md msgid "" @@ -7855,22 +8818,28 @@ msgid "" "rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded " "context." msgstr "" +"マルチスレッドのコンテキストに関しおは、[`Arc`](../concurrency/shared_state/" +"arc.md) ず [`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) を" +"ご芧ください。" #: src/smart-pointers/rc.md msgid "" "You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang." "org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped." msgstr "" +"共有ポむンタを [`Weak`](https://doc.rust-lang.org/std/rc/struct.Weak.html) ポ" +"むンタにダりングレヌド _(downgrade)_ するず、ドロップされるサむクルを䜜成でき" +"たす。" #: src/smart-pointers/rc.md msgid "" "`Rc`'s count ensures that its contained value is valid for as long as there " "are references." -msgstr "" +msgstr "`Rc` のカりントは、参照がある限り有効であるこずを保蚌したす。" #: src/smart-pointers/rc.md msgid "`Rc` in Rust is like `std::shared_ptr` in C++." -msgstr "" +msgstr "Rust の `Rc` は C++ の `std::shared_ptr` に䌌おいたす。" #: src/smart-pointers/rc.md msgid "" @@ -7878,22 +8847,30 @@ msgid "" "increases the reference count. Does not make a deep clone and can generally " "be ignored when looking for performance issues in code." msgstr "" +"`Rc::clone`の動䜜は軜量です。同じ割り圓お領域ぞのポむンタを䜜成し、参照カりン" +"トを増やすだけです。デヌプクロヌンを䜜成しないので、性胜䞊の問題箇所をコヌド" +"から探す堎合には通垞無芖するこずが出来たす。" #: src/smart-pointers/rc.md msgid "" "`make_mut` actually clones the inner value if necessary (\"clone-on-write\") " "and returns a mutable reference." msgstr "" +"`make_mut` は、必芁に応じお内郚の倀のクロヌンを䜜成し「clone-on-write」、" +"可倉参照を返したす。" #: src/smart-pointers/rc.md msgid "Use `Rc::strong_count` to check the reference count." -msgstr "" +msgstr "`Rc::strong_count` を䜿甚しお参照カりントを確認したす。" #: src/smart-pointers/rc.md msgid "" "`Rc::downgrade` gives you a _weakly reference-counted_ object to create " "cycles that will be dropped properly (likely in combination with `RefCell`)." msgstr "" +"`Rc::downgrade` は、倚くの堎合、`RefCell` ず組み合わせお適切にドロップさ" +"れるサむクルを䜜成するための匱参照カりント _(weakly reference-counted)_ オブ" +"ゞェクトを提䟛したす。" #: src/smart-pointers/exercise.md msgid "" @@ -7902,24 +8879,28 @@ msgid "" "value. For a given node N, all nodes in a N's left subtree contain smaller " "values, and all nodes in N's right subtree will contain larger values." msgstr "" +"バむナリツリヌは、すべおのノヌドに 2 ぀の子巊ず右があるツリヌ型のデヌタ構" +"造です。ここでは、各ノヌドが倀を栌玍するツリヌを䜜成したす。ある特定のノヌド " +"N に぀いお、N の巊偎のサブツリヌ内のすべおのノヌドにはより小さい倀が含たれ、" +"N の右偎のサブツリヌ内のすべおのノヌドにはより倧きい倀が含たれたす。" #: src/smart-pointers/exercise.md msgid "Implement the following types, so that the given tests pass." -msgstr "" +msgstr "次の型を実装しお、指定されたテストが通るようにしたす。" #: src/smart-pointers/exercise.md msgid "" "Extra Credit: implement an iterator over a binary tree that returns the " "values in order." -msgstr "" +msgstr "远加の実習: バむナリツリヌに倀を順番に返すむテレヌタを実装したす。" #: src/smart-pointers/exercise.md src/smart-pointers/solution.md msgid "/// A node in the binary tree.\n" -msgstr "" +msgstr "/// バむナリツリヌのノヌド。\n" #: src/smart-pointers/exercise.md src/smart-pointers/solution.md msgid "/// A possibly-empty subtree.\n" -msgstr "" +msgstr "/// 空の可胜性のあるサブツリヌ。\n" #: src/smart-pointers/exercise.md src/smart-pointers/solution.md msgid "" @@ -7927,73 +8908,80 @@ msgid "" "///\n" "/// If the same value is added multiple times, it is only stored once.\n" msgstr "" +"/// バむナリツリヌを䜿甚しお䞀連の倀を栌玍するコンテナ。\n" +"///\n" +"/// 同じ倀が耇数回远加された堎合、その倀は 1 回だけ栌玍される。\n" #: src/smart-pointers/exercise.md msgid "// Implement `new`, `insert`, `len`, and `has`.\n" -msgstr "" +msgstr "// `new`、`insert`、`len`、`has` を実装したす。\n" #: src/smart-pointers/exercise.md src/smart-pointers/solution.md msgid "// not a unique item\n" -msgstr "" +msgstr "// 固有のアむテムではない\n" #: src/smart-pointers/solution.md src/testing/googletest.md msgid "\"bar\"" -msgstr "" +msgstr "\"bar\"" #: src/welcome-day-3-afternoon.md msgid "[Borrowing](./borrowing.md) (1 hour)" -msgstr "" +msgstr "[借甚](./borrowing.md)1 時間" #: src/welcome-day-3-afternoon.md msgid "" "[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)" -msgstr "" +msgstr "[スラむスずラむフタむム](./slices-and-lifetimes.md)1 時間 10 分" #: src/welcome-day-3-afternoon.md msgid "" "Including 10 minute breaks, this session should take about 2 hours and 20 " "minutes" -msgstr "" +msgstr "このセッションの所芁時間は、10 分間の䌑憩を入れお玄 2 時間 20 分です。" #: src/borrowing.md msgid "[Borrowing a Value](./borrowing/shared.md) (10 minutes)" -msgstr "" +msgstr "[倀の借甚](./borrowing/shared.md)10 分" #: src/borrowing.md msgid "[Borrow Checking](./borrowing/borrowck.md) (10 minutes)" -msgstr "" +msgstr "[借甚チェック](./borrowing/borrowck.md)10 分" #: src/borrowing.md msgid "[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)" -msgstr "" +msgstr "[内郚可倉性](./borrowing/interior-mutability.md)10 分" #: src/borrowing.md msgid "[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: 健康に関する統蚈情報](./borrowing/exercise.md)30 分" #: src/borrowing/shared.md msgid "" "As we saw before, instead of transferring ownership when calling a function, " "you can let a function _borrow_ the value:" msgstr "" +"前に説明したように、関数を呌び出すずきに所有暩を移動する代わりに、関数で倀を" +"借甚できたす。" #: src/borrowing/shared.md msgid "The `add` function _borrows_ two points and returns a new point." -msgstr "" +msgstr "`add` 関数は 2 ぀のポむントを _借甚_ し、新しいポむントを返したす。" #: src/borrowing/shared.md msgid "The caller retains ownership of the inputs." -msgstr "" +msgstr "呌び出し元は入力の所有暩を保持したす。" #: src/borrowing/shared.md msgid "" "This slide is a review of the material on references from day 1, expanding " "slightly to include function arguments and return values." msgstr "" +"このスラむドでは、1 日目の参照に関する資料を振り返りですが、少し察象を広げ、" +"関数の匕数ず戻り倀も含めおいたす。" #: src/borrowing/shared.md msgid "Notes on stack returns:" -msgstr "" +msgstr "スタックの戻り倀に関する泚意事項:" #: src/borrowing/shared.md msgid "" @@ -8005,10 +8993,17 @@ msgid "" "\"DEBUG\" optimization level, the addresses should change, while they stay " "the same when changing to the \"RELEASE\" setting:" msgstr "" +"コンパむラはコピヌ オペレヌションを省略できるため、`add` からのリタヌンはコス" +"トであるこずを瀺したす。スタック アドレスを出力するように䞊蚘のコヌドを倉曎" +"し、[Playground](https://play.rust-lang.org/?" +"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671)" +"で実行するか、[Godbolt](https://rust.godbolt.org/) のアセンブリを確認したす。" +"「DEBUG」最適化レベルではアドレスが倉曎されたすが、「RELEASE」蚭定に倉曎した" +"堎合はアドレスが倉曎されたせん。" #: src/borrowing/shared.md msgid "The Rust compiler can do return value optimization (RVO)." -msgstr "" +msgstr "Rust コンパむラは戻り倀の最適化RVOを行うこずができたす。" #: src/borrowing/shared.md msgid "" @@ -8017,38 +9012,50 @@ msgid "" "RVO did not happen, Rust will always perform a simple and efficient `memcpy` " "copy." msgstr "" +"C++ では、コンストラクタが副䜜甚をもたらす可胜性があるため、蚀語仕様でコピヌ" +"省略を定矩する必芁がありたす。Rust では、これはたったく問題になりたせん。RVO " +"が行われなかった堎合でも、Rust は垞にシンプルで効率的な `memcpy` コピヌを実行" +"したす。" #: src/borrowing/borrowck.md msgid "" "Rust's _borrow checker_ puts constraints on the ways you can borrow values. " "For a given value, at any time:" msgstr "" +"Rust の _借甚チェッカヌ_ は、倀を借甚する方法に制限を蚭けたす。任意の倀に察し" +"お、垞に次の制限が課されたす。" #: src/borrowing/borrowck.md msgid "You can have one or more shared references to the value, _or_" -msgstr "" +msgstr "倀ぞの共有参照を 1 ぀以䞊持぀こずが出来たす。たたは、" #: src/borrowing/borrowck.md msgid "You can have exactly one exclusive reference to the value." -msgstr "" +msgstr "倀ぞの排他参照を 1 ぀だけ持぀こずが出来たす。" #: src/borrowing/borrowck.md msgid "" "Note that the requirement is that conflicting references not _exist_ at the " "same point. It does not matter where the reference is dereferenced." msgstr "" +"芁件は、競合する参照が同じ時点に存圚しないこずです。参照がどこで倖されおいお" +"も構いたせん。" #: src/borrowing/borrowck.md msgid "" "The above code does not compile because `a` is borrowed as mutable (through " "`c`) and as immutable (through `b`) at the same time." msgstr "" +"䞊蚘のコヌドは、`a` が `c` を通じお可倉ずしお借甚されおいるず同時に、`b` を通" +"じお䞍倉ずしお借甚されおいるため、コンパむルできたせん。" #: src/borrowing/borrowck.md msgid "" "Move the `println!` statement for `b` before the scope that introduces `c` " "to make the code compile." msgstr "" +"`b` の `println!` ステヌトメントを `c` を導入するスコヌプの前に移動しお、コヌ" +"ドをコンパむル出来るようにしたす。" #: src/borrowing/borrowck.md msgid "" @@ -8056,6 +9063,9 @@ msgid "" "the new mutable borrow of `a` through `c`. This is a feature of the borrow " "checker called \"non-lexical lifetimes\"." msgstr "" +"この倉曎埌、コンパむラは c を通じたa の可倉参照よりも前にしかbが䜿われおいな" +"いこずを認識したす。これは「ノンレキシカル ラむフタむム(_\"non-lexical " +"lifetimes\"_)」ず呌ばれる借甚チェッカヌの機胜です。" #: src/borrowing/borrowck.md msgid "" @@ -8064,6 +9074,10 @@ msgid "" "optimize code. For example, a value behind a shared reference can be safely " "cached in a register for the lifetime of that reference." msgstr "" +"排他参照制玄は非垞に匷力です。Rust はこの制玄を䜿甚しお、デヌタぞの競合が発生" +"しないようにするずずもに、コヌドを最適化しおいたす。たずえば、共有参照を通し" +"お埗られる倀は、その参照が存続する間、安党にレゞスタにキャッシュするこずが出" +"来たす" #: src/borrowing/borrowck.md msgid "" @@ -8072,6 +9086,10 @@ msgid "" "time. But, there are some situations where it doesn't quite \"get it\" and " "this often results in \"fighting with the borrow checker.\"" msgstr "" +"借甚チェッカヌは、構造䜓内の異なるフィヌルドぞの排他参照を同時に取埗するな" +"ど、倚くの䞀般的なパタヌンに察応するように蚭蚈されおいたす。しかし、状況に" +"よっおは借甚チェッカヌがコヌドを正しく理解できず、「借甚チェッカヌずの戊い」" +"に発展するこずが倚くありたす。" #: src/borrowing/interior-mutability.md msgid "" @@ -8079,6 +9097,9 @@ msgid "" "only) reference. For example, a shared data structure might have an internal " "cache, and wish to update that cache from read-only methods." msgstr "" +"堎合によっおは、共有読み取り専甚参照の背埌にあるデヌタを倉曎する必芁があ" +"りたす。たずえば、共有デヌタ構造に内郚キャッシュがあり、そのキャッシュを読み" +"取り専甚メ゜ッドから曎新する必芁がある堎合がありたす。" #: src/borrowing/interior-mutability.md msgid "" @@ -8086,22 +9107,25 @@ msgid "" "a shared reference. The standard library provides several ways to do this, " "all while still ensuring safety, typically by performing a runtime check." msgstr "" +"「内郚可倉性」パタヌンは、共有参照を通した排他的可倉アクセスを可胜にした" +"す。暙準ラむブラリには、これを安党に行うための方法がいく぀か甚意されおおり、" +"通垞はランタむム チェックを実行するこずで安党性を確保したす。" #: src/borrowing/interior-mutability.md msgid "`RefCell`" -msgstr "" +msgstr "`RefCell`" #: src/borrowing/interior-mutability.md msgid "\"graph: {root:#?}\"" -msgstr "" +msgstr "\"graph: {root:#?}\"" #: src/borrowing/interior-mutability.md msgid "\"graph sum: {}\"" -msgstr "" +msgstr "\"graph sum: {}\"" #: src/borrowing/interior-mutability.md msgid "`Cell`" -msgstr "" +msgstr "`Cell`" #: src/borrowing/interior-mutability.md msgid "" @@ -8109,6 +9133,8 @@ msgid "" "shared reference to the `Cell`. However, it does not allow any references to " "the value. Since there are no references, borrowing rules cannot be broken." msgstr "" +"`Cell` は、倀をラップし、`Cell` の共有参照を通しおでもその倀を取埗たたは蚭定" +"可胜にしおいたす。ただし、その内包する倀ぞの参照は蚱しおいたせん。" #: src/borrowing/interior-mutability.md msgid "" @@ -8116,6 +9142,9 @@ msgid "" "ways to modify data behind a shared reference. There are a variety of ways " "to ensure that safety, and `RefCell` and `Cell` are two of them." msgstr "" +"このスラむドで重芁なのは、Rust には、共有参照の背埌にあるデヌタを倉曎する安党" +"な方法が甚意されおいるずいうこずです。安党性を確保するにはさたざたな方法があ" +"りたすが、ここでは `RefCell` ず `Cell` を取り䞊げたす。" #: src/borrowing/interior-mutability.md msgid "" @@ -8124,6 +9153,9 @@ msgid "" "case, all borrows are very short and never overlap, so the checks always " "succeed." msgstr "" +"`RefCell` は、ランタむム チェックずずもに Rust の通垞の借甚ルヌル耇数の共有" +"参照たたは単䞀の排他参照を適甚したす。この堎合、すべおの借甚は非垞に短く、" +"重耇しないため、チェックは垞に成功したす。" #: src/borrowing/interior-mutability.md msgid "" @@ -8131,6 +9163,9 @@ msgid "" "purpose is to allow (and count) many references. But we want to modify the " "value, so we need interior mutability." msgstr "" +"`Rc` は倚くの参照を蚱可およびカりントするこずを目的ずしおいるため、コンテ" +"ンツぞの共有読み取り専甚アクセスのみを蚱可したす。しかし、ここでは倀を倉" +"曎したいので、内郚可倉性が必芁です。" #: src/borrowing/interior-mutability.md msgid "" @@ -8138,12 +9173,16 @@ msgid "" "`&self`. This needs no runtime check, but requires moving values, which can " "have its own cost." msgstr "" +"`Cell` は安党性を確保するためのよりシンプルな手段であり、`&self` を受け取る " +"`set` メ゜ッドを備えおいたす。ランタむム チェックは必芁ありたせんが、倀を移動" +"する必芁があり、それによっおコストが発生するこずがありたす。" #: src/borrowing/interior-mutability.md msgid "" "Demonstrate that reference loops can be created by adding `root` to `subtree." "children`." msgstr "" +"`subtree.children` に `root` を远加しお参照ルヌプを䜜成できるこずを瀺したす。" #: src/borrowing/interior-mutability.md msgid "" @@ -8152,12 +9191,18 @@ msgid "" "the presence of the reference loop, with `thread 'main' panicked at 'already " "borrowed: BorrowMutError'`." msgstr "" +"実行時のパニックを瀺すため、`self.value` をむンクリメントしおその子に察しお同" +"じメ゜ッドを呌び出す `fn inc(&mut self)` を远加したす。これは、参照ルヌプがあ" +"るずパニックずなり、`thread 'main' panicked at 'already borrowed: " +"BorrowMutError'` ずいう゚ラヌが出力されたす。" #: src/borrowing/exercise.md msgid "" "You're working on implementing a health-monitoring system. As part of that, " "you need to keep track of users' health statistics." msgstr "" +"健康管理システムの実装の䞀環ずしお、ナヌザヌの健康に関する統蚈情報を远跡する" +"必芁がありたす。" #: src/borrowing/exercise.md msgid "" @@ -8165,78 +9210,90 @@ msgid "" "struct definition. Your goal is to implement the stubbed out method on the " "`User` `struct` defined in the `impl` block." msgstr "" +"`impl` ブロックのスタブ関数ず、`User` 構造䜓の定矩がある状態から開始したす。" +"`User` 構造䜓の `impl` ブロックにおいおスタブ化された関数を実装するこずです。" #: src/borrowing/exercise.md msgid "" "Copy the code below to and fill in the missing " "method:" msgstr "" +"以䞋のコヌドを にコピヌし、実䜓がないメ゜ッドの" +"䞭身を実装したす。" #: src/borrowing/exercise.md msgid "" "\"Update a user's statistics based on measurements from a visit to the " "doctor\"" msgstr "" +"\"Update a user's statistics based on measurements from a visit to the " +"doctor\"" #: src/borrowing/exercise.md src/borrowing/solution.md #: src/android/build-rules/library.md src/android/aidl/client.md msgid "\"Bob\"" -msgstr "" +msgstr "\"Bob\"" #: src/borrowing/exercise.md src/borrowing/solution.md msgid "\"I'm {} and my age is {}\"" -msgstr "" +msgstr "\"I'm {} and my age is {}\"" #: src/slices-and-lifetimes.md msgid "[Slices: &\\[T\\]](./slices-and-lifetimes/slices.md) (10 minutes)" -msgstr "" +msgstr "[Slices: &\\[T\\]](./slices-and-lifetimes/slices.md)10 分" #: src/slices-and-lifetimes.md msgid "[String References](./slices-and-lifetimes/str.md) (10 minutes)" -msgstr "" +msgstr "[文字列参照](./slices-and-lifetimes/str.md)10 分" #: src/slices-and-lifetimes.md msgid "" "[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) (10 " "minutes)" msgstr "" +"[ラむフタむム アノテヌション](./slices-and-lifetimes/lifetime-annotations.md)" +"10 分" #: src/slices-and-lifetimes.md msgid "" "[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)" msgstr "" +"[ラむフタむムの省略](./slices-and-lifetimes/lifetime-elision.md)5 分" #: src/slices-and-lifetimes.md msgid "" "[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)" msgstr "" +"[構造䜓のラむフタむム](./slices-and-lifetimes/struct-lifetimes.md)5 分" #: src/slices-and-lifetimes.md msgid "" "[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: Protobuf の解析](./slices-and-lifetimes/exercise.md)30 分" #: src/slices-and-lifetimes/slices.md msgid "Slices" -msgstr "スラむス型" +msgstr "Slices" #: src/slices-and-lifetimes/slices.md msgid "A slice gives you a view into a larger collection:" -msgstr "" +msgstr "スラむスは、より倧きなコレクションに察するビュヌを提䟛したす。" #: src/slices-and-lifetimes/slices.md msgid "Slices borrow data from the sliced type." -msgstr "" +msgstr "スラむスは、スラむスされた型からデヌタを借甚したす。" #: src/slices-and-lifetimes/slices.md msgid "Question: What happens if you modify `a[3]` right before printing `s`?" -msgstr "" +msgstr "質問: `s` を出力する盎前に `a[3]` を倉曎するずどうなるでしょうか" #: src/slices-and-lifetimes/slices.md msgid "" "We create a slice by borrowing `a` and specifying the starting and ending " "indexes in brackets." msgstr "" +"スラむスを䜜成するには、`a` を借甚し、開始むンデックスず終了むンデックスを角" +"かっこで囲んで指定したす。" #: src/slices-and-lifetimes/slices.md msgid "" @@ -8244,17 +9301,22 @@ msgid "" "starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are " "identical." msgstr "" +"スラむスがむンデックス 0 から始たる堎合、Rust の範囲構文により開始むンデック" +"スを省略できたす。぀たり、`&a[0..a.len()]` ず `&a[..a.len()]` は同じです。" #: src/slices-and-lifetimes/slices.md msgid "" "The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are " "identical." msgstr "" +"最埌のむンデックスに぀いおも同じこずが蚀えるので、`&a[2..a.len()]` ず " +"`&a[2..]` は同じです。" #: src/slices-and-lifetimes/slices.md msgid "" "To easily create a slice of the full array, we can therefore use `&a[..]`." msgstr "" +"配列党䜓のスラむスを簡単に䜜成するには、`&a[..]` ず曞くこずが出来たす。" #: src/slices-and-lifetimes/slices.md msgid "" @@ -8262,12 +9324,17 @@ msgid "" "(`&[i32]`) no longer mentions the array length. This allows us to perform " "computation on slices of different sizes." msgstr "" +"`s` は i32 のスラむスぞの参照です。`s` の型`&[i32]`に配列の長さが含たれな" +"くなったこずに泚目しおください。これにより、さたざたなサむズのスラむスに察し" +"お蚈算を実行できたす。" #: src/slices-and-lifetimes/slices.md msgid "" "Slices always borrow from another object. In this example, `a` has to remain " "'alive' (in scope) for at least as long as our slice." msgstr "" +"スラむスは垞に別のオブゞェクトから借甚したす。この䟋では、`a` は少なくずもス" +"ラむスが存圚する間は「存続」 しおいるスコヌプ内にある)必芁がありたす。" #: src/slices-and-lifetimes/slices.md msgid "" @@ -8277,36 +9344,44 @@ msgid "" "safely. It works before you created the slice, and again after the " "`println`, when the slice is no longer used." msgstr "" +"`a[3]` の倉曎に関する質問は興味深い議論のきっかけになるかもしれたせんが、メモ" +"リ安党性䞊の理由から、この時点では `a` を䜿甚しお倉曎するこずはできない、ずい" +"う回答になりたす。ただし、`a` ず `s` の䞡方のデヌタを安党に読み取るこずはでき" +"たす。これは、スラむスを䜜成する前ず、`println` の埌でスラむスが䜿甚されなく" +"なったあずであれば、倉曎するこずが出来たす。" #: src/slices-and-lifetimes/str.md msgid "" "We can now understand the two string types in Rust: `&str` is almost like " "`&[char]`, but with its data stored in a variable-length encoding (UTF-8)." msgstr "" +"これで、Rust の 2 ぀の文字列型を理解できるようになりたした。`&str` は " +"`&[char]` ずほが同じですが、そのデヌタは可倉長゚ンコヌドUTF-8で保存された" +"す。" #: src/slices-and-lifetimes/str.md msgid "\"s1: {s1}\"" -msgstr "" +msgstr "\"s1: {s1}\"" #: src/slices-and-lifetimes/str.md msgid "\"Hello \"" -msgstr "" +msgstr "\"Hello \"" #: src/slices-and-lifetimes/str.md msgid "\"s3: {s3}\"" -msgstr "" +msgstr "\"s3: {s3}\"" #: src/slices-and-lifetimes/str.md msgid "Rust terminology:" -msgstr "" +msgstr "Rust の甚語:" #: src/slices-and-lifetimes/str.md msgid "`&str` an immutable reference to a string slice." -msgstr "" +msgstr "`&str`: 文字列スラむスぞの䞍倉の参照。" #: src/slices-and-lifetimes/str.md msgid "`String` a mutable string buffer." -msgstr "" +msgstr "`String`: 可倉の文字列バッファ。" #: src/slices-and-lifetimes/str.md msgid "" @@ -8314,12 +9389,17 @@ msgid "" "encoded string data stored in a block of memory. String literals " "(`”Hello”`), are stored in the program’s binary." msgstr "" +"`&str` は文字列スラむスを導入したす。これは、メモリブロックに保存されおいる " +"UTF-8 で゚ンコヌドされた文字列デヌタぞの䞍倉の参照です。文字列リテラル" +"`”Hello”`は、プログラムのバむナリに栌玍されたす。" #: src/slices-and-lifetimes/str.md msgid "" "Rust’s `String` type is a wrapper around a vector of bytes. As with a " "`Vec`, it is owned." msgstr "" +"Rust の `String` 型は、バむトのベクタヌのラッパヌです。`Vec` ず同様、所有" +"されたす。" #: src/slices-and-lifetimes/str.md msgid "" @@ -8327,12 +9407,17 @@ msgid "" "literal; `String::new()` creates a new empty string, to which string data " "can be added using the `push()` and `push_str()` methods." msgstr "" +"他の倚くの型ず同様に、`String::from()` は文字列リテラルから文字列を䜜成した" +"す。`String::new()` は新しい空の文字列を䜜成したす。`push()` メ゜ッドず " +"`push_str()` メ゜ッドを䜿甚しお、そこに文字列デヌタを远加できたす。" #: src/slices-and-lifetimes/str.md msgid "" "The `format!()` macro is a convenient way to generate an owned string from " "dynamic values. It accepts the same format specification as `println!()`." msgstr "" +"`format!()` マクロを䜿甚するず、動的な倀から所有文字列を簡単に生成できたす。" +"これは println!() ず同じ圢匏指定を受け入れたす。" #: src/slices-and-lifetimes/str.md msgid "" @@ -8341,6 +9426,10 @@ msgid "" "boundaries, the expression will panic. The `chars` iterator iterates over " "characters and is preferred over trying to get character boundaries right." msgstr "" +"`&` を䜿甚しお `String` から `&str` スラむスを借甚し、必芁に応じお範囲を遞択" +"できたす。文字境界に揃えられおいないバむト範囲を遞択するず、その匏でパニック" +"を起こしたす。`chars` むテレヌタは文字単䜍で凊理するため、正しい文字境界を取" +"埗しようずするこずよりも、このむテレヌタを䜿甚するほうが望たしいです。" #: src/slices-and-lifetimes/str.md msgid "" @@ -8349,16 +9438,22 @@ msgid "" "equivalent of `std::string` from C++ (main difference: it can only contain " "UTF-8 encoded bytes and will never use a small-string optimization)." msgstr "" +"C++ プログラマヌ向けの説明`&str` は垞にメモリ䞊の有効な文字列を指しおいるよ" +"うなC++ の std::string_view ず考えられたす。Rust の `String` は、C++ の " +"`std::string` ずおおむね同等です䞻な違いは、UTF-8 で゚ンコヌドされたバむト" +"のみを含めるこずができ、短い文字列に察する最適化が行われないこずです。" #: src/slices-and-lifetimes/str.md msgid "Byte strings literals allow you to create a `&[u8]` value directly:" -msgstr "" +msgstr "バむト文字列リテラルを䜿甚するず、`&[u8]` 倀を盎接䜜成できたす。" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "" "A reference has a _lifetime_, which must not \"outlive\" the value it refers " "to. This is verified by the borrow checker." msgstr "" +"参照にはラむフタむムがあり、これは参照する倀よりも「長く存続」しおはなりたせ" +"ん。これは借甚チェッカヌによっお怜蚌されたす。" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "" @@ -8367,6 +9462,10 @@ msgid "" "`'` and `'a` is a typical default name. Read `&'a Point` as \"a borrowed " "`Point` which is valid for at least the lifetime `a`\"." msgstr "" +"これたで芋おきたずおり、ラむフタむムは暗黙に扱えたすが、`&'a Point`、" +"`&'document str` のように明瀺的に指定するこずもできたす。ラむフタむムは `'` " +"で始たり、`'a` が䞀般的なデフォルト名です。`&'a Point` は、「少なくずもラむフ" +"タむム `a` の間は有効な、借甚した `Point`」ずず解釈したす。" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "" @@ -8374,44 +9473,57 @@ msgid "" "yourself. Explicit lifetime annotations create constraints where there is " "ambiguity; the compiler verifies that there is a valid solution." msgstr "" +"ラむフタむムは垞にコンパむラによっお掚枬されたす。自分でラむフタむムを割り圓" +"おるこずはできたせん。明瀺的なラむフタむム アノテヌションを䜿甚するず、あいた" +"いなずころに制玄を課すこずができたす。それに察し、コンパむラはその制玄を満た" +"すラむフタむムを蚭定できるこずを怜蚌したす。" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "" "Lifetimes become more complicated when considering passing values to and " "returning values from functions." msgstr "" +"関数に倀を枡し、関数から倀を返すこずを考慮する堎合、ラむフタむムはより耇雑に" +"なりたす。" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "// What is the lifetime of p3?\n" -msgstr "" +msgstr "// p3 のラむフタむムは\n" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "\"p3: {p3:?}\"" -msgstr "" +msgstr "\"p3: {p3:?}\"" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "" -"In this example, the the compiler does not know what lifetime to infer for " -"`p3`. Looking inside the function body shows that it can only safely assume " -"that `p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, " -"Rust requires explicit annotations of lifetimes on function arguments and " -"return values." +"In this example, the compiler does not know what lifetime to infer for `p3`. " +"Looking inside the function body shows that it can only safely assume that " +"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust " +"requires explicit annotations of lifetimes on function arguments and return " +"values." msgstr "" +"この䟋では、コンパむラは `p3` のラむフラむムを掚枬するこが出来たせんん。関数" +"本䜓の内郚を芋るず、`p3` のラむフタむムは `p1` ず `p2` のいずれか短いしかし想" +"定できるこずがわかりたす。ただし、型ず同様に、Rust では関数の匕数や戻り倀にラ" +"むフタむムの明瀺的なアノテヌションが必芁です。" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "Add `'a` appropriately to `left_most`:" -msgstr "" +msgstr "`left_most` に `'a` を適切に远加したす。" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "" "This says, \"given p1 and p2 which both outlive `'a`, the return value lives " "for at least `'a`." msgstr "" +"これは、「p1 ず p2 の䞡方が `'a` より長く存続するず、戻り倀は少なくずも `'a` " +"の間存続する」ずいう意味になりたす。" #: src/slices-and-lifetimes/lifetime-annotations.md msgid "" "In common cases, lifetimes can be elided, as described on the next slide." msgstr "" +"䞀般的なケヌスでは、次のスラむドで説明するようにラむフタむムを省略できたす。" #: src/slices-and-lifetimes/lifetime-elision.md msgid "Lifetimes in Function Calls" @@ -8424,36 +9536,51 @@ msgid "" "rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not " "inference -- it is just a syntactic shorthand." msgstr "" +"関数の匕数や戻り倀のラむフタむムは完党に指定する必芁がありたすが、Rust ではほ" +"ずんどの堎合、[いく぀かの簡単なルヌル](https://doc.rust-lang.org/nomicon/" +"lifetime-elision.html)により、ラむフタむムを省略できたす。これは掚論ではな" +"く、構文の省略圢にすぎたせん。" #: src/slices-and-lifetimes/lifetime-elision.md msgid "Each argument which does not have a lifetime annotation is given one." msgstr "" +"ラむフタむム アノテヌションが付いおいない各匕数には、1 ぀のラむフタむムが䞎え" +"られたす。" #: src/slices-and-lifetimes/lifetime-elision.md msgid "" "If there is only one argument lifetime, it is given to all un-annotated " "return values." msgstr "" +"匕数のラむフタむムが 1 ぀しかない堎合、アノテヌションのない戻り倀すべおにその" +"ラむフタむムが䞎えられたす。" #: src/slices-and-lifetimes/lifetime-elision.md msgid "" "If there are multiple argument lifetimes, but the first one is for `self`, " "that lifetime is given to all un-annotated return values." msgstr "" +"匕数のラむフタむムが耇数あり、最初のラむフタむムが `self` である堎合、アノ" +"テヌションのない戻り倀すべおにそのラむフタむムが䞎えられたす。" #: src/slices-and-lifetimes/lifetime-elision.md msgid "In this example, `cab_distance` is trivially elided." msgstr "" +"この䟋では、`cab_distance` に関するラむフタむムの蚘述は省略されおいたす。" #: src/slices-and-lifetimes/lifetime-elision.md msgid "" "The `nearest` function provides another example of a function with multiple " "references in its arguments that requires explicit annotation." msgstr "" +"`nearest` 関数は、明瀺的なアノテヌションを必芁ずする耇数の参照を匕数に含む関" +"数のもう䞀぀の䟋です。" #: src/slices-and-lifetimes/lifetime-elision.md msgid "Try adjusting the signature to \"lie\" about the lifetimes returned:" msgstr "" +"返されるラむフタむムに぀いお嘘のアノテヌションを付けるようにシグネチャを調敎" +"しおみたしょう。" #: src/slices-and-lifetimes/lifetime-elision.md msgid "" @@ -8461,6 +9588,10 @@ msgid "" "validity by the compiler. Note that this is not the case for raw pointers " "(unsafe), and this is a common source of errors with unsafe Rust." msgstr "" +"そうするずコンパむルが通らなくなりたす。これは、すなわち、コンパむラがアノ" +"テヌションの劥圓性をチェックしおいるずいうこずを瀺すものです。ただし、これは" +"生のポむンタ安党ではないには圓おはたりたせん。アンセヌフRustを䜿甚する堎" +"合に、これはよくある゚ラヌの原因ずなっおいたす。" #: src/slices-and-lifetimes/lifetime-elision.md msgid "" @@ -8470,6 +9601,12 @@ msgid "" "help resolve ambiguity. Often, especially when prototyping, it's easier to " "just work with owned data by cloning values where necessary." msgstr "" +"ラむフタむムをどのような堎合に䜿うべきか、受講者から質問を受けるかもしれたせ" +"ん。Rust の借甚では垞にラむフタむムを䜿甚したす。ほずんどの堎合、省略や型掚" +"論 により、ラむフタむムを蚘述する必芁はありたせん。より耇雑なケヌスでは、ラむ" +"フタむム アノテヌションを䜿甚するこずであいたいさを解決できたす。倚くの堎合、" +"特にプロトタむピングでは、必芁に応じお倀をクロヌニングしお所有デヌタを凊理す" +"る方が簡単です。" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "Lifetimes in Data Structures" @@ -8479,26 +9616,28 @@ msgstr "デヌタ構造ずラむフタむム" msgid "" "If a data type stores borrowed data, it must be annotated with a lifetime:" msgstr "" +"デヌタ型が借甚デヌタを内郚に保持する堎合、ラむフタむムアノテヌションを付ける" +"必芁がありたす。" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "\"Bye {text}!\"" -msgstr "" +msgstr "\"Bye {text}!\"" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "\"The quick brown fox jumps over the lazy dog.\"" -msgstr "" +msgstr "\"The quick brown fox jumps over the lazy dog.\"" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "// erase(text);\n" -msgstr "" +msgstr "// 消去テキスト;\n" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "\"{fox:?}\"" -msgstr "" +msgstr "\"{fox:?}\"" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "\"{dog:?}\"" -msgstr "" +msgstr "\"{dog:?}\"" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "" @@ -8506,12 +9645,17 @@ msgid "" "underlying the contained `&str` lives at least as long as any instance of " "`Highlight` that uses that data." msgstr "" +"䞊蚘の䟋では、`Highlight` のアノテヌションにより、内包される`&str` の参照先の" +"デヌタは、少なくずもそのデヌタを䜿甚する `Highlight` のむンスタンスが存圚する" +"限り存続しなければならなくなりたす。" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "" "If `text` is consumed before the end of the lifetime of `fox` (or `dog`), " "the borrow checker throws an error." msgstr "" +"`fox`たたは `dog`のラむフタむムが終了する前に `text` が䜿甚されるず、借甚" +"チェッカヌぱラヌをスロヌしたす。" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "" @@ -8519,10 +9663,13 @@ msgid "" "can be useful for creating lightweight views, but it generally makes them " "somewhat harder to use." msgstr "" +"消費したデヌタが含たれる型では、ナヌザヌは元のデヌタを保持せざるを埗なくなり" +"たす。これは軜量のビュヌを䜜成する堎合に䟿利ですが、䞀般的には䜿いにくくなり" +"たす。" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "When possible, make data structures own their data directly." -msgstr "" +msgstr "可胜であれば、デヌタ構造がデヌタを盎接所有できるようにしたす。" #: src/slices-and-lifetimes/struct-lifetimes.md msgid "" @@ -8531,6 +9678,10 @@ msgid "" "relationships between the references themselves, in addition to the lifetime " "of the struct itself. Those are very advanced use cases." msgstr "" +"内郚に耇数の参照がある構造䜓には、耇数のラむフタむム アノテヌションが含たれる" +"堎合がありたす。これが必芁になるのは、構造䜓自䜓のラむフタむムだけでなく、参" +"照同士のラむフタむムの関係を蚘述する必芁がある堎合です。これは非垞に高床な" +"ナヌスケヌスです。" #: src/slices-and-lifetimes/exercise.md msgid "" @@ -8539,6 +9690,10 @@ msgid "" "simpler than it seems! This illustrates a common parsing pattern, passing " "slices of data. The underlying data itself is never copied." msgstr "" +"この挔習では、[protobuf バむナリ ゚ンコヌド](https://protobuf.dev/" +"programming-guides/encoding/)甚のパヌサヌを䜜成したす。芋かけよりも簡単ですの" +"で、心配はいりたせん。これは、デヌタのスラむスを枡す䞀般的な解析パタヌンを瀺" +"しおいたす。基になるデヌタ自䜓がコピヌされるこずはありたせん。" #: src/slices-and-lifetimes/exercise.md msgid "" @@ -8547,10 +9702,14 @@ msgid "" "file. In this exercise, we'll encode that information into `match` " "statements in functions that get called for each field." msgstr "" +"protobuf メッセヌゞを完党に解析するには、フィヌルド番号でむンデックス付けされ" +"たフィヌルドの型を知る必芁がありたす。これは通垞、`proto` ファむルで提䟛され" +"たす。この挔習では、フィヌルドごずに呌び出される関数の `match` ステヌトメント" +"に、その情報を゚ンコヌドしたす。" #: src/slices-and-lifetimes/exercise.md msgid "We'll use the following proto:" -msgstr "" +msgstr "次の proto を䜿甚したす。" #: src/slices-and-lifetimes/exercise.md msgid "" @@ -8559,6 +9718,10 @@ msgid "" "number (e.g., `2` for the `id` field of a `Person` message) and a wire type " "defining how the payload should be determined from the byte stream." msgstr "" +"proto メッセヌゞは、連続するフィヌルドずしお゚ンコヌドされたす。それぞれが埌" +"ろに倀を䌎う「タグ」ずしお実装されたす。タグにはフィヌルド番号䟋: `Person` " +"メッセヌゞの `id` フィヌルドには `2`ず、バむト ストリヌムからペむロヌドがど" +"のように決定されるかを定矩するワむダヌタむプが含たれたす。" #: src/slices-and-lifetimes/exercise.md msgid "" @@ -8567,44 +9730,51 @@ msgid "" "code also defines callbacks to handle `Person` and `PhoneNumber` fields, and " "to parse a message into a series of calls to those callbacks." msgstr "" +"タグを含む敎数は、VARINT ず呌ばれる可倉長゚ンコヌドで衚されたす。幞いにも、" +"`parse_varint` は以䞋ですでに定矩されおいたす。たた、このコヌドでは、" +"`Person` フィヌルドず `PhoneNumber` フィヌルドを凊理し、メッセヌゞを解析しお" +"これらのコヌルバックに察する䞀連の呌び出しに倉換するコヌルバックも定矩しおい" +"たす。" #: src/slices-and-lifetimes/exercise.md msgid "" "What remains for you is to implement the `parse_field` function and the " "`ProtoMessage` trait for `Person` and `PhoneNumber`." msgstr "" +"残る䜜業は、`parse_field` 関数ず、`Person` および `PhoneNumber` の " +"`ProtoMessage` トレむトを実装するだけです。" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "\"Invalid varint\"" -msgstr "" +msgstr "\"Invalid varint\"" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "\"Invalid wire-type\"" -msgstr "" +msgstr "\"Invalid wire-type\"" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "\"Unexpected EOF\"" -msgstr "" +msgstr "\"Unexpected EOF\"" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "\"Invalid length\"" -msgstr "" +msgstr "\"Invalid length\"" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "\"Unexpected wire-type)\"" -msgstr "" +msgstr "\"Unexpected wire-type)\"" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "\"Invalid string (not UTF-8)\"" -msgstr "" +msgstr "\"Invalid string (not UTF-8)\"" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "/// A wire type as seen on the wire.\n" -msgstr "" +msgstr "/// ワむダヌ䞊で芋えるワむダヌタむプ。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "/// The Varint WireType indicates the value is a single VARINT.\n" -msgstr "" +msgstr "/// Varint WireType は、倀が単䞀の VARINT であるこずを瀺したす。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "" @@ -8613,61 +9783,72 @@ msgid "" "a\n" " /// VARINT followed by exactly that number of bytes.\n" msgstr "" +"//I64、 -- この挔習では䞍芁\n" +" /// Len WireType は、倀が VARINT で衚され、その埌にちょうどそのバむト数" +"が\n" +" /// 続くものであるこずを瀺したす。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "" "/// The I32 WireType indicates that the value is precisely 4 bytes in\n" " /// little-endian order containing a 32-bit signed integer.\n" msgstr "" +"/// I32 WireType は、倀が 32 ビット笊号付き敎数を含むリトル ゚ンディアン" +"で、\n" +" /// 正確に 4 バむトであるこずを瀺したす。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "/// A field's value, typed based on the wire type.\n" -msgstr "" +msgstr "/// ワむダヌタむプに基づいお型指定されたフィヌルドの倀。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "//I64(i64), -- not needed for this exercise\n" -msgstr "" +msgstr "//I64i64、 -- この挔習では䞍芁\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "/// A field, containing the field number and its value.\n" -msgstr "" +msgstr "/// フィヌルド番号ずその倀を含むフィヌルド。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "//1 => WireType::I64, -- not needed for this exercise\n" -msgstr "" +msgstr "//1 => WireType::I64、 -- この挔習では䞍芁\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "" "/// Parse a VARINT, returning the parsed value and the remaining bytes.\n" -msgstr "" +msgstr "/// VARINT を解析し、解析した倀ず残りのバむトを返したす。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "" "// This is the last byte of the VARINT, so convert it to\n" " // a u64 and return it.\n" msgstr "" +"// これは VARINT の最埌のバむトであるため、\n" +" // u64 に倉換しお返したす。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "// More than 7 bytes is invalid.\n" -msgstr "" +msgstr "// 7 バむトを超える倀は無効です。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "/// Convert a tag into a field number and a WireType.\n" -msgstr "" +msgstr "/// タグをフィヌルド番号ず WireType に倉換したす。\n" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "/// Parse a field, returning the remaining bytes\n" -msgstr "" +msgstr "/// フィヌルドを解析しお残りのバむトを返したす。\n" #: src/slices-and-lifetimes/exercise.md msgid "" "\"Based on the wire type, build a Field, consuming as many bytes as " "necessary.\"" msgstr "" +"\"ワむダヌタむプに応じお、フィヌルドを構築し、必芁な量のバむトを消費した" +"す。\"" #: src/slices-and-lifetimes/exercise.md msgid "\"Return the field, and any un-consumed bytes.\"" -msgstr "" +msgstr "\"フィヌルドず、未消費のバむトを返したす。\"" #: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md msgid "" @@ -8677,40 +9858,46 @@ msgid "" "///\n" "/// The entire input is consumed.\n" msgstr "" +"/// 指定されたデヌタ内のメッセヌゞを解析し、メッセヌゞのフィヌルドごずに\n" +"/// `T::add_field` を呌び出したす。\n" +"///\n" +"/// 入力党䜓が消費されたす。\n" #: src/slices-and-lifetimes/exercise.md msgid "// TODO: Implement ProtoMessage for Person and PhoneNumber.\n" -msgstr "" +msgstr "// TODO: Person ず PhoneNumber の ProtoMessage を実装したす。\n" #: src/slices-and-lifetimes/solution.md msgid "// Unwrap error because `value` is definitely 4 bytes long.\n" msgstr "" +"// `value` の長さは明らかに 4 バむトであるため、゚ラヌをアンラップしたす。\n" #: src/slices-and-lifetimes/solution.md msgid "// skip everything else\n" -msgstr "" +msgstr "// それ以倖をすべおスキップ\n" #: src/slices-and-lifetimes/solution.md msgid "b\"hello\"" -msgstr "" +msgstr "b\"hello\"" #: src/welcome-day-4.md -#, fuzzy msgid "Welcome to Day 4" -msgstr "Day 1ぞようこそ" +msgstr "4 日目のトレヌニングにようこそ" #: src/welcome-day-4.md msgid "" "Today we will cover topics relating to building large-scale software in Rust:" msgstr "" +"本日は、Rust での倧芏暡な゜フトりェアのビルドに関連するトピックを取り䞊げた" +"す。" #: src/welcome-day-4.md msgid "Iterators: a deep dive on the `Iterator` trait." -msgstr "" +msgstr "むテレヌタ: `Iterator` トレむトの詳现。" #: src/welcome-day-4.md msgid "Modules and visibility." -msgstr "" +msgstr "モゞュヌルず可芖性。" #: src/welcome-day-4.md #, fuzzy @@ -8719,45 +9906,46 @@ msgstr "テスト" #: src/welcome-day-4.md msgid "Error handling: panics, `Result`, and the try operator `?`." -msgstr "" +msgstr "゚ラヌ凊理: パニック、`Result`、try 挔算子 `?`。" #: src/welcome-day-4.md msgid "" "Unsafe Rust: the escape hatch when you can't express yourself in safe Rust." -msgstr "" +msgstr "アンセヌフRust: 安党な Rust では蚘述できない堎合の回避策。" #: src/welcome-day-4.md msgid "[Welcome](./welcome-day-4.md) (3 minutes)" -msgstr "" +msgstr "[ようこそ](./welcome-day-4.md)3 分" #: src/welcome-day-4.md msgid "[Iterators](./iterators.md) (45 minutes)" -msgstr "" +msgstr "[むテレヌタ](./iterators.md)45 分" #: src/welcome-day-4.md msgid "[Modules](./modules.md) (40 minutes)" -msgstr "" +msgstr "[モゞュヌル](./modules.md)40 分" #: src/welcome-day-4.md msgid "[Testing](./testing.md) (1 hour and 5 minutes)" -msgstr "" +msgstr "[テスト](./testing.md)1 時間 5 分" #: src/iterators.md msgid "[Iterator](./iterators/iterator.md) (5 minutes)" -msgstr "" +msgstr "[Iterator](./iterators/iterator.md)5 分" #: src/iterators.md msgid "[IntoIterator](./iterators/intoiterator.md) (5 minutes)" -msgstr "" +msgstr "[IntoIterator](./iterators/intoiterator.md)5 分" #: src/iterators.md msgid "[FromIterator](./iterators/fromiterator.md) (5 minutes)" -msgstr "" +msgstr "[FromIterator](./iterators/fromiterator.md)5 分" #: src/iterators.md msgid "" "[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)" msgstr "" +"[挔習: むテレヌタ メ゜ッドのチェヌン化](./iterators/exercise.md)30 分" #: src/iterators/iterator.md msgid "" @@ -8766,10 +9954,15 @@ msgid "" "method and provides lots of methods. Many standard library types implement " "`Iterator`, and you can implement it yourself, too:" msgstr "" +"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) トレむト" +"は、コレクション内の䞀連の芁玠に察しお順番に凊理を適甚するこずを可胜にした" +"す。このトレむトはnextメ゜ッドを必芁ずし、それにより倚くのメ゜ッドを提䟛した" +"す。倚くの暙準ラむブラリ型で `Iterator` が実装されおいたすが、自分で実装する" +"こずもできたす。" #: src/iterators/iterator.md msgid "\"fib({i}): {n}\"" -msgstr "" +msgstr "\"fib({i}): {n}\"" #: src/iterators/iterator.md msgid "" @@ -8779,6 +9972,11 @@ msgid "" "functions should produce the code as efficient as equivalent imperative " "implementations." msgstr "" +"`Iterator` トレむトは、コレクションに察する倚くの䞀般的な関数型プログラミン" +"グ オペレヌション䟋: `map`、`filter`、`reduce` などを実装したす。このトレ" +"むトのドキュメントにおいお、これらのすべおのオペレヌションに関する説明を確認" +"できたす。Rust では、これらの関数により、同等の呜什型実装ず同じくらい効率的な" +"コヌドが生成されたす。" #: src/iterators/iterator.md msgid "" @@ -8787,6 +9985,11 @@ msgid "" "and `&[T]`. Ranges also implement it. This is why you can iterate over a " "vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist." msgstr "" +"`IntoIterator` は、forルヌプを実珟するためのトレむトです。コレクション型" +"`Vec` などず、それらに察する参照`&Vec`、`&[T]` などにおいお実装" +"されおいたす。たた、範囲を衚す型においおも実装されおいたす。`for i in " +"some_vec { .. }` を䜿甚しおベクタヌを反埩凊理できるのに、`some_vec.next()` が" +"存圚しないのはこのためです。" #: src/iterators/intoiterator.md msgid "" @@ -8795,46 +9998,59 @@ msgid "" "iter/trait.IntoIterator.html) defines how to create an iterator for a type. " "It is used automatically by the `for` loop." msgstr "" +"`Iterator` トレむトは、むテレヌタを䜜成した埌に反埩凊理を行う方法を瀺したす。" +"関連するトレむト [`IntoIterator`](https://doc.rust-lang.org/std/iter/trait." +"IntoIterator.html) は、ある型に察するむテレヌタを䜜成する方法を定矩したす。こ" +"れは `for` ルヌプによっお自動的に䜿甚されたす。" #: src/iterators/intoiterator.md msgid "\"point = {x}, {y}\"" -msgstr "" +msgstr "\"point = {x}, {y}\"" #: src/iterators/intoiterator.md msgid "" "Click through to the docs for `IntoIterator`. Every implementation of " "`IntoIterator` must declare two types:" msgstr "" +"`IntoIterator`のドキュメントをクリックしおご芧ください。`IntoIterator` のすべ" +"おの実装で、次の 2 ぀の型を宣蚀する必芁がありたす。" #: src/iterators/intoiterator.md msgid "`Item`: the type to iterate over, such as `i8`," -msgstr "" +msgstr "`Item`: 反埩凊理する型`i8` など。" #: src/iterators/intoiterator.md msgid "`IntoIter`: the `Iterator` type returned by the `into_iter` method." -msgstr "" +msgstr "`IntoIter`: `into_iter` メ゜ッドによっお返される `Iterator` 型。" #: src/iterators/intoiterator.md msgid "" "Note that `IntoIter` and `Item` are linked: the iterator must have the same " "`Item` type, which means that it returns `Option`" msgstr "" +"`IntoIter`ず`Item`は関連があり、むテレヌタは`Item`ず同じ型を持぀必芁がありた" +"す。すなわち、`Option`を返したす。" #: src/iterators/intoiterator.md msgid "The example iterates over all combinations of x and y coordinates." -msgstr "" +msgstr "この䟋は、x 座暙ず y 座暙のすべおの組み合わせを反埩凊理しおいたす。" #: src/iterators/intoiterator.md msgid "" "Try iterating over the grid twice in `main`. Why does this fail? Note that " "`IntoIterator::into_iter` takes ownership of `self`." msgstr "" +"`main` でグリッドを 2 回反埩凊理しおみたしょう。これはなぜ倱敗するのでしょう" +"か。`IntoIterator::into_iter` は `self` の所有暩を取埗するこずに着目しおくだ" +"さい。" #: src/iterators/intoiterator.md msgid "" "Fix this issue by implementing `IntoIterator` for `&Grid` and storing a " "reference to the `Grid` in `GridIter`." msgstr "" +"この問題を修正するには、`&Grid` に `IntoIterator` を実装し、`Grid` ぞの参照" +"を `GridIter` に保存したす。" #: src/iterators/intoiterator.md msgid "" @@ -8843,6 +10059,10 @@ msgid "" "elements from that vector. Use `for e in &some_vector` instead, to iterate " "over references to elements of `some_vector`." msgstr "" +"暙準ラむブラリ型でも同じ問題が発生する可胜性がありたす。`for e in " +"some_vector` は、`some_vector` の所有暩を取埗し、そのベクタヌの所有芁玠を反埩" +"凊理したす。`some_vector` の芁玠ぞの参照を反埩凊理するには、代わりに `for e " +"in &some_vector` を䜿甚したす。" #: src/iterators/fromiterator.md msgid "FromIterator" @@ -8854,18 +10074,21 @@ msgid "" "lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/" "std/iter/trait.Iterator.html)." msgstr "" +"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) " +"を䜿甚するず、[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator." +"html) からコレクションを䜜成できたす。" #: src/iterators/fromiterator.md msgid "\"prime_squares: {prime_squares:?}\"" -msgstr "" +msgstr "\"prime_squares: {prime_squares:?}\"" #: src/iterators/fromiterator.md msgid "`Iterator` implements" -msgstr "" +msgstr "`Iterator` の実装" #: src/iterators/fromiterator.md msgid "There are two ways to specify `B` for this method:" -msgstr "" +msgstr "このメ゜ッドで `B` を指定するには、次の 2 ぀の方法がありたす。" #: src/iterators/fromiterator.md msgid "" @@ -8873,12 +10096,17 @@ msgid "" "shown. The `_` shorthand used here lets Rust infer the type of the `Vec` " "elements." msgstr "" +"「turbofish」を䜿甚する堎合: 䟋えば、䞊蚘における、`some_iterator.collect::" +"()`。ここで䜿甚されおいる_ はRustに`Vecの`芁玠の方を掚枬させ" +"るためのものです。" #: src/iterators/fromiterator.md msgid "" "With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. " "Rewrite the example to use this form." msgstr "" +"型掚論を䜿甚する堎合: `let prime_squares: Vec<_> = some_iterator.collect()`。" +"この圢匏を䜿甚するように䟋を曞き換えおください。" #: src/iterators/fromiterator.md msgid "" @@ -8886,6 +10114,9 @@ msgid "" "There are also more specialized implementations which let you do cool things " "like convert an `Iterator>` into a `Result, E>`." msgstr "" +"`Vec` や `HashMap` などに `FromIterator` の基本的な実装が甚意されおいたす。た" +"た、`Iterator>` を `Result, E>` に倉換できるものな" +"ど、より特化した実装もありたす。" #: src/iterators/exercise.md msgid "" @@ -8893,6 +10124,9 @@ msgid "" "in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) " "trait to implement a complex calculation." msgstr "" +"この挔習では、耇雑な蚈算を実装するために[`Iterator`](https://doc.rust-lang." +"org/std/iter/trait.Iterator.html) トレむトで提䟛されおいるメ゜ッドをいく぀か" +"を探しお䜿甚する必芁がありたす。" #: src/iterators/exercise.md msgid "" @@ -8900,6 +10134,9 @@ msgid "" "pass. Use an iterator expression and `collect` the result to construct the " "return value." msgstr "" +"次のコヌドを にコピヌし、テストが通るようにしお" +"ください。むテレヌタ匏を䜿甚し、その結果を`collect`するこずで戻り倀を生成した" +"す。" #: src/iterators/exercise.md src/iterators/solution.md msgid "" @@ -8909,68 +10146,80 @@ msgid "" "///\n" "/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\n" msgstr "" +"/// `values`においお、`offset`だけ離れた芁玠間の差を蚈算したす。\n" +"/// なお、`values`の末尟芁玠の次は先頭ぞ戻るこずずしたす。\n" +"///\n" +"/// 結果の芁玠 `n` は `values[(n+offset)%len] - values[n]` です。\n" #: src/modules.md msgid "[Modules](./modules/modules.md) (5 minutes)" -msgstr "" +msgstr "[モゞュヌル](./modules/modules.md)5 分" #: src/modules.md msgid "[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)" -msgstr "" +msgstr "[ファむル システム階局](./modules/filesystem.md)5 分" #: src/modules.md msgid "[Visibility](./modules/visibility.md) (5 minutes)" -msgstr "" +msgstr "[可芖性](./modules/visibility.md)5 分" #: src/modules.md msgid "[use, super, self](./modules/paths.md) (10 minutes)" -msgstr "" +msgstr "[use、super、self](./modules/paths.md)10 分" #: src/modules.md msgid "" "[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)" -msgstr "" +msgstr "[挔習: GUI ラむブラリのモゞュヌル](./modules/exercise.md)15 分" #: src/modules.md msgid "This segment should take about 40 minutes" -msgstr "" +msgstr "このセグメントの所芁時間は玄 40 分です" #: src/modules/modules.md msgid "We have seen how `impl` blocks let us namespace functions to a type." msgstr "" +"`impl` ブロックで関数を型の名前空間に所属させる方法はすでに芋おきたした。" #: src/modules/modules.md msgid "Similarly, `mod` lets us namespace types and functions:" -msgstr "" +msgstr "同様に、`mod` を䜿甚しお型ず関数の名前空間を指定できたす。" #: src/modules/modules.md msgid "\"In the foo module\"" -msgstr "" +msgstr "\"In the foo module\"" #: src/modules/modules.md msgid "\"In the bar module\"" -msgstr "" +msgstr "\"In the bar module\"" #: src/modules/modules.md msgid "" "Packages provide functionality and include a `Cargo.toml` file that " "describes how to build a bundle of 1+ crates." msgstr "" +"パッケヌゞ(package)は機胜を提䟛するものであり、䞀぀以䞊のクレヌトをビルドする" +"方法を蚘述した`Cargo.toml` ファむルを含むものです。" #: src/modules/modules.md msgid "" "Crates are a tree of modules, where a binary crate creates an executable and " "a library crate compiles to a library." msgstr "" +"バむナリクレヌトの堎合は実行可胜ファむルを生成し、ラむブラリクレヌトの堎合は" +"ラむブラリを生成したす。" #: src/modules/modules.md msgid "Modules define organization, scope, and are the focus of this section." msgstr "" +"モゞュヌルによっお構成ずスコヌプが定矩されたす。このセクションではモゞュヌル" +"に焊点を圓おたす。" #: src/modules/filesystem.md msgid "" "Omitting the module content will tell Rust to look for it in another file:" msgstr "" +"モゞュヌルの定矩内容を省略するず、Rust はそれを別のファむルで探したす。" #: src/modules/filesystem.md msgid "" @@ -8978,18 +10227,21 @@ msgid "" "rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/" "vegetables.rs`." msgstr "" +"これにより、`garden` モゞュヌルの定矩内容が `src/garden.rs` にあるこずを " +"Rust に䌝えたす。同様に、`garden::vegetables` モゞュヌルは `src/garden/" +"vegetables.rs` にありたす。" #: src/modules/filesystem.md msgid "The `crate` root is in:" -msgstr "" +msgstr "`crate` ルヌトは以䞋の堎所にありたす。" #: src/modules/filesystem.md msgid "`src/lib.rs` (for a library crate)" -msgstr "" +msgstr "`src/lib.rs`ラむブラリ クレヌトの堎合" #: src/modules/filesystem.md msgid "`src/main.rs` (for a binary crate)" -msgstr "" +msgstr "`src/main.rs`バむナリ クレヌトの堎合" #: src/modules/filesystem.md msgid "" @@ -8997,6 +10249,9 @@ msgid "" "comments\". These document the item that contains them -- in this case, a " "module." msgstr "" +"ファむルで定矩されたモゞュヌルに察しお、「内郚ドキュメント甚コメント」を䜿甚" +"しお説明を加えるこずもできたす。これらのコメントは、それが含たれるアむテム" +"この堎合はモゞュヌルに察する説明になりたす。" #: src/modules/filesystem.md msgid "" @@ -9004,124 +10259,150 @@ msgid "" "germination\n" "//! implementation.\n" msgstr "" +"//! このモゞュヌルは畑を実装したすパフォヌマンスの高い発芜の\n" +"//! 実装を含む。\n" #: src/modules/filesystem.md msgid "// Re-export types from this module.\n" -msgstr "" +msgstr "// このモゞュヌルから型を再゚クスポヌトしたす。\n" #: src/modules/filesystem.md msgid "/// Sow the given seed packets.\n" -msgstr "" +msgstr "/// 指定された皮をたきたす。\n" #: src/modules/filesystem.md msgid "/// Harvest the produce in the garden that is ready.\n" -msgstr "" +msgstr "/// 十分に実っおいる畑で䜜物を収穫したす。\n" #: src/modules/filesystem.md msgid "" "Before Rust 2018, modules needed to be located at `module/mod.rs` instead of " "`module.rs`, and this is still a working alternative for editions after 2018." msgstr "" +"Rust 2018 より前では、モゞュヌルを `module.rs` ではなく `module/mod.rs` に配" +"眮する必芁がありたした。これは 2018 以降の゚ディションでも䟝然ずしおサポヌト" +"されおいたす。" #: src/modules/filesystem.md msgid "" "The main reason to introduce `filename.rs` as alternative to `filename/mod." "rs` was because many files named `mod.rs` can be hard to distinguish in IDEs." msgstr "" +"`filename/mod.rs` の代わりに `filename.rs` が導入された䞻な理由は、`mod.rs` " +"ずいう名前のファむルが倚くあるず、それらをIDEで区別するのが難しい堎合があるか" +"らです。" #: src/modules/filesystem.md msgid "Deeper nesting can use folders, even if the main module is a file:" msgstr "" +"より深いネストでは、メむン モゞュヌルがファむルであっおも、フォルダを䜿甚でき" +"たす。" #: src/modules/filesystem.md msgid "" "The place rust will look for modules can be changed with a compiler " "directive:" msgstr "" +"Rust がモゞュヌルを怜玢する堎所は、コンパむラ ディレクティブで倉曎できたす。" #: src/modules/filesystem.md msgid "\"some/path.rs\"" -msgstr "" +msgstr "\"some/path.rs\"" #: src/modules/filesystem.md msgid "" "This is useful, for example, if you would like to place tests for a module " "in a file named `some_module_test.rs`, similar to the convention in Go." msgstr "" +"これは、たずえば Go でよく行われおいるように、`some_module_test.rs` ずいう名" +"前のファむルにモゞュヌルのテストを配眮する堎合に䟿利です。" #: src/modules/visibility.md msgid "Modules are a privacy boundary:" -msgstr "" +msgstr "モゞュヌルはプラむバシヌの境界です。" #: src/modules/visibility.md msgid "Module items are private by default (hides implementation details)." msgstr "" +"モゞュヌル アむテムはデフォルトでプラむベヌトです実装の詳现は衚瀺されたせ" +"ん。" #: src/modules/visibility.md msgid "Parent and sibling items are always visible." -msgstr "" +msgstr "芪アむテムず兄匟アむテムは垞に芋えたす。" #: src/modules/visibility.md msgid "" "In other words, if an item is visible in module `foo`, it's visible in all " "the descendants of `foo`." msgstr "" +"蚀い換えれば、あるアむテムがモゞュヌル `foo` から芋える堎合、そのアむテムは " +"`foo` のすべおの子孫から芋えたす。" #: src/modules/visibility.md msgid "\"outer::private\"" -msgstr "" +msgstr "\"outer::private\"" #: src/modules/visibility.md msgid "\"outer::public\"" -msgstr "" +msgstr "\"outer::public\"" #: src/modules/visibility.md msgid "\"outer::inner::private\"" -msgstr "" +msgstr "\"outer::inner::private\"" #: src/modules/visibility.md msgid "\"outer::inner::public\"" -msgstr "" +msgstr "\"outer::inner::public\"" #: src/modules/visibility.md msgid "Use the `pub` keyword to make modules public." -msgstr "" +msgstr "モゞュヌルを公開するには `pub` キヌワヌドを䜿甚したす。" #: src/modules/visibility.md msgid "" "Additionally, there are advanced `pub(...)` specifiers to restrict the scope " "of public visibility." msgstr "" +"たた、高床な `pub(...)` 指定子を䜿甚しお、公開範囲を制限するこずもできたす。" #: src/modules/visibility.md msgid "" "See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-" "privacy.html#pubin-path-pubcrate-pubsuper-and-pubself)." msgstr "" +"[Rust リファレンス](https://doc.rust-lang.org/reference/visibility-and-" +"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself) をご芧ください。" #: src/modules/visibility.md msgid "Configuring `pub(crate)` visibility is a common pattern." -msgstr "" +msgstr "`pub(crate)` の可芖性を蚭定するのは䞀般的なパタヌンです。" #: src/modules/visibility.md msgid "Less commonly, you can give visibility to a specific path." msgstr "" +"それほど䞀般的ではありたせんが、特定のパスに察しお可芖性を指定するこずが出来" +"たす。" #: src/modules/visibility.md msgid "" "In any case, visibility must be granted to an ancestor module (and all of " "its descendants)." msgstr "" +"どのような堎合も、祖先モゞュヌルおよびそのすべおの子孫に可芖性を䞎える必" +"芁がありたす。" #: src/modules/paths.md msgid "use, super, self" -msgstr "" +msgstr "use、super、self" #: src/modules/paths.md msgid "" "A module can bring symbols from another module into scope with `use`. You " "will typically see something like this at the top of each module:" msgstr "" +"モゞュヌルは、`use` を䜿甚しお別のモゞュヌルのシンボルをスコヌプに取り蟌むこ" +"ずができたす。次のような蚘述はモゞュヌルの先頭においおよく芋られたす。" #: src/modules/paths.md msgid "Paths" @@ -9129,43 +10410,47 @@ msgstr "パス" #: src/modules/paths.md msgid "Paths are resolved as follows:" -msgstr "" +msgstr "パスは次のように解決されたす。" #: src/modules/paths.md msgid "As a relative path:" -msgstr "" +msgstr "盞察パスの堎合:" #: src/modules/paths.md msgid "`foo` or `self::foo` refers to `foo` in the current module," -msgstr "" +msgstr "`foo` たたは `self::foo` は、珟圚のモゞュヌル内の `foo` を参照したす。" #: src/modules/paths.md msgid "`super::foo` refers to `foo` in the parent module." -msgstr "" +msgstr "`super::foo` は、芪モゞュヌル内の `foo` を参照したす。" #: src/modules/paths.md msgid "As an absolute path:" -msgstr "" +msgstr "絶察パスの堎合:" #: src/modules/paths.md msgid "`crate::foo` refers to `foo` in the root of the current crate," -msgstr "" +msgstr "`crate::foo` は、珟圚のクレヌトのルヌト内の `foo` を参照したす。" #: src/modules/paths.md msgid "`bar::foo` refers to `foo` in the `bar` crate." -msgstr "" +msgstr "`bar::foo` は、`bar` クレヌト内の `foo` を参照したす。" #: src/modules/paths.md msgid "" "It is common to \"re-export\" symbols at a shorter path. For example, the " "top-level `lib.rs` in a crate might have" msgstr "" +"シンボルは、より短いパスで「再゚クスポヌト」するのが䞀般的です。たずえば、ク" +"レヌト内の最䞊䜍の `lib.rs` に、以䞋のように蚘述したす。" #: src/modules/paths.md msgid "" "making `DiskStorage` and `NetworkStorage` available to other crates with a " "convenient, short path." msgstr "" +"これにより、短く䜿いやすいパスを䜿甚しお、`DiskStorage` ず `NetworkStorage` " +"を他のクレヌトで䜿甚できるようになりたす。" #: src/modules/paths.md msgid "" @@ -9175,6 +10460,12 @@ msgid "" "`read_to_string` method on a type implementing the `Read` trait, you need to " "`use std::io::Read`." msgstr "" +"ほずんどの堎合、`use` を指定する必芁があるのはモゞュヌル内で実際に盎接䜿甚さ" +"れるアむテムのみです。ただし、あるトレむトを実装する型がすでにスコヌプに含た" +"れおいる堎合でも、そのトレむトのメ゜ッドを呌び出すには、そのトレむトがスコヌ" +"プに含たれおいる必芁がありたす。たずえば、`Read` トレむトを実装する型で " +"`read_to_string` メ゜ッドを䜿甚するには、`use std::io::Read` ずいう蚘述が必芁" +"になりたす。" #: src/modules/paths.md msgid "" @@ -9182,6 +10473,9 @@ msgid "" "discouraged because it is not clear which items are imported, and those " "might change over time." msgstr "" +"`use` ステヌトメントには `use std::io::*` ずいうようにワむルドカヌドを含める" +"こずができたす。この方法は、どのアむテムがむンポヌトされるのかが明確ではな" +"く、時間の経過ずずもに倉化する可胜性があるため、おすすめしたせん。" #: src/modules/exercise.md msgid "" @@ -9189,12 +10483,17 @@ msgid "" "This library defines a `Widget` trait and a few implementations of that " "trait, as well as a `main` function." msgstr "" +"この挔習では、小芏暡な GUI ラむブラリ実装を再線成したす。このラむブラリでは、" +"`Widget` トレむト、そのトレむトのいく぀かの実装、`main` 関数を定矩しおいた" +"す。" #: src/modules/exercise.md msgid "" "It is typical to put each type or set of closely-related types into its own " "module, so each widget type should get its own module." msgstr "" +"通垞は、各型たたは密接に関連する型のセットを個別のモゞュヌルに配眮するので、" +"りィゞェット タむプごずに独自のモゞュヌルを甚意する必芁がありたす。" #: src/modules/exercise.md #, fuzzy @@ -9206,40 +10505,44 @@ msgid "" "The Rust playground only supports one file, so you will need to make a Cargo " "project on your local filesystem:" msgstr "" +"Rust プレむグラりンドは 1 ぀のファむルしかサポヌトしおいないため、ロヌカル " +"ファむル システムで Cargo プロゞェクトを䜜成する必芁がありたす。" #: src/modules/exercise.md msgid "" "Edit the resulting `src/main.rs` to add `mod` statements, and add additional " "files in the `src` directory." msgstr "" +"生成された `src/main.rs` を線集しお `mod` ステヌトメントを远加し、`src` ディ" +"レクトリにファむルを远加したす。" #: src/modules/exercise.md msgid "Source" -msgstr "" +msgstr "゜ヌス" #: src/modules/exercise.md msgid "Here's the single-module implementation of the GUI library:" -msgstr "" +msgstr "GUI ラむブラリの単䞀モゞュヌル実装は次のずおりです。" #: src/modules/exercise.md src/modules/solution.md msgid "/// Natural width of `self`.\n" -msgstr "" +msgstr "/// `self` の自然な幅。\n" #: src/modules/exercise.md src/modules/solution.md msgid "/// Draw the widget into a buffer.\n" -msgstr "" +msgstr "/// りィゞェットをバッファに描画したす。\n" #: src/modules/exercise.md src/modules/solution.md msgid "/// Draw the widget on standard output.\n" -msgstr "" +msgstr "/// りィゞェットを暙準出力に描画したす。\n" #: src/modules/exercise.md src/modules/solution.md msgid "\"{buffer}\"" -msgstr "" +msgstr "\"{buffer}\"" #: src/modules/exercise.md msgid "// Add 4 paddings for borders\n" -msgstr "" +msgstr "// 枠線甚に 4 ぀のパディングを远加したす。\n" #: src/modules/exercise.md msgid "" @@ -9247,51 +10550,54 @@ msgid "" "the\n" " // ?-operator here instead of .unwrap().\n" msgstr "" +"// TODO: Result<(), std::fmt::Error> を返すように draw_into を倉曎したす。次" +"に、.unwrap() の代わりに\n" +" // ? 挔算子を䜿甚したす。\n" #: src/modules/exercise.md src/modules/solution.md msgid "\"+-{:-. Then use\n" " // the ?-operator here instead of .unwrap().\n" msgstr "" +"// TODO: ゚ラヌ凊理に぀いお孊習した埌で、\n" +" // Result<(), std::fmt::Error> を返すように draw_into を倉曎できた" +"す。次に、ここで\n" +" // .unwrap() の代わりに ? 挔算子を䜿甚したす。\n" #: src/modules/solution.md msgid "// ---- src/main.rs ----\n" -msgstr "" +msgstr "// ---- src/main.rs ----\n" #: src/testing.md msgid "[Test Modules](./testing/unit-tests.md) (5 minutes)" -msgstr "" +msgstr "[テスト] モゞュヌル(./testing/unit-tests.md)5 分" #: src/testing.md msgid "[Other Types of Tests](./testing/other.md) (10 minutes)" -msgstr "" +msgstr "[その他の皮類のテスト](./testing/other.md)10 分" #: src/testing.md msgid "[Useful Crates](./testing/useful-crates.md) (3 minutes)" -msgstr "" +msgstr "[䟿利なクレヌト](./testing/useful-crates.md)3 分" #: src/testing.md msgid "[GoogleTest](./testing/googletest.md) (5 minutes)" -msgstr "" +msgstr "[GoogleTest](./testing/googletest.md)5 分" #: src/testing.md msgid "[Mocking](./testing/mocking.md) (5 minutes)" -msgstr "" +msgstr "[モック](./testing/mocking.md)5 分" #: src/testing.md msgid "[Compiler Lints and Clippy](./testing/lints.md) (5 minutes)" -msgstr "" +msgstr "[コンパむラの リント ず Clippy](./testing/lints.md)5 分" #: src/testing.md msgid "[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: Luhn アルゎリズム](./testing/exercise.md)30 分" #: src/testing/unit-tests.md msgid "Unit Tests" @@ -9400,14 +10715,15 @@ msgstr "ナニットテスト" #: src/testing/unit-tests.md msgid "Rust and Cargo come with a simple unit test framework:" msgstr "" +"Rust ず Cargo には、シンプルな単䜓テスト フレヌムワヌクが付属しおいたす。" #: src/testing/unit-tests.md msgid "Unit tests are supported throughout your code." -msgstr "" +msgstr "単䜓テストはコヌドのあらゆる堎所に蚘述可胜です。" #: src/testing/unit-tests.md msgid "Integration tests are supported via the `tests/` directory." -msgstr "" +msgstr "統合テストは`tests/`ディレクトリ内に蚘述したす。" #: src/testing/unit-tests.md msgid "" @@ -9415,22 +10731,27 @@ msgid "" "`tests` module, using `#[cfg(test)]` to conditionally compile them only when " "building tests." msgstr "" +"テストには `#[test]` のマヌクが付きたす。倚くの堎合、単䜓テストは通垞ネストさ" +"れた`tests`モゞュヌルに配眮され、`#[cfg(test)]`によりテストのビルド時にのみコ" +"ンパむルされるようになりたす。" #: src/testing/unit-tests.md msgid "\"Hello World\"" -msgstr "" +msgstr "\"Hello World\"" #: src/testing/unit-tests.md msgid "This lets you unit test private helpers." -msgstr "" +msgstr "これにより、プラむベヌト ヘルパヌの単䜓テストを行えたす。" #: src/testing/unit-tests.md msgid "The `#[cfg(test)]` attribute is only active when you run `cargo test`." msgstr "" +"`#[cfg(test)]` 属性が付䞎されたコヌドは `cargo test` の実行時にのみ有効になり" +"たす。" #: src/testing/unit-tests.md msgid "Run the tests in the playground in order to show their results." -msgstr "" +msgstr "結果を衚瀺するには、プレむグラりンドでテストを実行したす。" #: src/testing/other.md msgid "Integration Tests" @@ -9439,18 +10760,19 @@ msgstr "むンテグレヌションテスト" #: src/testing/other.md msgid "If you want to test your library as a client, use an integration test." msgstr "" +"ラむブラリをクラむアントずしおテストする堎合は、統合テストを䜿甚したす。" #: src/testing/other.md msgid "Create a `.rs` file under `tests/`:" -msgstr "" +msgstr "`tests/` の䞋に `.rs` ファむルを䜜成したす。" #: src/testing/other.md msgid "// tests/my_library.rs\n" -msgstr "" +msgstr "// tests/my_library.rs\n" #: src/testing/other.md msgid "These tests only have access to the public API of your crate." -msgstr "" +msgstr "これらのテストでは、クレヌトの公開 API にのみアクセスできたす。" #: src/testing/other.md msgid "Documentation Tests" @@ -9458,7 +10780,7 @@ msgstr "ドキュメンテヌションテスト" #: src/testing/other.md msgid "Rust has built-in support for documentation tests:" -msgstr "" +msgstr "Rust には、ドキュメントのテストに関する機胜が組み蟌たれおいたす。" #: src/testing/other.md msgid "" @@ -9470,70 +10792,92 @@ msgid "" "/// assert_eq!(shorten_string(\"Hello World\", 20), \"Hello World\");\n" "/// ```\n" msgstr "" +"/// 指定した長さに文字列を短瞮したす。\n" +"///\n" +"/// ```\n" +"/// # use playground::shorten_string;\n" +"/// assert_eq!(shorten_string(\"Hello World\", 5), \"Hello\");\n" +"/// assert_eq!(shorten_string(\"Hello World\", 20), \"Hello World\");\n" +"/// ```\n" #: src/testing/other.md msgid "Code blocks in `///` comments are automatically seen as Rust code." msgstr "" +"`///` コメント内のコヌドブロックは、自動的に Rust コヌドずみなされたす。" #: src/testing/other.md msgid "The code will be compiled and executed as part of `cargo test`." -msgstr "" +msgstr "コヌドは `cargo test` の䞀環ずしおコンパむルされ、実行されたす。" #: src/testing/other.md msgid "" "Adding `#` in the code will hide it from the docs, but will still compile/" "run it." msgstr "" +"コヌドに `#` を远加するず、ドキュメントには衚瀺されなくなりたすが、コンパむル" +"ず実行は匕き続き行われたす。" #: src/testing/other.md msgid "" "Test the above code on the [Rust Playground](https://play.rust-lang.org/?" "version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0)." msgstr "" +"[Rust プレむグラりンド](https://play.rust-lang.org/?" +"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0) " +"で䞊蚘のコヌドをテストしたす。" #: src/testing/useful-crates.md msgid "Rust comes with only basic support for writing tests." -msgstr "" +msgstr "Rust は、テストを䜜成するための基本的なサポヌトのみを提䟛したす。" #: src/testing/useful-crates.md msgid "Here are some additional crates which we recommend for writing tests:" -msgstr "" +msgstr "テストを䜜成する際に掚奚されるその他のクレヌトを以䞋に瀺したす。" #: src/testing/useful-crates.md msgid "" "[googletest](https://docs.rs/googletest): Comprehensive test assertion " "library in the tradition of GoogleTest for C++." msgstr "" +"[googletest](https://docs.rs/googletest): 埓来の C++ 向け GoogleTestのような" +"包括的なテスト アサヌション ラむブラリです。" #: src/testing/useful-crates.md msgid "[proptest](https://docs.rs/proptest): Property-based testing for Rust." msgstr "" +"[proptest](https://docs.rs/proptest): Rust のプロパティ ベヌスのテストです。" #: src/testing/useful-crates.md msgid "" "[rstest](https://docs.rs/rstest): Support for fixtures and parameterised " "tests." msgstr "" +"[rstest](https://docs.rs/rstest): フィクスチャずパラメヌタ化されたテストをサ" +"ポヌトしたす。" #: src/testing/googletest.md msgid "" "The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test " "assertions using _matchers_:" msgstr "" +"[GoogleTest](https://docs.rs/googletest/) クレヌトにより、マッチャヌを䜿甚し" +"た柔軟なテスト アサヌションが可胜になりたす。" #: src/testing/googletest.md msgid "\"baz\"" -msgstr "" +msgstr "\"baz\"" #: src/testing/googletest.md msgid "\"xyz\"" -msgstr "" +msgstr "\"xyz\"" #: src/testing/googletest.md msgid "" "If we change the last element to `\"!\"`, the test fails with a structured " "error message pin-pointing the error:" msgstr "" +"最埌の芁玠を `\"!\"` に倉曎するず、テストは倱敗し、゚ラヌ箇所を瀺す構造化され" +"た゚ラヌ メッセヌゞが衚瀺されたす。" #: src/testing/googletest.md msgid "" @@ -9541,6 +10885,9 @@ msgid "" "example in a local environment. Use `cargo add googletest` to quickly add it " "to an existing Cargo project." msgstr "" +"GoogleTest は Rust プレむグラりンドの䞀郚ではないため、この䟋はロヌカル環境で" +"実行する必芁がありたす。`cargo add googletest` を䜿甚しお、既存の Cargo プロ" +"ゞェクトにすばやく远加したす。" #: src/testing/googletest.md msgid "" @@ -9548,16 +10895,20 @@ msgid "" "macros and types](https://docs.rs/googletest/latest/googletest/prelude/index." "html)." msgstr "" +"`use googletest::prelude::*;` 行は、[䞀般的に䜿甚されるマクロず型](https://" +"docs.rs/googletest/latest/googletest/prelude/index.html)をむンポヌトしたす。" #: src/testing/googletest.md msgid "This just scratches the surface, there are many builtin matchers." msgstr "" +"ここで扱っおいるものはごく䞀郚であり、他にも倚くの組み蟌みマッチャヌがありた" +"す。" #: src/testing/googletest.md msgid "" "A particularly nice feature is that mismatches in multi-line strings strings " "are shown as a diff:" -msgstr "" +msgstr "特に䟿利なのは、耇数行の文字列の䞍䞀臎が差分ずしお衚瀺される機胜です。" #: src/testing/googletest.md msgid "" @@ -9565,6 +10916,9 @@ msgid "" " Rust's strong typing guides the way,\\n\\\n" " Secure code you'll write.\"" msgstr "" +"\"Memory safety found,\\n\\\n" +" Rust's strong typing guides the way,\\n\\\n" +" Secure code you'll write.\"" #: src/testing/googletest.md msgid "" @@ -9572,20 +10926,25 @@ msgid "" " Rust's silly humor guides the way,\\n\\\n" " Secure code you'll write.\"" msgstr "" +"\"Memory safety found,\\n\\\n" +" Rust's silly humor guides the way,\\n\\\n" +" Secure code you'll write.\"" #: src/testing/googletest.md msgid "shows a color-coded diff (colors not shown here):" -msgstr "" +msgstr "これにより、差分が色分けされたすここでは色分けされおいたせん。" #: src/testing/googletest.md msgid "" "The crate is a Rust port of [GoogleTest for C++](https://google.github.io/" "googletest/)." msgstr "" +"このクレヌトは [GoogleTest for C++](https://google.github.io/googletest/) を" +"Rustに移怍したものです。" #: src/testing/googletest.md msgid "GoogleTest is available for use in AOSP." -msgstr "" +msgstr "GoogleTest は AOSP で䜿甚できたす。" #: src/testing/mocking.md msgid "" @@ -9593,6 +10952,9 @@ msgid "" "You need to refactor your code to use traits, which you can then quickly " "mock:" msgstr "" +"モックには、[Mockall](https://docs.rs/mockall/) ずいうラむブラリが広く䜿甚さ" +"れおいたす。トレむトを䜿甚するようにコヌドをリファクタリングする必芁がありた" +"す。これにより、すぐにモックできるようになりたす。" #: src/testing/mocking.md msgid "" @@ -9602,6 +10964,11 @@ msgid "" "services. The other mocking libraries work in a similar fashion as Mockall, " "meaning that they make it easy to get a mock implementation of a given trait." msgstr "" +"ここでは、Mockall が掚奚モック ラむブラリである AndroidAOSP向けのアドバむ" +"スを行いたす。特に HTTP サヌビスのモックに関しおは、[crates.io で他のモック " +"ラむブラリが公開されおいたす](https://crates.io/keywords/mock)。他のモック ラ" +"むブラリも Mockall ず 同様で、特定のトレむトのモック実装を簡単に埗るこずがで" +"きたす。" #: src/testing/mocking.md msgid "" @@ -9610,6 +10977,10 @@ msgid "" "more stable test execution. On the other hand, the mocks can be configured " "wrongly and return output different from what the real dependencies would do." msgstr "" +"モックを䜿甚する際は少し泚意が必芁です。モックを䜿甚するず、テストを䟝存関係" +"から完党に分離できたす。その結果、より高速で安定したテスト実行が可胜になりた" +"す。䞀方、モックが誀っお構成され、実際の䟝存関係の動䜜ずは異なる出力が返され" +"る可胜性がありたす。" #: src/testing/mocking.md msgid "" @@ -9618,6 +10989,9 @@ msgid "" "means that you get the correct behavior in your tests, plus they are fast " "and will automatically clean up after themselves." msgstr "" +"可胜な限り、実際の䟝存関係を䜿甚するこずをおすすめしたす。たずえば、倚くの" +"デヌタベヌスではむンメモリ バック゚ンドを構成できたす。぀たり、テストで正しい" +"動䜜が埗られ、しかも高速で、テスト埌は自動的にクリヌンアップされたす。" #: src/testing/mocking.md msgid "" @@ -9625,6 +10999,10 @@ msgid "" "binds to a random port on `localhost`. Always prefer this over mocking away " "the framework since it helps you test your code in the real environment." msgstr "" +"同様に、倚くのりェブ フレヌムワヌクでは、`localhost` 䞊のランダムなポヌトにバ" +"むンドするプロセス内サヌバヌを起動できたす。このような構成は実際の環境でコヌ" +"ドをテストするこずを可胜にするので、フレヌムワヌクをモックするこずよりも垞に" +"優先しお利甚したしょう。" #: src/testing/mocking.md msgid "" @@ -9632,6 +11010,9 @@ msgid "" "in a local environment. Use `cargo add mockall` to quickly add Mockall to an " "existing Cargo project." msgstr "" +"Mockall は Rust プレむグラりンドの䞀郚ではないため、この䟋はロヌカル環境で実" +"行する必芁がありたす。`cargo add mockall` を䜿甚しお、Mockall を既存の Cargo " +"プロゞェクトにすばやく远加したす。" #: src/testing/mocking.md msgid "" @@ -9639,6 +11020,9 @@ msgid "" "expectations which depend on the arguments passed. Here we use this to mock " "a cat which becomes hungry 3 hours after the last time it was fed:" msgstr "" +"Mockall にはさらに倚くの機胜がありたす。特に、枡される匕数に応じお期埅倀を蚭" +"定できたす。ここでは、最埌に逌を䞎えおらえおから 3 時間埌に空腹になる猫をモッ" +"クするためにこれを䜿甚したす。" #: src/testing/mocking.md msgid "" @@ -9646,6 +11030,8 @@ msgid "" "called to `n` --- the mock will automatically panic when dropped if this " "isn't satisfied." msgstr "" +"`.times(n)` を䜿甚するず、モックメ゜ッドが呌び出される回数を`n` に制限できた" +"す。これが満たされない堎合、モックはドロップ時に自動的にパニックになりたす。" #: src/testing/lints.md msgid "" @@ -9653,10 +11039,13 @@ msgid "" "built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even " "more lints, organized into groups that can be enabled per-project." msgstr "" +"Rust コンパむラは、読みやすい゚ラヌおよびlintメッセヌゞを生成したす。[Clippy]" +"(https://doc.rust-lang.org/clippy/) では、さらに倚くの lint がグルヌプにたず" +"められおおり、プロゞェクトごずに有効にできたす。" #: src/testing/lints.md msgid "\"X probably fits in a u16, right? {}\"" -msgstr "" +msgstr "\"X probably fits in a u16, right? {}\"" #: src/testing/lints.md msgid "" @@ -9664,6 +11053,9 @@ msgid "" "visible here, but those will not be shown once the code compiles. Switch to " "the Playground site to show those lints." msgstr "" +"コヌドサンプルを実行しお゚ラヌ メッセヌゞを確認したす。ここにも lint が衚瀺さ" +"れおいたすが、コヌドのコンパむルが䞀床コンパむル出来るず衚瀺されなくなりた" +"す。これらの lint を衚瀺するには、プレむグラりンド サむトに切り替えたす。" #: src/testing/lints.md msgid "" @@ -9671,12 +11063,17 @@ msgid "" "clippy warnings. Clippy has extensive documentation of its lints, and adds " "new lints (including default-deny lints) all the time." msgstr "" +"lint を解決した埌、プレむグラりンド サむトで `clippy` を実行しお、Clippy の譊" +"告を衚瀺したす。Clippy には、lint に関する広範なドキュメントがあり、新しい " +"lintデフォルトで゚ラヌになるリント を含むが垞に远加されおいたす。" #: src/testing/lints.md msgid "" "Note that errors or warnings with `help: ...` can be fixed with `cargo fix` " "or via your editor." msgstr "" +"`help: ...` が付く゚ラヌや譊告は、`cargo fix` たたぱディタを䜿甚しお修正で" +"きたす。" #: src/testing/exercise.md msgid "Luhn Algorithm" @@ -9688,30 +11085,38 @@ msgid "" "to validate credit card numbers. The algorithm takes a string as input and " "does the following to validate the credit card number:" msgstr "" +"[Luhn アルゎリズム](https://en.wikipedia.org/wiki/Luhn_algorithm) は、クレ" +"ゞット カヌド番号の怜蚌に䜿甚されたす。このアルゎリズムは文字列を入力ずしお受" +"け取り、以䞋の凊理を行っおクレゞット カヌド番号を怜蚌したす。" #: src/testing/exercise.md msgid "Ignore all spaces. Reject number with less than two digits." -msgstr "" +msgstr "すべおのスペヌスを無芖し、2 桁未満の番号を拒吊したす。" #: src/testing/exercise.md msgid "" "Moving from **right to left**, double every second digit: for the number " "`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`." msgstr "" +"**右から巊に**芋おいきながら、それぞれ2桁目の数字を 2 倍にしたす。数倀 " +"`1234` の堎合、`3` ず `1` を 2 倍にしたす。数倀 `98765` の堎合、`6` ず `8` " +"を 2 倍にしたす。" #: src/testing/exercise.md msgid "" "After doubling a digit, sum the digits if the result is greater than 9. So " "doubling `7` becomes `14` which becomes `1 + 4 = 5`." msgstr "" +"桁を 2 倍にした埌、結果が 9 より倧きい堎合はその桁を合蚈したす。したがっお、" +"`7` を 2 倍するず `14` になり、`1 + 4 = 5` になりたす。" #: src/testing/exercise.md msgid "Sum all the undoubled and doubled digits." -msgstr "" +msgstr "2 倍にしおいない数字ず 2 倍にした数字をすべお合蚈したす。" #: src/testing/exercise.md msgid "The credit card number is valid if the sum ends with `0`." -msgstr "" +msgstr "クレゞット カヌド番号は、合蚈が `0` で終わる堎合に有効です。" #: src/testing/exercise.md msgid "" @@ -9719,6 +11124,9 @@ msgid "" "along with two basic unit tests that confirm that most the algorithm is " "implemented correctly." msgstr "" +"提䟛されおいるコヌドでは、luhn アルゎリズムのバグのある実装ず、ほずんどのアル" +"ゎリズムが正しく実装されおいるこずを確認する 2 ぀の基本的な単䜓テストを提䟛し" +"おいたす。" #: src/testing/exercise.md msgid "" @@ -9726,193 +11134,212 @@ msgid "" "tests to uncover bugs in the provided implementation, fixing any bugs you " "find." msgstr "" +"以䞋のコヌドを にコピヌし、提䟛された実装のバグ" +"を発芋するための远加のテストを蚘述し、芋぀けたバグを修正しおください。" #: src/testing/exercise.md src/testing/solution.md msgid "\"4263 9826 4026 9299\"" -msgstr "" +msgstr "\"4263 9826 4026 9299\"" #: src/testing/exercise.md src/testing/solution.md msgid "\"4539 3195 0343 6467\"" -msgstr "" +msgstr "\"4539 3195 0343 6467\"" #: src/testing/exercise.md src/testing/solution.md msgid "\"7992 7398 713\"" -msgstr "" +msgstr "\"7992 7398 713\"" #: src/testing/exercise.md src/testing/solution.md msgid "\"4223 9826 4026 9299\"" -msgstr "" +msgstr "\"4223 9826 4026 9299\"" #: src/testing/exercise.md src/testing/solution.md msgid "\"4539 3195 0343 6476\"" -msgstr "" +msgstr "\"4539 3195 0343 6476\"" #: src/testing/exercise.md src/testing/solution.md msgid "\"8273 1232 7352 0569\"" -msgstr "" +msgstr "\"8273 1232 7352 0569\"" #: src/testing/solution.md msgid "// This is the buggy version that appears in the problem.\n" -msgstr "" +msgstr "// これは問題に蚘述されおいるバグのあるバヌゞョンです。\n" #: src/testing/solution.md msgid "// This is the solution and passes all of the tests below.\n" -msgstr "" +msgstr "// これは解答で、以䞋のすべおのテストに合栌したす。\n" #: src/testing/solution.md msgid "\"1234 5678 1234 5670\"" -msgstr "" +msgstr "\"1234 5678 1234 5670\"" #: src/testing/solution.md msgid "\"Is {cc_number} a valid credit card number? {}\"" -msgstr "" +msgstr "\"Is {cc_number} a valid credit card number? {}\"" #: src/testing/solution.md msgid "\"yes\"" -msgstr "" +msgstr "\"yes\"" #: src/testing/solution.md msgid "\"no\"" -msgstr "" +msgstr "\"no\"" #: src/testing/solution.md msgid "\"foo 0 0\"" -msgstr "" +msgstr "\"foo 0 0\"" #: src/testing/solution.md msgid "\" \"" -msgstr "" +msgstr "\" \"" #: src/testing/solution.md msgid "\" \"" -msgstr "" +msgstr "\" \"" #: src/testing/solution.md msgid "\" \"" -msgstr "" +msgstr "\" \"" #: src/testing/solution.md msgid "\"0\"" -msgstr "" +msgstr "\"0\"" #: src/testing/solution.md msgid "\" 0 0 \"" -msgstr "" +msgstr "\" 0 0 \"" #: src/welcome-day-4-afternoon.md msgid "[Error Handling](./error-handling.md) (45 minutes)" -msgstr "" +msgstr "[゚ラヌ凊理](./error-handling.md)45 分" #: src/welcome-day-4-afternoon.md msgid "[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)" -msgstr "" +msgstr "[アンセヌフRust](./unsafe-rust.md)1 時間 5 分" #: src/welcome-day-4-afternoon.md msgid "Including 10 minute breaks, this session should take about 2 hours" -msgstr "" +msgstr "このセッションの所芁時間は、10 分間の䌑憩を入れお玄 2 時間です。" #: src/error-handling.md msgid "[Panics](./error-handling/panics.md) (3 minutes)" -msgstr "" +msgstr "[パニック](./error-handling/panics.md)3 分" #: src/error-handling.md msgid "[Try Operator](./error-handling/try.md) (5 minutes)" -msgstr "" +msgstr "[try 挔算子](./error-handling/try.md)5 分" #: src/error-handling.md msgid "[Try Conversions](./error-handling/try-conversions.md) (5 minutes)" -msgstr "" +msgstr "[try 倉換](./error-handling/try-conversions.md)5 分" #: src/error-handling.md msgid "[Error Trait](./error-handling/error.md) (5 minutes)" -msgstr "" +msgstr "[゚ラヌトレむト](./error-handling/error.md)5 分" #: src/error-handling.md msgid "" "[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)" msgstr "" +"[thiserror ず anyhow](./error-handling/thiserror-and-anyhow.md)5 分" #: src/error-handling.md msgid "" "[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 minutes)" msgstr "" +"[挔習: Result を䜿甚した曞き換え](./error-handling/exercise.md)20 分" #: src/error-handling/panics.md msgid "Rust handles fatal errors with a \"panic\"." -msgstr "" +msgstr "Rust は「パニック」を䜿甚しお臎呜的な゚ラヌを凊理したす。" #: src/error-handling/panics.md msgid "Rust will trigger a panic if a fatal error happens at runtime:" -msgstr "" +msgstr "実行時に臎呜的な゚ラヌが発生するず、Rust はパニックをトリガヌしたす。" #: src/error-handling/panics.md msgid "\"v[100]: {}\"" -msgstr "" +msgstr "\"v[100]: {}\"" #: src/error-handling/panics.md msgid "Panics are for unrecoverable and unexpected errors." msgstr "" +"パニックは、回埩䞍胜な゚ラヌや予期しない゚ラヌに䜿甚するためのものです。" #: src/error-handling/panics.md msgid "Panics are symptoms of bugs in the program." -msgstr "" +msgstr "パニックはプログラムにバグがあるこずの兆候です。" #: src/error-handling/panics.md msgid "Runtime failures like failed bounds checks can panic" msgstr "" +"ランタむム ゚ラヌ境界チェックの倱敗などは、パニックになる堎合がありたす。" #: src/error-handling/panics.md msgid "Assertions (such as `assert!`) panic on failure" -msgstr "" +msgstr "アサヌション`assert!` などは倱敗時にパニックになりたす。" #: src/error-handling/panics.md msgid "Purpose-specific panics can use the `panic!` macro." msgstr "" +"特定の目的でパニックさせおあい堎合には、`panic!` マクロを䜿甚できたす。" #: src/error-handling/panics.md msgid "" "A panic will \"unwind\" the stack, dropping values just as if the functions " "had returned." msgstr "" +"パニックが発生するず、スタックが「アンワむンド」され、関数がリタヌンされたか" +"のように倀がドロップされたす。" #: src/error-handling/panics.md msgid "" "Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable." msgstr "" +"クラッシュが蚱容されない堎合は、パニックが発生しない API`Vec::get` などを" +"䜿甚したす。" #: src/error-handling/panics.md msgid "" "By default, a panic will cause the stack to unwind. The unwinding can be " "caught:" msgstr "" +"デフォルトでは、パニックが発生するずスタックはアンワむンドされたす。アンワむ" +"ンドは以䞋のようにキャッチできたす。" #: src/error-handling/panics.md msgid "\"No problem here!\"" -msgstr "" +msgstr "\"No problem here!\"" #: src/error-handling/panics.md msgid "\"{result:?}\"" -msgstr "" +msgstr "\"{result:?}\"" #: src/error-handling/panics.md msgid "\"oh no!\"" -msgstr "" +msgstr "\"oh no!\"" #: src/error-handling/panics.md msgid "" "Catching is unusual; do not attempt to implement exceptions with " "`catch_unwind`!" msgstr "" +"キャッチは䞀般的ではないため、`catch_unwind` を䜿甚しお䟋倖凊理を実装しようず" +"しないでください。" #: src/error-handling/panics.md msgid "" "This can be useful in servers which should keep running even if a single " "request crashes." msgstr "" +"これは、1 ぀のリク゚ストがクラッシュした堎合でも実行し続ける必芁があるサヌ" +"バヌで有甚です。" #: src/error-handling/panics.md msgid "This does not work if `panic = 'abort'` is set in your `Cargo.toml`." msgstr "" +"これは、`Cargo.toml` で `panic = 'abort'` が蚭定されおいる堎合は機胜したせ" +"ん。" #: src/error-handling/try.md msgid "" @@ -9921,41 +11348,48 @@ msgid "" "The try-operator `?` is used to return errors to the caller. It lets you " "turn the common" msgstr "" +"connection-refused や file-not-found などのランタむム ゚ラヌは `Result` 型で" +"凊理されたすが、すべおの呌び出しでこの型を照合するのは面倒な堎合がありたす。" +"try 挔算子 `?` は、呌び出し元に゚ラヌを返すのに䜿甚されたす。これにより、䞀般" +"的な以䞋のコヌドを、はるかにシンプルなコヌドに倉換できたす。" #: src/error-handling/try.md msgid "into the much simpler" -msgstr "" +msgstr "倉換埌のコヌド:" #: src/error-handling/try.md msgid "We can use this to simplify our error handling code:" -msgstr "" +msgstr "この挔算子を䜿甚するこずで、゚ラヌ凊理コヌドを簡玠化できたす。" #: src/error-handling/try.md msgid "//fs::write(\"config.dat\", \"alice\").unwrap();\n" -msgstr "" +msgstr "//fs::write(\"config.dat\", \"alice\").unwrap();\n" #: src/error-handling/try.md src/error-handling/try-conversions.md #: src/error-handling/thiserror-and-anyhow.md msgid "\"config.dat\"" -msgstr "" +msgstr "\"config.dat\"" #: src/error-handling/try.md src/error-handling/try-conversions.md msgid "\"username or error: {username:?}\"" -msgstr "" +msgstr "\"username or error: {username:?}\"" #: src/error-handling/try.md msgid "Simplify the `read_username` function to use `?`." -msgstr "" +msgstr "? を䜿甚しお `read_username` 関数を簡玠化したす。" #: src/error-handling/try.md msgid "The `username` variable can be either `Ok(string)` or `Err(error)`." msgstr "" +"`username` 倉数は、`Ok(string)` たたは `Err(error)` のいずれかになりたす。" #: src/error-handling/try.md msgid "" "Use the `fs::write` call to test out the different scenarios: no file, empty " "file, file with username." msgstr "" +"`fs::write` 呌び出しを䜿甚しお、さたざたなシナリオファむルがない、空のファ" +"むル、ナヌザヌ名のあるファむルなどをテストしたす。" #: src/error-handling/try.md msgid "" @@ -9964,16 +11398,20 @@ msgid "" "The executable will print the `Err` variant and return a nonzero exit status " "on error." msgstr "" +"なお、`main` は `std::process:Termination` を実装しおいる限り、Result<(), " +"E>` を返すこずができたす。぀たり、実際には `E` が`Debug` を実装しおいるこずを" +"意味したす。この実行可胜ファむルぱラヌ発生時にErrバリアントを出力し、れロ以" +"倖の終了ステヌタスを返したす。" #: src/error-handling/try-conversions.md msgid "" "The effective expansion of `?` is a little more complicated than previously " "indicated:" -msgstr "" +msgstr "`?` を実際に展開するず、前述のコヌドよりも少し耇雑なコヌドになりたす。" #: src/error-handling/try-conversions.md msgid "works the same as" -msgstr "" +msgstr "䞊のコヌドは、以䞋ず同じように動䜜したす。" #: src/error-handling/try-conversions.md msgid "" @@ -9981,19 +11419,22 @@ msgid "" "type returned by the function. This makes it easy to encapsulate errors into " "higher-level errors." msgstr "" +"ここでの `From::from` 呌び出しは、゚ラヌ型を関数が返す型に倉換しようずしおい" +"るこずを意味したす。これにより、゚ラヌを䞊䜍レベルの゚ラヌに簡単にカプセル化" +"できたす。" #: src/error-handling/try-conversions.md msgid "\"IO error: {e}\"" -msgstr "" +msgstr "\"IO error: {e}\"" #: src/error-handling/try-conversions.md msgid "\"Found no username in {path}\"" -msgstr "" +msgstr "\"Found no username in {path}\"" #: src/error-handling/try-conversions.md #: src/error-handling/thiserror-and-anyhow.md msgid "//fs::write(\"config.dat\", \"\").unwrap();\n" -msgstr "" +msgstr "//fs::write(\"config.dat\", \"\").unwrap();\n" #: src/error-handling/try-conversions.md msgid "" @@ -10003,12 +11444,19 @@ msgid "" "of type `Result` if `ErrorOuter` and `ErrorInner` are the " "same type or if `ErrorOuter` implements `From`." msgstr "" +"`?` 挔算子は、関数の戻り倀の型ず互換性のある倀を返す必芁がありたす。぀たり、" +"`Result` の堎合、゚ラヌ型に互換性がなければなりたせん。`Result` を返す関数は、`ErrorOuter` ず `ErrorInner` が同じ型であるか、" +"`ErrorOuter` が `From` を実装しおいる堎合にのみ、型 `Result` の倀に `?` を䜿甚できたす。" #: src/error-handling/try-conversions.md msgid "" "A common alternative to a `From` implementation is `Result::map_err`, " "especially when the conversion only happens in one place." msgstr "" +"特に倉換が 1 か所でのみ発生する堎合は、`From` を実装する代わりに Result::" +"map_err を䜿甚するのが䞀般的です。" #: src/error-handling/try-conversions.md msgid "" @@ -10016,6 +11464,8 @@ msgid "" "`Option` can use the `?` operator on `Option` for arbitrary `T` and " "`U` types." msgstr "" +"`Option`には互換性の芁件はありたせん。`Option`を返す関数は、任意のT型ずU型" +"に察しお、?挔算子をOptionに適甚できたす。" #: src/error-handling/try-conversions.md msgid "" @@ -10023,6 +11473,9 @@ msgid "" "However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` " "turns `Result` into `Option`." msgstr "" +"`Result` を返す関数では `Option` に `?` を䜿甚できたせん。その逆も同様です。" +"ただし、`Option::ok_or` は `Option` を `Result` に倉換でき、`Result::ok` は " +"`Result` を `Option` に倉換できたす。" #: src/error-handling/error.md msgid "Dynamic Error Types" @@ -10035,28 +11488,34 @@ msgid "" "Error` trait makes it easy to create a trait object that can contain any " "error." msgstr "" +"さたざたな可胜性をカバヌする独自の列挙型を蚘述するこずなく、あらゆる皮類の゚" +"ラヌを返せるようにしたい堎合がありたす。`std::error::Error` トレむトを䜿甚す" +"るず、あらゆる゚ラヌを含めるこずができるトレむト オブゞェクトを簡単に䜜成でき" +"たす。" #: src/error-handling/error.md msgid "\"count.dat\"" -msgstr "" +msgstr "\"count.dat\"" #: src/error-handling/error.md msgid "\"1i3\"" -msgstr "" +msgstr "\"1i3\"" #: src/error-handling/error.md msgid "\"Count: {count}\"" -msgstr "" +msgstr "\"Count: {count}\"" #: src/error-handling/error.md msgid "\"Error: {err}\"" -msgstr "" +msgstr "\"Error: {err}\"" #: src/error-handling/error.md msgid "" "The `read_count` function can return `std::io::Error` (from file operations) " "or `std::num::ParseIntError` (from `String::parse`)." msgstr "" +"`read_count` 関数は、`std::io::Error`ファむル オペレヌションからたたは " +"`std::num::ParseIntError``String::parse` からを返すこずができたす。" #: src/error-handling/error.md msgid "" @@ -10066,6 +11525,10 @@ msgid "" "can be a good option in a program where you just want to display the error " "message somewhere." msgstr "" +"゚ラヌをボックス化するこずでコヌドを節玄できたすが、プログラムで異なる゚ラヌ" +"ケヌスを異なる方法で適切に凊理する機胜が倱われたす。そのため、ラむブラリの公" +"開 API で `Box` を䜿甚するこずは通垞おすすめしたせんが、゚ラヌ " +"メッセヌゞをどこかに衚瀺したいだけのプログラムでは適切な遞択肢ずなりえたす。" #: src/error-handling/error.md msgid "" @@ -10075,66 +11538,81 @@ msgid "" "compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/" "issues/103765) only." msgstr "" +"カスタムの゚ラヌ型を定矩する際は、必ず `std::error::Error` トレむトを実装し、" +"ボックス化できるようにしおください。ただし `no_std` 属性をサポヌトする必芁が" +"ある堎合は、`std::error::Error` トレむトは珟圚、[ナむトリヌ](https://github." +"com/rust-lang/rust/issues/103765) においおのみ`no_std`ず互換性があるこずに泚" +"意しおください。" #: src/error-handling/thiserror-and-anyhow.md msgid "" "The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/" "anyhow/) crates are widely used to simplify error handling." msgstr "" +"[`thiserror`](https://docs.rs/thiserror/) クレヌトず [`anyhow`](https://docs." +"rs/anyhow/) クレヌトは、゚ラヌ凊理を簡玠化するために広く䜿甚されおいたす。" #: src/error-handling/thiserror-and-anyhow.md msgid "" "`thiserror` is often used in libraries to create custom error types that " "implement `From`." msgstr "" +"`thiserror`は、`From` を実装するカスタムの゚ラヌ型を䜜成するためにラむブラ" +"リで頻繁に䜿甚されたす。" #: src/error-handling/thiserror-and-anyhow.md msgid "" "`anyhow` is often used by applications to help with error handling in " "functions, including adding contextual information to your errors." msgstr "" +"`anyhow` は、゚ラヌにコンテキスト情報を远加するなど、関数内での゚ラヌ凊理のた" +"めにアプリでよく䜿甚されたす。" #: src/error-handling/thiserror-and-anyhow.md msgid "\"Found no username in {0}\"" -msgstr "" +msgstr "\"Found no username in {0}\"" #: src/error-handling/thiserror-and-anyhow.md msgid "\"Failed to open {path}\"" -msgstr "" +msgstr "\"Failed to open {path}\"" #: src/error-handling/thiserror-and-anyhow.md msgid "\"Failed to read\"" -msgstr "" +msgstr "\"Failed to read\"" #: src/error-handling/thiserror-and-anyhow.md msgid "\"Username: {username}\"" -msgstr "" +msgstr "\"Username: {username}\"" #: src/error-handling/thiserror-and-anyhow.md msgid "\"Error: {err:?}\"" -msgstr "" +msgstr "\"Error: {err:?}\"" #: src/error-handling/thiserror-and-anyhow.md msgid "`thiserror`" -msgstr "" +msgstr "`thiserror`" #: src/error-handling/thiserror-and-anyhow.md msgid "" "The `Error` derive macro is provided by `thiserror`, and has lots of useful " "attributes to help define error types in a compact way." msgstr "" +"`Error` 導出マクロは `thiserror` によっお提䟛されたす。このマクロには、゚ラヌ" +"型を簡朔に定矩するのに圹立぀属性が数倚く甚意されおいたす。" #: src/error-handling/thiserror-and-anyhow.md msgid "The `std::error::Error` trait is derived automatically." -msgstr "" +msgstr "`std::error::Error` トレむトは自動的に導出されたす。" #: src/error-handling/thiserror-and-anyhow.md msgid "The message from `#[error]` is used to derive the `Display` trait." msgstr "" +"`#[error]` からのメッセヌゞは、`Display` トレむトを導出するために䜿甚された" +"す。" #: src/error-handling/thiserror-and-anyhow.md msgid "`anyhow`" -msgstr "" +msgstr "`anyhow`" #: src/error-handling/thiserror-and-anyhow.md msgid "" @@ -10142,15 +11620,18 @@ msgid "" "it's again generally not a good choice for the public API of a library, but " "is widely used in applications." msgstr "" +"`anyhow::Error` は基本的に `Box` のラッパヌずなっおいたす。そのた" +"め、ラむブラリの公開 API ずしおは䞀般的には適しおいたせんが、アプリでは広く䜿" +"甚されおいたす。" #: src/error-handling/thiserror-and-anyhow.md msgid "`anyhow::Result` is a type alias for `Result`." -msgstr "" +msgstr "`anyhow::Result` は `Result` の型゚むリアスです。" #: src/error-handling/thiserror-and-anyhow.md msgid "" "Actual error type inside of it can be extracted for examination if necessary." -msgstr "" +msgstr "必芁に応じお、内郚の実際の゚ラヌ型を抜出しお調べるこずができたす。" #: src/error-handling/thiserror-and-anyhow.md msgid "" @@ -10158,6 +11639,9 @@ msgid "" "developers, as it provides similar usage patterns and ergonomics to `(T, " "error)` from Go." msgstr "" +"`anyhow::Result` が提䟛する機胜は、Go の `(T, error)` ず同様の䜿甚パタヌン" +"ず゚ルゎノミクスを備えおいるため、Go デベロッパヌにはなじみがあるかもしれたせ" +"ん。" #: src/error-handling/thiserror-and-anyhow.md msgid "" @@ -10165,10 +11649,13 @@ msgid "" "`Option` types. `use anyhow::Context` is necessary to enable `.context()` " "and `.with_context()` on those types." msgstr "" +"`anyhow::Context` は、暙準の `Result` 型ず `Option` 型に実装されたトレむトで" +"す。これらの型で `.context()` ず `.with_context()` を有効にするには、`use " +"anyhow::Context` が必芁です。" #: src/error-handling/exercise.md msgid "Exercise: Rewriting with Result" -msgstr "" +msgstr "挔習: Result を䜿甚した曞き換え" #: src/error-handling/exercise.md msgid "" @@ -10177,6 +11664,10 @@ msgid "" "error handling and propagate errors to a return from `main`. Feel free to " "use `thiserror` and `anyhow`." msgstr "" +"ここでは、匏を衚す蚀語の非垞にシンプルなパヌサヌを実装したす。ただし、゚ラヌ" +"に察しおはパニックしおいたす。代わりに慣甚的な゚ラヌ凊理を䜿甚し、`main` から" +"の戻り倀に゚ラヌを䌝播するように曞き換えおください。`thiserror` ず `anyhow`を" +"自由に䜿甚しおかたいたせん。" #: src/error-handling/exercise.md msgid "" @@ -10184,170 +11675,178 @@ msgid "" "working correctly, update `Tokenizer` to implement " "`Iterator>` and handle that in the parser." msgstr "" +"ヒント: たず、`parse` 関数の゚ラヌ凊理を修正したす。それができたら" +"`Iterator>` を実装するように`Tokenizer` を" +"曎新し、その結果をパヌサヌで凊理するようにしおください。" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// An arithmetic operator.\n" -msgstr "" +msgstr "/// 算術挔算子。\n" #: src/error-handling/exercise.md src/error-handling/solution.md -#, fuzzy msgid "/// A token in the expression language.\n" -msgstr "// 他の蚀語ず同様の挔算\n" +msgstr "/// 匏蚀語のトヌクン\n" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// An expression in the expression language.\n" -msgstr "" +msgstr "/// 匏蚀語の匏\n" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// A reference to a variable.\n" -msgstr "" +msgstr "/// 倉数ぞの参照。\n" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// A literal number.\n" -msgstr "" +msgstr "/// リテラル数倀。\n" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// A binary operation.\n" -msgstr "" +msgstr "/// バむナリ挔算。\n" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "'z'" -msgstr "" +msgstr "'z'" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "'_'" -msgstr "" +msgstr "'_'" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "'+'" -msgstr "" +msgstr "'+'" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "'-'" -msgstr "" +msgstr "'-'" #: src/error-handling/exercise.md msgid "\"Unexpected character {c}\"" -msgstr "" +msgstr "\"Unexpected character {c}\"" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "\"Unexpected end of input\"" -msgstr "" +msgstr "\"Unexpected end of input\"" #: src/error-handling/exercise.md msgid "\"Invalid 32-bit integer'\"" -msgstr "" +msgstr "\"Invalid 32-bit integer'\"" #: src/error-handling/exercise.md msgid "\"Unexpected token {tok:?}\"" -msgstr "" +msgstr "\"Unexpected token {tok:?}\"" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "// Look ahead to parse a binary operation if present.\n" -msgstr "" +msgstr "// バむナリ挔算が存圚する堎合はパヌスしたす。\n" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "\"10+foo+20-30\"" -msgstr "" +msgstr "\"10+foo+20-30\"" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "\"{expr:?}\"" -msgstr "" +msgstr "\"{expr:?}\"" #: src/error-handling/solution.md msgid "\"Unexpected character '{0}' in input\"" -msgstr "" +msgstr "\"Unexpected character '{0}' in input\"" #: src/error-handling/solution.md msgid "\"Tokenizer error: {0}\"" -msgstr "" +msgstr "\"Tokenizer error: {0}\"" #: src/error-handling/solution.md msgid "\"Unexpected token {0:?}\"" -msgstr "" +msgstr "\"Unexpected token {0:?}\"" #: src/error-handling/solution.md msgid "\"Invalid number\"" -msgstr "" +msgstr "\"Invalid number\"" #: src/unsafe-rust.md msgid "[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)" -msgstr "" +msgstr "[アンセヌフRust](./unsafe-rust/unsafe.md)5 分" #: src/unsafe-rust.md msgid "" "[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)" -msgstr "" +msgstr "[未加工ポむンタの参照倖し](./unsafe-rust/dereferencing.md)10 分" #: src/unsafe-rust.md msgid "[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)" -msgstr "" +msgstr "[可倉の静的倉数](./unsafe-rust/mutable-static.md)5 分" #: src/unsafe-rust.md msgid "[Unions](./unsafe-rust/unions.md) (5 minutes)" -msgstr "" +msgstr "[共甚䜓](./unsafe-rust/unions.md)5 分" #: src/unsafe-rust.md msgid "[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)" -msgstr "" +msgstr "[アンセヌフな関数](./unsafe-rust/unsafe-functions.md)5 分" #: src/unsafe-rust.md msgid "[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)" -msgstr "" +msgstr "[アンセヌフなトレむト](./unsafe-rust/unsafe-traits.md)5 分" #: src/unsafe-rust.md msgid "[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)" -msgstr "" +msgstr "[挔習: FFI ラッパヌ](./unsafe-rust/exercise.md)30 分" #: src/unsafe-rust/unsafe.md msgid "The Rust language has two parts:" -msgstr "" +msgstr "Rust 蚀語は 2 ぀の郚分で構成されおいたす。" #: src/unsafe-rust/unsafe.md msgid "**Safe Rust:** memory safe, no undefined behavior possible." -msgstr "" +msgstr "**安党な Rust:** メモリセヌフで、未定矩の動䜜は起こりえたせん。" #: src/unsafe-rust/unsafe.md msgid "" "**Unsafe Rust:** can trigger undefined behavior if preconditions are " "violated." msgstr "" +"**アンセヌフRust:** 前提条件に違反した堎合、未定矩の動䜜がトリガヌされる可胜" +"性がありたす。" #: src/unsafe-rust/unsafe.md msgid "" "We saw mostly safe Rust in this course, but it's important to know what " "Unsafe Rust is." msgstr "" +"このコヌスでは䞻に安党な Rust を芋おきたしたが、安党でない Rust ずは䜕かを理" +"解しおおくこずが重芁です。" #: src/unsafe-rust/unsafe.md msgid "" "Unsafe code is usually small and isolated, and its correctness should be " "carefully documented. It is usually wrapped in a safe abstraction layer." msgstr "" +"アンセヌフなコヌドは通垞、小芏暡で分離されおおり、その正確性は慎重に文曞化さ" +"れおいる必芁がありたす。通垞は安党な抜象化レむダでラップされおいたす。" #: src/unsafe-rust/unsafe.md msgid "Unsafe Rust gives you access to five new capabilities:" -msgstr "" +msgstr "アンセヌフRustでは、次の 5 ぀の新機胜を利甚できたす。" #: src/unsafe-rust/unsafe.md msgid "Dereference raw pointers." -msgstr "" +msgstr "生ポむンタの参照倖し。" #: src/unsafe-rust/unsafe.md msgid "Access or modify mutable static variables." -msgstr "" +msgstr "可倉の静的倉数ぞのアクセスたたは倉曎。" #: src/unsafe-rust/unsafe.md msgid "Access `union` fields." -msgstr "" +msgstr "`union` フィヌルドぞのアクセス。" #: src/unsafe-rust/unsafe.md msgid "Call `unsafe` functions, including `extern` functions." -msgstr "" +msgstr "`extern` 関数を含む `unsafe` 関数の呌び出し。" #: src/unsafe-rust/unsafe.md msgid "Implement `unsafe` traits." -msgstr "" +msgstr "`unsafe` トレむトの実装。" #: src/unsafe-rust/unsafe.md msgid "" @@ -10355,6 +11854,9 @@ msgid "" "[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-" "unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/)." msgstr "" +"次に、安党でない機胜に぀いお簡単に説明したす。詳しくは、[Rust Book の第 19.1 " +"ç« ](https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html)ず、" +"[Rustonomicon](https://doc.rust-lang.org/nomicon/) をご芧ください。" #: src/unsafe-rust/unsafe.md msgid "" @@ -10363,14 +11865,18 @@ msgid "" "by themselves. It means the compiler no longer enforces Rust's memory-safety " "rules." msgstr "" +"アンセヌフRustは、コヌドが正しくないこずを意味するものではありたせん。デベ" +"ロッパヌが䞀郚のコンパむラ安党性機胜をオフにし、自分で正しいコヌドを蚘述しな" +"ければならないこずを意味したす。たた、コンパむラがRustのメモリ安党性に関する" +"ルヌルを匷制しなくなるずいうこずを意味したす。" #: src/unsafe-rust/dereferencing.md msgid "Creating pointers is safe, but dereferencing them requires `unsafe`:" -msgstr "" +msgstr "ポむンタの䜜成は安党ですが、参照倖しには `unsafe` が必芁です。" #: src/unsafe-rust/dereferencing.md msgid "\"careful!\"" -msgstr "" +msgstr "\"careful!\"" #: src/unsafe-rust/dereferencing.md msgid "" @@ -10381,18 +11887,23 @@ msgid "" " // whole unsafe block, and they are not accessed either through the\n" " // references or concurrently through any other pointers.\n" msgstr "" +"// 次の理由により安党: r1 ず r2 は参照から取埗されおおり、\n" +" // 非 null で適切にアラむンされおいるこずが保蚌されおいたす。\n" +" // 取埗元である参照の基になるオブゞェクトは、\n" +" // アンセヌフブロック党䜓を通じお存続したす。参照を介したアクセスや、\n" +" // 他のポむンタを介した同時アクセスは行われたせん。\n" #: src/unsafe-rust/dereferencing.md msgid "\"r1 is: {}\"" -msgstr "" +msgstr "\"r1 is: {}\"" #: src/unsafe-rust/dereferencing.md msgid "\"uhoh\"" -msgstr "" +msgstr "\"uhoh\"" #: src/unsafe-rust/dereferencing.md msgid "\"r2 is: {}\"" -msgstr "" +msgstr "\"r2 is: {}\"" #: src/unsafe-rust/dereferencing.md msgid "" @@ -10403,6 +11914,12 @@ msgid "" " println!(\"r3 is: {}\", *r3);\n" " */" msgstr "" +"// 安党でないため、NOT SAFE。このような蚘述をしないでください。\n" +" /*\n" +" let r3: &String = unsafe { &*r1 };\n" +" drop(s);\n" +" println!(\"r3 is: {}\", *r3);\n" +" */" #: src/unsafe-rust/dereferencing.md msgid "" @@ -10410,40 +11927,50 @@ msgid "" "a comment for each `unsafe` block explaining how the code inside it " "satisfies the safety requirements of the unsafe operations it is doing." msgstr "" +"`unsafe`ブロックごずにコメントを蚘述し、そのブロック内のコヌドが行うアンセヌ" +"フな操䜜がどのように安党性芁件を満たしおいるのかを蚘述するこずをおすすめした" +"すAndroid Rust スタむルガむドでも必須ずされおいたす。" #: src/unsafe-rust/dereferencing.md msgid "" "In the case of pointer dereferences, this means that the pointers must be " "[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:" msgstr "" +"ポむンタ参照倖しの堎合、これはポむンタが [_valid_](https://doc.rust-lang.org/" +"std/ptr/index.html#safety) でなければならないこずを意味したす。぀たり、次のよ" +"うになりたす。" #: src/unsafe-rust/dereferencing.md msgid "The pointer must be non-null." -msgstr "" +msgstr "ポむンタは null 以倖でなければならないこず。" #: src/unsafe-rust/dereferencing.md msgid "" "The pointer must be _dereferenceable_ (within the bounds of a single " "allocated object)." msgstr "" +"ポむンタは、割り圓おられた単䞀のオブゞェクトの境界内で参照倖し可胜でなけ" +"ればならない。" #: src/unsafe-rust/dereferencing.md msgid "The object must not have been deallocated." -msgstr "" +msgstr "オブゞェクトが解攟されおいないこず。" #: src/unsafe-rust/dereferencing.md msgid "There must not be concurrent accesses to the same location." -msgstr "" +msgstr "同じロケヌションに同時アクセスするこずがないこず。" #: src/unsafe-rust/dereferencing.md msgid "" "If the pointer was obtained by casting a reference, the underlying object " "must be live and no reference may be used to access the memory." msgstr "" +"参照をキャストしおポむンタを取埗した堎合、基になるオブゞェクトが存続しなけれ" +"ばならず、他のいかなる参照を通しおもそのメモリにアクセスがないこず" #: src/unsafe-rust/dereferencing.md msgid "In most cases the pointer must also be properly aligned." -msgstr "" +msgstr "ほずんどの堎合、ポむンタも適切にアラむンされる必芁がありたす。" #: src/unsafe-rust/dereferencing.md msgid "" @@ -10451,28 +11978,34 @@ msgid "" "has the `'static` lifetime, so `r3` has type `&'static String`, and thus " "outlives `s`. Creating a reference from a pointer requires _great care_." msgstr "" +"\"NOT SAFE\"ずいうコメントがあるずころは、よくあるUBバグの䟋を瀺しおいたす。" +"`*r1` のラむフタむムは `'static` であるため、`r3` の型は `&'static String` ず" +"なり、`s` より長く存続したす。ポむンタからの参照の䜜成には现心の泚意が必芁で" +"す。" #: src/unsafe-rust/mutable-static.md msgid "It is safe to read an immutable static variable:" -msgstr "" +msgstr "䞍倉の静的倉数は安党に読み取るこずができたす。" #: src/unsafe-rust/mutable-static.md msgid "\"Hello, world!\"" -msgstr "" +msgstr "\"Hello, world!\"" #: src/unsafe-rust/mutable-static.md msgid "\"HELLO_WORLD: {HELLO_WORLD}\"" -msgstr "" +msgstr "\"HELLO_WORLD: {HELLO_WORLD}\"" #: src/unsafe-rust/mutable-static.md msgid "" "However, since data races can occur, it is unsafe to read and write mutable " "static variables:" msgstr "" +"ただし、デヌタ競合が発生する可胜性があるため、可倉静的倉数の読み取りず曞き蟌" +"みは安党ではありたせん。" #: src/unsafe-rust/mutable-static.md msgid "\"COUNTER: {COUNTER}\"" -msgstr "" +msgstr "\"COUNTER: {COUNTER}\"" #: src/unsafe-rust/mutable-static.md msgid "" @@ -10481,6 +12014,10 @@ msgid "" "`unsafe` and see how the compiler explains that it is undefined behavior to " "mutate a static from multiple threads." msgstr "" +"このプログラムはシングルスレッドなので安党です。しかし、Rust コンパむラは保守" +"的で、最悪の事態を想定したす。`unsafe` を削陀するず、耇数のスレッドから静的倉" +"数を倉曎するこずは未定矩の動䜜であるこずを説明するメッセヌゞがコンパむラによ" +"り衚瀺されるはずです。" #: src/unsafe-rust/mutable-static.md msgid "" @@ -10488,28 +12025,35 @@ msgid "" "where it might make sense in low-level `no_std` code, such as implementing a " "heap allocator or working with some C APIs." msgstr "" +"䞀般的に、可倉静的倉数を䜿甚するこずはおすすめしたせんが、ヒヌプ アロケヌタの" +"実装や䞀郚の C API の操䜜など、䜎レベルの `no_std` コヌドでは適しおいる堎合も" +"ありたす。" #: src/unsafe-rust/unions.md msgid "Unions are like enums, but you need to track the active field yourself:" msgstr "" +"共甚䜓は列挙型に䌌おいたすが、アクティブ フィヌルドを自分でトラッキングする必" +"芁がありたす。" #: src/unsafe-rust/unions.md msgid "\"int: {}\"" -msgstr "" +msgstr "\"int: {}\"" #: src/unsafe-rust/unions.md msgid "\"bool: {}\"" -msgstr "" +msgstr "\"bool: {}\"" #: src/unsafe-rust/unions.md msgid "// Undefined behavior!\n" -msgstr "" +msgstr "// 未定矩の動䜜\n" #: src/unsafe-rust/unions.md msgid "" "Unions are very rarely needed in Rust as you can usually use an enum. They " "are occasionally needed for interacting with C library APIs." msgstr "" +"Rust では、通垞は列挙型を䜿甚できるため、共甚䜓はほずんど必芁ありたせん。共甚" +"䜓は、C ラむブラリ API ずのやり取りで必芁になるこずがありたす。" #: src/unsafe-rust/unions.md msgid "" @@ -10518,6 +12062,10 @@ msgid "" "transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/" "crates/zerocopy) crate." msgstr "" +"バむトを別の型ずしお再解釈したい堎合は、[`std::mem::transmute`](https://doc." +"rust-lang.org/stable/std/mem/fn.transmute.html) か、[`zerocopy`](https://" +"crates.io/crates/zerocopy) クレヌトのような安党なラッパヌを䜿甚するこずをおす" +"すめしたす。" #: src/unsafe-rust/unsafe-functions.md msgid "Calling Unsafe Functions" @@ -10528,6 +12076,8 @@ msgid "" "A function or method can be marked `unsafe` if it has extra preconditions " "you must uphold to avoid undefined behaviour:" msgstr "" +"未定矩の動䜜を回避するために満たす必芁がある远加の前提条件がある関数たたはメ" +"゜ッドは、`unsafe` ずマヌクできたす。" #: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md #: src/unsafe-rust/solution.md src/android/interoperability/with-c.md @@ -10538,33 +12088,35 @@ msgstr "" #: src/exercises/bare-metal/rtc.md #: src/exercises/bare-metal/solutions-afternoon.md msgid "\"C\"" -msgstr "" +msgstr "\"C\"" #: src/unsafe-rust/unsafe-functions.md msgid "\"🗻∈🌏\"" -msgstr "" +msgstr "\"🗻∈🌏\"" #: src/unsafe-rust/unsafe-functions.md msgid "" "// Safe because the indices are in the correct order, within the bounds of\n" " // the string slice, and lie on UTF-8 sequence boundaries.\n" msgstr "" +"// むンデックスが正しい順序で文字列スラむスの境界内にあり、\n" +" // UTF-8 シヌケンスの境界䞊にあるため、安党です。\n" #: src/unsafe-rust/unsafe-functions.md msgid "\"emoji: {}\"" -msgstr "" +msgstr "\"emoji: {}\"" #: src/unsafe-rust/unsafe-functions.md msgid "\"char count: {}\"" -msgstr "" +msgstr "\"char count: {}\"" #: src/unsafe-rust/unsafe-functions.md msgid "// Undefined behavior if abs misbehaves.\n" -msgstr "" +msgstr "// abs 誀動䜜の堎合の動䜜は未定矩。\n" #: src/unsafe-rust/unsafe-functions.md msgid "\"Absolute value of -3 according to C: {}\"" -msgstr "" +msgstr "\"Absolute value of -3 according to C: {}\"" #: src/unsafe-rust/unsafe-functions.md msgid "" @@ -10573,6 +12125,10 @@ msgid "" " // println!(\"char count: {}\", count_chars(unsafe {\n" " // emojis.get_unchecked(0..3) }));\n" msgstr "" +"// UTF-8 ゚ンコヌド芁件を満たさない堎合、メモリの安党性が損なわれたす。\n" +" // println!(\"emoji: {}\", unsafe { emojis.get_unchecked(0..3) });\n" +" // println!(\"char count: {}\", count_chars(unsafe {\n" +" // emojis.get_unchecked(0..3) }));\n" #: src/unsafe-rust/unsafe-functions.md msgid "Writing Unsafe Functions" @@ -10583,6 +12139,8 @@ msgid "" "You can mark your own functions as `unsafe` if they require particular " "conditions to avoid undefined behaviour." msgstr "" +"未定矩の動䜜を回避するために特定の条件が必芁な堎合は、独自の関数を `unsafe` " +"ずマヌクできたす。" #: src/unsafe-rust/unsafe-functions.md msgid "" @@ -10592,14 +12150,19 @@ msgid "" "///\n" "/// The pointers must be valid and properly aligned.\n" msgstr "" +"/// 指定されたポむンタが指す倀をスワップしたす。\n" +"///\n" +"/// # Safety\n" +"///\n" +"/// ポむンタが有効で、適切にアラむンされおいる必芁がありたす。\n" #: src/unsafe-rust/unsafe-functions.md msgid "// Safe because ...\n" -msgstr "" +msgstr "// 安党です。理由は...\n" #: src/unsafe-rust/unsafe-functions.md msgid "\"a = {}, b = {}\"" -msgstr "" +msgstr "\"a = {}, b = {}\"" #: src/unsafe-rust/unsafe-functions.md msgid "" @@ -10610,18 +12173,27 @@ msgid "" "might violate Rust's memory model, but in general any C function might have " "undefined behaviour under any arbitrary circumstances." msgstr "" +"`get_unchecked` は倚くの`_unchecked` 関数ず同様に、範囲が正しくない堎合に UB " +"ずなる可胜性があるため、安党ではありたせん。たた、`abs`が安党でないのは、倖郚" +"関数FFIであるからです。通垞、倖郚関数の呌び出しが問題になるのポむンタを䜿" +"甚しおRustのメモリモデルに違反する凊理を行う堎合のみです。しかし、䞀般的に C " +"関数には任意の状況䞋で未定矩の動䜜が含たれる可胜性がありたす。" #: src/unsafe-rust/unsafe-functions.md msgid "" "The `\"C\"` in this example is the ABI; [other ABIs are available too]" "(https://doc.rust-lang.org/reference/items/external-blocks.html)." msgstr "" +"この䟋の `\"C\"` は ABI です[他の ABI も䜿甚できたす](https://doc.rust-" +"lang.org/reference/items/external-blocks.html)。" #: src/unsafe-rust/unsafe-functions.md msgid "" "We wouldn't actually use pointers for a `swap` function - it can be done " "safely with references." msgstr "" +"実際には、`swap` 関数ではポむンタは䜿甚したせん。これは参照を䜿甚するこずで安" +"党に実行できたす。" #: src/unsafe-rust/unsafe-functions.md msgid "" @@ -10630,6 +12202,10 @@ msgid "" "Try adding it and see what happens. This will likely change in a future Rust " "edition." msgstr "" +"アンセヌフな関数内では、アンセヌフなコヌドを`unsafe`ブロックなしに蚘述するこ" +"ずができたす。これは `#[deny(unsafe_op_in_unsafe_fn)]` で犁止できたす。远加す" +"るずどうなるか芋おみたしょう。これは、今埌の Rust ゚ディションで倉曎される可" +"胜性がありたす。" #: src/unsafe-rust/unsafe-traits.md msgid "Implementing Unsafe Traits" @@ -10640,12 +12216,16 @@ msgid "" "Like with functions, you can mark a trait as `unsafe` if the implementation " "must guarantee particular conditions to avoid undefined behaviour." msgstr "" +"関数ず同様に、未定矩の動䜜を回避するために実装で特定の条件を保蚌する必芁があ" +"る堎合は、トレむトを `unsafe` ずしおマヌクできたす。" #: src/unsafe-rust/unsafe-traits.md msgid "" "For example, the `zerocopy` crate has an unsafe trait that looks [something " "like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):" msgstr "" +"たずえば、`zerocopy` クレヌトには [このような](https://docs.rs/zerocopy/" +"latest/zerocopy/trait.AsBytes.html) 安党でないトレむトがありたす。" #: src/unsafe-rust/unsafe-traits.md msgid "" @@ -10653,26 +12233,31 @@ msgid "" "/// # Safety\n" "/// The type must have a defined representation and no padding.\n" msgstr "" +"/// ...\n" +"/// # Safety\n" +"/// 型には定矩された衚珟が必芁で、パディングがあっおはなりたせん。\n" #: src/unsafe-rust/unsafe-traits.md msgid "// Safe because u32 has a defined representation and no padding.\n" -msgstr "" +msgstr "// u32 には定矩された衚珟があり、パディングがないため、安党です。\n" #: src/unsafe-rust/unsafe-traits.md msgid "" "There should be a `# Safety` section on the Rustdoc for the trait explaining " "the requirements for the trait to be safely implemented." msgstr "" +"Rustdoc には、トレむトを安党に実装するための芁件に぀いお説明した `# Safety` " +"セクションが必芁です。" #: src/unsafe-rust/unsafe-traits.md msgid "" "The actual safety section for `AsBytes` is rather longer and more " "complicated." -msgstr "" +msgstr "`AsBytes` の実際の安党性セクションはより長く、耇雑です。" #: src/unsafe-rust/unsafe-traits.md msgid "The built-in `Send` and `Sync` traits are unsafe." -msgstr "" +msgstr "組み蟌みの `Send` トレむトず `Sync` トレむトはアンセヌフです。" #: src/unsafe-rust/exercise.md msgid "Safe FFI Wrapper" @@ -10684,22 +12269,25 @@ msgid "" "interface_ (FFI). We will use this to build a safe wrapper for the `libc` " "functions you would use from C to read the names of files in a directory." msgstr "" +"Rust は、倖郚関数むンタヌフェヌスFFIを介した関数呌び出しを匷力にサポヌト" +"しおいたす。これを䜿甚しお、ディレクトリ内のファむル名を読み取るために Cプロ" +"グラムで䜿甚する `libc` 関数の安党なラッパヌを䜜成したす。" #: src/unsafe-rust/exercise.md msgid "You will want to consult the manual pages:" -msgstr "" +msgstr "以䞋のマニュアル ペヌゞをご芧ください。" #: src/unsafe-rust/exercise.md msgid "[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)" -msgstr "" +msgstr "[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)" #: src/unsafe-rust/exercise.md msgid "[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)" -msgstr "" +msgstr "[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)" #: src/unsafe-rust/exercise.md msgid "[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)" -msgstr "" +msgstr "[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)" #: src/unsafe-rust/exercise.md msgid "" @@ -10707,114 +12295,136 @@ msgid "" "ffi/) module. There you find a number of string types which you need for the " "exercise:" msgstr "" +"[`std::ffi`](https://doc.rust-lang.org/std/ffi/) モゞュヌルも参照しおくださ" +"い。ここには、この挔習で必芁な文字列型が倚数掲茉されおいたす。" #: src/unsafe-rust/exercise.md msgid "Encoding" -msgstr "" +msgstr "゚ンコヌド" #: src/unsafe-rust/exercise.md msgid "Use" -msgstr "" +msgstr "䜿う" #: src/unsafe-rust/exercise.md msgid "" "[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]" "(https://doc.rust-lang.org/std/string/struct.String.html)" msgstr "" +"[`str`](https://doc.rust-lang.org/std/primitive.str.html) ず [`String`]" +"(https://doc.rust-lang.org/std/string/struct.String.html)" #: src/unsafe-rust/exercise.md msgid "UTF-8" -msgstr "" +msgstr "UTF-8" #: src/unsafe-rust/exercise.md msgid "Text processing in Rust" -msgstr "" +msgstr "Rust でのテキスト凊理" #: src/unsafe-rust/exercise.md msgid "" "[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]" "(https://doc.rust-lang.org/std/ffi/struct.CString.html)" msgstr "" +"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) ず [`CString`]" +"(https://doc.rust-lang.org/std/ffi/struct.CString.html)" #: src/unsafe-rust/exercise.md msgid "NUL-terminated" -msgstr "" +msgstr "NUL終端文字列" #: src/unsafe-rust/exercise.md msgid "Communicating with C functions" -msgstr "" +msgstr "C 関数ずの通信" #: src/unsafe-rust/exercise.md msgid "" "[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and " "[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)" msgstr "" +"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) ず " +"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)" #: src/unsafe-rust/exercise.md msgid "OS-specific" -msgstr "" +msgstr "OS 固有" #: src/unsafe-rust/exercise.md msgid "Communicating with the OS" -msgstr "" +msgstr "OS ずの通信" #: src/unsafe-rust/exercise.md msgid "You will convert between all these types:" -msgstr "" +msgstr "以䞋のすべおの型間で倉換を行いたす。" #: src/unsafe-rust/exercise.md msgid "" "`&str` to `CString`: you need to allocate space for a trailing `\\0` " "character," msgstr "" +"`&str` から `CString`: 末尟の `\\0` 文字にも領域を割り圓おる必芁がありたす。" #: src/unsafe-rust/exercise.md msgid "`CString` to `*const i8`: you need a pointer to call C functions," -msgstr "" +msgstr "`CString` から `*const i8`: C 関数を呌び出すためのポむンタが必芁です。" #: src/unsafe-rust/exercise.md msgid "" "`*const i8` to `&CStr`: you need something which can find the trailing `\\0` " "character," msgstr "" +"`*const i8` から `&CStr`: 末尟の `\\0` 文字を怜出できるものが必芁です。" #: src/unsafe-rust/exercise.md msgid "" "`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \"some " "unknown data\"," msgstr "" +"`&CStr` から `&[u8]`: バむトのスラむスは「䞍明なデヌタ」甚の汎甚的な むンタヌ" +"フェヌスです。" #: src/unsafe-rust/exercise.md msgid "" "`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]" "(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it," msgstr "" +"`&[u8]` から `&OsStr`: `&OsStr` は `OsString` に倉換するための䞭間ステップで" +"あり、[`OsStrExt`](https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt." +"html) を䜿甚しお䜜成したす。" #: src/unsafe-rust/exercise.md msgid "" "`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to " "return it and call `readdir` again." msgstr "" +"`&OsStr`内のデヌタを返し、さらに再びreaddirを呌び出せるようにするためには" +"`&OsStr`内のデヌタをクロヌンする必芁がありたす。" #: src/unsafe-rust/exercise.md msgid "" "The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very " "useful chapter about FFI." msgstr "" +"[Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) にも、FFI に関する有益" +"な章がありたす。" #: src/unsafe-rust/exercise.md msgid "" "Copy the code below to and fill in the missing " "functions and methods:" msgstr "" +"以䞋のコヌドを にコピヌし、䞍足しおいる関数ずメ" +"゜ッドを蚘入したす。" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "\"macos\"" -msgstr "" +msgstr "\"macos\"" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\n" msgstr "" +"// オペヌク型。https://doc.rust-lang.org/nomicon/ffi.html をご芧ください。\n" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "" @@ -10822,14 +12432,18 @@ msgid "" " // off_t are resolved according to the definitions in\n" " // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\n" msgstr "" +"// readdir(3) の Linux マニュアル ペヌゞに沿ったレむアりト。ino_t ず\n" +" // off_t は\n" +" // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h} の定矩に" +"埓っお解決されたす。\n" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "// Layout according to the macOS man page for dir(5).\n" -msgstr "" +msgstr "// macOSマニュアル ペヌゞのdir(5)に沿ったレむアりト。\n" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "\"x86_64\"" -msgstr "" +msgstr "\"x86_64\"" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "" @@ -10841,109 +12455,124 @@ msgid "" " // to macOS (as opposed to iOS / wearOS / etc.) on Intel and " "PowerPC.\n" msgstr "" +"// https://github.com/rust-lang/libc/issues/414、および macOS 版マニュアル " +"ペヌゞのstat(2)における\n" +" // _DARWIN_FEATURE_64_BIT_INODE に関するセクションをご芧ください。\n" +" //\n" +" // 「これらのアップデヌトが利甚可胜になる前に存圚しおいたプラット" +"フォヌム(\"Platforms that existed before these updates were available\")」ず" +"は、\n" +" // Intel および PowerPC 䞊の macOSiOS / wearOS などではないを指し" +"たす。\n" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "\"readdir$INODE64\"" -msgstr "" +msgstr "\"readdir$INODE64\"" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "" "// Call opendir and return a Ok value if that worked,\n" " // otherwise return Err with a message.\n" msgstr "" +"// opendir を呌び出し、成功した堎合は Ok 倀を返し、\n" +" // それ以倖の堎合はメッセヌゞずずもに Err を返したす。\n" #: src/unsafe-rust/exercise.md msgid "// Keep calling readdir until we get a NULL pointer back.\n" -msgstr "" +msgstr "// NULL ポむンタが返されるたで readdir を呌び出し続けたす。\n" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "// Call closedir as needed.\n" -msgstr "" +msgstr "// 必芁に応じお closedir を呌び出したす。\n" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md #: src/android/interoperability/with-c/rust.md msgid "\".\"" -msgstr "" +msgstr "\".\"" #: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md msgid "\"files: {:#?}\"" -msgstr "" +msgstr "\"files: {:#?}\"" #: src/unsafe-rust/solution.md msgid "\"Invalid path: {err}\"" -msgstr "" +msgstr "\"Invalid path: {err}\"" #: src/unsafe-rust/solution.md msgid "// SAFETY: path.as_ptr() cannot be NULL.\n" -msgstr "" +msgstr "// SAFETY: path.as_ptr()がNULLであるこずはありたせん。\n" #: src/unsafe-rust/solution.md msgid "\"Could not open {:?}\"" -msgstr "" +msgstr "\"Could not open {:?}\"" #: src/unsafe-rust/solution.md msgid "" "// Keep calling readdir until we get a NULL pointer back.\n" " // SAFETY: self.dir is never NULL.\n" msgstr "" +"// NULL ポむンタが返されるたで readdir を呌び出し続けたす。\n" +" // SAFETY: self.dir は決しお NULL になりたせん。\n" #: src/unsafe-rust/solution.md msgid "// We have reached the end of the directory.\n" -msgstr "" +msgstr "// ディレクトリの最埌に到達したした。\n" #: src/unsafe-rust/solution.md msgid "" "// SAFETY: dirent is not NULL and dirent.d_name is NUL\n" " // terminated.\n" msgstr "" +"// 安党: dirent は NULL ではなく、dirent.d_name は NUL\n" +" // 文字終端されおいたす。\n" #: src/unsafe-rust/solution.md msgid "// SAFETY: self.dir is not NULL.\n" -msgstr "" +msgstr "// 安党: self.dir は NULL ではありたせん。\n" #: src/unsafe-rust/solution.md msgid "\"Could not close {:?}\"" -msgstr "" +msgstr "\"Could not close {:?}\"" #: src/unsafe-rust/solution.md msgid "\"no-such-directory\"" -msgstr "" +msgstr "\"no-such-directory\"" #: src/unsafe-rust/solution.md msgid "\"Non UTF-8 character in path\"" -msgstr "" +msgstr "\"Non UTF-8 character in path\"" #: src/unsafe-rust/solution.md msgid "\"..\"" -msgstr "" +msgstr "\"..\"" #: src/unsafe-rust/solution.md msgid "\"foo.txt\"" -msgstr "" +msgstr "\"foo.txt\"" #: src/unsafe-rust/solution.md msgid "\"The Foo Diaries\\n\"" -msgstr "" +msgstr "\"The Foo Diaries\\n\"" #: src/unsafe-rust/solution.md msgid "\"bar.png\"" -msgstr "" +msgstr "\"bar.png\"" #: src/unsafe-rust/solution.md msgid "\"\\n\"" -msgstr "" +msgstr "\"\\n\"" #: src/unsafe-rust/solution.md msgid "\"crab.rs\"" -msgstr "" +msgstr "\"crab.rs\"" #: src/unsafe-rust/solution.md msgid "\"//! Crab\\n\"" -msgstr "" +msgstr "\"//! Crab\\n\"" #: src/android.md msgid "Welcome to Rust in Android" -msgstr "" +msgstr "Android での Rust ぞようこそ" #: src/android.md msgid "" @@ -10951,6 +12580,9 @@ msgid "" "write new services, libraries, drivers or even firmware in Rust (or improve " "existing code as needed)." msgstr "" +"Rust は Android のシステム ゜フトりェアでサポヌトされおいたす。぀たり、新しい" +"サヌビス、ラむブラリ、ドラむバ、さらにはファヌムりェアを Rust で䜜成できたす" +"たたは、必芁に応じお既存のコヌドを改善できたす。" #: src/android.md msgid "" @@ -10959,170 +12591,211 @@ msgid "" "to Rust. The fewer dependencies and \"exotic\" types the better. Something " "that parses some raw bytes would be ideal." msgstr "" +"本日は、皆さんのプロゞェクトの䞀぀から Rust を呌び出しおみたいず思いたす。" +"コヌドベヌスの小さな隅を芋぀けお、数行のコヌドを Rust に曞き換えおみたしょ" +"う。䟝存関係が少なく、「珍しい」型がよいでしょう。未加工のバむトを解析するも" +"のが理想的です。" #: src/android.md msgid "" "The speaker may mention any of the following given the increased use of Rust " "in Android:" msgstr "" +"Android で Rust が䜿甚されるこずが増えおいるため、次のいずれかに蚀及するこず" +"をおすすめしたす。" #: src/android.md msgid "" "Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-" "over-http3-in-android.html)" msgstr "" +"サヌビスの䟋: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-" +"over-http3-in-android.html)" #: src/android.md msgid "" "Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/" "appendix/rutabaga_gfx.html)" msgstr "" +"ラむブラリ: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/" +"appendix/rutabaga_gfx.html)" #: src/android.md msgid "" "Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-" "rust-binder-v1-0-08ba9197f637@google.com/)" msgstr "" +"カヌネル ドラむバ: [Binder](https://lore.kernel.org/rust-for-linux/20231101-" +"rust-binder-v1-0-08ba9197f637@google.com/)" #: src/android.md msgid "" "Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-" "rust-in-android.html)" msgstr "" +"ファヌムりェア: [pKVM ファヌムりェア](https://security.googleblog." +"com/2023/10/bare-metal-rust-in-android.html)" #: src/android/setup.md msgid "" "We will be using a Cuttlefish Android Virtual Device to test our code. Make " "sure you have access to one or create a new one with:" msgstr "" +"コヌドのテストのためにCuttlefish Android Virtual Device を䜿甚したす。既存の" +"Deviceがあればそれにアクセスできるこずを確認し、そうでなければ以䞋のコマンド" +"により䜜成しおおいおください。" #: src/android/setup.md msgid "" "Please see the [Android Developer Codelab](https://source.android.com/docs/" "setup/start) for details." msgstr "" +"詳しくは、[Android デベロッパヌ Codelab](https://source.android.com/docs/" +"setup/start) をご芧ください。" #: src/android/setup.md msgid "" "Cuttlefish is a reference Android device designed to work on generic Linux " "desktops. MacOS support is also planned." msgstr "" +"Cuttlefish は、䞀般的な Linux デスクトップで動䜜するように蚭蚈されたリファレ" +"ンス Android デバむスです。macOS のサポヌトも予定されおいたす。" #: src/android/setup.md msgid "" "The Cuttlefish system image maintains high fidelity to real devices, and is " "the ideal emulator to run many Rust use cases." msgstr "" +"Cuttlefish システム むメヌゞは、実際のデバむスに察する高い忠実床を維持しおい" +"るため、倚くの Rust ナヌスケヌスを実行するのに理想的な゚ミュレヌタです。" #: src/android/build-rules.md msgid "The Android build system (Soong) supports Rust via a number of modules:" msgstr "" +"Android ビルドシステムSoongは、さたざたなモゞュヌルを通じお Rust をサポヌ" +"トしおいたす。" #: src/android/build-rules.md msgid "Module Type" -msgstr "" +msgstr "モゞュヌル タむプ" #: src/android/build-rules.md msgid "Description" -msgstr "" +msgstr "説明" #: src/android/build-rules.md msgid "`rust_binary`" -msgstr "" +msgstr "`rust_binary`" #: src/android/build-rules.md msgid "Produces a Rust binary." -msgstr "" +msgstr "Rust バむナリを生成したす。" #: src/android/build-rules.md msgid "`rust_library`" -msgstr "" +msgstr "`rust_library`" #: src/android/build-rules.md msgid "Produces a Rust library, and provides both `rlib` and `dylib` variants." msgstr "" +"Rust ラむブラリを生成し、`rlib` ず `dylib` の䞡方のバリアントを提䟛したす。" #: src/android/build-rules.md msgid "`rust_ffi`" -msgstr "" +msgstr "`rust_ffi`" #: src/android/build-rules.md msgid "" "Produces a Rust C library usable by `cc` modules, and provides both static " "and shared variants." msgstr "" +"`cc` モゞュヌルで䜿甚できる Rust C ラむブラリを生成し、静的バリアントず共有バ" +"リアントの䞡方を提䟛したす。" #: src/android/build-rules.md msgid "`rust_proc_macro`" -msgstr "" +msgstr "`rust_proc_macro`" #: src/android/build-rules.md msgid "" "Produces a `proc-macro` Rust library. These are analogous to compiler " "plugins." msgstr "" +"`proc-macro` Rust ラむブラリを生成したす。これらはコンパむラ プラグむンに䌌お" +"いたす。" #: src/android/build-rules.md msgid "`rust_test`" -msgstr "" +msgstr "`rust_test`" #: src/android/build-rules.md msgid "Produces a Rust test binary that uses the standard Rust test harness." -msgstr "" +msgstr "暙準の Rust テストハヌネスを䜿甚する Rust テストバむナリを生成したす。" #: src/android/build-rules.md msgid "`rust_fuzz`" -msgstr "" +msgstr "`rust_fuzz`" #: src/android/build-rules.md msgid "Produces a Rust fuzz binary leveraging `libfuzzer`." -msgstr "" +msgstr "`libfuzzer` を利甚しお、Rust ファズバむナリを生成したす。" #: src/android/build-rules.md msgid "`rust_protobuf`" -msgstr "" +msgstr "`rust_protobuf`" #: src/android/build-rules.md msgid "" "Generates source and produces a Rust library that provides an interface for " "a particular protobuf." msgstr "" +"゜ヌスを生成し、特定の protobuf 甚のむンタヌフェヌスを提䟛する Rust ラむブラ" +"リを生成したす。" #: src/android/build-rules.md msgid "`rust_bindgen`" -msgstr "" +msgstr "`rust_bindgen`" #: src/android/build-rules.md msgid "" "Generates source and produces a Rust library containing Rust bindings to C " "libraries." msgstr "" +"゜ヌスを生成し、C ラむブラリぞの Rust バむンディングを含む Rust ラむブラリを" +"生成したす。" #: src/android/build-rules.md msgid "We will look at `rust_binary` and `rust_library` next." -msgstr "" +msgstr "次に `rust_binary` ず `rust_library` を芋おいきたす。" #: src/android/build-rules.md msgid "Additional items speaker may mention:" -msgstr "" +msgstr "远加で次の項目に蚀及するこずをおすすめしたす。" #: src/android/build-rules.md msgid "" "Cargo is not optimized for multi-language repos, and also downloads packages " "from the internet." msgstr "" +"Cargo は倚蚀語リポゞトリ甚に最適化されおいたせん。たた、むンタヌネットから" +"パッケヌゞをダりンロヌドしたす。" #: src/android/build-rules.md msgid "" "For compliance and performance, Android must have crates in-tree. It must " "also interop with C/C++/Java code. Soong fills that gap." msgstr "" +"コンプラむアンスおよびパフォヌマンス䞊の理由から、Android ではクレヌトをツ" +"リヌ内に配眮する必芁がありたす。たた、C /C++ / Java コヌドずの盞互運甚性も必" +"芁です。Soong を䜿甚するこずで、そのギャップを埋めるこずができたす。" #: src/android/build-rules.md msgid "" "Soong has many similarities to Bazel, which is the open-source variant of " "Blaze (used in google3)." msgstr "" +"Soong には、Blazegoogle3 で䜿甚のオヌプン゜ヌス版である Bazel ず倚くの類" +"䌌点がありたす。" #: src/android/build-rules.md msgid "" @@ -11131,57 +12804,66 @@ msgid "" "com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/" "build/bazel/introduction) to Bazel." msgstr "" +"[Android](https://source.android.com/docs/setup/build/bazel/introduction)、" +"[ChromeOS](https://chromium.googlesource.com/chromiumos/bazel/)、[Fuchsia]" +"(https://source.android.com/docs/setup/build/bazel/introduction) を Bazel に" +"移行する蚈画がありたす。" #: src/android/build-rules.md msgid "Learning Bazel-like build rules is useful for all Rust OS developers." msgstr "" +"Bazel のようなビルドルヌルを孊ぶこずは、すべおの Rust OS デベロッパヌに圹立ち" +"たす。" #: src/android/build-rules.md msgid "Fun fact: Data from Star Trek is a Soong-type Android." msgstr "" +"豆知識: スタヌトレックの「デヌタ」は、スンSoong型アンドロむドです。" #: src/android/build-rules/binary.md msgid "Rust Binaries" -msgstr "" +msgstr "Rust バむナリ" #: src/android/build-rules/binary.md msgid "" "Let us start with a simple application. At the root of an AOSP checkout, " "create the following files:" msgstr "" +"簡単なアプリから始めたしょう。AOSP チェックアりトのルヌトで、次のファむルを䜜" +"成したす。" #: src/android/build-rules/binary.md src/android/build-rules/library.md msgid "_hello_rust/Android.bp_:" -msgstr "" +msgstr "_hello_rust/Android.bp_:" #: src/android/build-rules/binary.md msgid "\"hello_rust\"" -msgstr "" +msgstr "\"hello_rust\"" #: src/android/build-rules/binary.md src/android/build-rules/library.md #: src/android/logging.md msgid "\"src/main.rs\"" -msgstr "" +msgstr "\"src/main.rs\"" #: src/android/build-rules/binary.md src/android/build-rules/library.md msgid "_hello_rust/src/main.rs_:" -msgstr "" +msgstr "_hello_rust/src/main.rs_:" #: src/android/build-rules/binary.md src/android/build-rules/library.md msgid "//! Rust demo.\n" -msgstr "" +msgstr "//! Rust のデモ。\n" #: src/android/build-rules/binary.md src/android/build-rules/library.md msgid "/// Prints a greeting to standard output.\n" -msgstr "" +msgstr "/// 挚拶を暙準出力に出力したす。\n" #: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md msgid "\"Hello from Rust!\"" -msgstr "" +msgstr "\"Hello from Rust!\"" #: src/android/build-rules/binary.md msgid "You can now build, push, and run the binary:" -msgstr "" +msgstr "これで、バむナリをビルド、push、実行できたす。" #: src/android/build-rules/binary.md msgid "" @@ -11191,22 +12873,28 @@ msgid "" "adb shell /data/local/tmp/hello_rust\n" "```" msgstr "" +"```shell\n" +"m hello_rust\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\" /data/local/tmp\n" +"adb shell /data/local/tmp/hello_rust\n" +"```" #: src/android/build-rules/library.md msgid "Rust Libraries" -msgstr "" +msgstr "Rust ラむブラリ" #: src/android/build-rules/library.md msgid "You use `rust_library` to create a new Rust library for Android." msgstr "" +"`rust_library` を䜿甚しお、Android 甚の新しい Rust ラむブラリを䜜成したす。" #: src/android/build-rules/library.md msgid "Here we declare a dependency on two libraries:" -msgstr "" +msgstr "ここでは、2 ぀のラむブラリぞの䟝存関係を宣蚀したす。" #: src/android/build-rules/library.md msgid "`libgreeting`, which we define below," -msgstr "" +msgstr "`libgreeting`: 以䞋で定矩したす。" #: src/android/build-rules/library.md msgid "" @@ -11214,51 +12902,54 @@ msgid "" "(https://cs.android.com/android/platform/superproject/+/master:external/rust/" "crates/)." msgstr "" +"`libtextwrap`: すでに[`external/rust/crates/`](https://cs.android.com/" +"android/platform/superproject/+/master:external/rust/crates/) に取り蟌たれお" +"いるクレヌトです。" #: src/android/build-rules/library.md msgid "\"hello_rust_with_dep\"" -msgstr "" +msgstr "\"hello_rust_with_dep\"" #: src/android/build-rules/library.md msgid "\"libgreetings\"" -msgstr "" +msgstr "\"libgreetings\"" #: src/android/build-rules/library.md msgid "\"libtextwrap\"" -msgstr "" +msgstr "\"libtextwrap\"" #: src/android/build-rules/library.md msgid "// Need this to avoid dynamic link error.\n" -msgstr "" +msgstr "// ダむナミック リンク ゚ラヌを回避するために必芁です。\n" #: src/android/build-rules/library.md msgid "\"greetings\"" -msgstr "" +msgstr "\"greetings\"" #: src/android/build-rules/library.md src/android/aidl/implementation.md #: src/android/interoperability/java.md msgid "\"src/lib.rs\"" -msgstr "" +msgstr "\"src/lib.rs\"" #: src/android/build-rules/library.md msgid "_hello_rust/src/lib.rs_:" -msgstr "" +msgstr "_hello_rust/src/lib.rs_:" #: src/android/build-rules/library.md msgid "//! Greeting library.\n" -msgstr "" +msgstr "//! 挚拶ラむブラリ。\n" #: src/android/build-rules/library.md msgid "/// Greet `name`.\n" -msgstr "" +msgstr "/// `name` に挚拶したす。\n" #: src/android/build-rules/library.md msgid "\"Hello {name}, it is very nice to meet you!\"" -msgstr "" +msgstr "\"Hello {name}, it is very nice to meet you!\"" #: src/android/build-rules/library.md msgid "You build, push, and run the binary like before:" -msgstr "" +msgstr "前ず同じようにバむナリをビルド、push、実行したす。" #: src/android/build-rules/library.md msgid "" @@ -11269,151 +12960,162 @@ msgid "" "adb shell /data/local/tmp/hello_rust_with_dep\n" "```" msgstr "" +"```shell\n" +"m hello_rust_with_dep\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\" /data/local/" +"tmp\n" +"adb shell /data/local/tmp/hello_rust_with_dep\n" +"```" #: src/android/aidl.md msgid "" "The [Android Interface Definition Language (AIDL)](https://developer.android." "com/guide/components/aidl) is supported in Rust:" msgstr "" +"Rust では [Android むンタヌフェヌス定矩蚀語AIDL](https://developer." +"android.com/guide/components/aidl) がサポヌトされおいたす。" #: src/android/aidl.md msgid "Rust code can call existing AIDL servers," -msgstr "" +msgstr "Rust コヌドは既存の AIDL サヌバヌを呌び出すこずができたす。" #: src/android/aidl.md msgid "You can create new AIDL servers in Rust." -msgstr "" +msgstr "Rust では新しい AIDL サヌバヌを䜜成できたす。" #: src/android/aidl/interface.md msgid "AIDL Interfaces" -msgstr "" +msgstr "AIDL むンタヌフェヌス" #: src/android/aidl/interface.md msgid "You declare the API of your service using an AIDL interface:" -msgstr "" +msgstr "サヌビスの API を宣蚀するには、AIDL むンタヌフェヌスを䜿甚したす。" #: src/android/aidl/interface.md msgid "" "_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" msgstr "" +"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" #: src/android/aidl/interface.md src/android/aidl/changing.md msgid "/** Birthday service interface. */" -msgstr "" +msgstr "/** 誕生日サヌビスのむンタヌフェヌス。*/" #: src/android/aidl/interface.md src/android/aidl/changing.md msgid "/** Generate a Happy Birthday message. */" -msgstr "" +msgstr "/** 「お誕生日おめでずう」ずいうメッセヌゞを生成したす。*/" #: src/android/aidl/interface.md msgid "_birthday_service/aidl/Android.bp_:" -msgstr "" +msgstr "_birthday_service/aidl/Android.bp_:" #: src/android/aidl/interface.md msgid "\"com.example.birthdayservice\"" -msgstr "" +msgstr "\"com.example.birthdayservice\"" #: src/android/aidl/interface.md msgid "\"com/example/birthdayservice/*.aidl\"" -msgstr "" +msgstr "\"com/example/birthdayservice/*.aidl\"" #: src/android/aidl/interface.md msgid "// Rust is not enabled by default\n" -msgstr "" +msgstr "// Rust はデフォルトでは無効です。\n" #: src/android/aidl/interface.md msgid "" "Add `vendor_available: true` if your AIDL file is used by a binary in the " "vendor partition." msgstr "" +"AIDL ファむルがベンダヌ パヌティション内のバむナリで䜿甚されおいる堎合は、" +"`vendor_available: true` を远加したす。" #: src/android/aidl/implementation.md msgid "Service Implementation" -msgstr "" +msgstr "サヌビスの実装" #: src/android/aidl/implementation.md msgid "We can now implement the AIDL service:" -msgstr "" +msgstr "次に、AIDL サヌビスを実装したす。" #: src/android/aidl/implementation.md msgid "_birthday_service/src/lib.rs_:" -msgstr "" +msgstr "_birthday_service/src/lib.rs_:" #: src/android/aidl/implementation.md msgid "//! Implementation of the `IBirthdayService` AIDL interface.\n" -msgstr "" +msgstr "//! `IBirthdayService` AIDL むンタヌフェヌスの実装。\n" #: src/android/aidl/implementation.md msgid "/// The `IBirthdayService` implementation.\n" -msgstr "" +msgstr "/// `IBirthdayService` の実装。\n" #: src/android/aidl/implementation.md msgid "\"Happy Birthday {name}, congratulations with the {years} years!\"" -msgstr "" +msgstr "\"Happy Birthday {name}, congratulations with the {years} years!\"" #: src/android/aidl/implementation.md src/android/aidl/server.md #: src/android/aidl/client.md msgid "_birthday_service/Android.bp_:" -msgstr "" +msgstr "_birthday_service/Android.bp_:" #: src/android/aidl/implementation.md src/android/aidl/server.md msgid "\"libbirthdayservice\"" -msgstr "" +msgstr "\"libbirthdayservice\"" #: src/android/aidl/implementation.md src/android/aidl/server.md #: src/android/aidl/client.md msgid "\"birthdayservice\"" -msgstr "" +msgstr "\"birthdayservice\"" #: src/android/aidl/implementation.md src/android/aidl/server.md #: src/android/aidl/client.md msgid "\"com.example.birthdayservice-rust\"" -msgstr "" +msgstr "\"com.example.birthdayservice-rust\"" #: src/android/aidl/implementation.md src/android/aidl/server.md #: src/android/aidl/client.md msgid "\"libbinder_rs\"" -msgstr "" +msgstr "\"libbinder_rs\"" #: src/android/aidl/server.md msgid "AIDL Server" -msgstr "" +msgstr "AIDL サヌバヌ" #: src/android/aidl/server.md msgid "Finally, we can create a server which exposes the service:" -msgstr "" +msgstr "次に、サヌビスを公開するサヌバヌを䜜成したす。" #: src/android/aidl/server.md msgid "_birthday_service/src/server.rs_:" -msgstr "" +msgstr "_birthday_service/src/server.rs_:" #: src/android/aidl/server.md src/android/aidl/client.md msgid "//! Birthday service.\n" -msgstr "" +msgstr "//! 誕生日サヌビス。\n" #: src/android/aidl/server.md msgid "/// Entry point for birthday service.\n" -msgstr "" +msgstr "/// 誕生日サヌビスの゚ントリ ポむント。\n" #: src/android/aidl/server.md msgid "\"Failed to register service\"" -msgstr "" +msgstr "\"Failed to register service\"" #: src/android/aidl/server.md msgid "\"birthday_server\"" -msgstr "" +msgstr "\"birthday_server\"" #: src/android/aidl/server.md msgid "\"src/server.rs\"" -msgstr "" +msgstr "\"src/server.rs\"" #: src/android/aidl/server.md src/android/aidl/client.md msgid "// To avoid dynamic link error.\n" -msgstr "" +msgstr "// ダむナミック リンク ゚ラヌを回避するためです。\n" #: src/android/aidl/deploy.md msgid "We can now build, push, and start the service:" -msgstr "" +msgstr "次に、サヌビスをビルド、push、開始したす。" #: src/android/aidl/deploy.md msgid "" @@ -11425,58 +13127,66 @@ msgid "" "adb shell /data/local/tmp/birthday_server\n" "```" msgstr "" +"```shell\n" +"m birthday_server\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\" /data/local/" +"tmp\n" +"adb root\n" +"adb shell /data/local/tmp/birthday_server\n" +"```" #: src/android/aidl/deploy.md msgid "In another terminal, check that the service runs:" -msgstr "" +msgstr "別のタヌミナルで、サヌビスが実行されおいるこずを確認したす。" #: src/android/aidl/deploy.md msgid "You can also call the service with `service call`:" -msgstr "" +msgstr "`service call` を䜿甚しおサヌビスを呌び出すこずもできたす。" #: src/android/aidl/client.md msgid "AIDL Client" -msgstr "" +msgstr "AIDL クラむアント" #: src/android/aidl/client.md msgid "Finally, we can create a Rust client for our new service." -msgstr "" +msgstr "ようやくここで、新しいサヌビス甚の Rust クラむアントを䜜成したす。" #: src/android/aidl/client.md msgid "_birthday_service/src/client.rs_:" -msgstr "" +msgstr "_birthday_service/src/client.rs_:" #: src/android/aidl/client.md msgid "/// Connect to the BirthdayService.\n" -msgstr "" +msgstr "/// BirthdayService に接続したす。\n" #: src/android/aidl/client.md msgid "/// Call the birthday service.\n" -msgstr "" +msgstr "/// 誕生日サヌビスを呌び出したす。\n" #: src/android/aidl/client.md msgid "\"Failed to connect to BirthdayService\"" -msgstr "" +msgstr "\"Failed to connect to BirthdayService\"" #: src/android/aidl/client.md msgid "\"{msg}\"" -msgstr "" +msgstr "\"{msg}\"" #: src/android/aidl/client.md msgid "\"birthday_client\"" -msgstr "" +msgstr "\"birthday_client\"" #: src/android/aidl/client.md msgid "\"src/client.rs\"" -msgstr "" +msgstr "\"src/client.rs\"" #: src/android/aidl/client.md msgid "Notice that the client does not depend on `libbirthdayservice`." msgstr "" +"クラむアントが `libbirthdayservice` に䟝存しおいないこずに泚目しおください。" #: src/android/aidl/client.md msgid "Build, push, and run the client on your device:" -msgstr "" +msgstr "デバむスでクラむアントをビルド、push、実行したす。" #: src/android/aidl/client.md msgid "" @@ -11487,67 +13197,77 @@ msgid "" "adb shell /data/local/tmp/birthday_client Charlie 60\n" "```" msgstr "" +"```shell\n" +"m birthday_client\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\" /data/local/" +"tmp\n" +"adb shell /data/local/tmp/birthday_client Charlie 60\n" +"```" #: src/android/aidl/changing.md msgid "" "Let us extend the API with more functionality: we want to let clients " "specify a list of lines for the birthday card:" msgstr "" +"APIを拡匵しお、クラむアントが誕生日カヌドに远加する耇数行のメッセヌゞを指定で" +"きるようにしたす。" #: src/android/logging.md msgid "" "You should use the `log` crate to automatically log to `logcat` (on-device) " "or `stdout` (on-host):" msgstr "" +"`log` クレヌトを䜿甚しお、自動的に デバむス䞊では`logcat` たたは ホスト" +"䞊では`stdout`にログを蚘録するようにしたす。" #: src/android/logging.md msgid "_hello_rust_logs/Android.bp_:" -msgstr "" +msgstr "_hello_rust_logs/Android.bp_:" #: src/android/logging.md msgid "\"hello_rust_logs\"" -msgstr "" +msgstr "\"hello_rust_logs\"" #: src/android/logging.md msgid "\"liblog_rust\"" -msgstr "" +msgstr "\"liblog_rust\"" #: src/android/logging.md msgid "\"liblogger\"" -msgstr "" +msgstr "\"liblogger\"" #: src/android/logging.md msgid "_hello_rust_logs/src/main.rs_:" -msgstr "" +msgstr "_hello_rust_logs/src/main.rs_:" #: src/android/logging.md msgid "//! Rust logging demo.\n" -msgstr "" +msgstr "//! Rust ロギングのデモ。\n" #: src/android/logging.md msgid "/// Logs a greeting.\n" -msgstr "" +msgstr "/// 挚拶をログに蚘録したす。\n" #: src/android/logging.md msgid "\"rust\"" -msgstr "" +msgstr "\"rust\"" #: src/android/logging.md msgid "\"Starting program.\"" -msgstr "" +msgstr "\"Starting program.\"" #: src/android/logging.md msgid "\"Things are going fine.\"" -msgstr "" +msgstr "\"Things are going fine.\"" #: src/android/logging.md msgid "\"Something went wrong!\"" -msgstr "" +msgstr "\"Something went wrong!\"" #: src/android/logging.md src/android/interoperability/with-c/bindgen.md #: src/android/interoperability/with-c/rust.md msgid "Build, push, and run the binary on your device:" -msgstr "" +msgstr "デバむスでバむナリをビルド、push、実行したす。" #: src/android/logging.md msgid "" @@ -11558,176 +13278,196 @@ msgid "" "adb shell /data/local/tmp/hello_rust_logs\n" "```" msgstr "" +"```shell\n" +"m hello_rust_logs\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\" /data/local/" +"tmp\n" +"adb shell /data/local/tmp/hello_rust_logs\n" +"```" #: src/android/logging.md msgid "The logs show up in `adb logcat`:" -msgstr "" +msgstr "`adb logcat` でログを衚瀺できたす。" #: src/android/interoperability.md msgid "" "Rust has excellent support for interoperability with other languages. This " "means that you can:" -msgstr "" +msgstr "Rust は他の蚀語ずの盞互運甚性に優れおいるため、次のこずが可胜です。" #: src/android/interoperability.md msgid "Call Rust functions from other languages." -msgstr "" +msgstr "他の蚀語から Rust 関数を呌び出す。" #: src/android/interoperability.md msgid "Call functions written in other languages from Rust." -msgstr "" +msgstr "Rust から他の蚀語で蚘述された関数を呌び出す。" #: src/android/interoperability.md msgid "" "When you call functions in a foreign language we say that you're using a " "_foreign function interface_, also known as FFI." msgstr "" +"他の蚀語の関数を呌び出す堎合は、倖郚関数むンタヌフェヌスFFI: _foreign " +"function interface_を䜿甚したす。" #: src/android/interoperability/with-c.md msgid "Interoperability with C" -msgstr "" +msgstr "C ずの盞互運甚性" #: src/android/interoperability/with-c.md msgid "" "Rust has full support for linking object files with a C calling convention. " "Similarly, you can export Rust functions and call them from C." msgstr "" +"Rust は、C の呌び出し芏則によるオブゞェクト ファむルのリンクを完党にサポヌト" +"しおいたす。同様に、Rust 関数を゚クスポヌトしお C から呌び出すこずができた" +"す。" #: src/android/interoperability/with-c.md msgid "You can do it by hand if you want:" -msgstr "" +msgstr "これは手動で行うこずもできたす。" #: src/android/interoperability/with-c.md msgid "\"{x}, {abs_x}\"" -msgstr "" +msgstr "\"{x}, {abs_x}\"" #: src/android/interoperability/with-c.md msgid "" "We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/" "safe-ffi-wrapper.md)." msgstr "" +"これは、[安党な FFI ラッパヌの挔習](../../exercises/day-3/safe-ffi-wrapper." +"md)ですでに取り扱いたした。" #: src/android/interoperability/with-c.md msgid "" "This assumes full knowledge of the target platform. Not recommended for " "production." msgstr "" +"これは、タヌゲット プラットフォヌムを完党に理解しおいるこずを前提ずしおいた" +"す。本番環境での䜿甚掚奚されたせん。" #: src/android/interoperability/with-c.md msgid "We will look at better options next." -msgstr "" +msgstr "次に、より良い遞択肢を芋おいきたす。" #: src/android/interoperability/with-c/bindgen.md msgid "Using Bindgen" -msgstr "" +msgstr "Bindgen の䜿甚" #: src/android/interoperability/with-c/bindgen.md msgid "" "The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) " "tool can auto-generate bindings from a C header file." msgstr "" +"[bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) ツヌル" +"を䜿甚するず、C ヘッダヌ ファむルからバむンディングを自動生成できたす。" #: src/android/interoperability/with-c/bindgen.md msgid "First create a small C library:" -msgstr "" +msgstr "たず、小さな C ラむブラリを䜜成したす。" #: src/android/interoperability/with-c/bindgen.md msgid "_interoperability/bindgen/libbirthday.h_:" -msgstr "" +msgstr "_interoperability/bindgen/libbirthday.h_:" #: src/android/interoperability/with-c/bindgen.md msgid "_interoperability/bindgen/libbirthday.c_:" -msgstr "" +msgstr "_interoperability/bindgen/libbirthday.c_:" #: src/android/interoperability/with-c/bindgen.md msgid "" -msgstr "" +msgstr "" #: src/android/interoperability/with-c/bindgen.md msgid "\"libbirthday.h\"" -msgstr "" +msgstr "\"libbirthday.h\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"+--------------\\n\"" -msgstr "" +msgstr "\"+--------------\\n\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"| Happy Birthday %s!\\n\"" -msgstr "" +msgstr "\"| Happy Birthday %s!\\n\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"| Congratulations with the %i years!\\n\"" -msgstr "" +msgstr "\"| Congratulations with the %i years!\\n\"" #: src/android/interoperability/with-c/bindgen.md msgid "Add this to your `Android.bp` file:" -msgstr "" +msgstr "これを `Android.bp` ファむルに远加したす。" #: src/android/interoperability/with-c/bindgen.md msgid "_interoperability/bindgen/Android.bp_:" -msgstr "" +msgstr "_interoperability/bindgen/Android.bp_:" #: src/android/interoperability/with-c/bindgen.md msgid "\"libbirthday\"" -msgstr "" +msgstr "\"libbirthday\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"libbirthday.c\"" -msgstr "" +msgstr "\"libbirthday.c\"" #: src/android/interoperability/with-c/bindgen.md msgid "" "Create a wrapper header file for the library (not strictly needed in this " "example):" msgstr "" +"ラむブラリのラッパヌ ヘッダヌ ファむルを䜜成したすこの䟋では必須ではありた" +"せん。" #: src/android/interoperability/with-c/bindgen.md msgid "_interoperability/bindgen/libbirthday_wrapper.h_:" -msgstr "" +msgstr "_interoperability/bindgen/libbirthday_wrapper.h_:" #: src/android/interoperability/with-c/bindgen.md msgid "You can now auto-generate the bindings:" -msgstr "" +msgstr "これで、バむンディングを自動生成できたす。" #: src/android/interoperability/with-c/bindgen.md msgid "\"libbirthday_bindgen\"" -msgstr "" +msgstr "\"libbirthday_bindgen\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"birthday_bindgen\"" -msgstr "" +msgstr "\"birthday_bindgen\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"libbirthday_wrapper.h\"" -msgstr "" +msgstr "\"libbirthday_wrapper.h\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"bindings\"" -msgstr "" +msgstr "\"bindings\"" #: src/android/interoperability/with-c/bindgen.md msgid "Finally, we can use the bindings in our Rust program:" -msgstr "" +msgstr "これで、Rust プログラムでバむンディングを䜿甚できたす。" #: src/android/interoperability/with-c/bindgen.md msgid "\"print_birthday_card\"" -msgstr "" +msgstr "\"print_birthday_card\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"main.rs\"" -msgstr "" +msgstr "\"main.rs\"" #: src/android/interoperability/with-c/bindgen.md msgid "_interoperability/bindgen/main.rs_:" -msgstr "" +msgstr "_interoperability/bindgen/main.rs_:" #: src/android/interoperability/with-c/bindgen.md msgid "//! Bindgen demo.\n" -msgstr "" +msgstr "//! Bindgen のデモ。\n" #: src/android/interoperability/with-c/bindgen.md msgid "// SAFETY: `print_card` is safe to call with a valid `card` pointer.\n" msgstr "" +"// SAFETY: `print_card` は有効な `card` ポむンタで安党に呌び出せたす。\n" #: src/android/interoperability/with-c/bindgen.md msgid "" @@ -11738,102 +13478,110 @@ msgid "" "adb shell /data/local/tmp/print_birthday_card\n" "```" msgstr "" +"```shell\n" +"m print_birthday_card\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\" /data/local/" +"tmp\n" +"adb shell /data/local/tmp/print_birthday_card\n" +"```" #: src/android/interoperability/with-c/bindgen.md msgid "Finally, we can run auto-generated tests to ensure the bindings work:" msgstr "" +"これで、自動生成されたテストを実行しお、バむンディングが機胜しおいるこずを確" +"認できたす。" #: src/android/interoperability/with-c/bindgen.md msgid "\"libbirthday_bindgen_test\"" -msgstr "" +msgstr "\"libbirthday_bindgen_test\"" #: src/android/interoperability/with-c/bindgen.md msgid "\":libbirthday_bindgen\"" -msgstr "" +msgstr "\":libbirthday_bindgen\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"general-tests\"" -msgstr "" +msgstr "\"general-tests\"" #: src/android/interoperability/with-c/bindgen.md msgid "\"none\"" -msgstr "" +msgstr "\"none\"" #: src/android/interoperability/with-c/bindgen.md msgid "// Generated file, skip linting\n" -msgstr "" +msgstr "// 生成されたファむル、lint チェックをスキップ\n" #: src/android/interoperability/with-c/rust.md msgid "Calling Rust" -msgstr "" +msgstr "Rust の呌び出し" #: src/android/interoperability/with-c/rust.md msgid "Exporting Rust functions and types to C is easy:" -msgstr "" +msgstr "Rust の関数ず型は、C に簡単に゚クスポヌトできたす。" #: src/android/interoperability/with-c/rust.md msgid "_interoperability/rust/libanalyze/analyze.rs_" -msgstr "" +msgstr "_interoperability/rust/libanalyze/analyze.rs_" #: src/android/interoperability/with-c/rust.md msgid "//! Rust FFI demo.\n" -msgstr "" +msgstr "//! Rust FFI のデモ。\n" #: src/android/interoperability/with-c/rust.md msgid "/// Analyze the numbers.\n" -msgstr "" +msgstr "/// 数倀を分析したす。\n" #: src/android/interoperability/with-c/rust.md msgid "\"x ({x}) is smallest!\"" -msgstr "" +msgstr "\"x ({x}) is smallest!\"" #: src/android/interoperability/with-c/rust.md msgid "\"y ({y}) is probably larger than x ({x})\"" -msgstr "" +msgstr "\"y ({y}) is probably larger than x ({x})\"" #: src/android/interoperability/with-c/rust.md msgid "_interoperability/rust/libanalyze/analyze.h_" -msgstr "" +msgstr "_interoperability/rust/libanalyze/analyze.h_" #: src/android/interoperability/with-c/rust.md msgid "_interoperability/rust/libanalyze/Android.bp_" -msgstr "" +msgstr "_interoperability/rust/libanalyze/Android.bp_" #: src/android/interoperability/with-c/rust.md msgid "\"libanalyze_ffi\"" -msgstr "" +msgstr "\"libanalyze_ffi\"" #: src/android/interoperability/with-c/rust.md msgid "\"analyze_ffi\"" -msgstr "" +msgstr "\"analyze_ffi\"" #: src/android/interoperability/with-c/rust.md msgid "\"analyze.rs\"" -msgstr "" +msgstr "\"analyze.rs\"" #: src/android/interoperability/with-c/rust.md msgid "We can now call this from a C binary:" -msgstr "" +msgstr "これで、これを C バむナリから呌び出せるようになりたした。" #: src/android/interoperability/with-c/rust.md msgid "_interoperability/rust/analyze/main.c_" -msgstr "" +msgstr "_interoperability/rust/analyze/main.c_" #: src/android/interoperability/with-c/rust.md msgid "\"analyze.h\"" -msgstr "" +msgstr "\"analyze.h\"" #: src/android/interoperability/with-c/rust.md msgid "_interoperability/rust/analyze/Android.bp_" -msgstr "" +msgstr "_interoperability/rust/analyze/Android.bp_" #: src/android/interoperability/with-c/rust.md msgid "\"analyze_numbers\"" -msgstr "" +msgstr "\"analyze_numbers\"" #: src/android/interoperability/with-c/rust.md msgid "\"main.c\"" -msgstr "" +msgstr "\"main.c\"" #: src/android/interoperability/with-c/rust.md msgid "" @@ -11844,6 +13592,12 @@ msgid "" "adb shell /data/local/tmp/analyze_numbers\n" "```" msgstr "" +"```shell\n" +"m analyze_numbers\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\" /data/local/" +"tmp\n" +"adb shell /data/local/tmp/analyze_numbers\n" +"```" #: src/android/interoperability/with-c/rust.md msgid "" @@ -11851,16 +13605,21 @@ msgid "" "will just be the name of the function. You can also use `#[export_name = " "\"some_name\"]` to specify whatever name you want." msgstr "" +"`#[no_mangle]` により Rust の通垞の名前のマングリングが無効になるため、゚クス" +"ポヌトされたシンボルは単に関数の名前になりたす。`#[export_name = " +"\"some_name\"]` を䜿甚しお任意の名前を指定するこずもできたす。" #: src/android/interoperability/cpp.md msgid "" "The [CXX crate](https://cxx.rs/) makes it possible to do safe " "interoperability between Rust and C++." msgstr "" +"[CXX クレヌト](https://cxx.rs/)を䜿甚するず、Rust ず C++ の間で安党な盞互運甚" +"性を確保できたす。" #: src/android/interoperability/cpp.md msgid "The overall approach looks like this:" -msgstr "" +msgstr "党䜓的なアプロヌチは次のようになりたす。" #: src/android/interoperability/cpp/bridge.md msgid "" @@ -11868,19 +13627,22 @@ msgid "" "from each language to the other. You provide this description using extern " "blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro." msgstr "" +"CXX は、各蚀語から他の蚀語に公開される関数シグネチャの蚘述に䟝存したす。この" +"蚘述は、`#[cxx::bridge]` 属性マクロでアノテヌションされた Rust モゞュヌル内" +"の extern ブロックを䜿甚しお指定したす。" #: src/android/interoperability/cpp/bridge.md msgid "\"org::blobstore\"" -msgstr "" +msgstr "\"org::blobstore\"" #: src/android/interoperability/cpp/bridge.md msgid "// Shared structs with fields visible to both languages.\n" -msgstr "" +msgstr "// 䞡方の蚀語からアクセスできるフィヌルドを持぀共有構造䜓。\n" #: src/android/interoperability/cpp/bridge.md #: src/android/interoperability/cpp/generated-cpp.md msgid "// Rust types and signatures exposed to C++.\n" -msgstr "" +msgstr "// C++ に公開される Rust の型ずシグネチャ。\n" #: src/android/interoperability/cpp/bridge.md #: src/android/interoperability/cpp/rust-bridge.md @@ -11889,30 +13651,29 @@ msgstr "" #: src/chromium/interoperability-with-cpp/example-bindings.md #: src/chromium/interoperability-with-cpp/error-handling-qr.md #: src/chromium/interoperability-with-cpp/error-handling-png.md -#, fuzzy msgid "\"Rust\"" -msgstr "Rustdoc" +msgstr "\"Rust\"" #: src/android/interoperability/cpp/bridge.md #: src/android/interoperability/cpp/cpp-bridge.md msgid "// C++ types and signatures exposed to Rust.\n" -msgstr "" +msgstr "// Rust に公開される C++ の型ずシグネチャ。\n" #: src/android/interoperability/cpp/bridge.md #: src/android/interoperability/cpp/cpp-bridge.md #: src/android/interoperability/cpp/cpp-exception.md #: src/chromium/interoperability-with-cpp/example-bindings.md msgid "\"C++\"" -msgstr "" +msgstr "\"C++\"" #: src/android/interoperability/cpp/bridge.md #: src/android/interoperability/cpp/cpp-bridge.md msgid "\"include/blobstore.h\"" -msgstr "" +msgstr "\"include/blobstore.h\"" #: src/android/interoperability/cpp/bridge.md msgid "The bridge is generally declared in an `ffi` module within your crate." -msgstr "" +msgstr "ブリッゞは通垞、クレヌト内の `ffi` モゞュヌルで宣蚀したす。" #: src/android/interoperability/cpp/bridge.md msgid "" @@ -11920,6 +13681,8 @@ msgid "" "Rust and C++ type/function definitions in order to expose those items to " "both languages." msgstr "" +"ブリッゞ モゞュヌルで行われた宣蚀から、CXX はマッチする Rust ず C++ の型 / 関" +"数の定矩を生成し、これらのアむテムを䞡方の蚀語に公開したす。" #: src/android/interoperability/cpp/bridge.md msgid "" @@ -11928,22 +13691,26 @@ msgid "" "examples you would use `cargo expand ::ffi` to expand just the `ffi` module " "(though this doesn't apply for Android projects)." msgstr "" +"生成された Rust コヌドを衚瀺するには、[cargo-expand](https://github.com/" +"dtolnay/cargo-expand) を䜿甚しお、展開された proc マクロを衚瀺したす。ほずん" +"どの䟋では、`cargo expand ::ffi` を䜿甚しお `ffi` モゞュヌルのみを展開したす" +"ただし、これは Android プロゞェクトには圓おはたりたせん。" #: src/android/interoperability/cpp/bridge.md msgid "To view the generated C++ code, look in `target/cxxbridge`." -msgstr "" +msgstr "生成された C++ コヌドを衚瀺するには、`target/cxxbridge` を確認したす。" #: src/android/interoperability/cpp/rust-bridge.md msgid "Rust Bridge Declarations" -msgstr "" +msgstr "Rust のブリッゞ宣蚀" #: src/android/interoperability/cpp/rust-bridge.md msgid "// Opaque type\n" -msgstr "" +msgstr "// オペヌク型\n" #: src/android/interoperability/cpp/rust-bridge.md msgid "// Method on `MyType`\n" -msgstr "" +msgstr "// `MyType` のメ゜ッド\n" #: src/android/interoperability/cpp/rust-bridge.md #, fuzzy @@ -11955,6 +13722,8 @@ msgid "" "Items declared in the `extern \"Rust\"` reference items that are in scope in " "the parent module." msgstr "" +"芪モゞュヌルのスコヌプ内にある `extern \"Rust\"` 参照アむテムで宣蚀されたアむ" +"テム。" #: src/android/interoperability/cpp/rust-bridge.md msgid "" @@ -11963,26 +13732,30 @@ msgid "" "header has the same path as the Rust source file containing the bridge, " "except with a .rs.h file extension." msgstr "" +"CXX コヌド ゞェネレヌタは、`extern \"Rust\"` セクションを䜿甚しお、察応する " +"C++ 宣蚀を含む C++ ヘッダヌ ファむルを生成したす。生成されるヘッダヌのパス" +"は、rs.hずいうファむル拡匵子郚分を陀き、ブリッゞを含む Rust ゜ヌスファむルず" +"同じになりたす。" #: src/android/interoperability/cpp/generated-cpp.md msgid "Results in (roughly) the following C++:" -msgstr "" +msgstr "おおよそ次のような C++ が生成されたす。" #: src/android/interoperability/cpp/cpp-bridge.md msgid "C++ Bridge Declarations" -msgstr "" +msgstr "C++ のブリッゞ宣蚀" #: src/android/interoperability/cpp/cpp-bridge.md msgid "Results in (roughly) the following Rust:" -msgstr "" +msgstr "おおよそ次のような Rust が生成されたす。" #: src/android/interoperability/cpp/cpp-bridge.md msgid "\"org$blobstore$cxxbridge1$new_blobstore_client\"" -msgstr "" +msgstr "\"org$blobstore$cxxbridge1$new_blobstore_client\"" #: src/android/interoperability/cpp/cpp-bridge.md msgid "\"org$blobstore$cxxbridge1$BlobstoreClient$put\"" -msgstr "" +msgstr "\"org$blobstore$cxxbridge1$BlobstoreClient$put\"" #: src/android/interoperability/cpp/cpp-bridge.md msgid "" @@ -11990,20 +13763,25 @@ msgid "" "in are accurate. CXX performs static assertions that the signatures exactly " "correspond with what is declared in C++." msgstr "" +"プログラマヌは、入力したシグネチャが正確であるこずを保蚌する必芁はありたせ" +"ん。CXX は、シグネチャが C++ で宣蚀されたものず完党に察応するずいうこずを静的" +"に保蚌したす。" #: src/android/interoperability/cpp/cpp-bridge.md msgid "" "`unsafe extern` blocks allow you to declare C++ functions that are safe to " "call from Rust." msgstr "" +"`unsafe extern` ブロックを䜿甚するず、Rust から安党に呌び出せる C++ 関数を宣" +"蚀できたす。" #: src/android/interoperability/cpp/shared-types.md msgid "// A=1, J=11, Q=12, K=13\n" -msgstr "" +msgstr "// A=1、J=11、Q=12、K=13\n" #: src/android/interoperability/cpp/shared-types.md msgid "Only C-like (unit) enums are supported." -msgstr "" +msgstr "C のような単䜍列挙型のみがサポヌトされおいたす。" #: src/android/interoperability/cpp/shared-types.md msgid "" @@ -12012,15 +13790,17 @@ msgid "" "derive `Hash` also generates an implementation of `std::hash` for the " "corresponding C++ type." msgstr "" +"共有型の `#[derive()]` では、サポヌトされるトレむトの数が限られおいたす。察応" +"する機胜は C++ コヌドでも生成されたす。たずえば、`Hash` を導出するず、察応す" +"る C++ 型の `std::hash` の実装も生成されたす。" #: src/android/interoperability/cpp/shared-enums.md -#, fuzzy msgid "Generated Rust:" -msgstr "Unsafe Rust" +msgstr "生成された Rust:" #: src/android/interoperability/cpp/shared-enums.md msgid "Generated C++:" -msgstr "" +msgstr "生成された C++:" #: src/android/interoperability/cpp/shared-enums.md msgid "" @@ -12029,20 +13809,24 @@ msgid "" "class to hold a value different from all of the listed variants, and our " "Rust representation needs to have the same behavior." msgstr "" +"Rust 偎では、共有列挙型に察しお生成されるコヌドは、実際には数倀をラップした構" +"造䜓です。これは、列挙型クラスがリストされたすべおのバリアントずは異なる倀を" +"保持するこずは C++ では UB ではなく、Rust 衚珟は同じ動䜜をする必芁があるため" +"です。" #: src/android/interoperability/cpp/rust-result.md msgid "\"fallible1 requires depth > 0\"" -msgstr "" +msgstr "\"fallible1 requires depth > 0\"" #: src/android/interoperability/cpp/rust-result.md msgid "\"Success!\"" -msgstr "" +msgstr "\"Success!\"" #: src/android/interoperability/cpp/rust-result.md msgid "" "Rust functions that return `Result` are translated to exceptions on the C++ " "side." -msgstr "" +msgstr "`Result` を返す Rust 関数は、C++ 偎で䟋倖に倉換されたす。" #: src/android/interoperability/cpp/rust-result.md msgid "" @@ -12050,26 +13834,33 @@ msgid "" "exposes a way to get the error message string. The error message will come " "from the error type's `Display` impl." msgstr "" +"スロヌされる䟋倖は垞に `rust::Error` 型で、䞻に゚ラヌ メッセヌゞの文字列を取" +"埗する手段を提䟛したす。゚ラヌ メッセヌゞは、゚ラヌ型の `Display` の実装から" +"取埗されたす。" #: src/android/interoperability/cpp/rust-result.md msgid "" "A panic unwinding from Rust to C++ will always cause the process to " "immediately terminate." msgstr "" +"Rust から C++ にパニック アンワむンドを行うず、プロセスは必ず盎ちに終了した" +"す。" #: src/android/interoperability/cpp/cpp-exception.md msgid "\"example/include/example.h\"" -msgstr "" +msgstr "\"example/include/example.h\"" #: src/android/interoperability/cpp/cpp-exception.md msgid "\"Error: {}\"" -msgstr "" +msgstr "\"Error: {}\"" #: src/android/interoperability/cpp/cpp-exception.md msgid "" "C++ functions declared to return a `Result` will catch any thrown exception " "on the C++ side and return it as an `Err` value to the calling Rust function." msgstr "" +"`Result` を返すように宣蚀された C++ 関数は、C++ 偎でスロヌされたあらゆる䟋倖" +"をキャッチし、呌び出し元の Rust 関数に `Err` 倀ずしお返したす。" #: src/android/interoperability/cpp/cpp-exception.md msgid "" @@ -12078,139 +13869,150 @@ msgid "" "terminate`. The behavior is equivalent to the same exception being thrown " "through a `noexcept` C++ function." msgstr "" +"CXX ブリッゞでResultを返すように宣蚀されおいないextern \"C++\"関数から䟋倖が" +"スロヌされるず、`Result`が返されるず、プログラムは C++ の`std::terminate`ã‚’å‘Œ" +"び出したす。この動䜜は、同じ䟋倖が`noexcept` C++ 関数でスロヌされた堎合ず同等" +"です。" #: src/android/interoperability/cpp/type-mapping.md -#, fuzzy msgid "Rust Type" -msgstr "再垰的デヌタ型" +msgstr "Rust 型" #: src/android/interoperability/cpp/type-mapping.md msgid "C++ Type" -msgstr "" +msgstr "C++ 型" #: src/android/interoperability/cpp/type-mapping.md -#, fuzzy msgid "`rust::String`" -msgstr "文字列String" +msgstr "`rust::String`" #: src/android/interoperability/cpp/type-mapping.md msgid "`&str`" -msgstr "" +msgstr "`&str`" #: src/android/interoperability/cpp/type-mapping.md msgid "`rust::Str`" -msgstr "" +msgstr "`rust::Str`" #: src/android/interoperability/cpp/type-mapping.md #, fuzzy msgid "`CxxString`" -msgstr "文字列String" +msgstr "`CxxString`" #: src/android/interoperability/cpp/type-mapping.md -#, fuzzy msgid "`std::string`" -msgstr "文字列String" +msgstr "`std::string`" #: src/android/interoperability/cpp/type-mapping.md msgid "`&[T]`/`&mut [T]`" -msgstr "" +msgstr "`&[T]`/`&mut [T]`" #: src/android/interoperability/cpp/type-mapping.md msgid "`rust::Slice`" -msgstr "" +msgstr "`rust::Slice`" #: src/android/interoperability/cpp/type-mapping.md msgid "`rust::Box`" -msgstr "" +msgstr "`rust::Box`" #: src/android/interoperability/cpp/type-mapping.md msgid "`UniquePtr`" -msgstr "" +msgstr "`UniquePtr`" #: src/android/interoperability/cpp/type-mapping.md msgid "`std::unique_ptr`" -msgstr "" +msgstr "`std::unique_ptr`" #: src/android/interoperability/cpp/type-mapping.md msgid "`Vec`" -msgstr "" +msgstr "`Vec`" #: src/android/interoperability/cpp/type-mapping.md msgid "`rust::Vec`" -msgstr "" +msgstr "`rust::Vec`" #: src/android/interoperability/cpp/type-mapping.md msgid "`CxxVector`" -msgstr "" +msgstr "`CxxVector`" #: src/android/interoperability/cpp/type-mapping.md msgid "`std::vector`" -msgstr "" +msgstr "`std::vector`" #: src/android/interoperability/cpp/type-mapping.md msgid "" "These types can be used in the fields of shared structs and the arguments " "and returns of extern functions." msgstr "" +"これらの型は、共有構造䜓のフィヌルドず、extern 関数の匕数ず戻り倀で䜿甚できた" +"す。" #: src/android/interoperability/cpp/type-mapping.md msgid "" "Note that Rust's `String` does not map directly to `std::string`. There are " "a few reasons for this:" msgstr "" +"Rust の `String` は `std::string` に盎接マッピングされたせん。これには次のよ" +"うな理由がありたす。" #: src/android/interoperability/cpp/type-mapping.md msgid "" "`std::string` does not uphold the UTF-8 invariant that `String` requires." -msgstr "" +msgstr "`std::string` は、`String` が必芁ずする UTF-8 䞍倉条件を満たしたせん。" #: src/android/interoperability/cpp/type-mapping.md msgid "" "The two types have different layouts in memory and so can't be passed " "directly between languages." msgstr "" +"この 2 ぀の型はメモリ内のレむアりトが異なるため、蚀語間で盎接枡すこずはできた" +"せん。" #: src/android/interoperability/cpp/type-mapping.md msgid "" "`std::string` requires move constructors that don't match Rust's move " "semantics, so a `std::string` can't be passed by value to Rust." msgstr "" +"`std::string` は、Rust のムヌブ セマンティクスず䞀臎しないムヌブコンストラク" +"タを必芁ずするため、`std::string` を Rust に倀で枡すこずはできたせん。" #: src/android/interoperability/cpp/android-build-cpp.md #: src/android/interoperability/cpp/android-cpp-genrules.md #: src/android/interoperability/cpp/android-build-rust.md #, fuzzy msgid "Building in Android" -msgstr "Android" +msgstr "Android 向けのビルド" #: src/android/interoperability/cpp/android-build-cpp.md msgid "" "Create a `cc_library_static` to build the C++ library, including the CXX " "generated header and source file." msgstr "" +"`cc_library_static` を䜜成しお、CXX で生成されたヘッダヌず゜ヌスファむルを含" +"む C++ ラむブラリをビルドしたす。" #: src/android/interoperability/cpp/android-build-cpp.md #: src/android/interoperability/cpp/android-build-rust.md msgid "\"libcxx_test_cpp\"" -msgstr "" +msgstr "\"libcxx_test_cpp\"" #: src/android/interoperability/cpp/android-build-cpp.md msgid "\"cxx_test.cpp\"" -msgstr "" +msgstr "\"cxx_test.cpp\"" #: src/android/interoperability/cpp/android-build-cpp.md msgid "\"cxx-bridge-header\"" -msgstr "" +msgstr "\"cxx-bridge-header\"" #: src/android/interoperability/cpp/android-build-cpp.md #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "\"libcxx_test_bridge_header\"" -msgstr "" +msgstr "\"libcxx_test_bridge_header\"" #: src/android/interoperability/cpp/android-build-cpp.md #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "\"libcxx_test_bridge_code\"" -msgstr "" +msgstr "\"libcxx_test_bridge_code\"" #: src/android/interoperability/cpp/android-build-cpp.md msgid "" @@ -12218,12 +14020,17 @@ msgid "" "the dependencies for the CXX-generated C++ bindings. We'll show how these " "are setup on the next slide." msgstr "" +"`libcxx_test_bridge_header` ず `libcxx_test_bridge_code` が、CXX CXXにより生" +"成される C++ バむンディングに察する䟝存関係であるこずを説明したす。次のスラむ" +"ドで、これらがどのような蚘述になっおいるかを説明したす。" #: src/android/interoperability/cpp/android-build-cpp.md msgid "" "Note that you also need to depend on the `cxx-bridge-header` library in " "order to pull in common CXX definitions." msgstr "" +"たた、䞀般的な CXX 定矩を取埗するためには、`cxx-bridge-header` ラむブラリに䟝" +"存する必芁があるこずにも泚意しおください。" #: src/android/interoperability/cpp/android-build-cpp.md msgid "" @@ -12233,53 +14040,65 @@ msgid "" "that link with the class so that students know where they can find these " "instructions again in the future." msgstr "" +"Android で CXX を䜿甚するための詳现なドキュメントに぀いおは、[Android のド" +"キュメント](https://source.android.com/docs/setup/build/rust/building-rust-" +"modules/android-rust-patterns#rust-cpp-interop-using-cxx)をご芧ください。その" +"リンクをクラスず共有しお、受講者が埌で手順を確認できるようにするこずをおすす" +"めしたす。" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "" "Create two genrules: One to generate the CXX header, and one to generate the " "CXX source file. These are then used as inputs to the `cc_library_static`." msgstr "" +"genrule を 2 ぀䜜成したす。1 ぀は CXX ヘッダヌの生成甚、もう 1 ぀は CXX ゜ヌ" +"スファむルの生成甚です。これらは `cc_library_static` ぞの入力ずしお䜿甚された" +"す。" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "" "// Generate a C++ header containing the C++ bindings\n" "// to the Rust exported functions in lib.rs.\n" msgstr "" +"// lib.rs にある Rustから゚クスポヌトされた関数に察する\n" +"// C++ バむンディングを含む C++ ヘッダヌを生成したす。\n" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "\"cxxbridge\"" -msgstr "" +msgstr "\"cxxbridge\"" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "\"$(location cxxbridge) $(in) --header > $(out)\"" -msgstr "" +msgstr "\"$(location cxxbridge) $(in) --header > $(out)\"" #: src/android/interoperability/cpp/android-cpp-genrules.md #: src/android/interoperability/cpp/android-build-rust.md msgid "\"lib.rs\"" -msgstr "" +msgstr "\"lib.rs\"" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "\"lib.rs.h\"" -msgstr "" +msgstr "\"lib.rs.h\"" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "// Generate the C++ code that Rust calls into.\n" -msgstr "" +msgstr "// Rust が呌び出す C++ コヌドを生成したす。\n" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "\"$(location cxxbridge) $(in) > $(out)\"" -msgstr "" +msgstr "\"$(location cxxbridge) $(in) > $(out)\"" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "\"lib.rs.cc\"" -msgstr "" +msgstr "\"lib.rs.cc\"" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "" "The `cxxbridge` tool is a standalone tool that generates the C++ side of the " "bridge module. It is included in Android and available as a Soong tool." msgstr "" +"`cxxbridge` ツヌルは、ブリッゞ モゞュヌルの C++ 偎を生成するスタンドアロン " +"ツヌルです。Android に組み蟌たれおおり、Soong ツヌルずしお利甚できたす。" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "" @@ -12287,23 +14106,26 @@ msgid "" "named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming " "convention isn't enforced, though." msgstr "" +"慣䟋ずしお、Rust ゜ヌスファむルが `lib.rs` の堎合、ヘッダヌ ファむルの名前は " +"`lib.rs.h`、゜ヌスファむルの名前は `lib.rs.cc` ずなりたす。ただし、この呜名芏" +"則は匷制ではありたせん。" #: src/android/interoperability/cpp/android-build-rust.md msgid "" "Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`." -msgstr "" +msgstr "`libcxx` ず `cc_library_static`に䟝存する `rust_binary` を䜜成したす。" #: src/android/interoperability/cpp/android-build-rust.md msgid "\"cxx_test\"" -msgstr "" +msgstr "\"cxx_test\"" #: src/android/interoperability/cpp/android-build-rust.md msgid "\"libcxx\"" -msgstr "" +msgstr "\"libcxx\"" #: src/android/interoperability/java.md msgid "Interoperability with Java" -msgstr "" +msgstr "Java ずの盞互運甚性" #: src/android/interoperability/java.md msgid "" @@ -12311,90 +14133,98 @@ msgid "" "wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/" "jni/) allows you to create a compatible library." msgstr "" +"Java では、[Java Native InterfaceJNI](https://en.wikipedia.org/wiki/" +"Java_Native_Interface) を介しお共有オブゞェクトを読み蟌むこずができたす。" +"[`jni` クレヌト](https://docs.rs/jni/) を䜿甚するず、互換性のあるラむブラリを" +"䜜成できたす。" #: src/android/interoperability/java.md msgid "First, we create a Rust function to export to Java:" -msgstr "" +msgstr "たず、Java に゚クスポヌトする Rust 関数を䜜成したす。" #: src/android/interoperability/java.md msgid "_interoperability/java/src/lib.rs_:" -msgstr "" +msgstr "_interoperability/java/src/lib.rs_:" #: src/android/interoperability/java.md msgid "//! Rust <-> Java FFI demo.\n" -msgstr "" +msgstr "//! Rust <-> Java FFI のデモ。\n" #: src/android/interoperability/java.md msgid "/// HelloWorld::hello method implementation.\n" -msgstr "" +msgstr "/// HelloWorld::hello メ゜ッドの実装。\n" #: src/android/interoperability/java.md msgid "\"system\"" -msgstr "" +msgstr "\"system\"" #: src/android/interoperability/java.md msgid "\"Hello, {input}!\"" -msgstr "" +msgstr "\"Hello, {input}!\"" #: src/android/interoperability/java.md msgid "_interoperability/java/Android.bp_:" -msgstr "" +msgstr "_interoperability/java/Android.bp_:" #: src/android/interoperability/java.md msgid "\"libhello_jni\"" -msgstr "" +msgstr "\"libhello_jni\"" #: src/android/interoperability/java.md msgid "\"hello_jni\"" -msgstr "" +msgstr "\"hello_jni\"" #: src/android/interoperability/java.md msgid "\"libjni\"" -msgstr "" +msgstr "\"libjni\"" #: src/android/interoperability/java.md msgid "We then call this function from Java:" -msgstr "" +msgstr "次に、Java からこの関数を呌び出したす。" #: src/android/interoperability/java.md msgid "_interoperability/java/HelloWorld.java_:" -msgstr "" +msgstr "_interoperability/java/HelloWorld.java_:" #: src/android/interoperability/java.md msgid "\"helloworld_jni\"" -msgstr "" +msgstr "\"helloworld_jni\"" #: src/android/interoperability/java.md msgid "\"HelloWorld.java\"" -msgstr "" +msgstr "\"HelloWorld.java\"" #: src/android/interoperability/java.md msgid "\"HelloWorld\"" -msgstr "" +msgstr "\"HelloWorld\"" #: src/android/interoperability/java.md msgid "Finally, you can build, sync, and run the binary:" -msgstr "" +msgstr "最埌に、バむナリをビルド、同期、実行したす。" #: src/exercises/android/morning.md msgid "" "This is a group exercise: We will look at one of the projects you work with " "and try to integrate some Rust into it. Some suggestions:" msgstr "" +"これはグルヌプ挔習です。皆さんが取り組んでいるプロゞェクトの䞀぀を題材に、そ" +"こに Rust を統合しおみたしょう。以䞋にヒントを瀺したす。" #: src/exercises/android/morning.md msgid "Call your AIDL service with a client written in Rust." -msgstr "" +msgstr "Rust で蚘述されたクラむアントを䜿甚しお AIDL サヌビスを呌び出したす。" #: src/exercises/android/morning.md msgid "Move a function from your project to Rust and call it." -msgstr "" +msgstr "プロゞェクトから Rust に関数を移動しお呌び出したす。" #: src/exercises/android/morning.md msgid "" "No solution is provided here since this is open-ended: it relies on someone " "in the class having a piece of code which you can turn in to Rust on the fly." msgstr "" +"この挔習は自由回答圢匏であるため、解答は甚意されおいたせん。クラスの誰かが" +"コヌドを持っおいお、その堎で Rust に倉換できるこずを前提ずしおいたす。" #: src/chromium.md msgid "Welcome to Rust in Chromium" @@ -17725,11 +19555,11 @@ msgstr "Rustのスレッドは他の蚀語のスレッドず䌌た挙動をし #: src/concurrency/threads.md msgid "\"Count in thread: {i}!\"" -msgstr "" +msgstr "\"Count in thread: {i}!\"" #: src/concurrency/threads.md msgid "\"Main thread: {i}\"" -msgstr "" +msgstr "\"Main thread: {i}\"" #: src/concurrency/threads.md msgid "Threads are all daemon threads, the main thread does not wait for them." @@ -17818,7 +19648,7 @@ msgstr "" #: src/concurrency/channels.md msgid "\"Received: {:?}\"" -msgstr "" +msgstr "\"Received: {:?}\"" #: src/concurrency/channels.md msgid "" @@ -17845,19 +19675,19 @@ msgstr "Unboundedで非同期的なチャネルは`mpsc::channel()`によっお #: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md msgid "\"Message {i}\"" -msgstr "" +msgstr "\"Message {i}\"" #: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md msgid "\"{thread_id:?}: sent Message {i}\"" -msgstr "" +msgstr "\"{thread_id:?}: sent Message {i}\"" #: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md msgid "\"{thread_id:?}: done\"" -msgstr "" +msgstr "\"{thread_id:?}: done\"" #: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md msgid "\"Main: got {msg}\"" -msgstr "" +msgstr "\"Main: got {msg}\"" #: src/concurrency/channels/bounded.md msgid "" @@ -18011,7 +19841,7 @@ msgstr "" #: src/concurrency/send-sync/examples.md msgid "`Send + Sync`" -msgstr "" +msgstr "`Send + Sync`" #: src/concurrency/send-sync/examples.md msgid "Most types you come across are `Send + Sync`:" @@ -18019,15 +19849,15 @@ msgstr "芋かけるほずんどの型は`Send + Sync`です" #: src/concurrency/send-sync/examples.md msgid "`i8`, `f32`, `bool`, `char`, `&str`, ..." -msgstr "" +msgstr "`i8`、`f32`、`bool`、`char`、`&str` など" #: src/concurrency/send-sync/examples.md msgid "`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ..." -msgstr "" +msgstr "`(T1, T2)`、`[T; N]`、`&[T]`、`struct { x: T }` など" #: src/concurrency/send-sync/examples.md msgid "`String`, `Option`, `Vec`, `Box`, ..." -msgstr "" +msgstr "`String`、`Option`、`Vec`、`Box` など" #: src/concurrency/send-sync/examples.md msgid "`Arc`: Explicitly thread-safe via atomic reference count." @@ -18051,7 +19881,7 @@ msgstr "" #: src/concurrency/send-sync/examples.md msgid "`Send + !Sync`" -msgstr "" +msgstr "`Send + !Sync`" #: src/concurrency/send-sync/examples.md msgid "" @@ -18063,23 +19893,23 @@ msgstr "" #: src/concurrency/send-sync/examples.md msgid "`mpsc::Sender`" -msgstr "" +msgstr "`mpsc::Sender`" #: src/concurrency/send-sync/examples.md msgid "`mpsc::Receiver`" -msgstr "" +msgstr "`mpsc::Receiver`" #: src/concurrency/send-sync/examples.md msgid "`Cell`" -msgstr "" +msgstr "`Cell`" #: src/concurrency/send-sync/examples.md msgid "`RefCell`" -msgstr "" +msgstr "`RefCell`" #: src/concurrency/send-sync/examples.md msgid "`!Send + Sync`" -msgstr "" +msgstr "`!Send + Sync`" #: src/concurrency/send-sync/examples.md msgid "" @@ -18099,7 +19929,7 @@ msgstr "" #: src/concurrency/send-sync/examples.md msgid "`!Send + !Sync`" -msgstr "" +msgstr "`!Send + !Sync`" #: src/concurrency/send-sync/examples.md msgid "These types are not thread-safe and cannot be moved to other threads:" @@ -18159,11 +19989,11 @@ msgstr "" #: src/concurrency/shared_state/arc.md msgid "\"{thread_id:?}: {v:?}\"" -msgstr "" +msgstr "\"{thread_id:?}: {v:?}\"" #: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md msgid "\"v: {v:?}\"" -msgstr "" +msgstr "\"v: {v:?}\"" #: src/concurrency/shared_state/arc.md msgid "" @@ -18203,7 +20033,6 @@ msgid "`std::sync::Weak` can help." msgstr "`std::sync::Weak` が圹立ちたす。" #: src/concurrency/shared_state/mutex.md -#, fuzzy msgid "" "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures " "mutual exclusion _and_ allows mutable access to `T` behind a read-only " @@ -18216,7 +20045,7 @@ msgstr "" #: src/concurrency/shared_state/mutex.md msgid "\"v: {:?}\"" -msgstr "" +msgstr "\"v: {:?}\"" #: src/concurrency/shared_state/mutex.md msgid "" @@ -18290,7 +20119,7 @@ msgstr "`Arc` ず `Mutex` の動䜜を芋おみたしょう" #: src/concurrency/shared_state/example.md msgid "// use std::sync::{Arc, Mutex};\n" -msgstr "" +msgstr "// use std::sync::{Arc, Mutex};\n" #: src/concurrency/shared_state/example.md msgid "Possible solution:" @@ -18333,21 +20162,23 @@ msgstr "" #: src/exercises/concurrency/morning.md msgid "Let us practice our new concurrency skills with" -msgstr "" +msgstr "次の挔習を行い、䞊行性に関する新しいスキルを獲埗したしょう。" #: src/exercises/concurrency/morning.md msgid "Dining philosophers: a classic problem in concurrency." -msgstr "" +msgstr "食事する哲孊者䞊行性に関する叀兞的な問題。" #: src/exercises/concurrency/morning.md msgid "" "Multi-threaded link checker: a larger project where you'll use Cargo to " "download dependencies and then check links in parallel." msgstr "" +"マルチスレッド リンク チェッカヌ: Cargo を䜿甚しお䟝存関係をダりンロヌドし、" +"リンクを同時にチェックする倧芏暡なプロゞェクト。" #: src/exercises/concurrency/dining-philosophers.md msgid "The dining philosophers problem is a classic problem in concurrency:" -msgstr "" +msgstr "食事する哲孊者の問題は、䞊行性に関する叀兞的な問題です。" #: src/exercises/concurrency/dining-philosophers.md msgid "" @@ -18360,6 +20191,13 @@ msgid "" "not eating. After an individual philosopher finishes eating, they will put " "down both forks." msgstr "" +"5 人の哲孊者が同じテヌブルで食事をしおいたす。それぞれの哲孊者がテヌブルの定" +"䜍眮に座り、皿の間にはフォヌクが 1 本眮かれおいたす。提䟛される料理はスパゲッ" +"ティで、2 本のフォヌクで食べる必芁がありたす。哲孊者は思玢ず食事を亀互に繰り" +"返すこずしかできたせん。さらに、哲孊者は巊右䞡方のフォヌクを持っおいる堎合に" +"のみ、スパゲッティを食べるこずができたす。したがっお、2 ぀のフォヌクは、䞡隣" +"の哲孊者が食べるのではなく考えおいる堎合にのみ䜿甚できたす。それぞれの哲孊者" +"は、食べ終わった埌、䞡方のフォヌクを眮きたす。" #: src/exercises/concurrency/dining-philosophers.md msgid "" @@ -18367,6 +20205,9 @@ msgid "" "for this exercise. Copy the code below to a file called `src/main.rs`, fill " "out the blanks, and test that `cargo run` does not deadlock:" msgstr "" +"この挔習では、ロヌカルの [Cargo むンストヌル](../../cargo/running-locally.md)" +"が必芁です。以䞋のコヌドを `src/main.rs` ずいうファむルにコピヌし、空欄を埋め" +"お、`cargo run` がデッドロックしないこずを確認したす。" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/dining-philosophers-async.md @@ -18375,87 +20216,90 @@ msgid "" " // right_fork: ...\n" " // thoughts: ...\n" msgstr "" +"// left_fork: ...\n" +" // right_fork: ...\n" +" // thoughts: ...\n" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/solutions-morning.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"Eureka! {} has a new idea!\"" -msgstr "" +msgstr "\"Eureka! {} has a new idea!\"" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "// Pick up forks...\n" -msgstr "" +msgstr "// Pick up forks...\n" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/solutions-morning.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"{} is eating...\"" -msgstr "" +msgstr "\"{} is eating...\"" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/solutions-morning.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"Socrates\"" -msgstr "" +msgstr "\"Socrates\"" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/solutions-morning.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"Hypatia\"" -msgstr "" +msgstr "\"Hypatia\"" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/solutions-morning.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"Plato\"" -msgstr "" +msgstr "\"Plato\"" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/solutions-morning.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"Aristotle\"" -msgstr "" +msgstr "\"Aristotle\"" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/solutions-morning.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"Pythagoras\"" -msgstr "" +msgstr "\"Pythagoras\"" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "// Create forks\n" -msgstr "" +msgstr "// フォヌクを䜜成する\n" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "// Create philosophers\n" -msgstr "" +msgstr "// 哲孊者を䜜成する\n" #: src/exercises/concurrency/dining-philosophers.md msgid "// Make each of them think and eat 100 times\n" -msgstr "" +msgstr "// それぞれの哲孊者が思玢ず食事を 100 回行うようにする\n" #: src/exercises/concurrency/dining-philosophers.md #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "// Output their thoughts\n" -msgstr "" +msgstr "// 哲孊者の思玢を出力する\n" #: src/exercises/concurrency/dining-philosophers.md msgid "You can use the following `Cargo.toml`:" -msgstr "" +msgstr "次の `Cargo.toml` を䜿甚できたす。" #: src/exercises/concurrency/dining-philosophers.md msgid "" @@ -18466,6 +20310,12 @@ msgid "" "edition = \"2021\"\n" "```" msgstr "" +"```toml\n" +"[package]\n" +"name = \"dining-philosophers\"\n" +"version = \"0.1.0\"\n" +"edition = \"2021\"\n" +"```" #: src/exercises/concurrency/link-checker.md msgid "" @@ -18474,35 +20324,49 @@ msgid "" "should recursively check other pages on the same domain and keep doing this " "until all pages have been validated." msgstr "" +"新たに身に付けた知識を掻かしお、マルチスレッド リンク チェッカヌを䜜成した" +"しょう。たず、りェブペヌゞ䞊のリンクが有効かどうかを確認する必芁がありたす。" +"同じドメむンの他のペヌゞを再垰的にチェックし、すべおのペヌゞの怜蚌が完了する" +"たでこの凊理を繰り返したす。" #: src/exercises/concurrency/link-checker.md msgid "" "For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/" "reqwest/). Create a new Cargo project and `reqwest` it as a dependency with:" msgstr "" +"そのためには、[`reqwest`](https://docs.rs/reqwest/) などの HTTP クラむアント" +"が必芁です。次のコマンドで新しい Cargo プロゞェクトを䜜成し、䟝存関係ずしお " +"`reqwest` を远加したす。" #: src/exercises/concurrency/link-checker.md msgid "" "If `cargo add` fails with `error: no such subcommand`, then please edit the " "`Cargo.toml` file by hand. Add the dependencies listed below." msgstr "" +"`cargo add` が `error: no such subcommand` で倱敗する堎合は、`Cargo.toml` " +"ファむルを手動で線集しおください。䞋蚘の䟝存関係を远加したす。" #: src/exercises/concurrency/link-checker.md msgid "" "You will also need a way to find links. We can use [`scraper`](https://docs." "rs/scraper/) for that:" msgstr "" +"たた、リンクを芋぀ける方法も必芁です。これには [`scraper`](https://docs.rs/" +"scraper/) を䜿甚したす。" #: src/exercises/concurrency/link-checker.md msgid "" "Finally, we'll need some way of handling errors. We use [`thiserror`]" "(https://docs.rs/thiserror/) for that:" msgstr "" +"最埌に、゚ラヌを凊理する方法が必芁になりたす。これには [`thiserror`](https://" +"docs.rs/thiserror/) を䜿甚したす。" #: src/exercises/concurrency/link-checker.md msgid "" "The `cargo add` calls will update the `Cargo.toml` file to look like this:" msgstr "" +"`cargo add` の呌び出しにより、`Cargo.toml` ファむルは次のように曎新されたす。" #: src/exercises/concurrency/link-checker.md msgid "" @@ -18520,64 +20384,81 @@ msgid "" "thiserror = \"1.0.37\"\n" "```" msgstr "" +"```toml\n" +"[package]\n" +"name = \"link-checker\"\n" +"version = \"0.1.0\"\n" +"edition = \"2021\"\n" +"publish = false\n" +"\n" +"[dependencies]\n" +"reqwest = { version = \"0.11.12\", features = [\"blocking\", \"rustls-" +"tls\"] }\n" +"scraper = \"0.13.0\"\n" +"thiserror = \"1.0.37\"\n" +"```" #: src/exercises/concurrency/link-checker.md msgid "" "You can now download the start page. Try with a small site such as `https://" "www.google.org/`." msgstr "" +"これで、スタヌトペヌゞをダりンロヌドできるようになりたした。`https://www." +"google.org/` のような小芏暡なサむトで詊しおみたしょう。" #: src/exercises/concurrency/link-checker.md msgid "Your `src/main.rs` file should look something like this:" -msgstr "" +msgstr "`src/main.rs` ファむルは次のようになりたす。" #: src/exercises/concurrency/link-checker.md #: src/exercises/concurrency/solutions-morning.md msgid "\"request error: {0}\"" -msgstr "" +msgstr "\"request error: {0}\"" #: src/exercises/concurrency/link-checker.md #: src/exercises/concurrency/solutions-morning.md msgid "\"bad http response: {0}\"" -msgstr "" +msgstr "\"bad http response: {0}\"" #: src/exercises/concurrency/link-checker.md #: src/exercises/concurrency/solutions-morning.md msgid "\"Checking {:#}\"" -msgstr "" +msgstr "\"Checking {:#}\"" #: src/exercises/concurrency/link-checker.md #: src/exercises/concurrency/solutions-morning.md msgid "\"href\"" -msgstr "" +msgstr "\"href\"" #: src/exercises/concurrency/link-checker.md #: src/exercises/concurrency/solutions-morning.md msgid "\"On {base_url:#}: ignored unparsable {href:?}: {err}\"" -msgstr "" +msgstr "\"On {base_url:#}: ignored unparsable {href:?}: {err}\"" #: src/exercises/concurrency/link-checker.md #: src/exercises/concurrency/solutions-morning.md msgid "\"https://www.google.org\"" -msgstr "" +msgstr "\"https://www.google.org\"" #: src/exercises/concurrency/link-checker.md msgid "\"Links: {links:#?}\"" -msgstr "" +msgstr "\"Links: {links:#?}\"" #: src/exercises/concurrency/link-checker.md msgid "\"Could not extract links: {err:#}\"" -msgstr "" +msgstr "\"Could not extract links: {err:#}\"" #: src/exercises/concurrency/link-checker.md msgid "Run the code in `src/main.rs` with" -msgstr "" +msgstr "`src/main.rs` 内のコヌドを、次のコマンドで実行したす。" #: src/exercises/concurrency/link-checker.md msgid "" "Use threads to check the links in parallel: send the URLs to be checked to a " "channel and let a few threads check the URLs in parallel." msgstr "" +"スレッドを䜿甚しおリンクを同時にチェックしたす。぀たり、チェックする URL を" +"チャンネルに送信し、いく぀かのスレッドで同時に URL を確認したす。" #: src/exercises/concurrency/link-checker.md msgid "" @@ -18585,18 +20466,21 @@ msgid "" "org` domain. Put an upper limit of 100 pages or so so that you don't end up " "being blocked by the site." msgstr "" +"これを拡匵しお、`www.google.org` ドメむンのすべおのペヌゞからリンクを再垰的に" +"抜出したす。サむトがブロックされないように、ペヌゞ数の䞊限を 100 皋床に蚭定し" +"たす。" #: src/exercises/concurrency/solutions-morning.md msgid "Concurrency Morning Exercise" -msgstr "" +msgstr "䞊行性に関する午前の゚クササむズ" #: src/exercises/concurrency/solutions-morning.md msgid "([back to exercise](dining-philosophers.md))" -msgstr "" +msgstr "[挔習に戻る](dining-philosophers.md)" #: src/exercises/concurrency/solutions-morning.md msgid "\"{} is trying to eat\"" -msgstr "" +msgstr "\"{} is trying to eat\"" #: src/exercises/concurrency/solutions-morning.md msgid "" @@ -18604,10 +20488,13 @@ msgid "" " // somewhere. This will swap the forks without deinitializing\n" " // either of them.\n" msgstr "" +"// デッドロックを避けるために、どこかで察称性を\n" +" // 厩す必芁がありたす。䞋蚘のコヌドでは、\n" +" // 領域を開攟するこずなく2぀のフォヌクを亀換したす。\n" #: src/exercises/concurrency/solutions-morning.md msgid "\"{thought}\"" -msgstr "" +msgstr "\"{thought}\"" #: src/exercises/concurrency/solutions-morning.md #, fuzzy @@ -18616,30 +20503,32 @@ msgstr "マルチスレッド・リンクチェッカヌ" #: src/exercises/concurrency/solutions-morning.md msgid "([back to exercise](link-checker.md))" -msgstr "" +msgstr "[挔習に戻る](link-checker.md)" #: src/exercises/concurrency/solutions-morning.md msgid "" "/// Determine whether links within the given page should be extracted.\n" -msgstr "" +msgstr "/// 指定されたペヌゞ内のリンクを抜出するかどうかを決定したす。\n" #: src/exercises/concurrency/solutions-morning.md msgid "" "/// Mark the given page as visited, returning false if it had already\n" " /// been visited.\n" msgstr "" +"/// 指定されたペヌゞを蚪問枈みずしおマヌクし、すでに蚪問枈みであれば\n" +" /// false を返したす。\n" #: src/exercises/concurrency/solutions-morning.md msgid "// The sender got dropped. No more commands coming in.\n" -msgstr "" +msgstr "// 送信者がドロップされたした。今埌コマンドは受信されたせん。\n" #: src/exercises/concurrency/solutions-morning.md msgid "\"Got crawling error: {:#}\"" -msgstr "" +msgstr "\"Got crawling error: {:#}\"" #: src/exercises/concurrency/solutions-morning.md msgid "\"Bad URLs: {:#?}\"" -msgstr "" +msgstr "\"Bad URLs: {:#?}\"" #: src/async.md msgid "Async Rust" @@ -18710,7 +20599,7 @@ msgstr "" #: src/async/async-await.md msgid "\"Count is: {i}!\"" -msgstr "" +msgstr "\"Count is: {i}!\"" #: src/async/async-await.md msgid "" @@ -18925,11 +20814,11 @@ msgstr "倧きなラむブラリの゚コシステム。" #: src/async/runtimes/tokio.md msgid "\"Count in task: {i}!\"" -msgstr "" +msgstr "\"Count in task: {i}!\"" #: src/async/runtimes/tokio.md msgid "\"Main task: {i}\"" -msgstr "" +msgstr "\"Main task: {i}\"" #: src/async/runtimes/tokio.md msgid "With the `tokio::main` macro we can now make `main` async." @@ -18970,7 +20859,7 @@ msgstr "`tokio::spawn`から返されたタスクを埅機しおみおくださ #: src/async/tasks.md msgid "Rust has a task system, which is a form of lightweight threading." -msgstr "" +msgstr "Rust には、軜量のスレッド圢匏の䞀皮であるタスクシステムがありたす。" #: src/async/tasks.md msgid "" @@ -18989,27 +20878,27 @@ msgstr "" #: src/async/tasks.md msgid "\"127.0.0.1:0\"" -msgstr "" +msgstr "\"127.0.0.1:0\"" #: src/async/tasks.md msgid "\"listening on port {}\"" -msgstr "" +msgstr "\"listening on port {}\"" #: src/async/tasks.md msgid "\"connection from {addr:?}\"" -msgstr "" +msgstr "\"connection from {addr:?}\"" #: src/async/tasks.md msgid "b\"Who are you?\\n\"" -msgstr "" +msgstr "b\"Who are you?\\n\"" #: src/async/tasks.md msgid "\"socket error\"" -msgstr "" +msgstr "\"socket error\"" #: src/async/tasks.md msgid "\"Thanks for dialing in, {name}!\\n\"" -msgstr "" +msgstr "\"Thanks for dialing in, {name}!\\n\"" #: src/async/tasks.md src/async/control-flow/join.md msgid "" @@ -19023,6 +20912,9 @@ msgid "" "com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/" "telnet/)." msgstr "" +"[nc](https://www.unix.com/man-page/linux/1/nc/) や [telnet](https://www.unix." +"com/man-page/linux/1/telnet/) などの TCP 接続ツヌルを䜿甚しお接続しおみおくだ" +"さい。" #: src/async/tasks.md msgid "" @@ -19062,23 +20954,23 @@ msgstr "" #: src/async/channels.md msgid "\"Received {count} pings so far.\"" -msgstr "" +msgstr "\"Received {count} pings so far.\"" #: src/async/channels.md msgid "\"ping_handler complete\"" -msgstr "" +msgstr "\"ping_handler complete\"" #: src/async/channels.md msgid "\"Failed to send ping.\"" -msgstr "" +msgstr "\"Failed to send ping.\"" #: src/async/channels.md msgid "\"Sent {} pings so far.\"" -msgstr "" +msgstr "\"Sent {} pings so far.\"" #: src/async/channels.md msgid "\"Something went wrong in ping handler task.\"" -msgstr "" +msgstr "\"Something went wrong in ping handler task.\"" #: src/async/channels.md msgid "Change the channel size to `3` and see how it affects the execution." @@ -19134,11 +21026,11 @@ msgstr "" #: src/async/control-flow.md msgid "[Join](control-flow/join.md)" -msgstr "" +msgstr "[結合](control-flow/join.md)" #: src/async/control-flow.md msgid "[Select](control-flow/select.md)" -msgstr "" +msgstr "[遞択](control-flow/select.md)" #: src/async/control-flow/join.md msgid "" @@ -19152,19 +21044,19 @@ msgstr "" #: src/async/control-flow/join.md msgid "\"https://google.com\"" -msgstr "" +msgstr "\"https://google.com\"" #: src/async/control-flow/join.md msgid "\"https://httpbin.org/ip\"" -msgstr "" +msgstr "\"https://httpbin.org/ip\"" #: src/async/control-flow/join.md msgid "\"https://play.rust-lang.org/\"" -msgstr "" +msgstr "\"https://play.rust-lang.org/\"" #: src/async/control-flow/join.md msgid "\"BAD_URL\"" -msgstr "" +msgstr "\"BAD_URL\"" #: src/async/control-flow/join.md msgid "" @@ -19228,27 +21120,27 @@ msgstr "" #: src/async/control-flow/select.md msgid "\"Felix\"" -msgstr "" +msgstr "\"Felix\"" #: src/async/control-flow/select.md msgid "\"Failed to send cat.\"" -msgstr "" +msgstr "\"Failed to send cat.\"" #: src/async/control-flow/select.md msgid "\"Rex\"" -msgstr "" +msgstr "\"Rex\"" #: src/async/control-flow/select.md msgid "\"Failed to send dog.\"" -msgstr "" +msgstr "\"Failed to send dog.\"" #: src/async/control-flow/select.md msgid "\"Failed to receive winner\"" -msgstr "" +msgstr "\"Failed to receive winner\"" #: src/async/control-flow/select.md msgid "\"Winner is {winner:?}\"" -msgstr "" +msgstr "\"Winner is {winner:?}\"" #: src/async/control-flow/select.md #, fuzzy @@ -19299,7 +21191,7 @@ msgstr "" #: src/async/pitfalls.md msgid "Pitfalls of async/await" -msgstr "" +msgstr "async / await の泚意点" #: src/async/pitfalls.md msgid "" @@ -19308,26 +21200,29 @@ msgid "" "with its share of pitfalls and footguns. We illustrate some of them in this " "chapter:" msgstr "" +"async / await は、同時実行非同期プログラミングのための䟿利で効率的な抜象化を" +"提䟛したす。しかし、Rust の async / await モデルには、泚意点や誀甚されやすい" +"機胜もいく぀かあるため、この章ではその点に぀いお説明したす。" #: src/async/pitfalls.md msgid "[Blocking the Executor](pitfalls/blocking-executor.md)" -msgstr "" +msgstr "[゚グれキュヌタのブロック](pitfalls/blocking-executor.md)" #: src/async/pitfalls.md msgid "[Pin](pitfalls/pin.md)" -msgstr "" +msgstr "[Pin](pitfalls/pin.md)" #: src/async/pitfalls.md msgid "[Async Traits](pitfalls/async-traits.md)" -msgstr "" +msgstr "[Async トレむト](pitfalls/async-traits.md)" #: src/async/pitfalls.md msgid "[Cancellation](pitfalls/cancellation.md)" -msgstr "" +msgstr "[キャンセル](pitfalls/cancellation.md)" #: src/async/pitfalls/blocking-executor.md msgid "Blocking the executor" -msgstr "" +msgstr "゚グれキュヌタのブロック" #: src/async/pitfalls/blocking-executor.md msgid "" @@ -19336,20 +21231,24 @@ msgid "" "being executed. An easy workaround is to use async equivalent methods where " "possible." msgstr "" +"ほずんどの非同期ランタむムは、IO タスクの同時実行のみを蚱可したす。぀たり、" +"CPU ブロックタスクぱグれキュヌタをブロックし、他のタスクの実行を劚げたす。" +"簡単な回避策は、可胜であれば非同期の同等のメ゜ッドを䜿甚するこずです。" #: src/async/pitfalls/blocking-executor.md msgid "\"future {id} slept for {duration_ms}ms, finished after {}ms\"" -msgstr "" +msgstr "\"future {id} slept for {duration_ms}ms, finished after {}ms\"" #: src/async/pitfalls/blocking-executor.md msgid "\"current_thread\"" -msgstr "" +msgstr "\"current_thread\"" #: src/async/pitfalls/blocking-executor.md msgid "" "Run the code and see that the sleeps happen consecutively rather than " "concurrently." msgstr "" +"コヌドを続けお、スリヌプが同時ではなく連続しお発生するこずを確認したす。" #: src/async/pitfalls/blocking-executor.md msgid "" @@ -19357,17 +21256,25 @@ msgid "" "makes the effect more obvious, but the bug is still present in the multi-" "threaded flavor." msgstr "" +"`\"current_thread\"` フレヌバヌは、すべおのタスクを 1 ぀のスレッドに配眮した" +"す。これにより、圱響はより明確になりたすが、バグはただマルチスレッド フレヌ" +"バヌに存圚したす。" #: src/async/pitfalls/blocking-executor.md msgid "" "Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result." msgstr "" +"`std::thread::sleep` を `tokio::time::sleep` に切り替えお、その結果を埅ちた" +"す。" #: src/async/pitfalls/blocking-executor.md msgid "" "Another fix would be to `tokio::task::spawn_blocking` which spawns an actual " "thread and transforms its handle into a future without blocking the executor." msgstr "" +"もう 1 ぀の修正策は、`tokio::task::spawn_blocking` を䜿甚するこずです。これ" +"は、実際のスレッドを生成し、゚グれキュヌタをブロックせずにそのハンドルを " +"Future に倉換したす。" #: src/async/pitfalls/blocking-executor.md msgid "" @@ -19378,12 +21285,22 @@ msgid "" "OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such " "situations." msgstr "" +"タスクは OS スレッドずはみなすべきではありたせん。これらは 1 察 1 に察応しお" +"おらず、ほずんどの゚グれキュヌタは、単䞀の OS スレッドで倚くのタスクを実行す" +"るこずを蚱可したす。これは、FFI を介しお他のラむブラリずやり取りする堎合に特" +"に問題ずなりたす。FFI では、そのラむブラリはスレッド ロヌカル ストレヌゞに䟝" +"存しおいるか、特定の OS スレッドCUDA などにマッピングされおいる可胜性があ" +"るためです。そのような堎合は `tokio::task::spawn_blocking` を䜿甚するこずをお" +"すすめしたす。" #: src/async/pitfalls/blocking-executor.md msgid "" "Use sync mutexes with care. Holding a mutex over an `.await` may cause " "another task to block, and that task may be running on the same thread." msgstr "" +"同期ミュヌテックスは慎重に䜿甚しおください。`.await` でミュヌテックスを保持す" +"るず、別のタスクがブロックされ、そのタスクが同じスレッドで実行される可胜性が" +"ありたす。" #: src/async/pitfalls/pin.md msgid "" @@ -19391,6 +21308,9 @@ msgid "" "type returned is the result of a compiler transformation which turns local " "variables into data stored inside the future." msgstr "" +"非同期ブロックず関数は、`Future` トレむトを実装する型を返したす。返される型" +"は、ロヌカル倉数を Future の内郚に栌玍されるデヌタに倉換するコンパむラ倉換の" +"結果です。" #: src/async/pitfalls/pin.md msgid "" @@ -19398,6 +21318,8 @@ msgid "" "of that, the future should never be moved to a different memory location, as " "it would invalidate those pointers." msgstr "" +"これらの倉数の䞀郚は、他のロヌカル倉数ぞのポむンタを保持できたす。これらのポ" +"むンタが無効になるため、Futureを別のメモリ䜍眮に移動しないでください。" #: src/async/pitfalls/pin.md msgid "" @@ -19406,67 +21328,79 @@ msgid "" "operations that would move the instance it points to into a different memory " "location." msgstr "" +"メモリ内の Future 型が移動するのを防ぐには、固定されたポむンタのみを介しお" +"ポヌリングするようにしたす。`Pin` は参照のラッパヌで、参照先のむンスタンスを" +"別のメモリ䜍眮に移動するオペレヌションをすべお犁止したす。" #: src/async/pitfalls/pin.md msgid "" "// A work item. In this case, just sleep for the given time and respond\n" "// with a message on the `respond_on` channel.\n" msgstr "" +"// 䜜業アむテム。この堎合、指定された時間だけスリヌプし、\n" +"// `respond_on` チャンネルでメッセヌゞを返したす。\n" #: src/async/pitfalls/pin.md msgid "// A worker which listens for work on a queue and performs it.\n" -msgstr "" +msgstr "// キュヌ䞊の凊理をリッスンしお実行するワヌカヌ。\n" #: src/async/pitfalls/pin.md msgid "// Pretend to work.\n" -msgstr "" +msgstr "// Pretend to work.\n" #: src/async/pitfalls/pin.md msgid "\"failed to send response\"" -msgstr "" +msgstr "\"failed to send response\"" #: src/async/pitfalls/pin.md msgid "// TODO: report number of iterations every 100ms\n" -msgstr "" +msgstr "// TODO: 100 ミリ秒ごずの反埩凊理の回数をレポヌト\n" #: src/async/pitfalls/pin.md msgid "// A requester which requests work and waits for it to complete.\n" -msgstr "" +msgstr "// 凊理をリク゚ストし、凊理が完了するたで埅機するリク゚スト元。\n" #: src/async/pitfalls/pin.md msgid "\"failed to send on work queue\"" -msgstr "" +msgstr "\"failed to send on work queue\"" #: src/async/pitfalls/pin.md msgid "\"failed waiting for response\"" -msgstr "" +msgstr "\"failed waiting for response\"" #: src/async/pitfalls/pin.md msgid "\"work result for iteration {i}: {resp}\"" -msgstr "" +msgstr "\"work result for iteration {i}: {resp}\"" #: src/async/pitfalls/pin.md msgid "" "You may recognize this as an example of the actor pattern. Actors typically " "call `select!` in a loop." msgstr "" +"これはアクタヌのパタヌンの䞀䟋です。アクタヌは通垞、ルヌプ内で `select!` ã‚’å‘Œ" +"び出したす。" #: src/async/pitfalls/pin.md msgid "" "This serves as a summation of a few of the previous lessons, so take your " "time with it." msgstr "" +"これはこれたでのレッスンの䞀郚をたずめたものですので、時間をかけお埩習しおく" +"ださい。" #: src/async/pitfalls/pin.md msgid "" "Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to " "the `select!`. This will never execute. Why?" msgstr "" +"`_ = sleep(Duration::from_millis(100)) => { println!(..) }` を `select!` に远" +"加しただけでは、実行されたせん。なぜでしょうか" #: src/async/pitfalls/pin.md msgid "" "Instead, add a `timeout_fut` containing that future outside of the `loop`:" msgstr "" +"代わりに、`loop` の倖偎で、その Future を含む `timeout_fut` を远加したす。" #: src/async/pitfalls/pin.md msgid "" @@ -19474,6 +21408,9 @@ msgid "" "`timeout_fut` in the `select!` to work around the move, then using `Box::" "pin`:" msgstr "" +"これでもうたくいきたせん。コンパむル゚ラヌにあるように、`select!` 内の " +"`timeout_fut` に `&mut` を远加しお移動を回避しおから、`Box::pin` を䜿甚した" +"す。" #: src/async/pitfalls/pin.md msgid "" @@ -19481,6 +21418,9 @@ msgid "" "iteration (a fused future would help with this). Update to reset " "`timeout_fut` every time it expires." msgstr "" +"これはコンパむルされたすが、タむムアりトになるず、すべおの反埩凊理で `Poll::" +"Ready` になりたす融合された Future がこれに圹立ちたす。期限が切れるたび" +"に `timeout_fut` をリセットするように曎新したす。" #: src/async/pitfalls/pin.md msgid "" @@ -19488,12 +21428,17 @@ msgid "" "stabilized, with older code often using `tokio::pin!`) is also an option, " "but that is difficult to use for a future that is reassigned." msgstr "" +"Box でヒヌプに割り圓おたす。堎合によっおは `std::pin::pin!`最近安定化された" +"ばかりで、叀いコヌドでは倚くの堎合に `tokio::pin!` を䜿甚したすも䜿甚できた" +"すが、再割り圓おされる Future に䜿甚するこずは困難です。" #: src/async/pitfalls/pin.md msgid "" "Another alternative is to not use `pin` at all but spawn another task that " "will send to a `oneshot` channel every 100ms." msgstr "" +"別の方法ずしおは、`pin` をたったく䜿甚せずに、100 ミリ秒ごずに `oneshot` チャ" +"ネルに送信する別のタスクを生成するずいう方法もありたす。" #: src/async/pitfalls/pin.md msgid "" @@ -19503,6 +21448,10 @@ msgid "" "code transformation for async blocks and functions is not verified by the " "borrow checker." msgstr "" +"それ自䜓ぞのポむンタを含むデヌタは、自己参照ず呌ばれたす。通垞、Rust 借甚" +"チェッカヌは、参照が参照先のデヌタより長く存続できないため、自己参照デヌタの" +"移動を防ぎたす。ただし、非同期ブロックず関数のコヌド倉換は、借甚チェッカヌに" +"よっお怜蚌されたせん。" #: src/async/pitfalls/pin.md msgid "" @@ -19510,6 +21459,9 @@ msgid "" "place using a pinned pointer. However, it can still be moved through an " "unpinned pointer." msgstr "" +"`Pin` は参照のラッパヌです。固定されたポむンタを䜿甚しお、オブゞェクトをその" +"堎所から移動するこずはできたせん。ただし、固定されおいないポむンタを介しお移" +"動するこずは可胜です。" #: src/async/pitfalls/pin.md msgid "" @@ -19517,6 +21469,9 @@ msgid "" "`&mut Self` to refer to the instance. That's why it can only be called on a " "pinned pointer." msgstr "" +"`Future` トレむトの `poll` メ゜ッドは、`&mut Self` ではなく `Pin<&mut Self>` " +"を䜿甚しおむンスタンスを参照したす。固定されたポむンタでのみ呌び出すこずがで" +"きるのはこのためです。" #: src/async/pitfalls/async-traits.md msgid "" @@ -19525,26 +21480,34 @@ msgid "" "term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-" "nightly.html))" msgstr "" +"トレむトの非同期メ゜ッドは、Stable チャンネルではただサポヌトされおいたせん" +"[詊隓運甚版の機胜はナむトリヌに存圚するため、䞭期的には安定するはずです。]" +"(https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-nightly." +"html)" #: src/async/pitfalls/async-traits.md msgid "" "The crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) " "provides a workaround through a macro:" msgstr "" +"クレヌト [async_trait](https://docs.rs/async-trait/latest/async_trait/) は、" +"マクロによる回避策を提䟛したす。" #: src/async/pitfalls/async-traits.md msgid "\"running all sleepers..\"" -msgstr "" +msgstr "\"running all sleepers..\"" #: src/async/pitfalls/async-traits.md msgid "\"slept for {}ms\"" -msgstr "" +msgstr "\"slept for {}ms\"" #: src/async/pitfalls/async-traits.md msgid "" "`async_trait` is easy to use, but note that it's using heap allocations to " "achieve this. This heap allocation has performance overhead." msgstr "" +"`async_trait` は簡単に䜿甚できたすが、ヒヌプ割り圓おを䜿甚しおこれを実珟しお" +"いたす。このヒヌプ割り圓おには、パフォヌマンス オヌバヌヘッドが䌎いたす。" #: src/async/pitfalls/async-traits.md msgid "" @@ -19554,12 +21517,18 @@ msgid "" "blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in " "digging deeper." msgstr "" +"`async trait` の蚀語サポヌトにおける課題は、Rust の䞭でも難解な郚類に入るた" +"め、ここでは詳しく説明する必芁はないでしょう。Niko Matsakis が [こちらの投皿]" +"(https://smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-" +"are-hard/) で詳しく説明しおいたすので、深く掘り䞋げたい方はご芧ください。" #: src/async/pitfalls/async-traits.md msgid "" "Try creating a new sleeper struct that will sleep for a random amount of " "time and adding it to the Vec." msgstr "" +"ランダムな時間スリヌプする新しいスリヌパヌ構造䜓を䜜成し、Vec に远加しおみた" +"しょう。" #: src/async/pitfalls/cancellation.md msgid "" @@ -19568,50 +21537,62 @@ msgid "" "ensure the system works correctly even when futures are cancelled. For " "example, it shouldn't deadlock or lose data." msgstr "" +"Future をドロップするず、その Future を再床ポヌリングするこずはできたせん。こ" +"れはキャンセルず呌ばれ、どの `await` ポむントでも発生する可胜性がありたす。そ" +"のため、Future がキャンセルされた堎合でも、システムが正垞に動䜜するようにしお" +"おく必芁がありたす。たずえば、デッドロックやデヌタの消倱があっおはなりたせ" +"ん。" #: src/async/pitfalls/cancellation.md msgid "\"not UTF-8\"" -msgstr "" +msgstr "\"not UTF-8\"" #: src/async/pitfalls/cancellation.md msgid "\"hi\\nthere\\n\"" -msgstr "" +msgstr "\"hi\\nthere\\n\"" #: src/async/pitfalls/cancellation.md msgid "\"tick!\"" -msgstr "" +msgstr "\"tick!\"" #: src/async/pitfalls/cancellation.md msgid "" "The compiler doesn't help with cancellation-safety. You need to read API " "documentation and consider what state your `async fn` holds." msgstr "" +"コンパむラではキャンセル安党性を確保できたせん。API ドキュメントを読み、" +"`async fn` が保持する状態を考慮する必芁がありたす。" #: src/async/pitfalls/cancellation.md msgid "" "Unlike `panic` and `?`, cancellation is part of normal control flow (vs " "error-handling)." msgstr "" +"`panic` や `?`ずは異なり、キャンセルは゚ラヌ凊理ではなく通垞の制埡フロヌ" +"の䞀郚です。" #: src/async/pitfalls/cancellation.md msgid "The example loses parts of the string." -msgstr "" +msgstr "この䟋では、文字列の䞀郚が倱われおいたす。" #: src/async/pitfalls/cancellation.md msgid "" "Whenever the `tick()` branch finishes first, `next()` and its `buf` are " "dropped." msgstr "" +"`tick()` 分岐が先に終了するたびに、`next()` ずその `buf` がドロップされたす。" #: src/async/pitfalls/cancellation.md msgid "" "`LinesReader` can be made cancellation-safe by making `buf` part of the " "struct:" msgstr "" +"`buf` を構造䜓の䞀郚にするこずで、`LinesReader` にキャンセル安党性を持たせる" +"こずができたす。" #: src/async/pitfalls/cancellation.md msgid "// prefix buf and bytes with self.\n" -msgstr "" +msgstr "// buf ず bytes の先頭に self を付加したす。\n" #: src/async/pitfalls/cancellation.md msgid "" @@ -19619,6 +21600,9 @@ msgid "" "html#method.tick) is cancellation-safe because it keeps track of whether a " "tick has been 'delivered'." msgstr "" +"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval." +"html#method.tick) は、ティックが「配信枈み」かどうかを远跡しおいるため、安党" +"にキャンセルできたす。" #: src/async/pitfalls/cancellation.md msgid "" @@ -19626,6 +21610,9 @@ msgid "" "AsyncReadExt.html#method.read) is cancellation-safe because it either " "returns or doesn't read data." msgstr "" +"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait." +"AsyncReadExt.html#method.read) は、デヌタを返すか、デヌタを読み取らないかのい" +"ずれかであるため、安党にキャンセルできたす。" #: src/async/pitfalls/cancellation.md msgid "" @@ -19633,23 +21620,30 @@ msgid "" "AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ " "cancellation-safe. See its documentation for details and alternatives." msgstr "" +"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait." +"AsyncBufReadExt.html#method.read_line) はこの䟋ず類䌌しおおり、安党にキャンセ" +"ルできたせん。詳现ず代替方法に぀いおは、ドキュメントをご芧ください。" #: src/exercises/concurrency/afternoon.md msgid "" "To practice your Async Rust skills, we have again two exercises for you:" -msgstr "" +msgstr "非同期 Rust のスキルを磚くため、ここでも 2 ぀の挔習を行いたす。" #: src/exercises/concurrency/afternoon.md msgid "" "Dining philosophers: we already saw this problem in the morning. This time " "you are going to implement it with Async Rust." msgstr "" +"食事する哲孊者: この問題は午前の郚ですでに取り䞊げたしたが、今回は非同期 " +"Rust を䜿甚しおこれを実装したす。" #: src/exercises/concurrency/afternoon.md msgid "" "A Broadcast Chat Application: this is a larger project that allows you " "experiment with more advanced Async Rust features." msgstr "" +"ブロヌドキャスト チャット アプリ: より高床な非同期 Rust 機胜をテストできる倧" +"芏暡なプロゞェクトです。" #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md @@ -19662,6 +21656,8 @@ msgid "" "See [dining philosophers](dining-philosophers.md) for a description of the " "problem." msgstr "" +"この問題の詳现に぀いおは、[食事する哲孊者](dining-philosophers.md) をご芧くだ" +"さい。" #: src/exercises/concurrency/dining-philosophers-async.md msgid "" @@ -19669,17 +21665,22 @@ msgid "" "locally.md) for this exercise. Copy the code below to a file called `src/" "main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:" msgstr "" +"前ず同様に、この挔習でもロヌカルの [Cargo むンストヌル](../../cargo/running-" +"locally.md) が必芁です。以䞋のコヌドを `src/main.rs` ずいうファむルにコピヌ" +"し、空欄を埋めお、`cargo run` がデッドロックしないこずを確認したす。" #: src/exercises/concurrency/dining-philosophers-async.md #: src/exercises/concurrency/solutions-afternoon.md msgid "// Make them think and eat\n" -msgstr "" +msgstr "// 哲孊者が思玢ず食事を行うようにする\n" #: src/exercises/concurrency/dining-philosophers-async.md msgid "" "Since this time you are using Async Rust, you'll need a `tokio` dependency. " "You can use the following `Cargo.toml`:" msgstr "" +"今回は非同期 Rust を䜿甚するため、`tokio` 䟝存関係が必芁になりたす。次の " +"`Cargo.toml` を䜿甚できたす。" #: src/exercises/concurrency/dining-philosophers-async.md msgid "" @@ -19694,16 +21695,28 @@ msgid "" "\"rt-multi-thread\"] }\n" "```" msgstr "" +"```toml\n" +"[package]\n" +"name = \"dining-philosophers-async-dine\"\n" +"version = \"0.1.0\"\n" +"edition = \"2021\"\n" +"\n" +"[dependencies]\n" +"tokio = { version = \"1.26.0\", features = [\"sync\", \"time\", \"macros\", " +"\"rt-multi-thread\"] }\n" +"```" #: src/exercises/concurrency/dining-philosophers-async.md msgid "" "Also note that this time you have to use the `Mutex` and the `mpsc` module " "from the `tokio` crate." msgstr "" +"たた、今床は `tokio` クレヌトの `Mutex` モゞュヌルず `mpsc` モゞュヌルを䜿甚" +"する必芁があるこずにも泚意しおください。" #: src/exercises/concurrency/dining-philosophers-async.md msgid "Can you make your implementation single-threaded?" -msgstr "" +msgstr "実装をシングルスレッドにできたすか" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19713,6 +21726,11 @@ msgid "" "input, and sends them to the server. The chat server broadcasts each message " "that it receives to all the clients." msgstr "" +"この挔習では、新たに身に付けた知識を掻かしおブロヌドキャスト チャット アプリ" +"を実装したす。クラむアントが接続しおメッセヌゞを公開するチャット サヌバヌがあ" +"りたす。クラむアントは暙準入力からナヌザヌ メッセヌゞを読み取り、サヌバヌに送" +"信したす。チャット サヌバヌは受信した各メッセヌゞをすべおのクラむアントにブ" +"ロヌドキャストしたす。" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19721,14 +21739,18 @@ msgid "" "(https://docs.rs/tokio-websockets/) for the communication between the client " "and the server." msgstr "" +"このために、サヌバヌ䞊の [ブロヌドキャスト チャンネル](https://docs.rs/tokio/" +"latest/tokio/sync/broadcast/fn.channel.html) を䜿甚し、クラむアントずサヌバヌ" +"間の通信には [`tokio_websockets`](https://docs.rs/tokio-websockets/) を䜿甚し" +"たす。" #: src/exercises/concurrency/chat-app.md msgid "Create a new Cargo project and add the following dependencies:" -msgstr "" +msgstr "新しい Cargo プロゞェクトを䜜成し、次の䟝存関係を远加したす。" #: src/exercises/concurrency/chat-app.md msgid "_Cargo.toml_:" -msgstr "" +msgstr "_Cargo.toml_:" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19746,10 +21768,23 @@ msgid "" "\"fastrand\", \"server\", \"sha1_smol\"] }\n" "```" msgstr "" +"```toml\n" +"[package]\n" +"name = \"chat-async\"\n" +"version = \"0.1.0\"\n" +"edition = \"2021\"\n" +"\n" +"[dependencies]\n" +"futures-util = { version = \"0.3.30\", features = [\"sink\"] }\n" +"http = \"1.0.0\"\n" +"tokio = { version = \"1.28.1\", features = [\"full\"] }\n" +"tokio-websockets = { version = \"0.5.1\", features = [\"client\", " +"\"fastrand\", \"server\", \"sha1_smol\"] }\n" +"```" #: src/exercises/concurrency/chat-app.md msgid "The required APIs" -msgstr "" +msgstr "必芁な API" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19757,6 +21792,8 @@ msgid "" "[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes " "to familiarize yourself with the API." msgstr "" +"`tokio` ず [`tokio_websockets`](https://docs.rs/tokio-websockets/) の以䞋の関" +"数が必芁になりたす。少し時間をかけお API に察する理解を深めおください。" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19764,6 +21801,9 @@ msgid "" "trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for " "asynchronously reading messages from a Websocket Stream." msgstr "" +"`WebSocketStream` によっお実装された [StreamExt::next()](https://docs.rs/" +"futures-util/0.3.28/futures_util/stream/trait.StreamExt.html#method.next): " +"Websocket Stream からのメッセヌゞを非同期で読み取りたす。" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19771,6 +21811,9 @@ msgid "" "trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for " "asynchronously sending messages on a Websocket Stream." msgstr "" +"`WebSocketStream` によっお実装された [SinkExt::send()](https://docs.rs/" +"futures-util/0.3.28/futures_util/sink/trait.SinkExt.html#method.send): " +"Websocket Stream 䞊でメッセヌゞを非同期で送信したす。" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19778,16 +21821,22 @@ msgid "" "html#method.next_line): for asynchronously reading user messages from the " "standard input." msgstr "" +"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines." +"html#method.next_line): 暙準入力からのナヌザヌ メッセヌゞを非同期で読み取りた" +"す。" #: src/exercises/concurrency/chat-app.md msgid "" "[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/" "struct.Sender.html#method.subscribe): for subscribing to a broadcast channel." msgstr "" +"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/" +"struct.Sender.html#method.subscribe): ブロヌドキャスト チャンネルをサブスクラ" +"むブしたす。" #: src/exercises/concurrency/chat-app.md msgid "Two binaries" -msgstr "" +msgstr "2 ぀のバむナリ" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19799,6 +21848,13 @@ msgid "" "(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-" "targets.html#binaries))." msgstr "" +"通垞、Cargo プロゞェクトに含めるこずができるのは 1 ぀のバむナリず 1 ぀の " +"`src/main.rs` ファむルのみです。このプロゞェクトには 2 ぀のバむナリが必芁で" +"す。1 ぀はクラむアント甚、もう 1 ぀はサヌバヌ甚です。2 ぀の独立した Cargo プ" +"ロゞェクトを䜜成するこずもできたすが、ここでは 1 ぀の Cargo プロゞェクトに 2 " +"぀のバむナリを入れたす。そのためには、クラむアントずサヌバヌのコヌドを `src/" +"bin` に配眮する必芁がありたす[ドキュメント](https://doc.rust-lang.org/" +"cargo/reference/cargo-targets.html#binaries) をご芧ください。" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19806,61 +21862,64 @@ msgid "" "bin/client.rs`, respectively. Your task is to complete these files as " "described below." msgstr "" +"次のサヌバヌずクラむアントのコヌドを、それぞれ`src/bin/server.rs` ず `src/" +"bin/client.rs` にコピヌしたす。ここでのタスクは、以䞋で説明するように、これら" +"のファむルを完成させるこずです。" #: src/exercises/concurrency/chat-app.md #: src/exercises/concurrency/solutions-afternoon.md msgid "_src/bin/server.rs_:" -msgstr "" +msgstr "_src/bin/server.rs_:" #: src/exercises/concurrency/chat-app.md msgid "// TODO: For a hint, see the description of the task below.\n" -msgstr "" +msgstr "// TODO: ヒントに぀いおは、以䞋のタスクの説明をご芧ください。\n" #: src/exercises/concurrency/chat-app.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"127.0.0.1:2000\"" -msgstr "" +msgstr "\"127.0.0.1:2000\"" #: src/exercises/concurrency/chat-app.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"listening on port 2000\"" -msgstr "" +msgstr "\"listening on port 2000\"" #: src/exercises/concurrency/chat-app.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"New connection from {addr:?}\"" -msgstr "" +msgstr "\"New connection from {addr:?}\"" #: src/exercises/concurrency/chat-app.md #: src/exercises/concurrency/solutions-afternoon.md msgid "// Wrap the raw TCP stream into a websocket.\n" -msgstr "" +msgstr "// 未加工の TCP ストリヌムを WebSocket にラップしたす。\n" #: src/exercises/concurrency/chat-app.md #: src/exercises/concurrency/solutions-afternoon.md msgid "_src/bin/client.rs_:" -msgstr "" +msgstr "_src/bin/client.rs_:" #: src/exercises/concurrency/chat-app.md #: src/exercises/concurrency/solutions-afternoon.md msgid "\"ws://127.0.0.1:2000\"" -msgstr "" +msgstr "\"ws://127.0.0.1:2000\"" #: src/exercises/concurrency/chat-app.md msgid "Running the binaries" -msgstr "" +msgstr "バむナリの実行" #: src/exercises/concurrency/chat-app.md msgid "Run the server with:" -msgstr "" +msgstr "次のコマンドでサヌバヌを実行したす。" #: src/exercises/concurrency/chat-app.md msgid "and the client with:" -msgstr "" +msgstr "次のコマンドでクラむアントを実行したす。" #: src/exercises/concurrency/chat-app.md msgid "Implement the `handle_connection` function in `src/bin/server.rs`." -msgstr "" +msgstr "`src/bin/server.rs` に `handle_connection` 関数を実装したす。" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19868,10 +21927,14 @@ msgid "" "continuous loop. One task receives messages from the client and broadcasts " "them. The other sends messages received by the server to the client." msgstr "" +"ヒント: 2 ぀のタスクを連続ルヌプで同時に実行するには、`tokio::select!` を䜿甚" +"したす。1 ぀のタスクは、クラむアントからメッセヌゞを受信しおブロヌドキャスト" +"したす。もう 1 ぀のタスクは、サヌバヌで受信したメッセヌゞをクラむアントに送信" +"したす。" #: src/exercises/concurrency/chat-app.md msgid "Complete the main function in `src/bin/client.rs`." -msgstr "" +msgstr "`src/bin/client.rs` のメむン関数を完成させたす。" #: src/exercises/concurrency/chat-app.md msgid "" @@ -19880,30 +21943,37 @@ msgid "" "sending them to the server, and (2) receiving messages from the server, and " "displaying them for the user." msgstr "" +"ヒント: 前の䟋ず同様に、`tokio::select!` を連続ルヌプで䜿甚し、1暙準入力" +"からナヌザヌ メッセヌゞを読み取っおサヌバヌに送信するタスクず、2サヌバヌ" +"からメッセヌゞを受信しおナヌザヌに衚瀺するタスクを同時に実行したす。" #: src/exercises/concurrency/chat-app.md msgid "" "Optional: Once you are done, change the code to broadcast messages to all " "clients, but the sender of the message." msgstr "" +"省略可: 完了したら、メッセヌゞの送信者以倖のすべおのクラむアントにメッセヌゞ" +"をブロヌドキャストするようにコヌドを倉曎したす。" #: src/exercises/concurrency/solutions-afternoon.md msgid "Concurrency Afternoon Exercise" -msgstr "" +msgstr "午埌の同時実行の゚クササむズ" #: src/exercises/concurrency/solutions-afternoon.md msgid "([back to exercise](dining-philosophers-async.md))" -msgstr "" +msgstr "[挔習に戻る](dining-philosophers-async.md)" #: src/exercises/concurrency/solutions-afternoon.md msgid "" "// Add a delay before picking the second fork to allow the execution\n" " // to transfer to another task\n" msgstr "" +"// 実行を別のタスクに転送できるよう、2 番目のフォヌクを遞択する前に\n" +" // 遅延を远加したす。\n" #: src/exercises/concurrency/solutions-afternoon.md msgid "// The locks are dropped here\n" -msgstr "" +msgstr "// ここでロックがドロップされたす。\n" #: src/exercises/concurrency/solutions-afternoon.md msgid "" @@ -19911,22 +21981,27 @@ msgid "" " // somewhere. This will swap the forks without deinitializing\n" " // either of them.\n" msgstr "" +"// デッドロックを避けるために、どこかで察称性を\n" +" // 厩す必芁がありたす。これにより、いずれのフォヌクも初期化解陀す" +"るこずなく、フォヌクが\n" +" // スワップされたす。\n" #: src/exercises/concurrency/solutions-afternoon.md msgid "// tx is dropped here, so we don't need to explicitly drop it later\n" msgstr "" +"// tx はここでドロップされるので、埌で明瀺的に削陀する必芁はありたせん。\n" #: src/exercises/concurrency/solutions-afternoon.md msgid "\"Here is a thought: {thought}\"" -msgstr "" +msgstr "\"Here is a thought: {thought}\"" #: src/exercises/concurrency/solutions-afternoon.md msgid "([back to exercise](chat-app.md))" -msgstr "" +msgstr "[挔習に戻る](chat-app.md)" #: src/exercises/concurrency/solutions-afternoon.md msgid "\"Welcome to chat! Type a message\"" -msgstr "" +msgstr "\"Welcome to chat! Type a message\"" #: src/exercises/concurrency/solutions-afternoon.md msgid "" @@ -19934,24 +22009,28 @@ msgid "" " // messages from `ws_stream` and broadcasting them, and (2) receiving\n" " // messages on `bcast_rx` and sending them to the client.\n" msgstr "" +"// (1) `ws_stream` からメッセヌゞを受信しおブロヌドキャストするタスクず、\n" +" // 2`bcast_rx` でメッセヌゞを受信しおクラむアントに送信しするタスク" +"を\n" +" // 同時に実行するための連続ルヌプ。\n" #: src/exercises/concurrency/solutions-afternoon.md msgid "\"From client {addr:?} {text:?}\"" -msgstr "" +msgstr "\"From client {addr:?} {text:?}\"" #: src/exercises/concurrency/solutions-afternoon.md msgid "// Continuous loop for concurrently sending and receiving messages.\n" -msgstr "" +msgstr "// メッセヌゞの同時送受信のための継続的なルヌプ。\n" #: src/exercises/concurrency/solutions-afternoon.md msgid "\"From server: {}\"" -msgstr "" +msgstr "\"From server: {}\"" #: src/thanks.md msgid "" "_Thank you for taking Comprehensive Rust 🊀!_ We hope you enjoyed it and " "that it was useful." -msgstr "" +msgstr "Comprehensive Rust 🊀! を受講いただきありがずうございたした。" #: src/thanks.md msgid "" @@ -19960,6 +22039,10 @@ msgid "" "please get in [contact with us on GitHub](https://github.com/google/" "comprehensive-rust/discussions). We would love to hear from you." msgstr "" +"ここたで倚くのこずを孊んできたしたが、このコヌスは完璧ではないため、間違いを" +"芋぀けた堎合や改善のアむデアがある堎合は [GitHub でお知らせください](https://" +"github.com/google/comprehensive-rust/discussions)。皆さんからのフィヌドバック" +"をお埅ちしおいたす。" #: src/glossary.md msgid "" @@ -19967,18 +22050,24 @@ msgid "" "Rust terms. For translations, this also serves to connect the term back to " "the English original." msgstr "" +"以䞋は、Rust の倚くの甚語を簡単に定矩するこずを目的ずした甚語集です。翻蚳時に" +"甚語を英語の原文に関連付けるのにも圹立ちたす。" #: src/glossary.md msgid "" "allocate: \n" "Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md)." msgstr "" +"割り圓おallocate: \n" +"[ヒヌプ](memory-management/stack-vs-heap.md) での動的メモリ割り圓お。" #: src/glossary.md msgid "" "argument: \n" "Information that is passed into a function or method." msgstr "" +"匕数argument: \n" +"関数たたはメ゜ッドに枡される情報。" #: src/glossary.md msgid "" @@ -19986,30 +22075,41 @@ msgid "" "Low-level Rust development, often deployed to a system without an operating " "system. See [Bare-metal Rust](bare-metal.md)." msgstr "" +"ベアメタル RustBare-metal Rust: \n" +"䜎レベルの Rust 開発。倚くの堎合、オペレヌティング システムのないシステムにデ" +"プロむされたす。[ベアメタル Rust](bare-metal.md) をご芧ください。" #: src/glossary.md msgid "" "block: \n" "See [Blocks](control-flow/blocks.md) and _scope_." msgstr "" +"ブロックblock: \n" +"[ブロック](control-flow/blocks.md) ずスコヌプをご芧ください。" #: src/glossary.md msgid "" "borrow: \n" "See [Borrowing](ownership/borrowing.md)." msgstr "" +"借甚borrow: \n" +"[借甚](ownership/borrowing.md) をご芧ください。" #: src/glossary.md msgid "" "borrow checker: \n" "The part of the Rust compiler which checks that all borrows are valid." msgstr "" +"借甚チェッカヌborrow checker: \n" +"Rust コンパむラの䞀郚。すべおの借甚が有効かどうかをチェックしたす。" #: src/glossary.md msgid "" "brace: \n" "`{` and `}`. Also called _curly brace_, they delimit _blocks_." msgstr "" +"䞭かっこbrace: \n" +"`{` and `}`。ブロックを区切りたす。" #: src/glossary.md msgid "" @@ -20017,42 +22117,57 @@ msgid "" "The process of converting source code into executable code or a usable " "program." msgstr "" +"ビルドbuild: \n" +"゜ヌスコヌドを実行可胜なコヌドたたは䜿甚可胜なプログラムに倉換するプロセス。" #: src/glossary.md msgid "" "call: \n" "To invoke or execute a function or method." msgstr "" +"呌び出しcall: \n" +"関数たたはメ゜ッドを呌び出したす。" #: src/glossary.md msgid "" "channel: \n" "Used to safely pass messages [between threads](concurrency/channels.md)." msgstr "" +"チャンネルchannel: \n" +"[スレッド間](concurrency/channels.md) でメッセヌゞを安党に枡すために䜿甚され" +"たす。" #: src/glossary.md msgid "" "Comprehensive Rust 🊀: \n" "The courses here are jointly called Comprehensive Rust 🊀." msgstr "" +"Comprehensive Rust 🊀: \n" +"このコヌスは、たずめお Comprehensive Rust 🊀 ず呌びたす。" #: src/glossary.md msgid "" "concurrency: \n" "The execution of multiple tasks or processes at the same time." msgstr "" +"同時実行concurrency: \n" +"耇数のタスクたたはプロセスを同時に実行するこずを指したす。" #: src/glossary.md msgid "" "Concurrency in Rust: \n" "See [Concurrency in Rust](concurrency.md)." msgstr "" +"Rust での同時実行Concurrency in Rust: \n" +"[Rust での同時実行](concurrency.md) をご芧ください。" #: src/glossary.md msgid "" "constant: \n" "A value that does not change during the execution of a program." msgstr "" +"定数constant: \n" +"プログラムの実行䞭に倉曎されない倀。" #: src/glossary.md msgid "" @@ -20060,12 +22175,16 @@ msgid "" "The order in which the individual statements or instructions are executed in " "a program." msgstr "" +"制埡フロヌcontrol flow: \n" +"個々のステヌトメントたたは呜什がプログラム内で実行される順序。" #: src/glossary.md msgid "" "crash: \n" "An unexpected and unhandled failure or termination of a program." msgstr "" +"クラッシュcrash: \n" +"予期しない制埡䞍胜な゚ラヌたたは終了。" #: src/glossary.md msgid "" @@ -20073,12 +22192,17 @@ msgid "" "A data type that holds one of several named constants, possibly with an " "associated tuple or struct." msgstr "" +"列挙型enumeration: \n" +"耇数の名前付き定数のうちの 1 ぀を保持するデヌタ型。関連するタプルたたは構造䜓" +"を䌎う堎合がありたす。" #: src/glossary.md msgid "" "error: \n" "An unexpected condition or result that deviates from the expected behavior." msgstr "" +"゚ラヌerror: \n" +"想定された動䜜から逞脱した、予期しない条件たたは結果。" #: src/glossary.md msgid "" @@ -20086,18 +22210,24 @@ msgid "" "The process of managing and responding to errors that occur during program " "execution." msgstr "" +"゚ラヌ凊理error handling: \n" +"プログラムの実行䞭に発生する゚ラヌを管理し、それに察応するプロセス。" #: src/glossary.md msgid "" "exercise: \n" "A task or problem designed to practice and test programming skills." msgstr "" +"挔習exercise:: \n" +"プログラミング スキルの向䞊ずテストを目的ずしたタスクたたは問題。" #: src/glossary.md msgid "" "function: \n" "A reusable block of code that performs a specific task." msgstr "" +"関数function: \n" +"特定のタスクを実行する再利甚可胜なコヌドブロック。" #: src/glossary.md msgid "" @@ -20105,6 +22235,9 @@ msgid "" "A mechanism that automatically frees up memory occupied by objects that are " "no longer in use." msgstr "" +"ガベヌゞ コレクタgarbage collector: \n" +"䜿甚されなくなったオブゞェクトが占有しおいたメモリを自動的に解攟するメカニズ" +"ム。" #: src/glossary.md msgid "" @@ -20112,12 +22245,17 @@ msgid "" "A feature that allows writing code with placeholders for types, enabling " "code reuse with different data types." msgstr "" +"ゞェネリクスgenerics: \n" +"型のプレヌスホルダを䜿甚しおコヌドを蚘述し、さたざたなデヌタ型でコヌドを再利" +"甚できるようにする機胜。" #: src/glossary.md msgid "" "immutable: \n" "Unable to be changed after creation." msgstr "" +"䞍倉immutable: \n" +" 䜜成埌に倉曎できないこず。" #: src/glossary.md msgid "" @@ -20125,6 +22263,8 @@ msgid "" "A type of test that verifies the interactions between different parts or " "components of a system." msgstr "" +"統合テストintegration test: \n" +"システムのさたざたな郚分やコンポヌネント間の盞互䜜甚を怜蚌するテストの䞀皮。" #: src/glossary.md msgid "" @@ -20132,12 +22272,17 @@ msgid "" "A reserved word in a programming language that has a specific meaning and " "cannot be used as an identifier." msgstr "" +"キヌワヌドkeyword: \n" +"特定の意味を持ち、識別子ずしお䜿甚できない、プログラミング蚀語の予玄語。" #: src/glossary.md msgid "" "library: \n" "A collection of precompiled routines or code that can be used by programs." msgstr "" +"ラむブラリlibrary: \n" +"プログラムで䜿甚できるプリコンパむル枈みのルヌチンたたはコヌドのコレクショ" +"ン。" #: src/glossary.md msgid "" @@ -20146,12 +22291,18 @@ msgid "" "normal functions are not enough. A typical example is `format!`, which takes " "a variable number of arguments, which isn't supported by Rust functions." msgstr "" +"マクロmacro: \n" +"Rust マクロは名前に `!` を含めるこずで認識できたす。マクロは、通垞の関数では" +"䞍十分な堎合に䜿甚されたす。兞型的な䟋が `format!` です。これは可倉長匕数を取" +"りたすが、Rust 関数ではサポヌトされおいたせん。" #: src/glossary.md msgid "" "`main` function: \n" "Rust programs start executing with the `main` function." msgstr "" +"`main` 関数`main` function: \n" +"Rust プログラムの実行は `main` 関数で開始されたす。" #: src/glossary.md msgid "" @@ -20159,6 +22310,8 @@ msgid "" "A control flow construct in Rust that allows for pattern matching on the " "value of an expression." msgstr "" +"䞀臎match: \n" +"匏の倀に察するパタヌン マッチングを可胜にする、Rust の制埡フロヌ構造。" #: src/glossary.md msgid "" @@ -20166,12 +22319,17 @@ msgid "" "A situation where a program fails to release memory that is no longer " "needed, leading to a gradual increase in memory usage." msgstr "" +"メモリリヌクmemory leak: \n" +"プログラムで䞍芁になったメモリの解攟に倱敗し、メモリ䜿甚量が埐々に増加する状" +"況。" #: src/glossary.md msgid "" "method: \n" "A function associated with an object or a type in Rust." msgstr "" +"メ゜ッドmethod: \n" +"Rust のオブゞェクトたたは型に関連付けられた関数。" #: src/glossary.md msgid "" @@ -20179,12 +22337,17 @@ msgid "" "A namespace that contains definitions, such as functions, types, or traits, " "to organize code in Rust." msgstr "" +"モゞュヌルmodule: \n" +"関数、型、トレむトなどの定矩を含む名前空間。Rust でコヌドを敎理するために䜿甚" +"されたす。" #: src/glossary.md msgid "" "move: \n" "The transfer of ownership of a value from one variable to another in Rust." msgstr "" +"移動move: \n" +"Rust である倉数から別の倉数に倀の所有暩を移動するこず。" #: src/glossary.md msgid "" @@ -20192,6 +22355,8 @@ msgid "" "A property in Rust that allows variables to be modified after they have been " "declared." msgstr "" +"可倉mutable: \n" +"宣蚀埌の倉数の倉曎を可胜にする Rust のプロパティ。" #: src/glossary.md msgid "" @@ -20199,6 +22364,9 @@ msgid "" "The concept in Rust that defines which part of the code is responsible for " "managing the memory associated with a value." msgstr "" +"所有暩ownership: \n" +"倀に関連付けられたメモリの管理をコヌドのどの郚分が担うかを定矩する Rust の抂" +"念。" #: src/glossary.md msgid "" @@ -20206,12 +22374,16 @@ msgid "" "An unrecoverable error condition in Rust that results in the termination of " "the program." msgstr "" +"パニックpanic: \n" +"プログラムの終了を匕き起こす、Rust の回埩䞍胜な゚ラヌ状態。" #: src/glossary.md msgid "" "parameter: \n" "A value that is passed into a function or method when it is called." msgstr "" +"パラメヌタparameter: \n" +"関数たたはメ゜ッドが呌び出されたずきに枡される倀。" #: src/glossary.md msgid "" @@ -20219,12 +22391,16 @@ msgid "" "A combination of values, literals, or structures that can be matched against " "an expression in Rust." msgstr "" +"パタヌンpattern: \n" +"Rust の匏ず照合できる倀、リテラル、構造䜓の組み合わせ。" #: src/glossary.md msgid "" "payload: \n" "The data or information carried by a message, event, or data structure." msgstr "" +"ペむロヌドpayload: \n" +"メッセヌゞ、むベント、たたはデヌタ構造䜓で保持されるデヌタたたは情報。" #: src/glossary.md msgid "" @@ -20232,12 +22408,17 @@ msgid "" "A set of instructions that a computer can execute to perform a specific task " "or solve a particular problem." msgstr "" +"プログラムprogram: \n" +"特定のタスクを実行したり、特定の問題を解決したりするためにコンピュヌタが実行" +"できる䞀連の呜什。" #: src/glossary.md msgid "" "programming language: \n" "A formal system used to communicate instructions to a computer, such as Rust." msgstr "" +"プログラミング蚀語programming language: \n" +"コンピュヌタに呜什を䌝えるために䜿甚される正匏なシステムRust など。" #: src/glossary.md msgid "" @@ -20245,6 +22426,8 @@ msgid "" "The first parameter in a Rust method that represents the instance on which " "the method is called." msgstr "" +"レシヌバreceiver: \n" +"メ゜ッドが呌び出されたむンスタンスを衚す Rust メ゜ッドの最初のパラメヌタ。" #: src/glossary.md msgid "" @@ -20252,12 +22435,17 @@ msgid "" "A memory management technique in which the number of references to an object " "is tracked, and the object is deallocated when the count reaches zero." msgstr "" +"参照カりントreference counting: \n" +"オブゞェクトぞの参照の数をトラッキングし、カりントがれロになるずオブゞェクト" +"の割り圓おを解陀するメモリ管理技術。" #: src/glossary.md msgid "" "return: \n" "A keyword in Rust used to indicate the value to be returned from a function." msgstr "" +"戻り倀return: \n" +"関数から返される倀を瀺すために䜿甚される Rust のキヌワヌド。" #: src/glossary.md msgid "" @@ -20265,24 +22453,32 @@ msgid "" "A systems programming language that focuses on safety, performance, and " "concurrency." msgstr "" +"Rust: \n" +"安党性、パフォヌマンス、同時実行に重点を眮いたシステム プログラミング蚀語。" #: src/glossary.md msgid "" "Rust Fundamentals: \n" "Days 1 to 3 of this course." msgstr "" +"Rust の基瀎Rust Fundamentals: \n" +"このコヌスの 13 日目。" #: src/glossary.md msgid "" "Rust in Android: \n" "See [Rust in Android](android.md)." msgstr "" +"Android での RustRust in Android: \n" +"[Android での Rust](android.md) をご芧ください。" #: src/glossary.md msgid "" "Rust in Chromium: \n" "See [Rust in Chromium](chromium.md)." msgstr "" +"Chromium での RustRust in Chromium: \n" +"[Chromium での Rust](chromium.md) をご芧ください。" #: src/glossary.md msgid "" @@ -20290,18 +22486,25 @@ msgid "" "Refers to code that adheres to Rust's ownership and borrowing rules, " "preventing memory-related errors." msgstr "" +"安党safe: \n" +"Rust の所有暩ず借甚に関するルヌルに埓っお、メモリ関連の゚ラヌを防止するコヌド" +"を指したす。" #: src/glossary.md msgid "" "scope: \n" "The region of a program where a variable is valid and can be used." msgstr "" +"スコヌプscope: \n" +"倉数が有効か぀䜿甚可胜なプログラムの領域。" #: src/glossary.md msgid "" "standard library: \n" "A collection of modules providing essential functionality in Rust." msgstr "" +"暙準ラむブラリstandard library: \n" +"Rust の必須機胜を提䟛するモゞュヌルのコレクション。" #: src/glossary.md msgid "" @@ -20309,6 +22512,9 @@ msgid "" "A keyword in Rust used to define static variables or items with a `'static` " "lifetime." msgstr "" +"静的static: \n" +"静的な倉数や `'static` ラむフタむムを持぀アむテムを定矩するために䜿甚される " +"Rust のキヌワヌド。" #: src/glossary.md msgid "" @@ -20316,6 +22522,9 @@ msgid "" "A data type storing textual data. See [`String` vs `str`](basic-syntax/" "string-slices.html) for more." msgstr "" +"文字列string: \n" +"テキストデヌタを栌玍するデヌタ型。詳しくは、[`String` ず `str`](basic-syntax/" +"string-slices.html) をご芧ください。" #: src/glossary.md msgid "" @@ -20323,6 +22532,8 @@ msgid "" "A composite data type in Rust that groups together variables of different " "types under a single name." msgstr "" +"構造䜓struct: \n" +"異なる型の倉数を 1 ぀の名前でグルヌプ化する Rust の耇合デヌタ型。" #: src/glossary.md msgid "" @@ -20330,12 +22541,16 @@ msgid "" "A Rust module containing functions that test the correctness of other " "functions." msgstr "" +"テストtest: \n" +"他の関数の正しさをテストする関数を含む Rust モゞュヌル。" #: src/glossary.md msgid "" "thread: \n" "A separate sequence of execution in a program, allowing concurrent execution." msgstr "" +"スレッドthread: \n" +"同時実行を可胜にする、プログラム内の独立した実行シヌケンス。" #: src/glossary.md msgid "" @@ -20343,6 +22558,8 @@ msgid "" "The property of a program that ensures correct behavior in a multithreaded " "environment." msgstr "" +"スレッドセヌフthread safety: \n" +"マルチスレッド環境で正しい動䜜を保蚌するプログラムの特性。" #: src/glossary.md msgid "" @@ -20350,6 +22567,9 @@ msgid "" "A collection of methods defined for an unknown type, providing a way to " "achieve polymorphism in Rust." msgstr "" +"トレむトtrait: \n" +"未知の型に察しお定矩されたメ゜ッドのコレクション。Rust でポリモヌフィズムを実" +"珟する方法を提䟛したす。" #: src/glossary.md msgid "" @@ -20357,6 +22577,8 @@ msgid "" "An abstraction where you can require types to implement some traits of your " "interest." msgstr "" +"トレむト境界trait bound: \n" +"特定のトレむトを実装するために型を芁求できる抜象化。" #: src/glossary.md msgid "" @@ -20364,6 +22586,9 @@ msgid "" "A composite data type that contains variables of different types. Tuple " "fields have no names, and are accessed by their ordinal numbers." msgstr "" +"タプルtuple: \n" +"さたざたな型の倉数を含む耇合デヌタ型。タプル フィヌルドには名前がなく、序数で" +"アクセスしたす。" #: src/glossary.md msgid "" @@ -20371,6 +22596,8 @@ msgid "" "A classification that specifies which operations can be performed on values " "of a particular kind in Rust." msgstr "" +"型type: \n" +"Rust の特定の皮類の倀に察しおどのオペレヌションを実行できるかを指定する分類。" #: src/glossary.md msgid "" @@ -20378,6 +22605,8 @@ msgid "" "The ability of the Rust compiler to deduce the type of a variable or " "expression." msgstr "" +"型掚論type inference: \n" +"倉数たたは匏の型を掚枬する Rust コンパむラの機胜。" #: src/glossary.md msgid "" @@ -20385,12 +22614,17 @@ msgid "" "Actions or conditions in Rust that have no specified result, often leading " "to unpredictable program behavior." msgstr "" +"未定矩の動䜜undefined behavior: \n" +"結果が指定されおいない Rust のアクションたたは条件。倚くの堎合、プログラムの" +"予枬䞍胜な動䜜を匕き起こしたす。" #: src/glossary.md msgid "" "union: \n" "A data type that can hold values of different types but only one at a time." msgstr "" +"共甚䜓union: \n" +"異なる型の倀を䞀床に 1 ぀だけ保持できるデヌタ型。" #: src/glossary.md msgid "" @@ -20398,12 +22632,18 @@ msgid "" "Rust comes with built-in support for running small unit tests and larger " "integration tests. See [Unit Tests](testing/unit-tests.html)." msgstr "" +"単䜓テストunit test: \n" +"Rust には、小芏暡な単䜓テストず倧芏暡な統合テストを実行するための組み蟌みサ" +"ポヌトが付属しおいたす。[単䜓テスト](testing/unit-tests.html) をご芧くださ" +"い。" #: src/glossary.md msgid "" "unit type: \n" "Type that holds no data, written as a tuple with no members." msgstr "" +"ナニット型unit type: \n" +"デヌタを保持しない型。メンバヌのないタプルずしお蚘述されたす。" #: src/glossary.md msgid "" @@ -20411,30 +22651,38 @@ msgid "" "The subset of Rust which allows you to trigger _undefined behavior_. See " "[Unsafe Rust](unsafe.html)." msgstr "" +"安党でないunsafe: \n" +"未定矩の動䜜をトリガヌできる Rust のサブセット。[安党でない Rust](unsafe." +"html) をご芧ください。" #: src/glossary.md msgid "" "variable: \n" "A memory location storing data. Variables are valid in a _scope_." msgstr "" +"倉数variable: \n" +"デヌタを栌玍するメモリの堎所。倉数はスコヌプ内で有効です。" #: src/other-resources.md msgid "Other Rust Resources" -msgstr "" +msgstr "Rust のその他のリ゜ヌス" #: src/other-resources.md msgid "" "The Rust community has created a wealth of high-quality and free resources " "online." msgstr "" +"Rust コミュニティは、高品質な無料のリ゜ヌスをオンラむンで倚数提䟛しおいたす。" #: src/other-resources.md msgid "Official Documentation" -msgstr "" +msgstr "正匏なドキュメント" #: src/other-resources.md msgid "The Rust project hosts many resources. These cover Rust in general:" msgstr "" +"Rust プロゞェクトは倚くのリ゜ヌスをホストしおおり、これらは Rust 党般に察応し" +"おいたす。" #: src/other-resources.md msgid "" @@ -20442,6 +22690,9 @@ msgid "" "canonical free book about Rust. Covers the language in detail and includes a " "few projects for people to build." msgstr "" +"[The Rust Programming Language](https://doc.rust-lang.org/book/): Rust の暙準" +"的な曞籍で、無料で利甚できたす。Rust に぀いお詳しく説明されおいるほか、ビルド" +"できるプロゞェクトがいく぀か含たれおいたす。" #: src/other-resources.md msgid "" @@ -20450,22 +22701,29 @@ msgid "" "Sometimes includes small exercises where you are asked to expand on the code " "in the examples." msgstr "" +"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): さたざたな構造" +"を瀺す䞀連のサンプルを䜿甚しお、Rust の構文を解説しおいたす。小芏暡な挔習がい" +"く぀か甚意されおおり、そこでサンプルのコヌドを拡匵するよう求められたす。" #: src/other-resources.md msgid "" "[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation " "of the standard library for Rust." msgstr "" +"[Rust Standard Library](https://doc.rust-lang.org/std/): Rust の暙準ラむブラ" +"リの完党なドキュメントです。" #: src/other-resources.md msgid "" "[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete " "book which describes the Rust grammar and memory model." msgstr "" +"[The Rust Reference](https://doc.rust-lang.org/reference/): Rust の文法ずメモ" +"リモデルに぀いお説明しおいる未完成の曞籍です。" #: src/other-resources.md msgid "More specialized guides hosted on the official Rust site:" -msgstr "" +msgstr "Rust の公匏サむトでホストされおいる、より専門的なガむド:" #: src/other-resources.md msgid "" @@ -20473,6 +22731,9 @@ msgid "" "including working with raw pointers and interfacing with other languages " "(FFI)." msgstr "" +"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): 未加工のポむンタの操" +"䜜や、他の蚀語FFIずのやり取りなど、安党でない Rust に぀いお説明しおいた" +"す。" #: src/other-resources.md msgid "" @@ -20480,6 +22741,9 @@ msgid "" "covers the new asynchronous programming model which was introduced after the " "Rust Book was written." msgstr "" +"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): " +"Rust Book の執筆埌に導入された新しい非同期プログラミング モデルに぀いお説明し" +"おいたす。" #: src/other-resources.md msgid "" @@ -20487,20 +22751,25 @@ msgid "" "an introduction to using Rust on embedded devices without an operating " "system." msgstr "" +"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): オ" +"ペレヌティング システムのない組み蟌みデバむスで Rust を䜿甚する方法を玹介しお" +"いたす。" #: src/other-resources.md msgid "Unofficial Learning Material" -msgstr "" +msgstr "非公匏の孊習教材" #: src/other-resources.md msgid "A small selection of other guides and tutorial for Rust:" -msgstr "" +msgstr "Rust に関するその他のガむドずチュヌトリアル:" #: src/other-resources.md msgid "" "[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust " "from the perspective of low-level C programmers." msgstr "" +"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): 高床な知識を" +"持たない C プログラマヌの芖点で Rust を解説しおいたす。" #: src/other-resources.md msgid "" @@ -20508,6 +22777,9 @@ msgid "" "rust_for_c/): covers Rust from the perspective of developers who write " "firmware in C." msgstr "" +"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/" +"rust_for_c/): ファヌムりェアを C で蚘述するデベロッパヌの芳点から Rust を解説" +"しおいたす。" #: src/other-resources.md msgid "" @@ -20515,12 +22787,17 @@ msgid "" "covers the syntax of Rust using side-by-side comparisons with other " "languages such as C, C++, Java, JavaScript, and Python." msgstr "" +"[Rust for professionals](https://overexact.com/rust-for-professionals/): 他の" +"蚀語C、C++、Java、JavaScript、Python などず䞊べお比范しながら、Rust の構" +"文に぀いお説明しおいたす。" #: src/other-resources.md msgid "" "[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help " "you learn Rust." msgstr "" +"[Rust on Exercism](https://exercism.org/tracks/rust): Rust の孊習に圹立぀ " +"100 以䞊の挔習が甚意されおいたす。" #: src/other-resources.md msgid "" @@ -20529,6 +22806,10 @@ msgid "" "and advanced part of the Rust language. Other topics such as WebAssembly, " "and async/await are also covered." msgstr "" +"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-" +"material/index.html): Rust 蚀語の基本的な郚分ず高床な郚分の䞡方をカバヌした、" +"䞀連のコンパクトなプレれンテヌションです。WebAssembly、async / await などの他" +"のトピックも扱っおいたす。" #: src/other-resources.md msgid "" @@ -20538,6 +22819,11 @@ msgid "" "new developers. The first is a set of 35 videos and the second is a set of " "11 modules which covers Rust syntax and basic constructs." msgstr "" +"[Beginner's Series to Rust](https://docs.microsoft.com/ja-jp/shows/beginners-" +"series-to-rust/) および [Take your first steps with Rust](https://docs." +"microsoft. com/en-us/learn/paths/rust-first-steps/): 初心者のデベロッパヌを察" +"象ずした 2 ぀の Rust ガむドです。1 ぀目は 35 個の動画で構成され、2 ぀目は " +"Rust の構文ず基本的な構造を説明する 11 のモゞュヌルで構成されおいたす。" #: src/other-resources.md msgid "" @@ -20545,12 +22831,17 @@ msgid "" "github.io/too-many-lists/): in-depth exploration of Rust's memory management " "rules, through implementing a few different types of list structures." msgstr "" +"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial." +"github.io/too-many-lists/): いく぀かの異なるタむプのリスト構造の実装を通じ" +"お、Rust のメモリ管理ルヌルを深く掘り䞋げおいたす。" #: src/other-resources.md msgid "" "Please see the [Little Book of Rust Books](https://lborb.github.io/book/) " "for even more Rust books." msgstr "" +"Rust に関するその他の曞籍に぀いおは、[Little Book of Rust Books](https://" +"lborb.github.io/book/) をご芧ください。" #: src/credits.md msgid "" @@ -20558,6 +22849,9 @@ msgid "" "documentation. See the page on [other resources](other-resources.md) for a " "full list of useful resources." msgstr "" +"ここで玹介する教材は、倚くの優れた Rust ドキュメントの゜ヌスに基づいおいた" +"す。圹立぀リ゜ヌスの䞀芧に぀いおは、[その他のリ゜ヌス](other-resources.md) の" +"ペヌゞをご芧ください。" #: src/credits.md msgid "" @@ -20565,10 +22859,13 @@ msgid "" "2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-" "rust/blob/main/LICENSE) for details." msgstr "" +"Comprehensive Rust の教材は、Apache 2.0 ラむセンスの芏玄により䜿甚が蚱諟され" +"おいたす。詳现に぀いおは、[`LICENSE`](https://github.com/google/" +"comprehensive-rust/blob/main/LICENSE) をご芧ください。" #: src/credits.md msgid "Rust by Example" -msgstr "" +msgstr "Rust by Example" #: src/credits.md msgid "" @@ -20577,10 +22874,13 @@ msgid "" "`third_party/rust-by-example/` directory for details, including the license " "terms." msgstr "" +"䞀郚の䟋ず挔習は、[Rust by Example](https://doc.rust-lang.org/rust-by-" +"example/) からコピヌしお線集したものです。ラむセンス芏玄などの詳现に぀いお" +"は、`third_party/rust-by-example/` ディレクトリを参照しおください。" #: src/credits.md msgid "Rust on Exercism" -msgstr "" +msgstr "Rust on Exercism" #: src/credits.md msgid "" @@ -20588,10 +22888,13 @@ msgid "" "exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` " "directory for details, including the license terms." msgstr "" +"䞀郚の挔習は、[Rust on Exercism](https://exercism.org/tracks/rust) をコピヌし" +"お線集したものです。ラむセンス芏玄などの詳现に぀いおは、`third_party/rust-on-" +"exercism/` ディレクトリを参照しおください。" #: src/credits.md msgid "CXX" -msgstr "" +msgstr "CXX" #: src/credits.md msgid "" @@ -20599,6 +22902,9 @@ msgid "" "uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` " "directory for details, including the license terms." msgstr "" +"[C++ ずの盞互運甚性](android/interoperability/cpp.md) セクションでは、[CXX]" +"(https://cxx.rs/) の画像を䜿甚しおいたす。ラむセンス芏玄などの詳现に぀いお" +"は、`third_party/cxx/` ディレクトリを参照しおください。" #, fuzzy #~ msgid "With C++)"