diff --git a/po/ja.po b/po/ja.po index 3ea54414c4d6..dff3f129b7ec 100644 --- a/po/ja.po +++ b/po/ja.po @@ -52,15 +52,14 @@ msgstr "ローカル環境での実行" msgid "Day 1: Morning" msgstr "Day 1: AM" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md -#: src/welcome-day-4.md src/concurrency/welcome-async.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/welcome-day-2.md src/welcome-day-3.md src/welcome-day-4.md +#: src/concurrency/welcome-async.md msgid "Welcome" msgstr "ようこそ" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-1.md src/hello-world.md src/types-and-values.md -#: src/types-and-values/hello-world.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/hello-world.md src/types-and-values.md src/types-and-values/hello-world.md msgid "Hello, World" msgstr "Hello, World" @@ -76,8 +75,8 @@ msgstr "Rustのメリット" msgid "Playground" msgstr "プレイグラウンド" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-1.md src/types-and-values.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/types-and-values.md msgid "Types and Values" msgstr "型と値" @@ -105,22 +104,20 @@ msgstr "演習: フィボナッチ" #: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md #: src/references/solution.md src/user-defined-types/solution.md #: src/pattern-matching/solution.md src/methods-and-traits/solution.md -#: src/generics/solution.md src/std-types/solution.md -#: src/std-traits/solution.md src/memory-management/solution.md -#: src/smart-pointers/solution.md src/borrowing/solution.md -#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md -#: src/testing/solution.md src/error-handling/solution.md +#: src/generics/solution.md src/std-types/solution.md src/std-traits/solution.md +#: src/memory-management/solution.md src/smart-pointers/solution.md +#: src/borrowing/solution.md src/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 msgid "Solution" msgstr "解答" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-1.md src/control-flow-basics.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-1.md +#: src/control-flow-basics.md msgid "Control Flow Basics" msgstr "制御フローの基本" #: src/SUMMARY.md -#, fuzzy msgid "`if` Expressions" msgstr "`if` 式" @@ -153,8 +150,7 @@ msgstr "ブロックとスコープ" msgid "Scopes and Shadowing" msgstr "スコープとシャドーイング" -#: src/SUMMARY.md src/control-flow-basics.md -#: src/control-flow-basics/functions.md +#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/functions.md msgid "Functions" msgstr "関数" @@ -162,8 +158,7 @@ msgstr "関数" msgid "Macros" msgstr "マクロ" -#: src/SUMMARY.md src/control-flow-basics.md -#: src/control-flow-basics/exercise.md +#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/exercise.md msgid "Exercise: Collatz Sequence" msgstr "演習: コラッツ数列" @@ -188,11 +183,9 @@ msgstr "タプル" msgid "Array Iteration" msgstr "配列のイテレート" -#: src/SUMMARY.md src/tuples-and-arrays.md -#: src/tuples-and-arrays/destructuring.md -#, fuzzy +#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/destructuring.md msgid "Patterns and Destructuring" -msgstr "列挙型編" +msgstr "パターンと分配" #: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md msgid "Exercise: Nested Arrays" @@ -230,9 +223,8 @@ msgstr "ユーザー定義型" #: src/SUMMARY.md src/user-defined-types.md #: src/user-defined-types/named-structs.md -#, fuzzy msgid "Named Structs" -msgstr "構造体(structs)" +msgstr "名前付き構造体" #: src/SUMMARY.md src/user-defined-types.md #: src/user-defined-types/tuple-structs.md @@ -245,7 +237,6 @@ msgid "Enums" msgstr "列挙型(enums)" #: src/SUMMARY.md -#, fuzzy msgid "Const" msgstr "定数" @@ -265,8 +256,8 @@ msgstr "演習: エレベーターでのイベント" msgid "Day 2: Morning" msgstr "Day 2: AM" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-2.md src/pattern-matching.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-2.md +#: src/pattern-matching.md msgid "Pattern Matching" msgstr "パターンマッチング" @@ -276,25 +267,22 @@ msgstr "" #: src/SUMMARY.md src/pattern-matching.md msgid "Destructuring Structs" -msgstr "構造体編" +msgstr "構造体の分配" #: src/SUMMARY.md src/pattern-matching.md -#, fuzzy msgid "Destructuring Enums" -msgstr "列挙型編" +msgstr "列挙型の分配" -#: src/SUMMARY.md src/pattern-matching.md -#: src/pattern-matching/let-control-flow.md -#, fuzzy +#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/let-control-flow.md msgid "Let Control Flow" -msgstr "制御フロー" +msgstr "Let 制御フロー" #: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md msgid "Exercise: Expression Evaluation" msgstr "演習: 式の評価" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-2.md src/methods-and-traits.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-2.md +#: src/methods-and-traits.md msgid "Methods and Traits" msgstr "" @@ -307,24 +295,20 @@ msgid "Traits" msgstr "トレイト(trait)" #: src/SUMMARY.md src/methods-and-traits/traits/implementing.md -#, fuzzy msgid "Implementing Traits" -msgstr "Unsafeなトレイトの実装" +msgstr "トレイトの実装" #: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md -#, fuzzy msgid "Supertraits" -msgstr "他のトレイト" +msgstr "スーパートレイト" #: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md -#, fuzzy msgid "Associated Types" -msgstr "共有の型" +msgstr "関連型" #: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md -#, fuzzy msgid "Deriving" -msgstr "トレイトの導出" +msgstr "導出" #: src/SUMMARY.md src/methods-and-traits.md msgid "Exercise: Generic Logger" @@ -340,18 +324,16 @@ msgid "Generics" msgstr "ジェネリクス(generics)" #: src/SUMMARY.md src/generics.md src/generics/generic-functions.md -#, fuzzy msgid "Generic Functions" -msgstr "Extern関数" +msgstr "ジェネリック関数" #: src/SUMMARY.md src/generics.md src/generics/generic-data.md msgid "Generic Data Types" msgstr "ジェネリックデータ型" #: src/SUMMARY.md src/generics/generic-traits.md -#, fuzzy msgid "Generic Traits" -msgstr "ジェネリクス(generics)" +msgstr "ジェネリックトレイト" #: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md msgid "Trait Bounds" @@ -362,9 +344,8 @@ msgid "`impl Trait`" msgstr "`impl Trait`" #: src/SUMMARY.md src/generics/dyn-trait.md -#, fuzzy msgid "`dyn Trait`" -msgstr "`impl Trait`" +msgstr "`dyn Trait`" #: src/SUMMARY.md src/generics/exercise.md msgid "Exercise: Generic `min`" @@ -372,9 +353,8 @@ msgstr "演習: ジェネリックな `min`" #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-2-afternoon.md src/std-types.md -#, fuzzy msgid "Standard Library Types" -msgstr "標準ライブラリ" +msgstr "標準ライブラリ型" #: src/SUMMARY.md src/std-types.md src/std-types/std.md msgid "Standard Library" @@ -411,9 +391,8 @@ msgstr "演習: カウンター" #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-2-afternoon.md src/std-traits.md -#, fuzzy msgid "Standard Library Traits" -msgstr "標準ライブラリ" +msgstr "標準ライブラリトレイト" #: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md #: src/concurrency/welcome-async.md @@ -421,18 +400,16 @@ msgid "Comparisons" msgstr "他の言語との比較" #: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md -#, fuzzy msgid "Operators" -msgstr "イテレータ" +msgstr "演算子" #: src/SUMMARY.md src/std-traits/from-and-into.md msgid "`From` and `Into`" msgstr "`From` と `Into`" #: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md -#, fuzzy msgid "Casting" -msgstr "テスト" +msgstr "キャスト" #: src/SUMMARY.md src/std-traits/read-and-write.md msgid "`Read` and `Write`" @@ -454,8 +431,8 @@ msgstr "演習: ROT13暗号" msgid "Day 3: Morning" msgstr "Day 3: AM" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-3.md src/memory-management.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-3.md +#: src/memory-management.md msgid "Memory Management" msgstr "メモリ管理" @@ -464,9 +441,8 @@ msgid "Review of Program Memory" msgstr "プログラム メモリの見直し" #: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md -#, fuzzy msgid "Approaches to Memory Management" -msgstr "Rustのメモリ管理" +msgstr "メモリ管理アプローチ" #: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md msgid "Ownership" @@ -492,8 +468,8 @@ msgstr "`Drop`" msgid "Exercise: Builder Type" msgstr "演習: ビルダー型" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-3.md src/smart-pointers.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-3.md +#: src/smart-pointers.md msgid "Smart Pointers" msgstr "スマートポインタ" @@ -507,9 +483,8 @@ msgid "`Rc`" msgstr "`Rc`" #: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md -#, fuzzy msgid "Owned Trait Objects" -msgstr "トレイトオブジェクト" +msgstr "所有トレイトオブジェクト" #: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md msgid "Exercise: Binary Tree" @@ -525,14 +500,12 @@ msgid "Borrowing" msgstr "借用" #: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md -#, fuzzy msgid "Borrowing a Value" -msgstr "借用" +msgstr "値の借用" #: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md -#, fuzzy msgid "Borrow Checking" -msgstr "借用" +msgstr "借用チェック" #: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md msgid "Borrow Errors" @@ -548,7 +521,6 @@ msgstr "演習: 健康に関する統計" #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/welcome-day-3-afternoon.md src/lifetimes.md -#, fuzzy msgid "Lifetimes" msgstr "ライフタイム" @@ -557,14 +529,12 @@ msgid "Lifetime Annotations" msgstr "関数とライフタイム" #: src/SUMMARY.md src/lifetimes.md -#, fuzzy msgid "Lifetime Elision" -msgstr "ライフタイム" +msgstr "ライフタイムの省略" #: src/SUMMARY.md src/lifetimes.md -#, fuzzy msgid "Struct Lifetimes" -msgstr "ライフタイム" +msgstr "構造体のライフタイム" #: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md msgid "Exercise: Protobuf Parsing" @@ -574,8 +544,8 @@ msgstr "演習: Protobufの解析" msgid "Day 4: Morning" msgstr "Day 4: AM" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-4.md src/iterators.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-4.md +#: src/iterators.md msgid "Iterators" msgstr "イテレータ" @@ -595,11 +565,10 @@ msgstr "`FromIterator`" msgid "Exercise: Iterator Method Chaining" msgstr "演習: イテレータのメソッドチェーン" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-4.md src/modules.md src/modules/modules.md -#, fuzzy +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-4.md +#: src/modules.md src/modules/modules.md msgid "Modules" -msgstr "モジュール タイプ" +msgstr "モジュール " #: src/SUMMARY.md src/modules.md src/modules/filesystem.md msgid "Filesystem Hierarchy" @@ -614,12 +583,11 @@ msgid "`use`, `super`, `self`" msgstr "`use`、`super`、`self`" #: src/SUMMARY.md src/modules.md src/modules/exercise.md -#, fuzzy msgid "Exercise: Modules for a GUI Library" -msgstr "[演習: GUI ライブラリのモジュール](./modules/exercise.md)(15 分)" +msgstr "演習: GUI ライブラリのモジュール" -#: src/SUMMARY.md src/running-the-course/course-structure.md -#: src/welcome-day-4.md src/testing.md src/chromium/testing.md +#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-4.md +#: src/testing.md src/chromium/testing.md msgid "Testing" msgstr "テスト" @@ -628,18 +596,16 @@ msgid "Test Modules" msgstr "テストモジュール" #: src/SUMMARY.md src/testing.md src/testing/other.md -#, fuzzy msgid "Other Types of Tests" -msgstr "他のプロジェクト" +msgstr "他のタイプのテスト" #: src/SUMMARY.md src/testing.md src/testing/lints.md msgid "Compiler Lints and Clippy" msgstr "コンパイラの Lints と Clippy" #: src/SUMMARY.md src/testing.md src/testing/exercise.md -#, fuzzy msgid "Exercise: Luhn Algorithm" -msgstr "Luhnアルゴリズム" +msgstr "演習: Luhnアルゴリズム" #: src/SUMMARY.md msgid "Day 4: Afternoon" @@ -655,14 +621,12 @@ msgid "Panics" msgstr "パニック(panic)" #: src/SUMMARY.md src/error-handling.md src/error-handling/try.md -#, fuzzy msgid "Try Operator" -msgstr "Iterator" +msgstr "Try演算子" #: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md -#, fuzzy msgid "Try Conversions" -msgstr "暗黙的な型変換" +msgstr "Try変換" #: src/SUMMARY.md msgid "`Error` Trait" @@ -686,9 +650,8 @@ msgid "Unsafe Rust" msgstr "Unsafe Rust" #: src/SUMMARY.md src/unsafe-rust.md -#, fuzzy msgid "Unsafe" -msgstr "Unsafe Rust" +msgstr "アンセーフ" #: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md msgid "Dereferencing Raw Pointers" @@ -739,9 +702,8 @@ msgid "AIDL" msgstr "AIDL(Androidインターフェイス定義言語)" #: src/SUMMARY.md src/android/aidl/birthday-service.md -#, fuzzy msgid "Birthday Service Tutorial" -msgstr "/** 誕生日サービスのインターフェース。*/" +msgstr "誕生日サービスのチュートリアル" #: src/SUMMARY.md msgid "Interface" @@ -752,9 +714,8 @@ msgid "Service API" msgstr "" #: src/SUMMARY.md -#, fuzzy msgid "Service" -msgstr "サーバ" +msgstr "サービス" #: src/SUMMARY.md msgid "Server" @@ -773,33 +734,28 @@ msgid "Changing API" msgstr "APIの変更" #: src/SUMMARY.md -#, fuzzy msgid "Updating Implementations" -msgstr "実装" +msgstr "実装の更新" #: src/SUMMARY.md -#, fuzzy msgid "AIDL Types" -msgstr "型" +msgstr "AIDL型" #: src/SUMMARY.md src/android/aidl/types/primitives.md msgid "Primitive Types" msgstr "" #: src/SUMMARY.md src/android/aidl/types/arrays.md -#, fuzzy msgid "Array Types" -msgstr "配列" +msgstr "配列型" #: src/SUMMARY.md src/android/aidl/types/objects.md -#, fuzzy msgid "Sending Objects" -msgstr "トレイトオブジェクト" +msgstr "オブジェクトの送信" #: src/SUMMARY.md src/android/aidl/types/parcelables.md -#, fuzzy msgid "Parcelables" -msgstr "変数" +msgstr "パーセラブル" #: src/SUMMARY.md src/android/aidl/types/file-descriptor.md msgid "Sending Files" @@ -838,9 +794,8 @@ msgid "With C++" msgstr "C++" #: src/SUMMARY.md src/android/interoperability/cpp/bridge.md -#, fuzzy msgid "The Bridge Module" -msgstr "テストモジュール" +msgstr "ブリッジモジュール" #: src/SUMMARY.md msgid "Rust Bridge" @@ -863,14 +818,12 @@ msgid "Shared Enums" msgstr "共有の列挙型" #: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md -#, fuzzy msgid "Rust Error Handling" -msgstr "エラー処理" +msgstr "Rustのエラー処理" #: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md -#, fuzzy msgid "C++ Error Handling" -msgstr "エラー処理" +msgstr "C++のエラー処理" #: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md msgid "Additional Types" @@ -905,9 +858,8 @@ msgid "Policy" msgstr "ポリシー" #: src/SUMMARY.md -#, fuzzy msgid "Unsafe Code" -msgstr "Unsafe Rust" +msgstr "アンセーフなコード" #: src/SUMMARY.md src/chromium/build-rules/depending.md msgid "Depending on Rust Code from Chromium C++" @@ -934,33 +886,28 @@ msgid "`chromium::import!` Macro" msgstr "`chromium::import!` マクロ" #: src/SUMMARY.md src/chromium/interoperability-with-cpp.md -#, fuzzy msgid "Interoperability with C++" -msgstr "C との相互運用性" +msgstr "C++との相互運用性" #: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md -#, fuzzy msgid "Example Bindings" -msgstr "例" +msgstr "バインディングの例" #: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md msgid "Limitations of CXX" msgstr "CXXの限界" #: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md -#, fuzzy msgid "CXX Error Handling" -msgstr "エラー処理" +msgstr "CXXにおけるエラー処理" #: src/SUMMARY.md -#, fuzzy msgid "Error Handling: QR Example" -msgstr "エラー処理" +msgstr "エラー処理: QRの例" #: src/SUMMARY.md -#, fuzzy msgid "Error Handling: PNG Example" -msgstr "エラー処理" +msgstr "エラー処理: PNGの例" #: src/SUMMARY.md msgid "Using CXX in Chromium" @@ -1002,8 +949,7 @@ msgstr "コードを生成するビルドスクリプト" msgid "Build Scripts Which Build C++ or Take Arbitrary Actions" msgstr "C++をビルドする、もしくは、任意のアクションを実行するビルドスクリプト" -#: src/SUMMARY.md -#: src/chromium/adding-third-party-crates/depending-on-a-crate.md +#: src/SUMMARY.md src/chromium/adding-third-party-crates/depending-on-a-crate.md msgid "Depending on a Crate" msgstr "クレートへの依存を設定する" @@ -1024,14 +970,12 @@ msgid "Bringing It Together - Exercise" msgstr "まとめ - 演習" #: src/SUMMARY.md src/exercises/chromium/solutions.md -#, fuzzy msgid "Exercise Solutions" -msgstr "演習: 式の評価" +msgstr "演習の解答" #: src/SUMMARY.md -#, fuzzy msgid "Bare Metal: Morning" -msgstr "ベアメタル Rust:午前の講座" +msgstr "ベアメタルl: 午前" #: src/SUMMARY.md src/bare-metal/no_std.md msgid "`no_std`" @@ -1074,9 +1018,8 @@ msgid "`embedded-hal`" msgstr "`embedded-hal`" #: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md -#, fuzzy msgid "`probe-rs` and `cargo-embed`" -msgstr "probe-rs, cargo-embed" +msgstr "`probe-rs`と`cargo-embed`" #: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md msgid "Debugging" @@ -1099,8 +1042,7 @@ msgid "Compass" msgstr "コンパス" #: src/SUMMARY.md src/concurrency/sync-exercises.md -#: src/concurrency/sync-exercises/solutions.md -#: src/concurrency/async-exercises.md +#: src/concurrency/sync-exercises/solutions.md src/concurrency/async-exercises.md #: src/concurrency/async-exercises/solutions.md msgid "Solutions" msgstr "解答" @@ -1182,9 +1124,8 @@ msgid "`spin`" msgstr "`spin`" #: src/SUMMARY.md src/bare-metal/android.md -#, fuzzy msgid "Bare-Metal on Android" -msgstr "ベアメタル Rust:午前の講座" +msgstr "Android上のベアメタル" #: src/SUMMARY.md msgid "`vmbase`" @@ -1204,9 +1145,8 @@ msgid "Threads" msgstr "スレッド" #: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md -#, fuzzy msgid "Plain Threads" -msgstr "スレッド" +msgstr "プレーンなスレッド" #: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md msgid "Scoped Threads" @@ -1219,17 +1159,15 @@ msgstr "チャネル" #: src/SUMMARY.md src/concurrency/channels.md #: src/concurrency/channels/senders-receivers.md -#, fuzzy msgid "Senders and Receivers" -msgstr "メソッドレシーバ" +msgstr "送信側(Senders)と受信側(Receivers)" #: src/SUMMARY.md src/concurrency/channels.md #: src/concurrency/channels/unbounded.md msgid "Unbounded Channels" msgstr "Unboundedチャネル" -#: src/SUMMARY.md src/concurrency/channels.md -#: src/concurrency/channels/bounded.md +#: src/SUMMARY.md src/concurrency/channels.md src/concurrency/channels/bounded.md msgid "Bounded Channels" msgstr "Boundedチャネル" @@ -1239,9 +1177,8 @@ msgstr "`Send`と`Sync`" #: src/SUMMARY.md src/concurrency/send-sync.md #: src/concurrency/send-sync/marker-traits.md -#, fuzzy msgid "Marker Traits" -msgstr "他のトレイト" +msgstr "マーカートレイト" #: src/SUMMARY.md src/concurrency/send-sync/send.md msgid "`Send`" @@ -1277,8 +1214,7 @@ msgstr "例" #: src/SUMMARY.md src/concurrency/sync-exercises.md #: src/concurrency/sync-exercises/dining-philosophers.md -#: src/concurrency/sync-exercises/solutions.md -#: src/concurrency/async-exercises.md +#: src/concurrency/sync-exercises/solutions.md src/concurrency/async-exercises.md msgid "Dining Philosophers" msgstr "食事する哲学者" @@ -1320,9 +1256,8 @@ msgstr "タスク" #: src/SUMMARY.md src/running-the-course/course-structure.md #: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md -#, fuzzy msgid "Channels and Control Flow" -msgstr "制御フロー" +msgstr "チャネルと制御フロー" #: src/SUMMARY.md src/concurrency/async-control-flow.md #: src/concurrency/async-control-flow/channels.md @@ -1359,9 +1294,8 @@ msgstr "Asyncトレイト" #: src/SUMMARY.md src/concurrency/async-pitfalls.md #: src/concurrency/async-pitfalls/cancellation.md -#, fuzzy msgid "Cancellation" -msgstr "インストール" +msgstr "キャンセル" #: src/SUMMARY.md src/concurrency/async-exercises.md #: src/concurrency/async-exercises/chat-app.md @@ -1392,49 +1326,49 @@ msgstr "クレジット" #: src/index.md msgid "" -"[![Build workflow](https://img.shields.io/github/actions/workflow/status/" -"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/" -"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) [![GitHub stars](https://img.shields." -"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github." -"com/google/comprehensive-rust/stargazers)" -msgstr "" -"[![Build workflow](https://img.shields.io/github/actions/workflow/status/" -"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/" -"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) [![GitHub stars](https://img.shields." -"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github." -"com/google/comprehensive-rust/stargazers)" +"[![Build workflow](https://img.shields.io/github/actions/workflow/status/google/" +"comprehensive-rust/build.yml?style=flat-square)](https://github.com/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) [![GitHub stars](https://img.shields.io/github/stars/google/" +"comprehensive-rust?style=flat-square)](https://github.com/google/comprehensive-" +"rust/stargazers)" +msgstr "" +"[![Build workflow](https://img.shields.io/github/actions/workflow/status/google/" +"comprehensive-rust/build.yml?style=flat-square)](https://github.com/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) [![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 msgid "" -"This is a free Rust course developed by the Android team at Google. The " -"course covers the full spectrum of Rust, from basic syntax to advanced " -"topics like generics and error handling." +"This is a free Rust course developed by the Android team at Google. The course " +"covers the full spectrum of Rust, from basic syntax to advanced topics like " +"generics and error handling." msgstr "" -"この資料は、GoogleのAndroidチームによって開発された3日間のRust講座です。本講" -"座では、基本構文からジェネリクスやエラー処理など、幅広い内容をカバーします。" -"また、最終日にはAndroid専用の内容も含まれています。" +"この資料は、GoogleのAndroidチームによって開発された3日間のRust講座です。本講座で" +"は、基本構文からジェネリクスやエラー処理など、幅広い内容をカバーします。また、最" +"終日にはAndroid専用の内容も含まれています。" #: src/index.md msgid "" "The latest version of the course can be found at . If you are reading somewhere else, please check there " -"for updates." +"comprehensive-rust/>. If you are reading somewhere else, please check there for " +"updates." msgstr "" -"コースの最新バージョンは にあ" -"ります。他の場所でお読みの場合は、そちらで最新情報をご確認ください。" +"コースの最新バージョンは にありま" +"す。他の場所でお読みの場合は、そちらで最新情報をご確認ください。" #: src/index.md msgid "" -"The course is available in other languages. Select your preferred language " -"in the top right corner of the page or check the [Translations](running-the-" -"course/translations.md) page for a list of all available translations." +"The course is available in other languages. Select your preferred language in " +"the top right corner of the page or check the [Translations](running-the-course/" +"translations.md) page for a list of all available translations." msgstr "" #: src/index.md @@ -1443,11 +1377,11 @@ msgstr "" #: src/index.md msgid "" -"The goal of the course is to teach you Rust. We assume you don't know " -"anything about Rust and hope to:" +"The goal of the course is to teach you Rust. We assume you don't know anything " +"about Rust and hope to:" msgstr "" -"本講座の目的は、Rustを教える事です。Rustに関する前提知識は不要としており、次" -"の目標を設定しています:" +"本講座の目的は、Rustを教える事です。Rustに関する前提知識は不要としており、次の目" +"標を設定しています:" #: src/index.md msgid "Give you a comprehensive understanding of the Rust syntax and language." @@ -1470,8 +1404,8 @@ msgstr "コースの最初の4日間を「Rust の基礎」と呼びます。" msgid "" "Building on this, you're invited to dive into one or more specialized topics:" msgstr "" -"最初の3日間は、Rustの基礎を学びます。その後、より専門的なトピックに進む事がで" -"きます:" +"最初の3日間は、Rustの基礎を学びます。その後、より専門的なトピックに進む事ができ" +"ます:" #: src/index.md #, fuzzy @@ -1479,20 +1413,20 @@ msgid "" "[Android](android.md): a half-day course on using Rust for Android platform " "development (AOSP). This includes interoperability with C, C++, and Java." msgstr "" -"[Android](android.md): Androidオープンソースプラットフォーム(AOSP)でRustを" -"使用するための半日講座。C、C++、およびJavaとの相互運用性も含まれます。" +"[Android](android.md): Androidオープンソースプラットフォーム(AOSP)でRustを使" +"用するための半日講座。C、C++、およびJavaとの相互運用性も含まれます。" #: src/index.md #, fuzzy msgid "" -"[Chromium](chromium.md): a half-day course on using Rust within Chromium " -"based browsers. This includes interoperability with C++ and how to include " -"third-party crates in Chromium." +"[Chromium](chromium.md): a half-day course on using Rust within Chromium based " +"browsers. This includes interoperability with C++ and how to include third-" +"party crates in Chromium." msgstr "" -"[ChromiumでのRust](../chromium.md) は半日コースで、Chromium ブラウザの一部と" -"してRustを使用する方法について詳しく説明します。Chromium の `gn` ビルドシステ" -"ムでRustを使用することで、サードパーティライブラリ(「クレート」)、および C+" -"+ との相互運用性を導入できます。" +"[ChromiumでのRust](../chromium.md) は半日コースで、Chromium ブラウザの一部として" +"Rustを使用する方法について詳しく説明します。Chromium の `gn` ビルドシステムで" +"Rustを使用することで、サードパーティライブラリ(「クレート」)、および C++ との" +"相互運用性を導入できます。" #: src/index.md #, fuzzy @@ -1501,9 +1435,8 @@ msgid "" "(embedded) development. Both microcontrollers and application processors are " "covered." msgstr "" -"[Bare-metal](bare-metal.md): ベアメタル(組み込み)開発でRustを使用するため" -"の1日講座。マイクロコントローラとアプリケーションプロセッサの両方が対象となり" -"ます。" +"[Bare-metal](bare-metal.md): ベアメタル(組み込み)開発でRustを使用するための1" +"日講座。マイクロコントローラとアプリケーションプロセッサの両方が対象となります。" #: src/index.md #, fuzzy @@ -1513,9 +1446,9 @@ msgid "" "threads and mutexes) and async/await concurrency (cooperative multitasking " "using futures)." msgstr "" -"[Concurrency](concurrency.md): Rustの並行性についての1日講座。並行性(スレッ" -"ドとミューテックスを用いたプリエンプティブなスケジューリング)と、async/await" -"を使用した並行性(futuresを用いた協調的マルチタスク)がカバーされます。" +"[Concurrency](concurrency.md): Rustの並行性についての1日講座。並行性(スレッド" +"とミューテックスを用いたプリエンプティブなスケジューリング)と、async/awaitを使" +"用した並行性(futuresを用いた協調的マルチタスク)がカバーされます。" #: src/index.md msgid "Non-Goals" @@ -1523,11 +1456,11 @@ msgstr "本講座の対象外" #: src/index.md msgid "" -"Rust is a large language and we won't be able to cover all of it in a few " -"days. Some non-goals of this course are:" +"Rust is a large language and we won't be able to cover all of it in a few days. " +"Some non-goals of this course are:" msgstr "" -"Rustは非常に汎用性の高い言語であり、数日で全てを網羅する事はできません。本講" -"座の目標として設定されていないものには、以下のようなものがあります:" +"Rustは非常に汎用性の高い言語であり、数日で全てを網羅する事はできません。本講座の" +"目標として設定されていないものには、以下のようなものがあります:" #: src/index.md #, fuzzy @@ -1537,9 +1470,8 @@ msgid "" "(https://doc.rust-lang.org/rust-by-example/macros.html) instead." msgstr "" "マクロ(macro)の開発。マクロの詳細については、[Rust Book 日本語版 Ch. 19.5]" -"(https://doc.rust-jp.rs/book-ja/ch19-06-macros.html)と[Rust by Example 日本語" -"版 Ch.17](http://doc.rust-jp.rs/rust-by-example-ja/macros.html)を参照してくだ" -"さい。" +"(https://doc.rust-jp.rs/book-ja/ch19-06-macros.html)と[Rust by Example 日本語版 " +"Ch.17](http://doc.rust-jp.rs/rust-by-example-ja/macros.html)を参照してください。" #: src/index.md msgid "Assumptions" @@ -1548,13 +1480,13 @@ msgstr "前提知識" #: src/index.md #, fuzzy msgid "" -"The course assumes that you already know how to program. Rust is a " -"statically-typed language and we will sometimes make comparisons with C and " -"C++ to better explain or contrast the Rust approach." +"The course assumes that you already know how to program. Rust is a statically-" +"typed language and we will sometimes make comparisons with C and C++ to better " +"explain or contrast the Rust approach." msgstr "" -"本講座では、既にプログラミングの知識がある事を前提としています。Rustは静的型" -"付け言語であり、Rustのアプローチをより分かりやすく説明するために、時折CやC+" -"+との比較を行います。" +"本講座では、既にプログラミングの知識がある事を前提としています。Rustは静的型付け" +"言語であり、Rustのアプローチをより分かりやすく説明するために、時折CやC++との比較" +"を行います。" #: src/index.md #, fuzzy @@ -1562,17 +1494,17 @@ msgid "" "If you know how to program in a dynamically-typed language such as Python or " "JavaScript, then you will be able to follow along just fine too." msgstr "" -"もし受講者の知識がPythonやJavaScriptなどの動的型付け言語に限定されている場合" -"でも、本講座の受講は可能です。" +"もし受講者の知識がPythonやJavaScriptなどの動的型付け言語に限定されている場合で" +"も、本講座の受講は可能です。" #: src/index.md msgid "" "This is an example of a _speaker note_. We will use these to add additional " -"information to the slides. This could be key points which the instructor " -"should cover as well as answers to typical questions which come up in class." +"information to the slides. This could be key points which the instructor should " +"cover as well as answers to typical questions which come up in class." msgstr "" -"これはスピーカーノートの一例です。これを使用してスライドを捕捉します。講師が" -"カバーすべき要点や、授業でよく出る質問への回答などが含まれます。" +"これはスピーカーノートの一例です。これを使用してスライドを捕捉します。講師がカ" +"バーすべき要点や、授業でよく出る質問への回答などが含まれます。" #: src/running-the-course.md src/running-the-course/course-structure.md msgid "This page is for the course instructor." @@ -1580,20 +1512,20 @@ msgstr "このページは講師用です。" #: src/running-the-course.md msgid "" -"Here is a bit of background information about how we've been running the " -"course internally at Google." +"Here is a bit of background information about how we've been running the course " +"internally at Google." msgstr "以下は、Google内での講座の運営方法に関する情報です。" #: src/running-the-course.md msgid "" -"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break " -"in the middle. This leaves 3 hours for the morning class and 3 hours for the " -"afternoon class. Both sessions contain multiple breaks and time for students " -"to work on exercises." +"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break in " +"the middle. This leaves 3 hours for the morning class and 3 hours for the " +"afternoon class. Both sessions contain multiple breaks and time for students to " +"work on exercises." msgstr "" -"クラスは通常午前9時から午後4時までで、途中で1時間の昼食休憩があります。つま" -"り、午前のクラスが3時間、午後のクラスが3時間となります。どちらのセッションに" -"も、休憩と、受講者が演習に取り組むための時間が複数回含まれています。" +"クラスは通常午前9時から午後4時までで、途中で1時間の昼食休憩があります。つまり、" +"午前のクラスが3時間、午後のクラスが3時間となります。どちらのセッションにも、休憩" +"と、受講者が演習に取り組むための時間が複数回含まれています。" #: src/running-the-course.md msgid "Before you run the course, you will want to:" @@ -1601,94 +1533,93 @@ msgstr "講座開始までに、以下にあげる準備を済ませておくと #: src/running-the-course.md msgid "" -"Make yourself familiar with the course material. We've included speaker " -"notes to help highlight the key points (please help us by contributing more " -"speaker notes!). When presenting, you should make sure to open the speaker " -"notes in a popup (click the link with a little arrow next to \"Speaker " -"Notes\"). This way you have a clean screen to present to the class." +"Make yourself familiar with the course material. We've included speaker notes " +"to help highlight the key points (please help us by contributing more speaker " +"notes!). When presenting, you should make sure to open the speaker notes in a " +"popup (click the link with a little arrow next to \"Speaker Notes\"). This way " +"you have a clean screen to present to the class." msgstr "" -"資料に慣れておいてください。要点を強調するためにスピーカーノートが用意されて" -"います(内容の追加にご協力ください!)。プレゼン時には、スクリーンを見やすい" -"状態で保つために、スピーカーノートはポップアップウィンドウで開いてください" -"(スピーカーノートの横にある小さな矢印をクリック)。" +"資料に慣れておいてください。要点を強調するためにスピーカーノートが用意されていま" +"す(内容の追加にご協力ください!)。プレゼン時には、スクリーンを見やすい状態で保" +"つために、スピーカーノートはポップアップウィンドウで開いてください(スピーカー" +"ノートの横にある小さな矢印をクリック)。" #: src/running-the-course.md #, fuzzy msgid "" "Decide on the dates. Since the course takes four days, we recommend that you " -"schedule the days over two weeks. Course participants have said that they " -"find it helpful to have a gap in the course since it helps them process all " -"the information we give them." +"schedule the days over two weeks. Course participants have said that they find " +"it helpful to have a gap in the course since it helps them process all the " +"information we give them." msgstr "" -"あらかじめ日程を決めておいてください。講座は最低でも3日かかるため、2週間にわ" -"たって日程を組む事を推奨しています。過去の受講者によると、講座の間に数日" -"ギャップを設ける事で内容が吸収しやすくなります。" +"あらかじめ日程を決めておいてください。講座は最低でも3日かかるため、2週間にわたっ" +"て日程を組む事を推奨しています。過去の受講者によると、講座の間に数日ギャップを設" +"ける事で内容が吸収しやすくなります。" #: src/running-the-course.md msgid "" -"Find a room large enough for your in-person participants. We recommend a " -"class size of 15-25 people. That's small enough that people are comfortable " -"asking questions --- it's also small enough that one instructor will have " -"time to answer the questions. Make sure the room has _desks_ for yourself " -"and for the students: you will all need to be able to sit and work with your " -"laptops. In particular, you will be doing a lot of live-coding as an " -"instructor, so a lectern won't be very helpful for you." +"Find a room large enough for your in-person participants. We recommend a class " +"size of 15-25 people. That's small enough that people are comfortable asking " +"questions --- it's also small enough that one instructor will have time to " +"answer the questions. Make sure the room has _desks_ for yourself and for the " +"students: you will all need to be able to sit and work with your laptops. In " +"particular, you will be doing a lot of live-coding as an instructor, so a " +"lectern won't be very helpful for you." msgstr "" -"十分な広さの部屋を確保しておいてください。15~25名程度のクラスを推奨していま" -"す。受講者にとって質問がしやすい人数であり、1人の講師が質問に答える時間も確保" -"できる規模だからです。また、皆さんはPCで作業をする必要があるため、講師を含め" -"た人数分の机を用意しておいてください。ライブコーディング形式での実施を想定し" -"ているため、講壇は不要です。" +"十分な広さの部屋を確保しておいてください。15~25名程度のクラスを推奨しています。" +"受講者にとって質問がしやすい人数であり、1人の講師が質問に答える時間も確保できる" +"規模だからです。また、皆さんはPCで作業をする必要があるため、講師を含めた人数分の" +"机を用意しておいてください。ライブコーディング形式での実施を想定しているため、講" +"壇は不要です。" #: src/running-the-course.md msgid "" -"On the day of your course, show up to the room a little early to set things " -"up. We recommend presenting directly using `mdbook serve` running on your " -"laptop (see the [installation instructions](https://github.com/google/" -"comprehensive-rust#building)). This ensures optimal performance with no lag " -"as you change pages. Using your laptop will also allow you to fix typos as " -"you or the course participants spot them." +"On the day of your course, show up to the room a little early to set things up. " +"We recommend presenting directly using `mdbook serve` running on your laptop " +"(see the [installation instructions](https://github.com/google/comprehensive-" +"rust#building)). This ensures optimal performance with no lag as you change " +"pages. Using your laptop will also allow you to fix typos as you or the course " +"participants spot them." msgstr "" -"当日は少し早めに到着して準備をしてください。自分のPCで実行する`mdbook serve`" -"から直接プレゼンを行う事を推奨します([インストール手順](https://github.com/" -"google/comprehensive-rust#building)はこちら)。これにより、ページ切り替え時に" -"遅延なしで最適なパフォーマンスが得られます。また、PCを使用する事で、受講者や" -"自分自身が見つけたタイプミスなども修正可能になります。" +"当日は少し早めに到着して準備をしてください。自分のPCで実行する`mdbook serve`から" +"直接プレゼンを行う事を推奨します([インストール手順](https://github.com/google/" +"comprehensive-rust#building)はこちら)。これにより、ページ切り替え時に遅延なしで" +"最適なパフォーマンスが得られます。また、PCを使用する事で、受講者や自分自身が見つ" +"けたタイプミスなども修正可能になります。" #: src/running-the-course.md msgid "" -"Let people solve the exercises by themselves or in small groups. We " -"typically spend 30-45 minutes on exercises in the morning and in the " -"afternoon (including time to review the solutions). Make sure to ask people " -"if they're stuck or if there is anything you can help with. When you see " -"that several people have the same problem, call it out to the class and " -"offer a solution, e.g., by showing people where to find the relevant " -"information in the standard library." +"Let people solve the exercises by themselves or in small groups. We typically " +"spend 30-45 minutes on exercises in the morning and in the afternoon (including " +"time to review the solutions). Make sure to ask people if they're stuck or if " +"there is anything you can help with. When you see that several people have the " +"same problem, call it out to the class and offer a solution, e.g., by showing " +"people where to find the relevant information in the standard library." msgstr "" -"練習問題は個人か小さいグループで解いてください。回答をレビューする時間も含" -"め、各練習問題に30~45分を費やします。受講者が行き詰まっているかどうか、何か質" -"問があるかなど確認してください。複数の受講者が同じ問題で詰まっている場合、ク" -"ラス全体に対してそれを共有し、解決策を提供してください。例えば、探している情" -"報が標準ライブラリのどこにあるかを示す、など。" +"練習問題は個人か小さいグループで解いてください。回答をレビューする時間も含め、各" +"練習問題に30~45分を費やします。受講者が行き詰まっているかどうか、何か質問がある" +"かなど確認してください。複数の受講者が同じ問題で詰まっている場合、クラス全体に対" +"してそれを共有し、解決策を提供してください。例えば、探している情報が標準ライブラ" +"リのどこにあるかを示す、など。" #: src/running-the-course.md msgid "" -"That is all, good luck running the course! We hope it will be as much fun " -"for you as it has been for us!" +"That is all, good luck running the course! We hope it will be as much fun for " +"you as it has been for us!" msgstr "" "以上です。運営頑張ってください!皆さんにとっても楽しい時間になりますように!" #: src/running-the-course.md msgid "" "Please [provide feedback](https://github.com/google/comprehensive-rust/" -"discussions/86) afterwards so that we can keep improving the course. We " -"would love to hear what worked well for you and what can be made better. " -"Your students are also very welcome to [send us feedback](https://github.com/" -"google/comprehensive-rust/discussions/100)!" +"discussions/86) afterwards so that we can keep improving the course. We would " +"love to hear what worked well for you and what can be made better. Your " +"students are also very welcome to [send us feedback](https://github.com/google/" +"comprehensive-rust/discussions/100)!" msgstr "" "本講座の改善に向けて[フィードバック](https://github.com/google/comprehensive-" -"rust/discussions/86)をお願いします。うまくいった点や改善点について幅広くご意" -"見お聞かせください。[受講者からのフィードバック](https://github.com/google/" +"rust/discussions/86)をお願いします。うまくいった点や改善点について幅広くご意見お" +"聞かせください。[受講者からのフィードバック](https://github.com/google/" "comprehensive-rust/discussions/100)も歓迎しております!" #: src/running-the-course/course-structure.md @@ -1697,11 +1628,11 @@ 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!" +"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 日間で、さまざまな項目" -"を駆け足で学びます。" +"[Rust の基礎](../welcome-day-1.md) を構成する最初の 4 日間で、さまざまな項目を駆" +"け足で学びます。" #: src/running-the-course/course-structure.md msgid "Course schedule:" @@ -1727,16 +1658,15 @@ msgstr "" #: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md #: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md #: src/std-types.md src/std-traits.md src/welcome-day-3.md -#: src/memory-management.md src/smart-pointers.md -#: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md -#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md -#: src/welcome-day-4-afternoon.md src/error-handling.md src/unsafe-rust.md -#: src/concurrency/welcome.md src/concurrency/threads.md -#: src/concurrency/channels.md src/concurrency/send-sync.md -#: src/concurrency/shared-state.md src/concurrency/sync-exercises.md -#: src/concurrency/welcome-async.md src/concurrency/async.md -#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md -#: src/concurrency/async-exercises.md +#: src/memory-management.md src/smart-pointers.md src/welcome-day-3-afternoon.md +#: src/borrowing.md src/lifetimes.md src/welcome-day-4.md src/iterators.md +#: src/modules.md src/testing.md src/welcome-day-4-afternoon.md +#: src/error-handling.md src/unsafe-rust.md src/concurrency/welcome.md +#: src/concurrency/threads.md src/concurrency/channels.md +#: src/concurrency/send-sync.md src/concurrency/shared-state.md +#: src/concurrency/sync-exercises.md src/concurrency/welcome-async.md +#: src/concurrency/async.md src/concurrency/async-control-flow.md +#: src/concurrency/async-pitfalls.md src/concurrency/async-exercises.md #, fuzzy msgid "Duration" msgstr "`Duration`" @@ -1852,8 +1782,8 @@ msgid "" "In addition to the 4-day class on Rust Fundamentals, we cover some more " "specialized topics:" msgstr "" -"Rustの基礎に関する3日間の講座に加え、いくつかのより専門的なトピックも用意され" -"ています:" +"Rustの基礎に関する3日間の講座に加え、いくつかのより専門的なトピックも用意されて" +"います:" #: src/running-the-course/course-structure.md #, fuzzy @@ -1864,37 +1794,37 @@ msgstr "Android での Rust へようこそ" #, fuzzy msgid "" "The [Rust in Android](../android.md) deep dive is a half-day course on using " -"Rust for Android platform development. This includes interoperability with " -"C, C++, and Java." +"Rust for Android platform development. This includes interoperability with C, C+" +"+, and Java." msgstr "" "[Android編](../android.md)は、Androidオープンソースプラットフォーム(AOSP)で" -"Rustを使用するための半日程度の講座です。C、C++、およびJavaとの相互運用性も含" -"まれます。" +"Rustを使用するための半日程度の講座です。C、C++、およびJavaとの相互運用性も含まれ" +"ます。" #: src/running-the-course/course-structure.md msgid "" -"You will need an [AOSP checkout](https://source.android.com/docs/setup/" -"download/downloading). Make a checkout of the [course repository](https://" -"github.com/google/comprehensive-rust) on the same machine and move the `src/" -"android/` directory into the root of your AOSP checkout. This will ensure " -"that the Android build system sees the `Android.bp` files in `src/android/`." +"You will need an [AOSP checkout](https://source.android.com/docs/setup/download/" +"downloading). Make a checkout of the [course repository](https://github.com/" +"google/comprehensive-rust) on the same machine and move the `src/android/` " +"directory into the root of your AOSP checkout. This will ensure that the " +"Android build system sees the `Android.bp` files in `src/android/`." msgstr "" "[AOSPのチェックアウト](https://source.android.com/docs/setup/download/" "downloading)が必要です。同じ端末から[講座のリポジトリ](https://github.com/" -"google/comprehensive-rust)をチェックアウトし、`src/android/`ディレクトリを" -"AOSPチェックアウトのルートに移動してください。これにより、Androidビルドシステ" -"ムが`src/android/`内の`Android.bp`を確認できるようになります。" +"google/comprehensive-rust)をチェックアウトし、`src/android/`ディレクトリをAOSP" +"チェックアウトのルートに移動してください。これにより、Androidビルドシステムが" +"`src/android/`内の`Android.bp`を確認できるようになります。" #: src/running-the-course/course-structure.md msgid "" "Ensure that `adb sync` works with your emulator or real device and pre-build " -"all Android examples using `src/android/build_all.sh`. Read the script to " -"see the commands it runs and make sure they work when you run them by hand." +"all Android examples using `src/android/build_all.sh`. Read the script to see " +"the commands it runs and make sure they work when you run them by hand." msgstr "" -"エミュレータまたは実際のデバイスで`adb sync`が機能する事を確認し、`src/" -"android/build_all.sh`を使用して全てのAndroidの例を事前にビルドしてください。" -"スクリプトを読んで実行コマンドを確認し、手動で実行した際に正常に動作する事を" -"確認してください。" +"エミュレータまたは実際のデバイスで`adb sync`が機能する事を確認し、`src/android/" +"build_all.sh`を使用して全てのAndroidの例を事前にビルドしてください。スクリプトを" +"読んで実行コマンドを確認し、手動で実行した際に正常に動作する事を確認してくださ" +"い。" #: src/running-the-course/course-structure.md #, fuzzy @@ -1903,25 +1833,25 @@ msgstr "Chromium の Rust へようこそ" #: src/running-the-course/course-structure.md msgid "" -"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on " -"using Rust as part of the Chromium browser. It includes using Rust in " -"Chromium's `gn` build system, bringing in third-party libraries (\"crates\") " -"and C++ interoperability." +"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on using " +"Rust as part of the Chromium browser. It includes using Rust in 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++ との相互運用性を導入できます。" +"[Chromium での Rust](../chromium.md) は半日コースで、Chromium ブラウザの一部とし" +"て Rust を使用する方法について詳しく説明します。Chromium の `gn` ビルドシステム" +"で Rust を使用することで、サードパーティ ライブラリ(「クレート」)、および C++ " +"との相互運用性を導入できます。" #: src/running-the-course/course-structure.md msgid "" "You will need to be able to build Chromium --- a debug, component build is " -"[recommended](../chromium/setup.md) for speed but any build will work. " -"Ensure that you can run the Chromium browser that you've built." +"[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 ブラウザを実行できることを確認します。" +"受講者は、Chromium をビルドできる必要があります。時間を短縮できるデバッグのコン" +"ポーネント ビルドを [推奨](../chromium/setup.md) しますが、どのようなビルドでも" +"問題ありません。作成した Chromium ブラウザを実行できることを確認します。" #: src/running-the-course/course-structure.md #, fuzzy @@ -1931,24 +1861,24 @@ msgstr "ベアメタル" #: src/running-the-course/course-structure.md #, fuzzy msgid "" -"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on " -"using Rust for bare-metal (embedded) development. Both microcontrollers and " +"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on using " +"Rust for bare-metal (embedded) development. Both microcontrollers and " "application processors are covered." msgstr "" -"[ベアメタル編](../bare-metal.md)は、ベアメタル(組み込み)開発でRustを使用す" -"るための1日講座です。マイクロコントローラとアプリケーションプロセッサの両方が" -"対象となります。" +"[ベアメタル編](../bare-metal.md)は、ベアメタル(組み込み)開発でRustを使用するた" +"めの1日講座です。マイクロコントローラとアプリケーションプロセッサの両方が対象と" +"なります。" #: src/running-the-course/course-structure.md msgid "" -"For the microcontroller part, you will need to buy the [BBC micro:bit]" -"(https://microbit.org/) v2 development board ahead of time. Everybody will " -"need to install a number of packages as described on the [welcome page](../" -"bare-metal.md)." +"For the microcontroller part, you will need to buy the [BBC micro:bit](https://" +"microbit.org/) v2 development board ahead of time. Everybody will need to " +"install a number of packages as described on the [welcome page](../bare-metal." +"md)." msgstr "" -"マイクロコントローラの章では、事前に[BBCmicro:bit](https://microbit.org/)v2開" -"発ボードを購入する必要があります。また、[welcomeページ](../bare-metal.md)で説" -"明されているように、複数のパッケージをインストールする必要があります。" +"マイクロコントローラの章では、事前に[BBCmicro:bit](https://microbit.org/)v2開発" +"ボードを購入する必要があります。また、[welcomeページ](../bare-metal.md)で説明さ" +"れているように、複数のパッケージをインストールする必要があります。" #: src/running-the-course/course-structure.md msgid "Concurrency in Rust" @@ -1960,17 +1890,17 @@ msgid "" "The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day " "class on classical as well as `async`/`await` concurrency." msgstr "" -"[並行性編](../concurrency.md) は、並行性とasync/awaitを使用した並行性について" -"の1日講座です。" +"[並行性編](../concurrency.md) は、並行性とasync/awaitを使用した並行性についての1" +"日講座です。" #: src/running-the-course/course-structure.md msgid "" -"You will need a fresh crate set up and the dependencies downloaded and ready " -"to go. You can then copy/paste the examples into `src/main.rs` to experiment " -"with them:" +"You will need a fresh crate set up and the dependencies downloaded and ready to " +"go. You can then copy/paste the examples into `src/main.rs` to experiment with " +"them:" msgstr "" -"新規クレートの作成と、依存関係(dependencies)のダウンロードが必要です。その" -"後、例を`src/main.rs`にコピペして実行する事ができます:" +"新規クレートの作成と、依存関係(dependencies)のダウンロードが必要です。その後、" +"例を`src/main.rs`にコピペして実行する事ができます:" #: src/running-the-course/course-structure.md #, fuzzy @@ -2011,8 +1941,8 @@ msgid "" "The course is meant to be very interactive and we recommend letting the " "questions drive the exploration of Rust!" msgstr "" -"本講座はインタラクティブな形式で行います。積極的に質問して、Rustへの理解を深" -"めてください!" +"本講座はインタラクティブな形式で行います。積極的に質問して、Rustへの理解を深めて" +"ください!" #: src/running-the-course/keyboard-shortcuts.md msgid "There are several useful keyboard shortcuts in mdBook:" @@ -2046,36 +1976,36 @@ msgstr "本資料は、ボランティアによって翻訳されています: #: src/running-the-course/translations.md msgid "" -"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) " -"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github." -"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and " -"[@henrif75](https://github.com/henrif75)." +"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) by " +"[@rastringer](https://github.com/rastringer), [@hugojacob](https://github.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)" +"[ポルトガル語(ブラジル)](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 #, fuzzy msgid "" -"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) " -"by [@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, and [@nodmp](https://github.com/nodmp)." +"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) by " +"[@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, 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)" +"superwhd)、[@SketchK](https://github.com/SketchK)、[@nodmp](https://github.com/" +"nodmp)" #: src/running-the-course/translations.md msgid "" -"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) " -"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/" +"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) by " +"[@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/" "victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://" "github.com/kuanhungchen), and [@johnathan79717](https://github.com/" "johnathan79717)." @@ -2083,8 +2013,7 @@ 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)" +"github.com/kuanhungchen)、[@johnathan79717](https://github.com/johnathan79717)" #: src/running-the-course/translations.md #, fuzzy @@ -2092,22 +2021,21 @@ msgid "" "[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" "(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" "jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://" -"github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) " -"and [@mehrad77](https://github.com/mehrad77)." +"github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) and " +"[@mehrad77](https://github.com/mehrad77)." 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)" +"github.com/kuanhungchen)、[@johnathan79717](https://github.com/johnathan79717)" #: src/running-the-course/translations.md #, fuzzy msgid "" "[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]" -"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/" -"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) " -"and [@kantasv](https://github.com/kantasv)." +"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/momotaro1105), " +"[@HidenoriKobayashi](https://github.com/HidenoriKobayashi) and [@kantasv]" +"(https://github.com/kantasv)." msgstr "" "[日本語](https://google.github.io/comprehensive-rust/ja/): [@CoinEZ-JPN]" "(https://github.com/CoinEZ)、[@momotaro1105](https://github.com/momotaro1105)" @@ -2120,14 +2048,14 @@ msgid "" "[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github." "com/namhyung)." msgstr "" -"[韓国語](https://google.github.io/comprehensive-rust/ko/): [@keispace]" -"(https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp)、" -"[@jooyunghan](https://github.com/jooyunghan)" +"[韓国語](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)." +"[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)" @@ -2135,13 +2063,13 @@ msgstr "" #: src/running-the-course/translations.md #, fuzzy msgid "" -"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-" -"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/" -"yaremam) and [@reta](https://github.com/reta)." +"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-cpp]" +"(https://github.com/git-user-cpp), [@yaremam](https://github.com/yaremam) and " +"[@reta](https://github.com/reta)." msgstr "" -"[韓国語](https://google.github.io/comprehensive-rust/ko/): [@keispace]" -"(https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp)、" -"[@jooyunghan](https://github.com/jooyunghan)" +"[韓国語](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 #, fuzzy @@ -2149,14 +2077,13 @@ msgid "" "[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]" "(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-" "jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://" -"github.com/moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) " -"and [@mehrad77](https://github.com/mehrad77)." +"github.com/moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) and " +"[@mehrad77](https://github.com/mehrad77)." 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)" +"github.com/kuanhungchen)、[@johnathan79717](https://github.com/johnathan79717)" #: src/running-the-course/translations.md msgid "" @@ -2177,8 +2104,8 @@ msgstr "進行中の翻訳が多数あります。最新の翻訳へのリンク #: src/running-the-course/translations.md #, fuzzy msgid "" -"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]" -"(https://github.com/younies)" +"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies](https://" +"github.com/younies)" msgstr "" "[スペイン語](https://google.github.io/comprehensive-rust/es/): [@deavid]" "(https://github.com/deavid)" @@ -2194,30 +2121,29 @@ msgstr "" #: src/running-the-course/translations.md #, fuzzy msgid "" -"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]" -"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and " -"[@AdrienBaudemont](https://github.com/AdrienBaudemont)." +"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS](https://" +"github.com/KookaS), [@vcaen](https://github.com/vcaen) and [@AdrienBaudemont]" +"(https://github.com/AdrienBaudemont)." 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)." +"[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)" +"[ドイツ語](https://google.github.io/comprehensive-rust/de/): [@Throvn](https://" +"github.com/Throvn)、[@ronaldfw](https://github.com/ronaldfw)" #: src/running-the-course/translations.md #, fuzzy msgid "" -"[Italian](https://google.github.io/comprehensive-rust/it/) by " -"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://" -"github.com/detro)." +"[Italian](https://google.github.io/comprehensive-rust/it/) by [@henrythebuilder]" +"(https://github.com/henrythebuilder) and [@detro](https://github.com/detro)." msgstr "" -"[ドイツ語](https://google.github.io/comprehensive-rust/de/): [@Throvn]" -"(https://github.com/Throvn)、[@ronaldfw](https://github.com/ronaldfw)" +"[ドイツ語](https://google.github.io/comprehensive-rust/de/): [@Throvn](https://" +"github.com/Throvn)、[@ronaldfw](https://github.com/ronaldfw)" #: src/running-the-course/translations.md msgid "" @@ -2230,27 +2156,26 @@ msgstr "" #: src/running-the-course/translations.md msgid "" "If you want to help with this effort, please see [our instructions](https://" -"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to " -"get going. Translations are coordinated on the [issue tracker](https://" -"github.com/google/comprehensive-rust/issues/282)." +"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to get " +"going. Translations are coordinated on the [issue tracker](https://github.com/" +"google/comprehensive-rust/issues/282)." msgstr "" "この取り組みにご協力いただける場合は、[our instructions](https://github.com/" "google/comprehensive-rust/blob/main/TRANSLATIONS.md)をご覧ください。翻訳は" -"[issue tracker](https://github.com/google/comprehensive-rust/issues/282)で管" -"理されています。" +"[issue tracker](https://github.com/google/comprehensive-rust/issues/282)で管理さ" +"れています。" #: src/cargo.md msgid "" -"When you start reading about Rust, you will soon meet [Cargo](https://doc." -"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build " -"and run Rust applications. Here we want to give a brief overview of what " -"Cargo is and how it fits into the wider ecosystem and how it fits into this " -"training." +"When you start reading about Rust, you will soon meet [Cargo](https://doc.rust-" +"lang.org/cargo/), the standard tool used in the Rust ecosystem to build and run " +"Rust applications. Here we want to give a brief overview of what Cargo is and " +"how it fits into the wider ecosystem and how it fits into this training." msgstr "" -"Rustを学び始めると、まもなくRustエコシステムで広く使われているビルドシステム" -"兼パッケージマネージャである[Cargo](https://doc.rust-lang.org/cargo/)という標" -"準ツールに出会います。ここでは、Cargoの概要や使用方法、そして本講座における重" -"要性について簡単に説明します。" +"Rustを学び始めると、まもなくRustエコシステムで広く使われているビルドシステム兼" +"パッケージマネージャである[Cargo](https://doc.rust-lang.org/cargo/)という標準" +"ツールに出会います。ここでは、Cargoの概要や使用方法、そして本講座における重要性" +"について簡単に説明します。" #: src/cargo.md msgid "Installation" @@ -2264,49 +2189,48 @@ msgstr "** の手順に沿ってインストールしてく #, fuzzy msgid "" "This will give you the Cargo build tool (`cargo`) and the Rust compiler " -"(`rustc`). You will also get `rustup`, a command line utility that you can " -"use to install to different compiler versions." +"(`rustc`). You will also get `rustup`, a command line utility that you can use " +"to install to different compiler versions." msgstr "" -"Rustupも、cargoやrustcと一緒にコマンドラインユーティリティとしてインストール" -"されます。Rustupを使用することで、ツールチェーンのインストールや切り替え、ク" -"ロスコンパイルの設定などが行えます。" +"Rustupも、cargoやrustcと一緒にコマンドラインユーティリティとしてインストールされ" +"ます。Rustupを使用することで、ツールチェーンのインストールや切り替え、クロスコン" +"パイルの設定などが行えます。" #: src/cargo.md msgid "" "After installing Rust, you should configure your editor or IDE to work with " -"Rust. Most editors do this by talking to [rust-analyzer](https://rust-" -"analyzer.github.io/), which provides auto-completion and jump-to-definition " +"Rust. Most editors do this by talking to [rust-analyzer](https://rust-analyzer." +"github.io/), which provides auto-completion and jump-to-definition " "functionality for [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), 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 も用意されています。" +"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-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 msgid "" "On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust " -"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this " -"gets you an outdated Rust version and may lead to unexpected behavior. The " -"command would be:" +"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this gets " +"you an outdated Rust version and may lead to unexpected behavior. The command " +"would be:" msgstr "" -"Debian/Ubuntuを使用している場合、以下のコマンドを使ってcargo、rustのソース" -"コード、[Rust formatter](https://github.com/rust-lang/rustfmt)をインストール" -"します" +"Debian/Ubuntuを使用している場合、以下のコマンドを使ってcargo、rustのソースコー" +"ド、[Rust formatter](https://github.com/rust-lang/rustfmt)をインストールします" #: src/cargo.md msgid "" "On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this " -"may provide an outdated version. Therefore, it is recommended to install " -"Rust from the official site." +"may provide an outdated version. Therefore, it is recommended to install Rust " +"from the official site." msgstr "" #: src/cargo/rust-ecosystem.md @@ -2323,35 +2247,35 @@ msgid "" "`rustc`: the Rust compiler which turns `.rs` files into binaries and other " "intermediate formats." msgstr "" -"`rustc`: Rustのコンパイラです。`.rs`ファイルをバイナリや他の中間形式に変換し" -"ます。" +"`rustc`: Rustのコンパイラです。`.rs`ファイルをバイナリや他の中間形式に変換しま" +"す。" #: src/cargo/rust-ecosystem.md #, fuzzy msgid "" "`cargo`: the Rust dependency manager and build tool. Cargo knows how to " -"download dependencies, usually hosted on , and it will " -"pass them to `rustc` when building your project. Cargo also comes with a " -"built-in test runner which is used to execute unit tests." +"download dependencies, usually hosted on , and it will pass " +"them to `rustc` when building your project. Cargo also comes with a built-in " +"test runner which is used to execute unit tests." msgstr "" -"`cargo`: Rustのビルドシステム兼パッケージマネージャです。" -"でホストされている依存関係をダウンロードし、プロジェクトビルド時に`rustc`に渡" -"します。Cargo に組み込まれたテストランナを使って、ユニットテストを実行するこ" -"ともできます。" +"`cargo`: Rustのビルドシステム兼パッケージマネージャです。で" +"ホストされている依存関係をダウンロードし、プロジェクトビルド時に`rustc`に渡しま" +"す。Cargo に組み込まれたテストランナを使って、ユニットテストを実行することもでき" +"ます。" #: src/cargo/rust-ecosystem.md #, fuzzy msgid "" "`rustup`: the Rust toolchain installer and updater. This tool is used to " -"install and update `rustc` and `cargo` when new versions of Rust are " -"released. In addition, `rustup` can also download documentation for the " -"standard library. You can have multiple versions of Rust installed at once " -"and `rustup` will let you switch between them as needed." +"install and update `rustc` and `cargo` when new versions of Rust are released. " +"In addition, `rustup` can also download documentation for the standard library. " +"You can have multiple versions of Rust installed at once and `rustup` will let " +"you switch between them as needed." msgstr "" -"`rustup`: Rustのツールチェーンを管理するためのツールです。`rustc`や`cargo`の" -"インストールやアップデートに使用されます。標準ライブラリのドキュメントをダウ" -"ンロードする事も可能です。また、複数のRustのバージョンがインストールされてい" -"る場合、`rustup`で切り替えが行えます。" +"`rustup`: Rustのツールチェーンを管理するためのツールです。`rustc`や`cargo`のイ" +"ンストールやアップデートに使用されます。標準ライブラリのドキュメントをダウンロー" +"ドする事も可能です。また、複数のRustのバージョンがインストールされている場合、" +"`rustup`で切り替えが行えます。" #: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md #: src/references/exclusive.md src/memory-management/move.md @@ -2363,15 +2287,14 @@ msgstr "要点:" #: src/cargo/rust-ecosystem.md msgid "" "Rust has a rapid release schedule with a new release coming out every six " -"weeks. New releases maintain backwards compatibility with old releases --- " -"plus they enable new functionality." +"weeks. New releases maintain backwards compatibility with old releases --- plus " +"they enable new functionality." msgstr "" -"Rust言語とコンパイラは、6週間のリリースサイクルを採用しています。新しいリリー" -"スは、古いリリースとの後方互換性を維持しながら、新機能を提供します。" +"Rust言語とコンパイラは、6週間のリリースサイクルを採用しています。新しいリリース" +"は、古いリリースとの後方互換性を維持しながら、新機能を提供します。" #: src/cargo/rust-ecosystem.md -msgid "" -"There are three release channels: \"stable\", \"beta\", and \"nightly\"." +msgid "There are three release channels: \"stable\", \"beta\", and \"nightly\"." msgstr "リリースチャネルは3つあります:「stable」「beta」「nightly」。" #: src/cargo/rust-ecosystem.md @@ -2391,48 +2314,45 @@ msgstr "" #: src/cargo/rust-ecosystem.md msgid "" -"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the " -"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018." +"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the current " +"edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018." msgstr "" -"Rustには[editions](https://doc.rust-lang.org/edition-guide/)(エディション)" -"があります:現在のエディションはRust2021です。以前はRust2015とRust2018でし" -"た。" +"Rustには[editions](https://doc.rust-lang.org/edition-guide/)(エディション)があ" +"ります:現在のエディションはRust2021です。以前はRust2015とRust2018でした。" #: src/cargo/rust-ecosystem.md msgid "" -"The editions are allowed to make backwards incompatible changes to the " -"language." +"The editions are allowed to make backwards incompatible changes to the language." msgstr "エディションでは、後方非互換な変更を加える事ができます。" #: src/cargo/rust-ecosystem.md msgid "" -"To prevent breaking code, editions are opt-in: you select the edition for " -"your crate via the `Cargo.toml` file." +"To prevent breaking code, editions are opt-in: you select the edition for your " +"crate via the `Cargo.toml` file." msgstr "" -"コードの破損を防ぐために、エディションはオプトイン方式です:`Cargo.toml`で、" -"クレートに対して適用したいエディションを選択します。" +"コードの破損を防ぐために、エディションはオプトイン方式です:`Cargo.toml`で、ク" +"レートに対して適用したいエディションを選択します。" #: src/cargo/rust-ecosystem.md msgid "" "To avoid splitting the ecosystem, Rust compilers can mix code written for " "different editions." msgstr "" -"エコシステムの分断を避けるために、コンパイラは異なるエディションのコードを混" -"在させる事ができます。" +"エコシステムの分断を避けるために、コンパイラは異なるエディションのコードを混在さ" +"せる事ができます。" #: src/cargo/rust-ecosystem.md msgid "" "Mention that it is quite rare to ever use the compiler directly not through " "`cargo` (most users never do)." -msgstr "" -"コンパイラを直接使用する事は非常に稀であり、基本的には`cargo`を介します。" +msgstr "コンパイラを直接使用する事は非常に稀であり、基本的には`cargo`を介します。" #: src/cargo/rust-ecosystem.md #, fuzzy msgid "" "It might be worth alluding that Cargo itself is an extremely powerful and " -"comprehensive tool. It is capable of many advanced features including but " -"not limited to:" +"comprehensive tool. It is capable of many advanced features including but not " +"limited to:" msgstr "`Cargo`は非常に包括的なツールであり、多くの機能を備えています:" #: src/cargo/rust-ecosystem.md @@ -2442,8 +2362,8 @@ msgstr "プロジェクト・パッケージの構造管理" #: src/cargo/rust-ecosystem.md msgid "[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)" msgstr "" -"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)(ワー" -"クスペース)" +"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)(ワーク" +"スペース)" #: src/cargo/rust-ecosystem.md msgid "Dev Dependencies and Runtime Dependency management/caching" @@ -2451,11 +2371,10 @@ msgstr "開発用とランタイム用の依存関係管理・キャッシュ" #: src/cargo/rust-ecosystem.md msgid "" -"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts." -"html)" +"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.html)" msgstr "" -"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts." -"html)(ビルドスクリプト)" +"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.html)" +"(ビルドスクリプト)" #: src/cargo/rust-ecosystem.md msgid "" @@ -2467,15 +2386,14 @@ msgstr "" #: src/cargo/rust-ecosystem.md msgid "" -"It is also extensible with sub command plugins as well (such as [cargo " -"clippy](https://github.com/rust-lang/rust-clippy))." +"It is also extensible with sub command plugins as well (such as [cargo clippy]" +"(https://github.com/rust-lang/rust-clippy))." msgstr "" -"[cargo clippy](https://github.com/rust-lang/rust-clippy)などのサブコマンドプ" -"ラグインによる拡張" +"[cargo clippy](https://github.com/rust-lang/rust-clippy)などのサブコマンドプラグ" +"インによる拡張" #: src/cargo/rust-ecosystem.md -msgid "" -"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)" +msgid "Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)" msgstr "" "詳細は[official Cargo Book](https://doc.rust-lang.org/cargo/)を参照してくださ" "い。" @@ -2490,18 +2408,17 @@ msgid "" "which can be executed through your browser. This makes the setup much easier " "and ensures a consistent experience for everyone." msgstr "" -"本講座は、主にブラウザ内で実行可能な例を使います。こうする事で、セットアップ" -"が容易になり、一貫した開発環境の提供が可能となります。" +"本講座は、主にブラウザ内で実行可能な例を使います。こうする事で、セットアップが容" +"易になり、一貫した開発環境の提供が可能となります。" #: src/cargo/code-samples.md msgid "" -"Installing Cargo is still encouraged: it will make it easier for you to do " -"the exercises. On the last day, we will do a larger exercise which shows you " -"how to work with dependencies and for that you need Cargo." +"Installing Cargo is still encouraged: it will make it easier for you to do the " +"exercises. On the last day, we will do a larger exercise which shows you how to " +"work with dependencies and for that you need Cargo." msgstr "" -"ただし、できればCargoをインストールしてください: 練習問題で使えると便利で" -"す。また最終日に依存関係を扱う課題を扱いますが、そこではCargoが必要になりま" -"す。" +"ただし、できればCargoをインストールしてください: 練習問題で使えると便利です。ま" +"た最終日に依存関係を扱う課題を扱いますが、そこではCargoが必要になります。" #: src/cargo/code-samples.md msgid "The code blocks in this course are fully interactive:" @@ -2523,27 +2440,26 @@ msgid "" "Most code samples are editable like shown above. A few code samples are not " "editable for various reasons:" msgstr "" -"ほとんどのサンプルコードは上記のように編集可能ですが、一部だけ以下のような理" -"由から編集不可となっています:" +"ほとんどのサンプルコードは上記のように編集可能ですが、一部だけ以下のような理由か" +"ら編集不可となっています:" #: src/cargo/code-samples.md msgid "" "The embedded playgrounds cannot execute unit tests. Copy-paste the code and " "open it in the real Playground to demonstrate unit tests." msgstr "" -"講座のページ内に埋め込まれたプレイグラウンドでユニットテストは実行できませ" -"ん。コードを実際のプレイグラウンドで開き、デモンストレーションを行う必要があ" -"ります。" +"講座のページ内に埋め込まれたプレイグラウンドでユニットテストは実行できません。" +"コードを実際のプレイグラウンドで開き、デモンストレーションを行う必要があります。" #: src/cargo/code-samples.md msgid "" -"The embedded playgrounds lose their state the moment you navigate away from " -"the page! This is the reason that the students should solve the exercises " -"using a local Rust installation or via the Playground." +"The embedded playgrounds lose their state the moment you navigate away from the " +"page! This is the reason that the students should solve the exercises using a " +"local Rust installation or via the Playground." msgstr "" -"講座のページ内に埋め込まれたプレイグラウンドでは、ページ移動すると状態が失わ" -"れます!故に、受講生はローカル環境や実際のプレイグラウンドを使用して問題を解" -"く必要があります。" +"講座のページ内に埋め込まれたプレイグラウンドでは、ページ移動すると状態が失われま" +"す!故に、受講生はローカル環境や実際のプレイグラウンドを使用して問題を解く必要が" +"あります。" #: src/cargo/running-locally.md msgid "Running Code Locally with Cargo" @@ -2551,33 +2467,31 @@ msgstr "Cargoを使ってローカルで実行" #: src/cargo/running-locally.md msgid "" -"If you want to experiment with the code on your own system, then you will " -"need to first install Rust. Do this by following the [instructions in the " -"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This " -"should give you a working `rustc` and `cargo`. At the time of writing, the " -"latest stable Rust release has these version numbers:" +"If you want to experiment with the code on your own system, then you will need " +"to first install Rust. Do this by following the [instructions in the Rust Book]" +"(https://doc.rust-lang.org/book/ch01-01-installation.html). This should give " +"you a working `rustc` and `cargo`. At the time of writing, the latest stable " +"Rust release has these version numbers:" msgstr "" "コードをローカルで試したい場合、[Rust Bookの手順](https://doc.rust-lang.org/" -"book/ch01-01-installation.html)に従ってRustをインストールしてください。正常に" -"インストールされたら、`rustc`と`cargo`が使えるようになります。最新のstableリ" -"リースのバージョンは以下の通りです:" +"book/ch01-01-installation.html)に従ってRustをインストールしてください。正常にイ" +"ンストールされたら、`rustc`と`cargo`が使えるようになります。最新のstableリリース" +"のバージョンは以下の通りです:" #: src/cargo/running-locally.md msgid "" -"You can use any later version too since Rust maintains backwards " -"compatibility." +"You can use any later version too since Rust maintains backwards compatibility." msgstr "" -"Rust は下位互換性を維持しているため、新しいバージョンを使用することもできま" -"す。" +"Rust は下位互換性を維持しているため、新しいバージョンを使用することもできます。" #: src/cargo/running-locally.md #, fuzzy msgid "" -"With this in place, follow these steps to build a Rust binary from one of " -"the examples in this training:" +"With this in place, follow these steps to build a Rust binary from one of the " +"examples in this training:" msgstr "" -"次に、本講座の例を参考にしながら、以下の手順に従ってRustのバイナリをビルドし" -"てください:" +"次に、本講座の例を参考にしながら、以下の手順に従ってRustのバイナリをビルドしてく" +"ださい:" #: src/cargo/running-locally.md msgid "Click the \"Copy to clipboard\" button on the example you want to copy." @@ -2591,16 +2505,15 @@ msgstr "`cargo new exercise`で`exercise/`ディレクトリを作成:" #: src/cargo/running-locally.md msgid "" "Navigate into `exercise/` and use `cargo run` to build and run your binary:" -msgstr "" -"`exercise/`ディレクトリに移動し、`cargo run`でバイナリをビルドして実行:" +msgstr "`exercise/`ディレクトリに移動し、`cargo run`でバイナリをビルドして実行:" #: src/cargo/running-locally.md msgid "" -"Replace the boiler-plate code in `src/main.rs` with your own code. For " -"example, using the example on the previous page, make `src/main.rs` look like" +"Replace the boiler-plate code in `src/main.rs` with your own code. For example, " +"using the example on the previous page, make `src/main.rs` look like" msgstr "" -"`src/main.rs`のボイラープレートコードを、コピーしたコードで置き換えてくださ" -"い。例えば、前のページの例を使った場合、`src/main.rs`は以下のようになります。" +"`src/main.rs`のボイラープレートコードを、コピーしたコードで置き換えてください。" +"例えば、前のページの例を使った場合、`src/main.rs`は以下のようになります。" #: src/cargo/running-locally.md msgid "Use `cargo run` to build and run your updated binary:" @@ -2608,25 +2521,25 @@ msgstr "`cargo run`で更新されたバイナリをビルドして実行:" #: src/cargo/running-locally.md msgid "" -"Use `cargo check` to quickly check your project for errors, use `cargo " -"build` to compile it without running it. You will find the output in `target/" -"debug/` for a normal debug build. Use `cargo build --release` to produce an " -"optimized release build in `target/release/`." +"Use `cargo check` to quickly check your project for errors, use `cargo build` " +"to compile it without running it. You will find the output in `target/debug/` " +"for a normal debug build. Use `cargo build --release` to produce an optimized " +"release build in `target/release/`." msgstr "" -"`cargo check`でプロジェクトのエラーチェックを行い、`cargo build`でコンパイル" -"だけ(実行はせず)を行います。通常のデバッグビルドでは、生成されたファイルは" -"`target/debug/`に格納されます。最適化されたリリースビルドには`cargo build —" -"release`を使い、ファイルは`target/release/`に格納されます。" +"`cargo check`でプロジェクトのエラーチェックを行い、`cargo build`でコンパイルだけ" +"(実行はせず)を行います。通常のデバッグビルドでは、生成されたファイルは`target/" +"debug/`に格納されます。最適化されたリリースビルドには`cargo build —release`を使" +"い、ファイルは`target/release/`に格納されます。" #: src/cargo/running-locally.md msgid "" -"You can add dependencies for your project by editing `Cargo.toml`. When you " -"run `cargo` commands, it will automatically download and compile missing " +"You can add dependencies for your project by editing `Cargo.toml`. When you run " +"`cargo` commands, it will automatically download and compile missing " "dependencies for you." msgstr "" -"プロジェクトに依存関係を追加するには、`Cargo.toml`を編集します。その後、" -"`cargo`コマンドを実行すると、自動的に不足している依存関係がダウンロードされて" -"コンパイルされます。" +"プロジェクトに依存関係を追加するには、`Cargo.toml`を編集します。その後、`cargo`" +"コマンドを実行すると、自動的に不足している依存関係がダウンロードされてコンパイル" +"されます。" #: src/cargo/running-locally.md msgid "" @@ -2634,8 +2547,8 @@ msgid "" "editor. It will make their life easier since they will have a normal " "development environment." msgstr "" -"受講者にCargoのインストールとローカルエディタの使用を勧めてください。通常の開" -"発環境を持つ事で、作業がスムーズになります。" +"受講者にCargoのインストールとローカルエディタの使用を勧めてください。通常の開発" +"環境を持つ事で、作業がスムーズになります。" #: src/welcome-day-1.md msgid "Welcome to Day 1" @@ -2644,10 +2557,8 @@ msgstr "Day 1へようこそ" #: src/welcome-day-1.md #, fuzzy msgid "" -"This is the first day of Rust Fundamentals. We will cover a lot of ground " -"today:" -msgstr "" -"「Comprehensive Rust」の初日です。本日は多岐にわたる内容をカバーします:" +"This is the first day of Rust Fundamentals. We will cover a lot of ground today:" +msgstr "「Comprehensive Rust」の初日です。本日は多岐にわたる内容をカバーします:" #: src/welcome-day-1.md msgid "" @@ -2693,31 +2604,29 @@ msgstr "受講生に伝えてください:" #: src/welcome-day-1.md #, fuzzy -msgid "" -"They should ask questions when they get them, don't save them to the end." +msgid "They should ask questions when they get them, don't save them to the end." msgstr "分からない事があれば、最後まで待たずに質問をしてください。" #: src/welcome-day-1.md #, fuzzy msgid "" -"The class is meant to be interactive and discussions are very much " -"encouraged!" +"The class is meant to be interactive and discussions are very much encouraged!" msgstr "" -"本講座はインタラクティブな形式で行うため、積極的にディスカッションをしてくだ" -"さい!" +"本講座はインタラクティブな形式で行うため、積極的にディスカッションをしてくださ" +"い!" #: src/welcome-day-1.md #, fuzzy msgid "" -"As an instructor, you should try to keep the discussions relevant, i.e., " -"keep the discussions related to how Rust does things vs some other language. " -"It can be hard to find the right balance, but err on the side of allowing " -"discussions since they engage people much more than one-way communication." +"As an instructor, you should try to keep the discussions relevant, i.e., keep " +"the discussions related to how Rust does things vs some other language. It can " +"be hard to find the right balance, but err on the side of allowing discussions " +"since they engage people much more than one-way communication." msgstr "" "講師の方へ: ディスカッションはなるべく関連性を有する範囲に留めましょう。例え" -"ば、他言語との比較を行う場合には、あくまでもRustとどう違うのかまでを議論の範" -"囲に設定してください。また、バランスの取り方が難しいかもしれませんが、一方的" -"に話すよりもなるべくディスカッションを許容するように心がけてください。" +"ば、他言語との比較を行う場合には、あくまでもRustとどう違うのかまでを議論の範囲に" +"設定してください。また、バランスの取り方が難しいかもしれませんが、一方的に話すよ" +"りもなるべくディスカッションを許容するように心がけてください。" #: src/welcome-day-1.md #, fuzzy @@ -2728,34 +2637,33 @@ msgstr "質問があった場合、おそらく将来的に話す内容に触れ #: src/welcome-day-1.md #, fuzzy msgid "" -"This is perfectly okay! Repetition is an important part of learning. " -"Remember that the slides are just a support and you are free to skip them as " -"you like." +"This is perfectly okay! Repetition is an important part of learning. Remember " +"that the slides are just a support and you are free to skip them as you like." msgstr "" -"これは全く問題ありません!復習は学びの重要な要素です。スライドはあくまでもサ" -"ポートとして用意されているものであり、ご自身の判断でスキップも可能です。" +"これは全く問題ありません!復習は学びの重要な要素です。スライドはあくまでもサポー" +"トとして用意されているものであり、ご自身の判断でスキップも可能です。" #: src/welcome-day-1.md msgid "" -"The idea for the first day is to show the \"basic\" things in Rust that " -"should have immediate parallels in other languages. The more advanced parts " -"of Rust come on the subsequent days." +"The idea for the first day is to show the \"basic\" things in Rust that should " +"have immediate parallels in other languages. The more advanced parts of Rust " +"come on the subsequent days." msgstr "" -"1 日目は、他の言語にも共通する Rust の「基本的な」事項を示します。Rust のより" -"高度な部分については、後日説明します。" +"1 日目は、他の言語にも共通する Rust の「基本的な」事項を示します。Rust のより高" +"度な部分については、後日説明します。" #: src/welcome-day-1.md msgid "" "If you're teaching this in a classroom, this is a good place to go over the " -"schedule. Note that there is an exercise at the end of each segment, " -"followed by a break. Plan to cover the exercise solution after the break. " -"The times listed here are a suggestion in order to keep the course on " -"schedule. Feel free to be flexible and adjust as necessary!" +"schedule. Note that there is an exercise at the end of each segment, followed " +"by a break. Plan to cover the exercise solution after the break. 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/concurrency/send-sync.md #, fuzzy @@ -2794,11 +2702,11 @@ msgstr "" #: src/hello-world/what-is-rust.md msgid "" -"Rust is a new programming language which had its [1.0 release in 2015]" -"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):" +"Rust is a new programming language which had its [1.0 release in 2015](https://" +"blog.rust-lang.org/2015/05/15/Rust-1.0.html):" msgstr "" -"Rustは[2015年に1.0版がリリース](https://blog.rust-lang.org/2015/05/15/" -"Rust-1.0.html)された新しいプログラミング言語です:" +"Rustは[2015年に1.0版がリリース](https://blog.rust-lang.org/2015/05/15/Rust-1.0." +"html)された新しいプログラミング言語です:" #: src/hello-world/what-is-rust.md msgid "Rust is a statically compiled language in a similar role as C++" @@ -2862,8 +2770,7 @@ msgstr "高度な制御性。" #: src/hello-world/what-is-rust.md #, fuzzy -msgid "" -"Can be scaled down to very constrained devices such as microcontrollers." +msgid "Can be scaled down to very constrained devices such as microcontrollers." msgstr "携帯電話のようなデバイスにまでスケールダウンが可能" #: src/hello-world/what-is-rust.md @@ -2883,8 +2790,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." @@ -2919,8 +2826,8 @@ msgid "" "_No undefined runtime behavior_ - what a Rust statement does is never left " "unspecified" msgstr "" -"_未定義のランタイム動作がない_ - Rust ステートメントで行われる処理が未規定の" -"まま残ることはありません。" +"_未定義のランタイム動作がない_ - Rust ステートメントで行われる処理が未規定のまま" +"残ることはありません。" #: src/hello-world/benefits.md msgid "Array access is bounds checked." @@ -2936,8 +2843,8 @@ msgid "" "_Modern language features_ - as expressive and ergonomic as higher-level " "languages" msgstr "" -"_最新の言語機能_ - 高水準言語に匹敵する表現力があり、人間が使いやすい機能を備" -"えています。" +"_最新の言語機能_ - 高水準言語に匹敵する表現力があり、人間が使いやすい機能を備え" +"ています。" #: src/hello-world/benefits.md msgid "Enums and pattern matching." @@ -2973,55 +2880,55 @@ msgstr "Language Server Protocol(LSP)のサポート。" #: src/hello-world/benefits.md msgid "" -"Do not spend much time here. All of these points will be covered in more " -"depth later." +"Do not spend much time here. All of these points will be covered in more depth " +"later." msgstr "" -"ここにはあまり時間をかけないでください。これらのポイントについては、後ほど詳" -"しく説明します。" +"ここにはあまり時間をかけないでください。これらのポイントについては、後ほど詳しく" +"説明します。" #: src/hello-world/benefits.md msgid "" -"Make sure to ask the class which languages they have experience with. " -"Depending on the answer you can highlight different features of Rust:" +"Make sure to ask the class which languages they have experience with. Depending " +"on the answer you can highlight different features of Rust:" msgstr "" -"受講者にどの言語の経験があるかを尋ねてください。回答に応じて、Rustのさまざま" -"な特徴を強調することができます:" +"受講者にどの言語の経験があるかを尋ねてください。回答に応じて、Rustのさまざまな特" +"徴を強調することができます:" #: src/hello-world/benefits.md msgid "" -"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ " -"via the borrow checker. You get performance like in C and C++, but you don't " -"have the memory unsafety issues. In addition, you get a modern language with " +"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ via " +"the borrow checker. You get performance like in C and C++, but you don't have " +"the memory unsafety issues. In addition, you get a modern language with " "constructs like pattern matching and built-in dependency management." msgstr "" -"CまたはC++の経験がある場合: Rustは借用チェッカーを介して実行時エラーの一部を" -"排除してくれます。それに加え、CやC++と同等のパフォーマンスを得ることができ、" -"メモリ安全性の問題はありません。さらに、パターンマッチングや組み込みの依存関" -"係管理などの構造要素を含む現代的な言語です。" +"CまたはC++の経験がある場合: Rustは借用チェッカーを介して実行時エラーの一部を排" +"除してくれます。それに加え、CやC++と同等のパフォーマンスを得ることができ、メモリ" +"安全性の問題はありません。さらに、パターンマッチングや組み込みの依存関係管理など" +"の構造要素を含む現代的な言語です。" #: src/hello-world/benefits.md #, fuzzy msgid "" -"Experience with Java, Go, Python, JavaScript...: You get the same memory " -"safety as in those languages, plus a similar high-level language feeling. In " -"addition you get fast and predictable performance like C and C++ (no garbage " -"collector) as well as access to low-level hardware (should you need it)." +"Experience with Java, Go, Python, JavaScript...: You get the same memory safety " +"as in those languages, plus a similar high-level language feeling. In addition " +"you get fast and predictable performance like C and C++ (no garbage collector) " +"as well as access to low-level hardware (should you need it)." msgstr "" -"Java、Go、Python、JavaScriptなどの経験がある場合: これらの言語と同様のメモリ" -"安全性と、高水準言語に近い感覚を得ることができます。また、CやC++のように高速" -"かつ予測可能なパフォーマンス(ガベージコレクタがない)を得ることができ、(必" -"要なら)低水準なハードウェアへのアクセスも可能です" +"Java、Go、Python、JavaScriptなどの経験がある場合: これらの言語と同様のメモリ安" +"全性と、高水準言語に近い感覚を得ることができます。また、CやC++のように高速かつ予" +"測可能なパフォーマンス(ガベージコレクタがない)を得ることができ、(必要なら)低" +"水準なハードウェアへのアクセスも可能です" #: src/hello-world/playground.md msgid "" -"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to " -"run short Rust programs, and is the basis for the examples and exercises in " -"this course. Try running the \"hello-world\" program it starts with. It " -"comes with a few handy features:" +"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to run " +"short Rust programs, and is the basis for the examples and exercises in 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」" -"プログラムを実行してみましょう。次のような便利な機能があります。" +"このコースの例や演習には、短い Rust プログラムを簡単に実行できる [Rust プレイグ" +"ラウンド](https://play.rust-lang.org/) を使用します。最初の「hello-world」プログ" +"ラムを実行してみましょう。次のような便利な機能があります。" #: src/hello-world/playground.md msgid "" @@ -3037,31 +2944,30 @@ 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] からアクセスできます。" +"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." +"If you're interested, use \"ASM\" under \"...\" to see the generated assembly " +"code." msgstr "" -"興味がある場合は、「...」 の下にある 「ASM」 を使用すると、生成されたアセンブ" -"リ コードを確認できます。" +"興味がある場合は、「...」 の下にある 「ASM」 を使用すると、生成されたアセンブリ " +"コードを確認できます。" #: src/hello-world/playground.md msgid "" -"As students head into the break, encourage them to open up the playground " -"and experiment a little. Encourage them to keep the tab open and try things " -"out during the rest of the course. This is particularly helpful for advanced " -"students who want to know more about Rust's optimizations or generated " -"assembly." +"As students head into the break, encourage them to open up the playground and " +"experiment a little. Encourage them to keep the tab open and try things out " +"during the rest of the course. This is particularly helpful for advanced " +"students who want to know more about Rust's optimizations or generated assembly." msgstr "" -"受講者が休憩に入ったら、プレイグラウンドを開いていろいろ試してみるよう促しま" -"す。タブを開いたままにして、コースの残りの部分で学習したことを試すようすすめ" -"ましょう。これは、Rust の最適化や生成されたアセンブリについて詳しく知りたい受" -"講者に特に役立ちます。" +"受講者が休憩に入ったら、プレイグラウンドを開いていろいろ試してみるよう促します。" +"タブを開いたままにして、コースの残りの部分で学習したことを試すようすすめましょ" +"う。これは、Rust の最適化や生成されたアセンブリについて詳しく知りたい受講者に特" +"に役立ちます。" #: src/types-and-values.md src/control-flow-basics.md src/modules.md #, fuzzy @@ -3107,9 +3013,8 @@ msgstr "" #: src/types-and-values/hello-world.md #, fuzzy msgid "" -"This slide tries to make the students comfortable with Rust code. They will " -"see a ton of it over the next four days so we start small with something " -"familiar." +"This slide tries to make the students comfortable with Rust code. They will see " +"a ton of it over the next four days so we start small with something familiar." msgstr "" "このスライドの目的は、Rustのコードに慣れてもらう事です。この4日間で大量のRust" "コードを見る事になるので、馴染みのあるものから始めてみましょう。" @@ -3120,8 +3025,8 @@ msgid "" "Rust is very much like other languages in the C/C++/Java tradition. It is " "imperative and it doesn't try to reinvent things unless absolutely necessary." msgstr "" -"Rustは、C/C++/Java系統の言語によく似ています。Rustは、命令型(関数型ではな" -"く)であり、必須でない限り機能の再発明はしません。" +"Rustは、C/C++/Java系統の言語によく似ています。Rustは、命令型(関数型ではなく)で" +"あり、必須でない限り機能の再発明はしません。" #: src/types-and-values/hello-world.md #, fuzzy @@ -3134,21 +3039,20 @@ msgid "" "Rust uses macros for situations where you want to have a variable number of " "arguments (no function [overloading](../control-flow-basics/functions.md))." msgstr "" -"Rustで可変長引数を用いたい場合は、マクロを使用します(関数[オーバーロード]" -"(basic-syntax/functions-interlude.md)はありません)。" +"Rustで可変長引数を用いたい場合は、マクロを使用します(関数[オーバーロード](basic-" +"syntax/functions-interlude.md)はありません)。" #: src/types-and-values/hello-world.md #, fuzzy msgid "" -"Macros being 'hygienic' means they don't accidentally capture identifiers " -"from the scope they are used in. Rust macros are actually only [partially " -"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene." -"html)." +"Macros being 'hygienic' means they don't accidentally capture identifiers from " +"the scope they are used in. Rust macros are actually only [partially hygienic]" +"(https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html)." msgstr "" -"マクロが「衛生的 (hygienic)」であるとは、そのマクロが呼び出されるスコープにあ" -"る識別子と、そのマクロ内部の識別子が衝突しないことが保証されていることを言い" -"ます。Rustのマクロは、実際には[部分的にしか衛生的](https://veykril.github.io/" -"tlborm/decl-macros/minutiae/hygiene.html)ではありません。" +"マクロが「衛生的 (hygienic)」であるとは、そのマクロが呼び出されるスコープにある" +"識別子と、そのマクロ内部の識別子が衝突しないことが保証されていることを言います。" +"Rustのマクロは、実際には[部分的にしか衛生的](https://veykril.github.io/tlborm/" +"decl-macros/minutiae/hygiene.html)ではありません。" #: src/types-and-values/hello-world.md msgid "" @@ -3157,18 +3061,18 @@ 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) を内包しています。" +"Rust はマルチパラダイムです。たとえば、強力な [オブジェクト指向プログラミング機" +"能](https://doc.rust-lang.org/book/ch17-00-oop.html) を備えている一方、非関数型" +"言語であるにもかかわらず、さまざまな [関数的概念](https://doc.rust-lang.org/" +"book/ch13-00-functional-features.html) を内包しています。" #: src/types-and-values/variables.md msgid "" "Rust provides type safety via static typing. Variable bindings are made with " "`let`:" msgstr "" -"Rust は静的型付けによって型安全性を提供します。変数のバインディングは `let` " -"を使用して行います。" +"Rust は静的型付けによって型安全性を提供します。変数のバインディングは `let` を使" +"用して行います。" #: src/types-and-values/variables.md src/control-flow-basics/loops/for.md #: src/control-flow-basics/blocks-and-scopes.md @@ -3185,25 +3089,25 @@ msgstr "" #: 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." +"Uncomment the `x = 20` to demonstrate that variables are immutable by default. " +"Add the `mut` keyword to allow changes." msgstr "" -"`x = 20` のコメント化を解除して、変数がデフォルトで不変であることを示します。" -"変更を許可するには、`mut` キーワードを追加します。" +"`x = 20` のコメント化を解除して、変数がデフォルトで不変であることを示します。変" +"更を許可するには、`mut` キーワードを追加します。" #: src/types-and-values/variables.md msgid "" -"The `i32` here is the type of the variable. This must be known at compile " -"time, but type inference (covered later) allows the programmer to omit it in " -"many cases." +"The `i32` here is the type of the variable. This must be known at compile time, " +"but type inference (covered later) allows the programmer to omit it in many " +"cases." msgstr "" -"ここでの `i32` は変数の型です。これはコンパイル時に指定する必要がありますが、" -"多くの場合、プログラマーは型推論(後述)を使用することでこれを省略できます。" +"ここでの `i32` は変数の型です。これはコンパイル時に指定する必要がありますが、多" +"くの場合、プログラマーは型推論(後述)を使用することでこれを省略できます。" #: src/types-and-values/values.md msgid "" -"Here are some basic built-in types, and the syntax for literal values of " -"each type." +"Here are some basic built-in types, and the syntax for literal values of each " +"type." msgstr "基本的な組み込み型と、各型のリテラル値の構文を以下に示します。" #: src/types-and-values/values.md src/unsafe-rust/exercise.md @@ -3301,12 +3205,12 @@ msgstr "上記には示されていない構文もあります。" #: src/types-and-values/values.md msgid "" "All underscores in numbers can be left out, they are for legibility only. So " -"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written " -"as `123i64`." +"`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` と記述できます。" +"数字のアンダースコアはすべて省略できます。アンダースコアは読みやすくするためにの" +"み使用します。そのため、`1_000` は `1000`(または `10_00`)、`123_i64` は " +"`123i64` と記述できます。" #: src/types-and-values/arithmetic.md msgid "\"result: {}\"" @@ -3314,13 +3218,12 @@ msgstr "\"result: {}\"" #: src/types-and-values/arithmetic.md msgid "" -"This is the first time we've seen a function other than `main`, but the " -"meaning should be clear: it takes three integers, and returns an integer. " -"Functions will be covered in more detail later." +"This is the first time we've seen a function other than `main`, but the meaning " +"should be clear: it takes three integers, and returns an integer. Functions " +"will be covered in more detail later." msgstr "" -"`main` 以外の関数が出てきたのは今回が初めてですが、その意味は明確です。つま" -"り、3 つの整数を取り、1 つの整数を返します。関数については、後で詳しく説明し" -"ます。" +"`main` 以外の関数が出てきたのは今回が初めてですが、その意味は明確です。つまり、" +"3 つの整数を取り、1 つの整数を返します。関数については、後で詳しく説明します。" #: src/types-and-values/arithmetic.md msgid "Arithmetic is very similar to other languages, with similar precedence." @@ -3333,68 +3236,65 @@ msgid "" "actually undefined, and might do unknown things at runtime. In Rust, it's " "defined." msgstr "" -"整数オーバーフローはどうでしょうか。C と C++ では、 _符号付き_ 整数のオーバー" -"フローは実際には未定義であり、プラットフォームやコンパイラによって動作が異な" -"る場合があります。Rust では、整数オーバーフローが定義されています。" +"整数オーバーフローはどうでしょうか。C と C++ では、 _符号付き_ 整数のオーバーフ" +"ローは実際には未定義であり、プラットフォームやコンパイラによって動作が異なる場合" +"があります。Rust では、整数オーバーフローが定義されています。" #: src/types-and-values/arithmetic.md msgid "" -"Change the `i32`'s to `i16` to see an integer overflow, which panics " -"(checked) in a debug build and wraps in a release build. There are other " -"options, such as overflowing, saturating, and carrying. These are accessed " -"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * " -"a)`." +"Change the `i32`'s to `i16` to see an integer overflow, which panics (checked) " +"in a debug build and wraps in a release build. There are other options, such as " +"overflowing, saturating, and carrying. These are accessed 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)`)。" +"`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/inference.md msgid "Rust will look at how the variable is _used_ to determine the type:" msgstr "" -"Rust は、どのように変数が _使用されているか_ を確認することで、型を判別しま" -"す。" +"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." +"This slide demonstrates how the Rust compiler infers types based on constraints " +"given by variable declarations and usages." msgstr "" -"このスライドは、変数の宣言と使用方法による制約に基づいて、Rust コンパイラが型" -"を推測する仕組みを示しています。" +"このスライドは、変数の宣言と使用方法による制約に基づいて、Rust コンパイラが型を" +"推測する仕組みを示しています。" #: src/types-and-values/inference.md msgid "" -"It is very important to emphasize that variables declared like this are not " -"of some sort of dynamic \"any type\" that can hold any data. The machine " -"code generated by such declaration is identical to the explicit declaration " -"of a type. The compiler does the job for us and helps us write more concise " -"code." +"It is very important to emphasize that variables declared like this are not of " +"some sort of dynamic \"any type\" that can hold any data. The machine code " +"generated by such declaration is identical to the explicit declaration 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 "" -"When nothing constrains the type of an integer literal, Rust defaults to " -"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, " -"floating-point literals default to `f64`." +"When nothing constrains the type of an integer literal, Rust defaults to `i32`. " +"This sometimes appears as `{integer}` in error messages. Similarly, floating-" +"point literals default to `f64`." msgstr "" -"整数リテラルの型に制約がない場合、Rust はデフォルトで `i32` を使用します。こ" -"れは、エラー メッセージに `{integer}` として表示されることがあります。同様" -"に、浮動小数点リテラルはデフォルトで `f64` になります。" +"整数リテラルの型に制約がない場合、Rust はデフォルトで `i32` を使用します。これ" +"は、エラー メッセージに `{integer}` として表示されることがあります。同様に、浮動" +"小数点リテラルはデフォルトで `f64` になります。" #: src/types-and-values/inference.md msgid "// ERROR: no implementation for `{float} == {integer}`\n" @@ -3403,21 +3303,20 @@ msgstr "// エラー: `{float} == {integer}` の実装がありません\n" #: src/types-and-values/exercise.md #, fuzzy msgid "" -"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci " -"number is calculated recursively as the sum of the n-1'th and n-2'th " -"Fibonacci numbers." +"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th 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 番目のフィボナッチ数の合計として" -"再帰的に計算されます。" +"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?" +"Write a function `fib(n)` that calculates the n'th Fibonacci number. When will " +"this function panic?" msgstr "" -"n 番目のフィボナッチ数を計算する関数 `fib(n)` を記述します。この関数はいつパ" -"ニックするでしょうか。" +"n 番目のフィボナッチ数を計算する関数 `fib(n)` を記述します。この関数はいつパニッ" +"クするでしょうか。" #: src/types-and-values/exercise.md msgid "// The base case.\n" @@ -3457,8 +3356,8 @@ msgstr "`if` 式" #: src/control-flow-basics/if.md msgid "" -"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/" -"if-expr.html#if-expressions) exactly like `if` statements in other languages:" +"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/if-" +"expr.html#if-expressions) exactly like `if` statements in other languages:" msgstr "" "Rust の [`if` 式](https://doc.rust-lang.org/reference/expressions/if-expr." "html#if-expressions) は、他の言語における `if` 文と全く同じように使えます。" @@ -3480,8 +3379,8 @@ msgid "" "In addition, you can use `if` as an expression. The last expression of each " "block becomes the value of the `if` expression:" msgstr "" -"さらに、`if` を式としても用いることができます。それぞれのブロックにある最後の" -"式が、`if` 式の値となります。" +"さらに、`if` を式としても用いることができます。それぞれのブロックにある最後の式" +"が、`if` 式の値となります。" #: src/control-flow-basics/if.md msgid "\"small\"" @@ -3499,29 +3398,27 @@ msgstr "\"number size: {}\"" #, fuzzy msgid "" "Because `if` is an expression and must have a particular type, both of its " -"branch blocks must have the same type. Show what happens if you add `;` " -"after `\"small\"` in the second example." +"branch blocks must have the same type. Show what happens if you add `;` after " +"`\"small\"` in the second example." msgstr "" -"`if` は式であるため、1 つの決まった型を持たなくてはなりません。したがって、" -"`if` 式の分岐ブロックは同一の型を持つ必要があります。2 つ目の例において、" -"`x / 2` のあとに `;` を付け加えると何が起こるでしょうか。" +"`if` は式であるため、1 つの決まった型を持たなくてはなりません。したがって、`if` " +"式の分岐ブロックは同一の型を持つ必要があります。2 つ目の例において、`x / 2` のあ" +"とに `;` を付け加えると何が起こるでしょうか。" #: src/control-flow-basics/if.md #, fuzzy msgid "" -"An `if` expression should be used in the same way as the other expressions. " -"For example, when it is used in a `let` statement, the statement must be " -"terminated with a `;` as well. Remove the `;` before `println!` to see the " -"compiler error." +"An `if` expression should be used in the same way as the other expressions. For " +"example, when it is used in a `let` statement, the statement must be terminated " +"with a `;` as well. Remove the `;` before `println!` to see the compiler error." msgstr "" -"式で `if` を使用する場合、次のステートメントと区切るために、式に `;` を含める" -"必要があります。`println!` の前にある `;` を削除すると、コンパイラ エラーが表" -"示されます。" +"式で `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 つのループ キーワードがあります。" +msgstr "Rust には、`while`、`loop`、`for` の 3 つのループ キーワードがあります。" #: src/control-flow-basics/loops.md msgid "`while`" @@ -3529,13 +3426,13 @@ msgstr "`while`" #: src/control-flow-basics/loops.md msgid "" -"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-" -"expr.html#predicate-loops) works much like in other languages, executing the " -"loop body as long as the condition is true." +"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-expr." +"html#predicate-loops) works much like in other languages, executing the loop " +"body as long as the condition is true." msgstr "" -"[`while` キーワード](https://doc.rust-lang.org/reference/expressions/loop-" -"expr.html#predicate-loops) は、他の言語における `while` と非常によく似た働き" -"をします。" +"[`while` キーワード](https://doc.rust-lang.org/reference/expressions/loop-expr." +"html#predicate-loops) は、他の言語における `while` と非常によく似た働きをしま" +"す。" #: src/control-flow-basics/loops.md msgid "\"Final x: {x}\"" @@ -3544,11 +3441,11 @@ msgstr "\"Final x: {x}\"" #: src/control-flow-basics/loops/for.md #, fuzzy msgid "" -"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates " -"over ranges of values or the items in a collection:" +"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates over " +"ranges of values or the items in a collection:" msgstr "" -"[`for` ループ](https://doc.rust-lang.org/std/keyword.for.html) は、値の範囲を" -"反復処理します。" +"[`for` ループ](https://doc.rust-lang.org/std/keyword.for.html) は、値の範囲を反" +"復処理します。" #: src/control-flow-basics/loops/for.md msgid "\"elem: {elem}\"" @@ -3567,8 +3464,8 @@ msgid "" "Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax " "for an inclusive range." msgstr "" -"なお、この `for` ループは `4` までしか反復処理しません。5 を範囲に含める場合" -"の構文は `1..=5` であることを示します。" +"なお、この `for` ループは `4` までしか反復処理しません。5 を範囲に含める場合の構" +"文は `1..=5` であることを示します。" #: src/control-flow-basics/loops/loop.md msgid "" @@ -3587,20 +3484,19 @@ msgid "" "If you want to immediately start the next iteration use [`continue`](https://" "doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions)." msgstr "" -"次のイテレーションをすぐさま開始したい場合は [`continue`](https://doc.rust-" -"lang.org/reference/expressions/loop-expr.html#continue-expressions) を使用し" -"てください。" +"次のイテレーションをすぐさま開始したい場合は [`continue`](https://doc.rust-lang." +"org/reference/expressions/loop-expr.html#continue-expressions) を使用してくださ" +"い。" #: src/control-flow-basics/break-continue.md #, fuzzy msgid "" -"If you want to exit any kind of loop early, use [`break`](https://doc.rust-" -"lang.org/reference/expressions/loop-expr.html#break-expressions). With " -"`loop`, this can take an optional expression that becomes the value of the " -"`loop` expression." +"If you want to exit any kind of loop early, use [`break`](https://doc.rust-lang." +"org/reference/expressions/loop-expr.html#break-expressions). With `loop`, this " +"can take an optional expression that becomes the value of the `loop` expression." msgstr "" -"ループから早く抜け出したい場合は [`break`](https://doc.rust-lang.org/" -"reference/expressions/loop-expr.html#break-expressions) を使用してください。" +"ループから早く抜け出したい場合は [`break`](https://doc.rust-lang.org/reference/" +"expressions/loop-expr.html#break-expressions) を使用してください。" #: src/control-flow-basics/break-continue.md src/std-traits/exercise.md #: src/std-traits/solution.md src/smart-pointers/trait-objects.md @@ -3614,23 +3510,23 @@ msgstr "\"{}\"" #: src/control-flow-basics/break-continue.md #, fuzzy msgid "" -"Note that `loop` is the only looping construct which can return a non-" -"trivial value. This is because it's guaranteed to only return at a `break` " -"statement (unlike `while` and `for` loops, which can also return when the " -"condition fails)." +"Note that `loop` is the only looping construct which can return a non-trivial " +"value. This is because it's guaranteed to only return at a `break` statement " +"(unlike `while` and `for` loops, which can also return when the condition " +"fails)." msgstr "" -"注意が必要なのは、`loop` が唯一、非自明な値を返すことができるループ構造である" -"という点です。これは、`loop` が少なくとも一度は必ず実行されることが保証されて" -"いるからです(これに対して、while や for ループは必ずしも実行されるわけではあ" -"りません)。" +"注意が必要なのは、`loop` が唯一、非自明な値を返すことができるループ構造であると" +"いう点です。これは、`loop` が少なくとも一度は必ず実行されることが保証されている" +"からです(これに対して、while や for ループは必ずしも実行されるわけではありませ" +"ん)。" #: src/control-flow-basics/break-continue/labels.md msgid "" -"Both `continue` and `break` can optionally take a label argument which is " -"used to break out of nested loops:" +"Both `continue` and `break` can optionally take a label argument which is used " +"to break out of nested loops:" msgstr "" -"`continue` と `break` はオプションでラベル引数を取ることができます。ラベルは" -"ネストしたループから抜け出すために使われます。" +"`continue` と `break` はオプションでラベル引数を取ることができます。ラベルはネス" +"トしたループから抜け出すために使われます。" #: src/control-flow-basics/break-continue/labels.md msgid "\"elements searched: {elements_searched}\"" @@ -3655,9 +3551,9 @@ msgid "" "Each block has a value and a type, which are those of the last expression of " "the block:" msgstr "" -"Rust におけるブロックの中にはいくつかの式が存在します。それぞれのブロックは値" -"と型を持っており、ブロックの値や型はそのブロック内にある最後の式の値や型と一" -"致します。" +"Rust におけるブロックの中にはいくつかの式が存在します。それぞれのブロックは値と" +"型を持っており、ブロックの値や型はそのブロック内にある最後の式の値や型と一致しま" +"す。" #: src/control-flow-basics/blocks-and-scopes.md msgid "\"y: {y}\"" @@ -3665,19 +3561,17 @@ msgstr "\"y: {y}\"" #: src/control-flow-basics/blocks-and-scopes.md msgid "" -"If the last expression ends with `;`, then the resulting value and type is " -"`()`." -msgstr "" -"最後の式が `;` で終了した場合、ブロック全体の値と型は `()` になります。" +"If the last expression ends with `;`, then the resulting value and type is `()`." +msgstr "最後の式が `;` で終了した場合、ブロック全体の値と型は `()` になります。" #: src/control-flow-basics/blocks-and-scopes.md msgid "" "You can show how the value of the block changes by changing the last line in " "the block. For instance, adding/removing a semicolon or using a `return`." msgstr "" -"ブロック内にある最後の行を変更することによって、ブロック全体の値が変わること" -"が分かります。例えば、行末のセミコロンを追加/削除したり、`return` を使用した" -"りすることで、ブロックの値は変化します。" +"ブロック内にある最後の行を変更することによって、ブロック全体の値が変わることが分" +"かります。例えば、行末のセミコロンを追加/削除したり、`return` を使用したりするこ" +"とで、ブロックの値は変化します。" #: src/control-flow-basics/blocks-and-scopes/scopes.md msgid "A variable's scope is limited to the enclosing block." @@ -3685,8 +3579,8 @@ msgstr "変数のスコープは、囲まれたブロック内に限定されま #: src/control-flow-basics/blocks-and-scopes/scopes.md msgid "" -"You can shadow variables, both those from outer scopes and variables from " -"the same scope:" +"You can shadow variables, both those from outer scopes and variables from the " +"same scope:" msgstr "" "外側のスコープの変数と、同じスコープの変数の両方をシャドーイングできます。" @@ -3713,22 +3607,22 @@ msgstr "\"after: {a}\"" #: src/control-flow-basics/blocks-and-scopes/scopes.md 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." +"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` を追加し、そのブロックの外側でアクセスを試みる" -"ことで、変数のスコープが制限されていることを示します。" +"最後の例の内側のブロックに `b` を追加し、そのブロックの外側でアクセスを試みるこ" +"とで、変数のスコープが制限されていることを示します。" #: src/control-flow-basics/blocks-and-scopes/scopes.md #, fuzzy msgid "" -"Shadowing is different from mutation, because after shadowing both " -"variables' memory locations exist at the same time. Both are available under " -"the same name, depending where you use it in the code." +"Shadowing is different from mutation, because after shadowing both variables' " +"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/scopes.md msgid "A shadowing variable can have a different type." @@ -3739,28 +3633,27 @@ msgid "" "Shadowing looks obscure at first, but is convenient for holding on to values " "after `.unwrap()`." msgstr "" -"シャドーイングは一見わかりにくいように見えますが、`.unwrap()` の後の値を保持" -"する場合に便利です。" +"シャドーイングは一見わかりにくいように見えますが、`.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." +"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 "" -"The last expression in a function body (or any block) becomes the return " -"value. Simply omit the `;` at the end of the expression. The `return` " -"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`)." +"The last expression in a function body (or any block) becomes the return value. " +"Simply omit the `;` at the end of the expression. The `return` 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` をリ" -"ファクタリングします)。" +"関数本体(または任意のブロック)内の最後の式が戻り値になります。式の末尾の `;` " +"を省略します。`return` キーワードは早期リターンに使用できますが、関数の最後は" +"「裸の値」の形式にするのが慣用的です(`return` を使用するには `gcd` をリファクタ" +"リングします)。" #: src/control-flow-basics/functions.md #, fuzzy @@ -3768,39 +3661,38 @@ 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'、`()` を返す関数もあります。`-> ()` の戻り値の型が" -"省略されている場合、コンパイラはこれを推測します。" +"戻り値がなく、'unit type'、`()` を返す関数もあります。`-> ()` の戻り値の型が省略" +"されている場合、コンパイラはこれを推測します。" #: src/control-flow-basics/functions.md -msgid "" -"Overloading is not supported -- each function has a single implementation." +msgid "Overloading is not supported -- each function has a single implementation." 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." +"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." +"Always takes a single set of parameter types. These types can be generic, which " +"will be covered later." msgstr "" -"常に 1 つのパラメータ型セットを受け取ります。これらの型は汎用にすることもでき" -"ますが、これについては後で説明します。" +"常に 1 つのパラメータ型セットを受け取ります。これらの型は汎用にすることもできま" +"すが、これについては後で説明します。" #: src/control-flow-basics/macros.md msgid "" -"Macros are expanded into Rust code during compilation, and can take a " -"variable number of arguments. They are distinguished by a `!` at the end. " -"The Rust standard library includes an assortment of useful macros." +"Macros are expanded into Rust code during compilation, and can take a 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 標準ライブラリには、各種の便利な" -"マクロが含まれています。" +"マクロはコンパイル時に Rust コードに展開され、可変長引数を取ることができます。こ" +"れらは末尾の `!` で区別されます。Rust 標準ライブラリには、各種の便利なマクロが含" +"まれています。" #: src/control-flow-basics/macros.md msgid "" @@ -3815,8 +3707,8 @@ msgid "" "`format!(format, ..)` works just like `println!` but returns the result as a " "string." msgstr "" -"`format!(format, ..)`: `println!` と同様に機能しますが、結果を文字列として返" -"します。" +"`format!(format, ..)`: `println!` と同様に機能しますが、結果を文字列として返しま" +"す。" #: src/control-flow-basics/macros.md msgid "`dbg!(expression)` logs the value of the expression and returns it." @@ -3827,16 +3719,15 @@ msgid "" "`todo!()` marks a bit of code as not-yet-implemented. If executed, it will " "panic." msgstr "" -"`todo!()`: 一部のコードに未実装のマークを付けます。実行するとパニックが発生し" -"ます。" +"`todo!()`: 一部のコードに未実装のマークを付けます。実行するとパニックが発生しま" +"す。" #: src/control-flow-basics/macros.md msgid "" -"`unreachable!()` marks a bit of code as unreachable. If executed, it will " -"panic." +"`unreachable!()` marks a bit of code as unreachable. If executed, it will panic." msgstr "" -"`unreachable!()`: コードの一部をアクセス不能としてマークします。実行するとパ" -"ニックが発生します。" +"`unreachable!()`: コードの一部をアクセス不能としてマークします。実行するとパニッ" +"クが発生します。" #: src/control-flow-basics/macros.md msgid "\"{n}! = {}\"" @@ -3844,20 +3735,20 @@ msgstr "\"{n}! = {}\"" #: src/control-flow-basics/macros.md msgid "" -"The takeaway from this section is that these common conveniences exist, and " -"how to use them. Why they are defined as macros, and what they expand to, is " -"not especially critical." +"The takeaway from this section is that these common conveniences exist, and 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 #, fuzzy @@ -3865,13 +3756,12 @@ msgid "" "The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is " "defined as follows, for an arbitrary n1 greater than zero:" msgstr "" -"[コラッツ数列](https://en.wikipedia.org/wiki/Collatz_conjecture) は、ゼロより" -"大きい任意の n" +"[コラッツ数列](https://en.wikipedia.org/wiki/Collatz_conjecture) は、ゼロより大" +"きい任意の n" #: src/control-flow-basics/exercise.md #, fuzzy -msgid "" -"If _ni_ is 1, then the sequence terminates at _ni_." +msgid "If _ni_ is 1, then the sequence terminates at _ni_." msgstr "_ が 1 の場合、数列は _n" #: src/control-flow-basics/exercise.md @@ -3879,8 +3769,7 @@ msgid "If _ni_ is even, then _ni+1 = ni / 2_." msgstr "" #: src/control-flow-basics/exercise.md -msgid "" -"If _ni_ is odd, then _ni+1 = 3 * ni + 1_." +msgid "If _ni_ is odd, then _ni+1 = 3 * ni + 1_." msgstr "" #: src/control-flow-basics/exercise.md @@ -3924,8 +3813,7 @@ msgstr "数列は終了します。" msgid "" "Write a function to calculate the length of the collatz sequence for a given " "initial `n`." -msgstr "" -"任意の初期値 `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" @@ -3955,26 +3843,25 @@ msgstr "このセグメントの所要時間は約 55 分です" #: src/tuples-and-arrays/arrays.md msgid "" -"A value of the array type `[T; N]` holds `N` (a compile-time constant) " -"elements of the same type `T`. Note that the length of the array is _part of " -"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two " -"different types. Slices, which have a size determined at runtime, are " -"covered later." +"A value of the array type `[T; N]` holds `N` (a compile-time constant) elements " +"of the same type `T`. Note that the length of the array is _part of its type_, " +"which means that `[u8; 3]` and `[u8; 4]` are considered two different types. " +"Slices, which have a size determined at runtime, are covered later." msgstr "" -"配列型 `[T; N]`には、同じ型 `T` の `N`(コンパイル時定数)個の要素が保持され" -"ます。なお、配列の長さはその型の一部分です。つまり、`[u8; 3]` と `[u8; 4]` " -"は 2 つの異なる型とみなされます。スライス(サイズが実行時に決定される)につい" -"ては後で説明します。" +"配列型 `[T; N]`には、同じ型 `T` の `N`(コンパイル時定数)個の要素が保持されま" +"す。なお、配列の長さはその型の一部分です。つまり、`[u8; 3]` と `[u8; 4]` は 2 つ" +"の異なる型とみなされます。スライス(サイズが実行時に決定される)については後で説" +"明します。" #: src/tuples-and-arrays/arrays.md msgid "" "Try accessing an out-of-bounds array element. Array accesses are checked at " -"runtime. Rust can usually optimize these checks away, and they can be " -"avoided using unsafe Rust." +"runtime. Rust can usually optimize these checks away, and they can be avoided " +"using unsafe Rust." msgstr "" -"境界外の配列要素にアクセスしてみてください。配列アクセスは実行時にチェックさ" -"れます。Rust では通常、これらのチェックを最適化により除去できます(Unsafe " -"Rust を使用することで回避できます)。" +"境界外の配列要素にアクセスしてみてください。配列アクセスは実行時にチェックされま" +"す。Rust では通常、これらのチェックを最適化により除去できます(Unsafe Rust を使" +"用することで回避できます)。" #: src/tuples-and-arrays/arrays.md msgid "We can use literals to assign values to arrays." @@ -3983,23 +3870,22 @@ msgstr "リテラルを使用して配列に値を代入することができま #: src/tuples-and-arrays/arrays.md msgid "" "The `println!` macro asks for the debug implementation with the `?` format " -"parameter: `{}` gives the default output, `{:?}` gives the debug output. " -"Types such as integers and strings implement the default output, but arrays " -"only implement the debug output. This means that we must use debug output " -"here." +"parameter: `{}` gives the default output, `{:?}` gives the debug output. Types " +"such as integers and strings implement the default output, but arrays only " +"implement the debug output. This means that we must use debug output here." msgstr "" -"`println!` マクロは、`?` 形式のパラメータを使用してデバッグ実装を要求します。" -"つまり、`{}` はデフォルトの出力を、`{:?}` はデバッグ出力を提供します。整数や" -"文字列などの型はデフォルトの出力を実装しますが、配列はデバッグ出力のみを実装" -"します。そのため、ここではデバッグ出力を使用する必要があります。" +"`println!` マクロは、`?` 形式のパラメータを使用してデバッグ実装を要求します。つ" +"まり、`{}` はデフォルトの出力を、`{:?}` はデバッグ出力を提供します。整数や文字列" +"などの型はデフォルトの出力を実装しますが、配列はデバッグ出力のみを実装します。そ" +"のため、ここではデバッグ出力を使用する必要があります。" #: src/tuples-and-arrays/arrays.md msgid "" "Adding `#`, eg `{a:#?}`, invokes a \"pretty printing\" format, which can be " "easier to read." msgstr "" -"`#` を追加すると(例: `{a:#?}`)、読みやすい「プリティ プリント」形式が呼び出" -"されます。" +"`#` を追加すると(例: `{a:#?}`)、読みやすい「プリティ プリント」形式が呼び出さ" +"れます。" #: src/tuples-and-arrays/tuples.md msgid "Like arrays, tuples have a fixed length." @@ -4011,43 +3897,41 @@ msgstr "タプルは、異なる型の値を複合型にグループ化します #: src/tuples-and-arrays/tuples.md msgid "" -"Fields of a tuple can be accessed by the period and the index of the value, " -"e.g. `t.0`, `t.1`." +"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`)でアク" -"セスできます。" +"タプルのフィールドには、ピリオドと値のインデックス(例: `t.0`、`t.1`)でアクセス" +"できます。" #: src/tuples-and-arrays/tuples.md msgid "" -"The empty tuple `()` is referred to as the \"unit type\" and signifies " -"absence of a return value, akin to `void` in other languages." +"The empty tuple `()` is referred to as the \"unit type\" and signifies absence " +"of a return value, akin to `void` in other languages." msgstr "" #: src/tuples-and-arrays/iteration.md msgid "The `for` statement supports iterating over arrays (but not tuples)." msgstr "" -"for ステートメントでは、配列の反復処理がサポートされています(タプルはサポー" -"トされていません)。" +"for ステートメントでは、配列の反復処理がサポートされています(タプルはサポートさ" +"れていません)。" #: src/tuples-and-arrays/iteration.md msgid "" -"This functionality uses the `IntoIterator` trait, but we haven't covered " -"that yet." +"This functionality uses the `IntoIterator` trait, but we haven't covered that " +"yet." msgstr "" -"この機能は `IntoIterator` トレイトを使用しますが、これはまだ説明していませ" -"ん。" +"この機能は `IntoIterator` トレイトを使用しますが、これはまだ説明していません。" #: src/tuples-and-arrays/iteration.md #, fuzzy msgid "" -"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!" -"` macros. These are always checked, while debug-only variants like " -"`debug_assert!` compile to nothing in release builds." +"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!` " +"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!` などのデバッグ専用の派生ツールは、リリースビルドでは何もコン" -"パイルされません。" +"ここでは `assert_ne!` マクロが新たに加わっていますが、他にも `assert_eq! マクロ" +"と`assert!` マクロがあります。これらは常にチェックされますが、`debug_assert!` な" +"どのデバッグ専用の派生ツールは、リリースビルドでは何もコンパイルされません。" #: src/tuples-and-arrays/destructuring.md msgid "" @@ -4069,21 +3953,21 @@ msgstr "" #: src/tuples-and-arrays/destructuring.md msgid "" "The patterns used here are \"irrefutable\", meaning that the compiler can " -"statically verify that the value on the right of `=` has the same structure " -"as the pattern." +"statically verify that the value on the right of `=` has the same structure as " +"the pattern." msgstr "" #: src/tuples-and-arrays/destructuring.md msgid "" -"A variable name is an irrefutable pattern that always matches any value, " -"hence why we can also use `let` to declare a single variable." +"A variable name is an irrefutable pattern that always matches any value, hence " +"why we can also use `let` to declare a single variable." msgstr "" #: src/tuples-and-arrays/destructuring.md msgid "" "Rust also supports using patterns in conditionals, allowing for equality " -"comparison and destructuring to happen at the same time. This form of " -"pattern matching will be discussed in more detail later." +"comparison and destructuring to happen at the same time. This form of pattern " +"matching will be discussed in more detail later." msgstr "" #: src/tuples-and-arrays/destructuring.md @@ -4106,8 +3990,8 @@ msgid "" "Use an array such as the above to write a function `transpose` which will " "transpose a matrix (turn rows into columns):" msgstr "" -"上記のような配列を使用して、行列を転置(行を列に変換)する `transpose` 関数を" -"記述します。" +"上記のような配列を使用して、行列を転置(行を列に変換)する `transpose` 関数を記" +"述します。" #: src/tuples-and-arrays/exercise.md #, fuzzy @@ -4147,56 +4031,54 @@ msgstr "このセグメントの所要時間は約 55 分です" #: src/references/shared.md #, fuzzy msgid "" -"A reference provides a way to access another value without taking ownership " -"of the value, and is also called \"borrowing\". Shared references are read-" -"only, and the referenced data cannot change." +"A reference provides a way to access another value without taking ownership of " +"the value, and is also called \"borrowing\". Shared references are read-only, " +"and the referenced data cannot change." msgstr "" -"参照を使用すると、値について責任を負うことなく別の値にアクセスできます。参照" -"は「借用」とも呼ばれます。共有参照は読み取り専用であり、参照先のデータは変更" -"できません。" +"参照を使用すると、値について責任を負うことなく別の値にアクセスできます。参照は" +"「借用」とも呼ばれます。共有参照は読み取り専用であり、参照先のデータは変更できま" +"せん。" #: src/references/shared.md msgid "" -"A shared reference to a type `T` has type `&T`. A reference value is made " -"with the `&` operator. The `*` operator \"dereferences\" a reference, " -"yielding its value." +"A shared reference to a type `T` has type `&T`. A reference value is made with " +"the `&` operator. The `*` operator \"dereferences\" a reference, yielding its " +"value." msgstr "" -"型 `T` への共有参照の型は `&T` です。参照値は `&` 演算子で作成されます。`*` " -"演算子は参照を「逆参照」し、その値を生成します。" +"型 `T` への共有参照の型は `&T` です。参照値は `&` 演算子で作成されます。`*` 演算" +"子は参照を「逆参照」し、その値を生成します。" #: src/references/shared.md msgid "Rust will statically forbid dangling references:" msgstr "Rust はダングリング参照を静的に禁止します。" #: src/references/shared.md -msgid "" -"References can never be null in Rust, so null checking is not necessary." +msgid "References can never be null in Rust, so null checking is not necessary." msgstr "" #: src/references/shared.md msgid "" "A reference is said to \"borrow\" the value it refers to, and this is a good " "model for students not familiar with pointers: code can use the reference to " -"access the value, but is still \"owned\" by the original variable. The " -"course will get into more detail on ownership in day 3." +"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 日目で詳しく説明します。" +"参照とは、参照する値を「借用する」ことだと言われていますが、これはポインタに慣れ" +"ていない受講者にとって理解しやすい説明です。コードでは参照を使用して値にアクセス" +"できますが、その値は元の変数によって「所有」されたままとなります。所有について" +"は、コースの 3 日目で詳しく説明します。" #: src/references/shared.md msgid "" -"References are implemented as pointers, and a key advantage is that they can " -"be much smaller than the thing they point to. Students familiar with C or C+" -"+ will recognize references as pointers. Later parts of the course will " -"cover how Rust prevents the memory-safety bugs that come from using raw " -"pointers." +"References are implemented as pointers, and a key advantage is that they can be " +"much smaller than the thing they point to. Students familiar with C or C++ will " +"recognize references as pointers. Later parts of the course will cover how Rust " +"prevents the memory-safety bugs that come from using raw pointers." msgstr "" -"参照はポインタとして実装されます。主な利点は、参照先よりもはるかに小さくでき" -"ることです。C または C++ に精通している受講者は、参照をポインタとして認識でき" -"ます。このコースの後半で、未加工ポインタの使用によるメモリ安全性のバグを " -"Rust で防止する方法について説明します。" +"参照はポインタとして実装されます。主な利点は、参照先よりもはるかに小さくできるこ" +"とです。C または C++ に精通している受講者は、参照をポインタとして認識できます。" +"このコースの後半で、未加工ポインタの使用によるメモリ安全性のバグを Rust で防止す" +"る方法について説明します。" #: src/references/shared.md msgid "" @@ -4207,43 +4089,41 @@ msgstr "Rust は参照を自動的に作成しないため、常に `&` を付 #: src/references/shared.md #, fuzzy msgid "" -"Rust will auto-dereference in some cases, in particular when invoking " -"methods (try `r.is_ascii()`). There is no need for an `->` operator like in " -"C++." +"Rust will auto-dereference in some cases, in particular when invoking methods " +"(try `r.is_ascii()`). There is no need for an `->` operator like in C++." msgstr "" "Rust は、特にメソッドを呼び出すとき、自動的に逆参照する場合があります(`r." "count_ones()` を試してください)。C++ のような `->` 演算子は必要ありません。" #: src/references/shared.md msgid "" -"In this example, `r` is mutable so that it can be reassigned (`r = &b`). " -"Note that this re-binds `r`, so that it refers to something else. This is " -"different from C++, where assignment to a reference changes the referenced " -"value." +"In this example, `r` is mutable so that it can be reassigned (`r = &b`). Note " +"that this re-binds `r`, so that it refers to something else. This is different " +"from C++, where assignment to a reference changes the referenced value." msgstr "" -"この例では、`r` は可変であるため、再代入が可能です(`r = &b`)。これにより " -"`r` が再バインドされ、他の値を参照するようになります。これは、参照に代入する" -"と参照先の値が変更される C++ とは異なります。" +"この例では、`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'` と指" -"定してみてください。" +"共有参照では、値が可変であっても、参照先の値は変更できません。`*r = 'X'` と指定" +"してみてください。" #: src/references/shared.md msgid "" "Rust is tracking the lifetimes of all references to ensure they live long " -"enough. Dangling references cannot occur in safe Rust. `x_axis` would return " -"a reference to `point`, but `point` will be deallocated when the function " +"enough. Dangling references cannot occur in safe Rust. `x_axis` would return 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` の割り当てが解除される" -"ため、コンパイルされません。" +"Rust は、すべての参照のライフタイムを追跡して、十分な存続期間を確保しています。" +"安全な Rust では、ダングリング参照が発生することはありません。`x_axis` は " +"`point` への参照を返しますが、関数が戻ると `point` の割り当てが解除されるため、" +"コンパイルされません。" #: src/references/shared.md msgid "We will talk more about borrowing when we get to ownership." @@ -4258,27 +4138,26 @@ msgstr "" #: src/references/exclusive.md msgid "" -"\"Exclusive\" means that only this reference can be used to access the " -"value. No other references (shared or exclusive) can exist at the same time, " -"and the referenced value cannot be accessed while the exclusive reference " -"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is " -"alive." +"\"Exclusive\" means that only this reference can be used to access the value. " +"No other references (shared or exclusive) can exist at the same time, and the " +"referenced value cannot be accessed while the exclusive reference exists. Try " +"making an `&point.0` or changing `point.0` while `x_coord` is alive." msgstr "" -"「排他」とは、この参照のみを使用して値にアクセスできることを意味します。他の" -"参照(共有または排他)が同時に存在することはできず、排他参照が存在する間は参" -"照先の値にアクセスできません。`x_coord` が有効な状態で `&point.0` を作成する" -"か、`point.0` を変更してみてください。" +"「排他」とは、この参照のみを使用して値にアクセスできることを意味します。他の参照" +"(共有または排他)が同時に存在することはできず、排他参照が存在する間は参照先の値" +"にアクセスできません。`x_coord` が有効な状態で `&point.0` を作成するか、" +"`point.0` を変更してみてください。" #: src/references/exclusive.md msgid "" "Be sure to note the difference between `let mut x_coord: &i32` and `let " "x_coord: &mut i32`. The first one represents a shared reference which can be " -"bound to different values, while the second represents an exclusive " -"reference to a mutable value." +"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` の違いに注意してください。" -"前者は異なる値にバインドできる共有参照を表すのに対し、後者は可変の値への排他" -"参照を表します。" +"`let mut x_coord: &i32` と `let x_coord: &mut i32` の違いに注意してください。前" +"者は異なる値にバインドできる共有参照を表すのに対し、後者は可変の値への排他参照を" +"表します。" #: src/references/slices.md msgid "A slice gives you a view into a larger collection:" @@ -4293,49 +4172,46 @@ msgid "" "We create a slice by borrowing `a` and specifying the starting and ending " "indexes in brackets." msgstr "" -"スライスを作成するには、`a` を借用し、開始インデックスと終了インデックスを角" -"かっこで囲んで指定します。" +"スライスを作成するには、`a` を借用し、開始インデックスと終了インデックスを角かっ" +"こで囲んで指定します。" #: src/references/slices.md msgid "" "If the slice starts at index 0, Rust’s range syntax allows us to drop the " -"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are " -"identical." +"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are identical." msgstr "" -"スライスがインデックス 0 から始まる場合、Rust の範囲構文により開始インデック" -"スを省略できます。つまり、`&a[0..a.len()]` と `&a[..a.len()]` は同じです。" +"スライスがインデックス 0 から始まる場合、Rust の範囲構文により開始インデックスを" +"省略できます。つまり、`&a[0..a.len()]` と `&a[..a.len()]` は同じです。" #: src/references/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..]` は同じです。" +"最後のインデックスについても同じことが言えるので、`&a[2..a.len()]` と `&a[2..]` " +"は同じです。" #: src/references/slices.md -msgid "" -"To easily create a slice of the full array, we can therefore use `&a[..]`." -msgstr "" -"配列全体のスライスを簡単に作成するには、`&a[..]` と書くことが出来ます。" +msgid "To easily create a slice of the full array, we can therefore use `&a[..]`." +msgstr "配列全体のスライスを簡単に作成するには、`&a[..]` と書くことが出来ます。" #: src/references/slices.md msgid "" -"`s` is a reference to a slice of `i32`s. Notice that the type of `s` " -"(`&[i32]`) no longer mentions the array length. This allows us to perform " -"computation on slices of different sizes." +"`s` is a reference to a slice of `i32`s. Notice that the type of `s` (`&[i32]`) " +"no longer mentions the array length. This allows us to perform computation on " +"slices of different sizes." msgstr "" -"`s` は i32 のスライスへの参照です。`s` の型(`&[i32]`)に配列の長さが含まれな" -"くなったことに注目してください。これにより、さまざまなサイズのスライスに対し" -"て計算を実行できます。" +"`s` は i32 のスライスへの参照です。`s` の型(`&[i32]`)に配列の長さが含まれなく" +"なったことに注目してください。これにより、さまざまなサイズのスライスに対して計算" +"を実行できます。" #: src/references/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` は少なくともス" -"ライスが存在する間は「存続」 している(スコープ内にある)必要があります。" +"スライスは常に別のオブジェクトから借用します。この例では、`a` は少なくともスライ" +"スが存在する間は「存続」 している(スコープ内にある)必要があります。" #: src/references/strings.md msgid "We can now understand the two string types in Rust:" @@ -4346,8 +4222,7 @@ msgid "`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`." msgstr "" #: src/references/strings.md -msgid "" -"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec`." +msgid "`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec`." msgstr "" #: src/references/strings.md src/std-traits/read-and-write.md @@ -4374,8 +4249,8 @@ msgstr "\"s3: {s3}\"" #, fuzzy msgid "" "`&str` introduces a string slice, which is an immutable reference to UTF-8 " -"encoded string data stored in a block of memory. String literals " -"(`\"Hello\"`), are stored in the program’s binary." +"encoded string data stored in a block of memory. String literals (`\"Hello\"`), " +"are stored in the program’s binary." msgstr "" "`&str` は文字列スライスを導入します。これは、メモリブロックに保存されている " "UTF-8 でエンコードされた文字列データへの不変の参照です。文字列リテラル" @@ -4384,20 +4259,20 @@ msgstr "" #: src/references/strings.md #, fuzzy msgid "" -"Rust's `String` type is a wrapper around a vector of bytes. As with a " -"`Vec`, it is owned." +"Rust's `String` type is a wrapper around a vector of bytes. As with a `Vec`, " +"it is owned." msgstr "" -"Rust の `String` 型は、バイトのベクターのラッパーです。`Vec` と同様、所有" -"されます。" +"Rust の `String` 型は、バイトのベクターのラッパーです。`Vec` と同様、所有され" +"ます。" #: src/references/strings.md msgid "" "As with many other types `String::from()` creates a string from a string " -"literal; `String::new()` creates a new empty string, to which string data " -"can be added using the `push()` and `push_str()` methods." +"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()` メソッドと " +"他の多くの型と同様に、`String::from()` は文字列リテラルから文字列を作成します。" +"`String::new()` は新しい空の文字列を作成します。`push()` メソッドと " "`push_str()` メソッドを使用して、そこに文字列データを追加できます。" #: src/references/strings.md @@ -4405,8 +4280,8 @@ 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!() と同じ形式指定を受け入れます。" +"`format!()` マクロを使用すると、動的な値から所有文字列を簡単に生成できます。これ" +"は println!() と同じ形式指定を受け入れます。" #: src/references/strings.md msgid "" @@ -4415,10 +4290,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` イテレータは文字単位で処理するため、正しい文字境界を取" -"得しようとすることよりも、このイテレータを使用するほうが望ましいです。" +"`&` を使用して `String` から `&str` スライスを借用し、必要に応じて範囲を選択でき" +"ます。文字境界に揃えられていないバイト範囲を選択すると、その式でパニックを起こし" +"ます。`chars` イテレータは文字単位で処理するため、正しい文字境界を取得しようとす" +"ることよりも、このイテレータを使用するほうが望ましいです。" #: src/references/strings.md msgid "" @@ -4427,10 +4302,10 @@ 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 でエンコードされたバイト" -"のみを含めることができ、短い文字列に対する最適化が行われないことです)。" +"C++ プログラマー向けの説明:`&str` は常にメモリ上の有効な文字列を指しているよう" +"なC++ の std::string_view と考えられます。Rust の `String` は、C++ の `std::" +"string` とおおむね同等です(主な違いは、UTF-8 でエンコードされたバイトのみを含め" +"ることができ、短い文字列に対する最適化が行われないことです)。" #: src/references/strings.md msgid "Byte strings literals allow you to create a `&[u8]` value directly:" @@ -4438,34 +4313,32 @@ msgstr "バイト文字列リテラルを使用すると、`&[u8]` 値を直接 #: src/references/strings.md msgid "" -"Raw strings allow you to create a `&str` value with escapes disabled: " -"`r\"\\n\" == \"\\\\n\"`. You can embed double-quotes by using an equal " -"amount of `#` on either side of the quotes:" +"Raw strings allow you to create a `&str` value with escapes disabled: `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\"`)。二重引用符を埋め込むには、引用符の両側に同量の " -"`#` を使用します。" +"(`r\"\\n\" == \"\\\\n\"`)。二重引用符を埋め込むには、引用符の両側に同量の `#` " +"を使用します。" #: src/references/exercise.md msgid "" -"We will create a few utility functions for 3-dimensional geometry, " -"representing a point as `[f64;3]`. It is up to you to determine the function " -"signatures." +"We will create a few utility functions for 3-dimensional geometry, representing " +"a point as `[f64;3]`. It is up to you to determine the function signatures." msgstr "" -"ここでは、点を `[f64;3]` として表現する 3 次元ジオメトリのユーティリティ関数" -"をいくつか作成します。関数シグネチャは任意で指定してください。" +"ここでは、点を `[f64;3]` として表現する 3 次元ジオメトリのユーティリティ関数をい" +"くつか作成します。関数シグネチャは任意で指定してください。" #: src/references/exercise.md msgid "" "// Calculate the magnitude of a vector by summing the squares of its " "coordinates\n" -"// and taking the square root. Use the `sqrt()` method to calculate the " -"square\n" +"// and taking the square root. Use the `sqrt()` method to calculate the square\n" "// root, like `v.sqrt()`.\n" msgstr "" "// 座標の二乗を合計して平方根を取り、\n" -"// ベクターの大きさを計算します。`sqrt()` メソッドを使用して、`v.sqrt()` と同" -"様に\n" +"// ベクターの大きさを計算します。`sqrt()` メソッドを使用して、`v.sqrt()` と同様" +"に\n" "// 平方根を計算します。\n" #: src/references/exercise.md @@ -4498,8 +4371,7 @@ msgstr "/// 指定されたベクターの大きさを計算します。\n" #: src/references/solution.md msgid "" -"/// Change the magnitude of the vector to 1.0 without changing its " -"direction.\n" +"/// Change the magnitude of the vector to 1.0 without changing its direction.\n" msgstr "/// 向きを変えずにベクターの大きさを 1.0 に変更します。\n" #: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md @@ -4548,26 +4420,24 @@ 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." +"This may be a good time to let people know there are different types of structs." msgstr "ここで、構造体にはさまざまな型があることを説明しましょう。" #: src/user-defined-types/named-structs.md msgid "" -"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a " -"trait on some type but don’t have any data that you want to store in the " -"value itself." +"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a trait " +"on some type but don’t have any data that you want to store in the value itself." msgstr "" -"サイズがゼロの構造体(例: `struct Foo;`)は、ある型にトレイトを実装しているも" -"のの、値自体に格納するデータがない場合に使用できます。" +"サイズがゼロの構造体(例: `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." +"The next slide will introduce Tuple structs, used when the field names are not " +"important." msgstr "" -"次のスライドでは、フィールド名が重要でない場合に使用されるタプル構造体を紹介" -"します。" +"次のスライドでは、フィールド名が重要でない場合に使用されるタプル構造体を紹介しま" +"す。" #: src/user-defined-types/named-structs.md msgid "" @@ -4578,13 +4448,13 @@ msgstr "" #: src/user-defined-types/named-structs.md msgid "" -"The syntax `..avery` allows us to copy the majority of the fields from the " -"old struct without having to explicitly type it all out. It must always be " -"the last element." +"The syntax `..avery` allows us to copy the majority of the fields from the old " +"struct without having to explicitly type it all out. It must always be the last " +"element." msgstr "" -"構文 `..avery` を使用すると、明示的にすべてのフィールドを入力しなくても、古い" -"構造体のフィールドの大部分をコピーできます。この構文は、常に最後の要素にする" -"必要があります。" +"構文 `..avery` を使用すると、明示的にすべてのフィールドを入力しなくても、古い構" +"造体のフィールドの大部分をコピーできます。この構文は、常に最後の要素にする必要が" +"あります。" #: src/user-defined-types/tuple-structs.md msgid "If the field names are unimportant, you can use a tuple struct:" @@ -4597,8 +4467,8 @@ 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\"" @@ -4613,11 +4483,11 @@ 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:" +"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." @@ -4625,8 +4495,8 @@ msgstr "数値はいくつかの単位で測定されます(上記の例では #: 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)`." +"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)` を使用するたびに再検証する必要はありません。" @@ -4636,16 +4506,16 @@ msgid "" "Demonstrate how to add a `f64` value to a `Newtons` type by accessing the " "single field in the newtype." msgstr "" -"ニュータイプの 1 つのフィールドにアクセスして、`Newtons` 型に `f64` の値を追" -"加する方法を示します。" +"ニュータイプの 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." +"Rust generally doesn’t like inexplicit things, like automatic unwrapping or for " +"instance using booleans as integers." msgstr "" -"Rust では通常、不明瞭なこと(自動ラップ解除や、整数としてのブール値の使用な" -"ど)は好まれません。" +"Rust では通常、不明瞭なこと(自動ラップ解除や、整数としてのブール値の使用など)" +"は好まれません。" #: src/user-defined-types/tuple-structs.md msgid "Operator overloading is discussed on Day 3 (generics)." @@ -4699,13 +4569,13 @@ msgstr "" #: src/user-defined-types/enums.md msgid "" -"`PlayerMove` is a type with three variants. In addition to the payloads, " -"Rust will store a discriminant so that it knows at runtime which variant is " -"in a `PlayerMove` value." +"`PlayerMove` is a type with three variants. In addition to the payloads, Rust " +"will store a discriminant so that it knows at runtime which variant is in a " +"`PlayerMove` value." msgstr "" -"`PlayerMove` は、3 つのバリアントを持つ型です。Rust はペイロードに加えて判別" -"式を格納することで、実行時にどのバリアントが `PlayerMove` 値に含まれているか" -"を把握できるようにします。" +"`PlayerMove` は、3 つのバリアントを持つ型です。Rust はペイロードに加えて判別式を" +"格納することで、実行時にどのバリアントが `PlayerMove` 値に含まれているかを把握で" +"きるようにします。" #: src/user-defined-types/enums.md msgid "This might be a good time to compare structs and enums:" @@ -4713,8 +4583,8 @@ 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)." +"In both, you can have a simple version without fields (unit struct) or one with " +"different types of fields (variant payloads)." msgstr "" "どちらでも、フィールドのないシンプルなバージョン(単位構造体)か、さまざまな" "フィールドがあるバージョン(バリアント ペイロード)を使用できます。" @@ -4722,12 +4592,11 @@ msgstr "" #: src/user-defined-types/enums.md msgid "" "You could even implement the different variants of an enum with separate " -"structs but then they wouldn’t be the same type as they would if they were " -"all defined in an enum." +"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." @@ -4740,14 +4609,14 @@ msgstr "必要に応じて、必要最小限のサイズの整数を格納しま #: src/user-defined-types/enums.md msgid "" "If the allowed variant values do not cover all bit patterns, it will use " -"invalid bit patterns to encode the discriminant (the \"niche " -"optimization\"). For example, `Option<&u8>` stores either a pointer to an " -"integer or `NULL` for the `None` variant." +"invalid bit patterns to encode the discriminant (the \"niche optimization\"). " +"For example, `Option<&u8>` stores either a pointer to an integer or `NULL` for " +"the `None` variant." msgstr "" -"許可されたバリアント値がすべてのビットパターンをカバーしていない場合、無効な" -"ビットパターンを使用して判別式をエンコードします(「ニッチの最適化」)。たと" -"えば、`Option<&u8>` には `None` バリアントに対する整数へのポインタまたは " -"`NULL` が格納されます。" +"許可されたバリアント値がすべてのビットパターンをカバーしていない場合、無効なビッ" +"トパターンを使用して判別式をエンコードします(「ニッチの最適化」)。たとえば、" +"`Option<&u8>` には `None` バリアントに対する整数へのポインタまたは `NULL` が格納" +"されます。" #: src/user-defined-types/enums.md msgid "" @@ -4757,11 +4626,10 @@ msgstr "" #: src/user-defined-types/enums.md msgid "" -"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 " -"bytes." +"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 bytes." msgstr "" -"`repr` がない場合、10001 は 2 バイトに収まるため、判別式の型には 2 バイトが使" -"用されます。" +"`repr` がない場合、10001 は 2 バイトに収まるため、判別式の型には 2 バイトが使用" +"されます。" #: src/user-defined-types/enums.md src/user-defined-types/static.md #: src/memory-management/review.md src/memory-management/move.md @@ -4772,31 +4640,30 @@ msgstr "その他" #: src/user-defined-types/enums.md msgid "" -"Rust has several optimizations it can employ to make enums take up less " -"space." +"Rust has several optimizations it can employ to make enums take up less space." msgstr "" -"Rust には、列挙型が占めるスペースを少なくするために使用できる最適化がいくつか" -"あります。" +"Rust には、列挙型が占めるスペースを少なくするために使用できる最適化がいくつかあ" +"ります。" #: src/user-defined-types/enums.md msgid "" "Null pointer optimization: For [some types](https://doc.rust-lang.org/std/" -"option/#representation), Rust guarantees that `size_of::()` equals " -"`size_of::>()`." +"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::>()` と等" -"しいことを保証します。" +"#representation)で、Rust は `size_of::()` が `size_of::>()` と等し" +"いことを保証します。" #: src/user-defined-types/enums.md msgid "" -"Example code if you want to show how the bitwise representation _may_ look " -"like in practice. It's important to note that the compiler provides no " -"guarantees regarding this representation, therefore this is totally unsafe." +"Example code if you want to show how the bitwise representation _may_ look 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/const.md msgid "`const`" @@ -4805,27 +4672,27 @@ msgstr "`const`" #: src/user-defined-types/const.md #, fuzzy msgid "" -"Constants are evaluated at compile time and their values are inlined " -"wherever they are used:" +"Constants are evaluated at compile time and their values are inlined wherever " +"they are used:" msgstr "" -"定数変数はコンパイル時に評価され、使用場所にかかわらずその値がインライン化さ" -"れます。" +"定数変数はコンパイル時に評価され、使用場所にかかわらずその値がインライン化されま" +"す。" #: src/user-defined-types/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." +"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) " -"によると、定数変数は使用時にインライン化されます。" +"[Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html) によ" +"ると、定数変数は使用時にインライン化されます。" #: src/user-defined-types/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." +"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` 関数は実行時に呼び出すことができます。" +"コンパイル時に `const` 値を生成するために呼び出せるのは、`const` とマークされた" +"関数のみです。ただし、`const` 関数は実行時に呼び出すことができます。" #: src/user-defined-types/const.md #, fuzzy @@ -4834,11 +4701,11 @@ msgstr "`const` は C++ の `constexpr` と意味的によく似ていること #: src/user-defined-types/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." +"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.md msgid "`static`" @@ -4860,49 +4727,47 @@ msgstr "\"{BANNER}\"" #: src/user-defined-types/static.md msgid "" -"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" -"vs-static.html), these are not inlined upon use and have an actual " -"associated memory location. This is useful for unsafe and embedded code, and " -"the variable lives through the entirety of the program execution. When a " -"globally-scoped value does not have a reason to need object identity, " -"`const` is generally preferred." +"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-" +"static.html), these are not inlined upon use and have an actual associated " +"memory location. This is useful for unsafe and embedded code, and the variable " +"lives through the entirety of the program execution. When a 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` が使用されます。" +"[Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html) で説" +"明されているように、静的変数は使用時にインライン化されず、実際の関連するメモリ位" +"置に存在します。これは安全でないコードや埋め込みコードに有用であり、変数はプログ" +"ラムの実行全体を通じて存続します。グローバル スコープの値にオブジェクト ID が必" +"要ない場合は、一般的に `const` が使用されます。" #: src/user-defined-types/static.md #, fuzzy msgid "`static` is similar to mutable global variables in C++." msgstr "" -"一方、`static` は、C++ の `const` または可変グローバル変数にかなり似ていま" -"す。" +"一方、`static` は、C++ の `const` または可変グローバル変数にかなり似ています。" #: src/user-defined-types/static.md msgid "" -"`static` provides object identity: an address in memory and state as " -"required by types with interior mutability such as `Mutex`." +"`static` provides object identity: an address in memory and state as required " +"by types with interior mutability such as `Mutex`." msgstr "" -"`static` はオブジェクト ID(メモリ内のアドレス)と、内部可変性を持つ型に必要" -"な状態(`Mutex` など)を提供します。" +"`static` はオブジェクト ID(メモリ内のアドレス)と、内部可変性を持つ型に必要な状" +"態(`Mutex` など)を提供します。" #: src/user-defined-types/static.md msgid "" -"Because `static` variables are accessible from any thread, they must be " -"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-" -"lang.org/std/sync/struct.Mutex.html), atomic or similar." +"Because `static` variables are accessible from any thread, they must be `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) やアトミックなどの方法で実現できます。" +"`static` 変数はどのスレッドからでもアクセスできるため、`Sync` である必要がありま" +"す。内部の可変性は、[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex." +"html) やアトミックなどの方法で実現できます。" #: src/user-defined-types/static.md msgid "Thread-local data can be created with the macro `std::thread_local`." msgstr "" -"マクロ `std::thread_local` を使用して、スレッド ローカルのデータを作成できま" -"す。" +"マクロ `std::thread_local` を使用して、スレッド ローカルのデータを作成できます。" #: src/user-defined-types/aliases.md msgid "" @@ -4923,29 +4788,26 @@ msgstr "C プログラマーは、これを `typedef` と同様のものと考 #: src/user-defined-types/exercise.md msgid "" "We will create a data structure to represent an event in an elevator control " -"system. It is up to you to define the types and functions to construct " -"various events. Use `#[derive(Debug)]` to allow the types to be formatted " -"with `{:?}`." +"system. It is up to you to define the types and functions to construct various " +"events. Use `#[derive(Debug)]` to allow the types to be formatted with `{:?}`." msgstr "" -"エレベーター制御システムでイベントを表すデータ構造を作成します。さまざまなイ" -"ベントを構築するための型と関数を自由に定義して構いません。`#[derive(Debug)]` " -"を使用して、型を `{:?}` でフォーマットできるようにします。" +"エレベーター制御システムでイベントを表すデータ構造を作成します。さまざまなイベン" +"トを構築するための型と関数を自由に定義して構いません。`#[derive(Debug)]` を使用" +"して、型を `{:?}` でフォーマットできるようにします。" #: src/user-defined-types/exercise.md msgid "" "This exercise only requires creating and populating data structures so that " -"`main` runs without errors. The next part of the course will cover getting " -"data out of these structures." +"`main` runs without errors. The next part of the course will cover getting data " +"out of these structures." msgstr "" -"この演習に必要なのは、`main` がエラーなしで実行されるように、データ構造を作成" -"して入力することだけです。このコースの次のパートでは、これらの構造からデータ" -"を取得する方法を説明します。" +"この演習に必要なのは、`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" +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" @@ -4969,8 +4831,7 @@ 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" +"/// A directional button was pressed in an elevator lobby on the given floor.\n" msgstr "/// 所定の階のエレベーター ロビーで方向ボタンが押された。\n" #: src/user-defined-types/exercise.md src/user-defined-types/solution.md @@ -5042,8 +4903,8 @@ msgid "" "Now that we have seen a fair amount of Rust, today will focus on Rust's type " "system:" msgstr "" -"Rust についてかなり多くのことを学んできましたが、今日は Rust の型システムに焦" -"点を当てます。" +"Rust についてかなり多くのことを学んできましたが、今日は Rust の型システムに焦点" +"を当てます。" #: src/welcome-day-2.md msgid "Pattern matching: extracting data from structures." @@ -5062,8 +4923,7 @@ msgid "Generics: parameterizing types on other types." msgstr "ジェネリクス: 他の型での型のパラメータ化。" #: src/welcome-day-2.md -msgid "" -"Standard library types and traits: a tour of Rust's rich standard library." +msgid "Standard library types and traits: a tour of Rust's rich standard library." msgstr "標準ライブラリの型とトレイト: Rust の豊富な標準ライブラリの紹介。" #: src/welcome-day-2.md @@ -5080,11 +4940,11 @@ msgstr "このセグメントの所要時間は約 1 時間です" #: src/pattern-matching/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." +"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 つ以上のパターンに対して値を照合できます。" -"上から順に照合が行われ、最初に一致したパターンのみが実行されます。" +"`match` キーワードを使用すると、1 つ以上のパターンに対して値を照合できます。上か" +"ら順に照合が行われ、最初に一致したパターンのみが実行されます。" #: src/pattern-matching/match.md msgid "The patterns can be simple values, similarly to `switch` in C and C++:" @@ -5102,9 +4962,9 @@ msgstr "'q'" msgid "\"Quitting\"" msgstr "\"Quitting\"" -#: src/pattern-matching/match.md src/generics/exercise.md -#: src/generics/solution.md src/std-traits/solution.md -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/pattern-matching/match.md src/generics/exercise.md src/generics/solution.md +#: src/std-traits/solution.md src/error-handling/exercise.md +#: src/error-handling/solution.md msgid "'a'" msgstr "'a'" @@ -5149,13 +5009,13 @@ msgstr "\"Something else\"" #: src/pattern-matching/match.md #, fuzzy msgid "" -"The `_` pattern is a wildcard pattern which matches any value. The " -"expressions _must_ be exhaustive, meaning that it covers every possibility, " -"so `_` is often used as the final catch-all case." +"The `_` pattern is a wildcard pattern which matches any value. The expressions " +"_must_ be exhaustive, meaning that it covers every possibility, so `_` is often " +"used as the final catch-all case." msgstr "" -"`_` パターンは、任意の値に一致するワイルドカード パターンです。式は論駁不可能" -"でなければなりません。つまり、あらゆる可能性をカバーする必要があるため、最後" -"のキャッチオール ケースとして `_` がよく使用されます。" +"`_` パターンは、任意の値に一致するワイルドカード パターンです。式は論駁不可能で" +"なければなりません。つまり、あらゆる可能性をカバーする必要があるため、最後の" +"キャッチオール ケースとして `_` がよく使用されます。" #: src/pattern-matching/match.md msgid "" @@ -5163,17 +5023,17 @@ msgid "" "the same type. The type is the last expression of the block, if any. In the " "example above, the type is `()`." msgstr "" -"一致を式として使用できます。`if` と同様に、各マッチアームは同じ型にする必要が" -"あります。型は、ブロックの最後の式です(存在する場合)。上記の例では、型は " -"`()` です。" +"一致を式として使用できます。`if` と同様に、各マッチアームは同じ型にする必要があ" +"ります。型は、ブロックの最後の式です(存在する場合)。上記の例では、型は `()` で" +"す。" #: src/pattern-matching/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`)により、マッチアーム内で使用できるバイン" -"ディングが作成されます。" +"パターンの変数(この例では `key`)により、マッチアーム内で使用できるバインディン" +"グが作成されます。" #: src/pattern-matching/match.md msgid "A match guard causes the arm to match only if the condition is true." @@ -5203,24 +5063,23 @@ msgstr "`_` はワイルドカードを表す" #: src/pattern-matching/match.md msgid "" -"Match guards as a separate syntax feature are important and necessary when " -"we wish to concisely express more complex ideas than patterns alone would " -"allow." +"Match guards as a separate syntax feature are important and necessary when we " +"wish to concisely express more complex ideas than patterns alone would allow." msgstr "" -"パターンのみでは表現できない複雑な概念を簡潔に表現したい場合、独立した構文機" -"能であるマッチガードは重要かつ必要です。" +"パターンのみでは表現できない複雑な概念を簡潔に表現したい場合、独立した構文機能で" +"あるマッチガードは重要かつ必要です。" #: src/pattern-matching/match.md msgid "" -"They are not the same as separate `if` expression inside of the match arm. " -"An `if` expression inside of the branch block (after `=>`) happens after the " -"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." +"They are not the same as separate `if` expression inside of the match arm. An " +"`if` expression inside of the branch block (after `=>`) happens after the 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` 式の他のアームは考慮" -"されません。" +"(`=>` の後)の `if` 式は、マッチアームが選択された後に実行されます。そのブロッ" +"ク内で `if` 条件が満たされなかった場合、元の `match` 式の他のアームは考慮されま" +"せん。" #: src/pattern-matching/match.md msgid "" @@ -5236,8 +5095,8 @@ msgstr "その他" #: src/pattern-matching/match.md msgid "" -"Another piece of pattern syntax you can show students is the `@` syntax " -"which binds a part of a pattern to a variable. For example:" +"Another piece of pattern syntax you can show students is the `@` syntax which " +"binds a part of a pattern to a variable. For example:" msgstr "" #: src/pattern-matching/match.md @@ -5246,10 +5105,10 @@ msgstr "" #: src/pattern-matching/match.md msgid "" -"In this example `inner` has the value 123 which it pulled from the `Option` " -"via destructuring, `outer` captures the entire `Some(inner)` expression, so " -"it contains the full `Option::Some(123)`. This is rarely used but can be " -"useful in more complex patterns." +"In this example `inner` has the value 123 which it pulled from the `Option` via " +"destructuring, `outer` captures the entire `Some(inner)` expression, so it " +"contains the full `Option::Some(123)`. This is rarely used but can be useful in " +"more complex patterns." msgstr "" #: src/pattern-matching/destructuring-structs.md @@ -5280,8 +5139,7 @@ msgstr "`foo` のリテラル値を他のパターンと一致するように変 #: src/pattern-matching/destructuring-structs.md msgid "Add a new field to `Foo` and make changes to the pattern as needed." -msgstr "" -"`Foo` に新しいフィールドを追加し、必要に応じてパターンに変更を加えます。" +msgstr "`Foo` に新しいフィールドを追加し、必要に応じてパターンに変更を加えます。" #: src/pattern-matching/destructuring-structs.md msgid "" @@ -5289,9 +5147,9 @@ 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` に変更して、再" -"び動作することを確認します。" +"キャプチャと定数式を区別しづらい場合があります。2 つ目のアームの `2` を変数に変" +"更してみて、うまく機能しないことを確認します。これを `const` に変更して、再び動" +"作することを確認します。" #: src/pattern-matching/destructuring-enums.md #, fuzzy @@ -5302,11 +5160,11 @@ msgstr "" #: src/pattern-matching/destructuring-enums.md msgid "" "Patterns can also be used to bind variables to parts of your values. This is " -"how you inspect the structure of your types. Let us start with a simple " -"`enum` type:" +"how you inspect the structure of your types. Let us start with a simple `enum` " +"type:" msgstr "" -"パターンは、変数を値の一部にバインドするためにも使用できます。以下のようにし" -"て、型の構造を調べることができます。単純な `enum` から始めましょう。" +"パターンは、変数を値の一部にバインドするためにも使用できます。以下のようにして、" +"型の構造を調べることができます。単純な `enum` から始めましょう。" #: src/pattern-matching/destructuring-enums.md msgid "\"cannot divide {n} into two equal parts\"" @@ -5323,19 +5181,18 @@ msgstr "\"sorry, an error happened: {msg}\"" #: src/pattern-matching/destructuring-enums.md msgid "" "Here we have used the arms to _destructure_ the `Result` value. In the first " -"arm, `half` is bound to the value inside the `Ok` variant. In the second " -"arm, `msg` is bound to the error message." +"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` がエラー メッセージにバインドされます。" +"ここでは、アーム(arm, パターンを並べたもの)を使用して `Result` 値の分解を行っ" +"ています。最初のアームでは、`half` は `Ok` バリアント内の値にバインドされます。" +"2 つ目のアームでは `msg` がエラー メッセージにバインドされます。" #: src/pattern-matching/destructuring-enums.md msgid "" -"The `if`/`else` expression is returning an enum that is later unpacked with " -"a `match`." -msgstr "" -"`if`/`else` 式は、後で `match` でアンパックされる列挙型を返しています。" +"The `if`/`else` expression is returning an enum that is later unpacked with a " +"`match`." +msgstr "`if`/`else` 式は、後で `match` でアンパックされる列挙型を返しています。" #: src/pattern-matching/destructuring-enums.md msgid "" @@ -5343,32 +5200,31 @@ 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 つ目のバリアント(列挙型の要素のこと)を追加し、コード実行時" -"にエラーを表示してみましょう。コードが網羅されていない箇所を示し、コンパイラ" -"がどのようにヒントを提供しようとしているかを説明します。" +"列挙型の定義に 3 つ目のバリアント(列挙型の要素のこと)を追加し、コード実行時に" +"エラーを表示してみましょう。コードが網羅されていない箇所を示し、コンパイラがどの" +"ようにヒントを提供しようとしているかを説明します。" #: src/pattern-matching/destructuring-enums.md msgid "" "The values in the enum variants can only be accessed after being pattern " "matched." -msgstr "" -"列挙型バリアントの値には、パターンが一致した場合にのみアクセスできます。" +msgstr "列挙型バリアントの値には、パターンが一致した場合にのみアクセスできます。" #: src/pattern-matching/destructuring-enums.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 コンパイラの利点を強調します。" +"検索が網羅的でない場合にどうなるかを示します。すべてのケースが処理されるタイミン" +"グを確認することで、Rust コンパイラの利点を強調します。" #: 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:" +"Rust has a few control flow constructs which differ from other languages. They " +"are used for pattern matching:" msgstr "" -"Rust には、他の言語とは異なる制御フロー構造がいくつかあります。これらはパター" -"ン マッチングに使用されます。" +"Rust には、他の言語とは異なる制御フロー構造がいくつかあります。これらはパターン " +"マッチングに使用されます。" #: src/pattern-matching/let-control-flow.md msgid "`if let` expressions" @@ -5388,9 +5244,9 @@ 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) を使用すると、値がパターンに一致するかどうかに応じて" -"異なるコードを実行できます。" +"[`if let` 式](https://doc.rust-lang.org/reference/expressions/if-expr.html#if-" +"let-expressions) を使用すると、値がパターンに一致するかどうかに応じて異なるコー" +"ドを実行できます。" #: src/pattern-matching/let-control-flow.md #, fuzzy @@ -5399,15 +5255,15 @@ msgstr "\"slept for {:?}\"" #: src/pattern-matching/let-control-flow.md msgid "" -"For the common case of matching a pattern and returning from the function, " -"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/" -"let_else.html). The \"else\" case must diverge (`return`, `break`, or panic " -"- anything but falling off the end of the block)." +"For the common case of matching a pattern and returning from the function, use " +"[`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/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`、パニックな" -"ど、ブロックから抜けるもの以外のすべて)。" +"パターンをマッチして関数から戻るという一般的なケースでは、[`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 "\"not a hex digit\"" @@ -5426,8 +5282,8 @@ msgid "\"result: {:?}\"" msgstr "\"result: {:?}\"" #: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md -#: src/smart-pointers/solution.md src/testing/solution.md -#: src/android/testing.md src/android/testing/googletest.md +#: src/smart-pointers/solution.md src/testing/solution.md src/android/testing.md +#: src/android/testing/googletest.md msgid "\"foo\"" msgstr "\"foo\"" @@ -5437,21 +5293,20 @@ 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) 派生物もあります。これ" -"は、パターンに照らして値をテストします。" +"`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 "" -"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct." -"String.html#method.pop) returns `Some(c)` until the string is empty, after " -"which it will return `None`. The `while let` lets us keep iterating through " -"all items." +"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.String." +"html#method.pop) returns `Some(c)` until the string is empty, after 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` を使用すると、すべてのアイテムに対して反復処理" -"を続行できます。" +"`None` を返します。`while let` を使用すると、すべてのアイテムに対して反復処理を" +"続行できます。" #: src/pattern-matching/let-control-flow.md msgid "if-let" @@ -5459,11 +5314,11 @@ 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`." +"Unlike `match`, `if let` does not have to cover all branches. This can make it " +"more concise than `match`." msgstr "" -"`match` とは異なり、`if let` ではすべての分岐を網羅する必要はないため、" -"`match` よりも簡潔になります。" +"`match` とは異なり、`if let` ではすべての分岐を網羅する必要はないため、`match` " +"よりも簡潔になります。" #: src/pattern-matching/let-control-flow.md msgid "A common usage is handling `Some` values when working with `Option`." @@ -5474,8 +5329,8 @@ msgstr "" msgid "" "Unlike `match`, `if let` does not support guard clauses for pattern matching." msgstr "" -"`match` とは異なり、`if let` はパターン マッチングでガード節をサポートしてい" -"ません。" +"`match` とは異なり、`if let` はパターン マッチングでガード節をサポートしていませ" +"ん。" #: src/pattern-matching/let-control-flow.md msgid "let-else" @@ -5483,13 +5338,13 @@ msgstr "let-else" #: src/pattern-matching/let-control-flow.md msgid "" -"`if-let`s can pile up, as shown. The `let-else` construct supports " -"flattening this nested code. Rewrite the awkward version for students, so " -"they can see the transformation." +"`if-let`s can pile up, as shown. The `let-else` construct supports flattening " +"this nested code. Rewrite the awkward version for students, so they can see the " +"transformation." msgstr "" -"次に示すように、`if let` は積み重なってしまうことがあります。`let-else` の構" -"成は、このネストされたコードを平坦にする助けとなります。読みづらいバージョン" -"を受講者向けに書き直して、受講者が変化を確認できるようにします。" +"次に示すように、`if let` は積み重なってしまうことがあります。`let-else` の構成" +"は、このネストされたコードを平坦にする助けとなります。読みづらいバージョンを受講" +"者向けに書き直して、受講者が変化を確認できるようにします。" #: src/pattern-matching/let-control-flow.md msgid "The rewritten version is:" @@ -5504,18 +5359,17 @@ msgid "" "Point out that the `while let` loop will keep going as long as the value " "matches the pattern." msgstr "" -"値がパターンに一致する限り、`while let` ループが繰り返されることを説明しま" -"す。" +"値がパターンに一致する限り、`while let` ループが繰り返されることを説明します。" #: src/pattern-matching/let-control-flow.md msgid "" -"You could rewrite the `while let` loop as an infinite loop with an if " -"statement that breaks when there is no value to unwrap for `name.pop()`. The " -"`while let` provides syntactic sugar for the above scenario." +"You could rewrite the `while let` loop as an infinite loop with an if 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` は、上" -"記のシナリオの糖衣構文として使用できます。" +"`while let` ループを無限ループに書き換えることができます。`while let` は、上記の" +"シナリオの糖衣構文として使用できます。" #: src/pattern-matching/exercise.md msgid "Let's write a simple recursive evaluator for arithmetic expressions." @@ -5523,14 +5377,14 @@ msgstr "演算式用の簡単な再帰エバリュエータを作成してみま #: src/pattern-matching/exercise.md msgid "" -"An example of a small arithmetic expression could be `10 + 20`, which " -"evaluates to `30`. We can represent the expression as a tree:" +"An example of a small arithmetic expression could be `10 + 20`, which evaluates " +"to `30`. We can represent the expression as a tree:" msgstr "" #: src/pattern-matching/exercise.md msgid "" -"A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, " -"which evaluate to `85`. We represent this as a much bigger tree:" +"A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, which " +"evaluate to `85`. We represent this as a much bigger tree:" msgstr "" #: src/pattern-matching/exercise.md @@ -5555,40 +5409,39 @@ msgstr "/// リテラル値\n" #: src/pattern-matching/exercise.md msgid "" -"The `Box` type here is a smart pointer, and will be covered in detail later " -"in the course. An expression can be \"boxed\" with `Box::new` as seen in the " +"The `Box` type here is a smart pointer, and will be covered in detail later in " +"the course. An expression can be \"boxed\" with `Box::new` as seen in the " "tests. To evaluate a boxed expression, use the deref operator (`*`) to " "\"unbox\" it: `eval(*boxed_expr)`." msgstr "" -"ここでの `Box` 型はスマート ポインタです。詳細はこの講座で後ほど説明します。" -"テストで見られるように、式は `Box::new` で「ボックス化」できます。ボックス化" -"された式を評価するには、逆参照演算子(`*`)を使用して「ボックス化解除」します" +"ここでの `Box` 型はスマート ポインタです。詳細はこの講座で後ほど説明します。テス" +"トで見られるように、式は `Box::new` で「ボックス化」できます。ボックス化された式" +"を評価するには、逆参照演算子(`*`)を使用して「ボックス化解除」します" "(`eval(*boxed_expr)`)。" #: src/pattern-matching/exercise.md msgid "" "Some expressions cannot be evaluated and will return an error. The standard " "[`Result`](https://doc.rust-lang.org/std/result/enum.Result." -"html) type is an enum that represents either a successful value " -"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail " -"later." +"html) type is an enum that represents either a successful value (`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)`)のいずれかを表す列挙型です。この" -"型については、後ほど詳しく説明します。" +"(`Ok(Value)`)またはエラー(`Err(String)`)のいずれかを表す列挙型です。この型に" +"ついては、後ほど詳しく説明します。" #: src/pattern-matching/exercise.md msgid "" "Copy and paste the code into the Rust playground, and begin implementing " -"`eval`. The final product should pass the tests. It may be helpful to use " -"`todo!()` and get the tests to pass one-by-one. You can also skip a test " -"temporarily with `#[ignore]`:" +"`eval`. The final product should pass the tests. It may be helpful to use `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]` を使用して、" -"テストを一時的にスキップすることもできます。" +"コードをコピーして Rust プレイグラウンドに貼り付け、`eval` の実装を開始します。" +"完成したエバリュエータはテストに合格する必要があります。`todo!()` を使用して、テ" +"ストを 1 つずつ実施することをおすすめします。`#[ignore]` を使用して、テストを一" +"時的にスキップすることもできます。" #: src/pattern-matching/exercise.md src/pattern-matching/solution.md msgid "\"division by zero\"" @@ -5601,8 +5454,8 @@ msgstr "\"expr: {:?}\"" #: src/methods-and-traits/methods.md msgid "" -"Rust allows you to associate functions with your new types. You do this with " -"an `impl` block:" +"Rust allows you to associate functions with your new types. You do this with an " +"`impl` block:" msgstr "" "Rust を使用すると、関数を新しい型に関連付けることができます。これは `impl` ブ" "ロックで実行します。" @@ -5646,27 +5499,27 @@ 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:" +"The `self` arguments specify the \"receiver\" - the object the method acts on. " +"There are several common receivers for a method:" msgstr "" -"`self` 引数は、「レシーバ」、つまりメソッドが操作するオブジェクトを指定しま" -"す。メソッドの一般的なレシーバは次のとおりです。" +"`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`: 共有の不変参照を使用して、呼び出し元からオブジェクトを借用します。こ" -"のオブジェクトは後で再び使用できます。" +"`&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`: 一意の可変参照を使用して、呼び出し元からオブジェクトを借用しま" -"す。このオブジェクトは後で再び使用できます。" +"`&mut self`: 一意の可変参照を使用して、呼び出し元からオブジェクトを借用します。" +"このオブジェクトは後で再び使用できます。" #: src/methods-and-traits/methods.md msgid "" @@ -5675,10 +5528,10 @@ msgid "" "(deallocated) when the method returns, unless its ownership is explicitly " "transmitted. Complete ownership does not automatically mean mutability." msgstr "" -"`self`: オブジェクトの所有権を取得し、呼び出し元から遠ざけます。メソッドがオ" -"ブジェクトの所有者になります。所有権が明示的に送信されない限り、メソッドが戻" -"ると、オブジェクトは破棄(デアロケート)されます。完全な所有権は、必ずしも可" -"変性を意味するわけではありません。" +"`self`: オブジェクトの所有権を取得し、呼び出し元から遠ざけます。メソッドがオブ" +"ジェクトの所有者になります。所有権が明示的に送信されない限り、メソッドが戻ると、" +"オブジェクトは破棄(デアロケート)されます。完全な所有権は、必ずしも可変性を意味" +"するわけではありません。" #: src/methods-and-traits/methods.md msgid "`mut self`: same as above, but the method can mutate the object." @@ -5689,8 +5542,8 @@ msgid "" "No receiver: this becomes a static method on the struct. Typically used to " "create constructors which are called `new` by convention." msgstr "" -"レシーバなし: 構造体の静的メソッドになります。通常は、`new` と呼ばれるコンス" -"トラクタを作成するために使用されます。" +"レシーバなし: 構造体の静的メソッドになります。通常は、`new` と呼ばれるコンストラ" +"クタを作成するために使用されます。" #: src/methods-and-traits/methods.md msgid "It can be helpful to introduce methods by comparing them to functions." @@ -5701,72 +5554,71 @@ 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` として表します。" +"メソッドは型(構造体や列挙型など)のインスタンスで呼び出されます。最初のパラメー" +"タはインスタンスを `self` として表します。" #: src/methods-and-traits/methods.md msgid "" "Developers may choose to use methods to take advantage of method receiver " -"syntax and to help keep them more organized. By using methods we can keep " -"all the implementation code in one predictable place." +"syntax and to help keep them more organized. By using methods we can keep all " +"the implementation code in one predictable place." msgstr "" -"デベロッパーは、メソッド レシーバ構文でコードを整理する目的で、メソッドを使用" -"することもできます。メソッドを使用することで、すべての実装コードを 1 つの予測" -"可能な場所にまとめることができます。" +"デベロッパーは、メソッド レシーバ構文でコードを整理する目的で、メソッドを使用す" +"ることもできます。メソッドを使用することで、すべての実装コードを 1 つの予測可能" +"な場所にまとめることができます。" #: src/methods-and-traits/methods.md msgid "Point out the use of the keyword `self`, a method receiver." -msgstr "" -"メソッド レシーバである `self` というキーワードの使用について説明します。" +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." +"Show that it is an abbreviated term for `self: Self` and perhaps show how the " +"struct name could also be used." msgstr "" -"`self: Self` の略語であることを示し、構造体名の使用方法についても説明すること" -"をおすすめします。" +"`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." +"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` ブロックが存在する型の型エイリアスであり、ブロック内の他の場" -"所で使用できることを説明します。" +"`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` は他の構造体と同様に使用され、ドット表記を使用して個々のフィールドを参" -"照できることを説明します。" +"`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." +"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` の違いを示すことをおすすめ" -"します。" +"ここで `finish` を 2 回実行して、`&self` と `self` の違いを示すことをおすすめし" +"ます。" #: src/methods-and-traits/methods.md msgid "" -"Beyond variants on `self`, there are also [special wrapper types](https://" -"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be " -"receiver types, such as `Box`." +"Beyond variants on `self`, there are also [special wrapper types](https://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)" +"`self` のバリアント以外にも、レシーバ型として許可されている [特別なラッパー型]" +"(https://doc.rust-lang.org/reference/special-types-and-traits.html)" "(`Box` など)もあります。" #: src/methods-and-traits/traits.md msgid "" "Rust lets you abstract over types with traits. They're similar to interfaces:" msgstr "" -"Rustでは、型に関しての抽象化をトレイトを用いて行うことができます。トレイトは" -"インターフェースに似ています:" +"Rustでは、型に関しての抽象化をトレイトを用いて行うことができます。トレイトはイン" +"ターフェースに似ています:" #: src/methods-and-traits/traits.md #, fuzzy @@ -5780,16 +5632,15 @@ msgstr "/// 挨拶を標準出力に出力します。\n" #: src/methods-and-traits/traits.md msgid "" -"A trait defines a number of methods that types must have in order to " -"implement the trait." +"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 "" -"In the \"Generics\" segment, next, we will see how to build functionality " -"that is generic over all types implementing a trait." +"In the \"Generics\" segment, next, we will see how to build functionality that " +"is generic over all types implementing a trait." msgstr "" #: src/methods-and-traits/traits/implementing.md @@ -5809,33 +5660,31 @@ msgstr "\"Fido\"" #: src/methods-and-traits/traits/implementing.md #, fuzzy msgid "" -"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` " -"block." +"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` block." msgstr "トレイトは `impl for { .. }` ブロックに実装されます。" #: src/methods-and-traits/traits/implementing.md msgid "" -"Unlike Go interfaces, just having matching methods is not enough: a `Cat` " -"type with a `talk()` method would not automatically satisfy `Pet` unless it " -"is in an `impl Pet` block." +"Unlike Go interfaces, just having matching methods is not enough: a `Cat` type " +"with a `talk()` method would not automatically satisfy `Pet` unless it is in an " +"`impl Pet` block." msgstr "" #: src/methods-and-traits/traits/implementing.md #, fuzzy msgid "" "Traits may provide default implementations of some methods. Default " -"implementations can rely on all the methods of the trait. In this case, " -"`greet` is provided, and relies on `talk`." +"implementations can rely on all the methods of the trait. In this case, `greet` " +"is provided, and relies on `talk`." msgstr "" -"トレイトは予め実装された(デフォルトの)メソッドと、ユーザが自身で実装する必" -"要のあるメソッドを指定することができます。デフォルトの実装のあるメソッドは、" -"その定義を実装必須のメソットに依存することができます。" +"トレイトは予め実装された(デフォルトの)メソッドと、ユーザが自身で実装する必要の" +"あるメソッドを指定することができます。デフォルトの実装のあるメソッドは、その定義" +"を実装必須のメソットに依存することができます。" #: src/methods-and-traits/traits/supertraits.md msgid "" "A trait can require that types implementing it also implement other traits, " -"called _supertraits_. Here, any type implementing `Pet` must implement " -"`Animal`." +"called _supertraits_. Here, any type implementing `Pet` must implement `Animal`." msgstr "" #: src/methods-and-traits/traits/supertraits.md @@ -5849,9 +5698,9 @@ msgstr "\"{} is {} years old\"" #: src/methods-and-traits/traits/supertraits.md msgid "" -"This is sometimes called \"trait inheritance\" but students should not " -"expect this to behave like OO inheritance. It just specifies an additional " -"requirement on implementations of a trait." +"This is sometimes called \"trait inheritance\" but students should not expect " +"this to behave like OO inheritance. It just specifies an additional requirement " +"on implementations of a trait." msgstr "" #: src/methods-and-traits/traits/associated-types.md @@ -5898,8 +5747,7 @@ msgstr "\"EldurScrollz\"" #: src/methods-and-traits/deriving.md msgid "// Debug trait adds support for printing with `{:?}`.\n" -msgstr "" -"// デバッグ トレイトで、`{:?}` を使用した出力のサポートを追加します。\n" +msgstr "// デバッグ トレイトで、`{:?}` を使用した出力のサポートを追加します。\n" #: src/methods-and-traits/deriving.md #, fuzzy @@ -5912,9 +5760,9 @@ msgid "" "macros to add useful functionality. For example, `serde` can derive " "serialization support for a struct using `#[derive(Serialize)]`." msgstr "" -"導出はマクロで実装され、多くのクレートには有用な機能を追加するための便利な導" -"出マクロが用意されています。たとえば、`serde` は `#[derive(Serialize)]` を使" -"用して、構造体のシリアル化のサポートを導出できます。" +"導出はマクロで実装され、多くのクレートには有用な機能を追加するための便利な導出マ" +"クロが用意されています。たとえば、`serde` は `#[derive(Serialize)]` を使用して、" +"構造体のシリアル化のサポートを導出できます。" #: src/methods-and-traits/exercise.md #, fuzzy @@ -5924,15 +5772,14 @@ msgstr "演習: ジェネリックなロガー" #: src/methods-and-traits/exercise.md msgid "" "Let's design a simple logging utility, using a trait `Logger` with a `log` " -"method. Code which might log its progress can then take an `&impl Logger`. " -"In testing, this might put messages in the test logfile, while in a " -"production build it would send messages to a log server." +"method. Code which might log its progress can then take an `&impl Logger`. 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` を受け取ることができます。この場合、テストではテストログファイルに" -"メッセージが書き込まれますが、本番環境ビルドではログサーバーにメッセージが送" -"信されます。" +"トレイト `Logger` と `log` メソッドを使用して、シンプルなロギングユーティリティ" +"を設計してみましょう。進行状況をログに記録するコードは、その後に `&impl Logger` " +"を受け取ることができます。この場合、テストではテストログファイルにメッセージが書" +"き込まれますが、本番環境ビルドではログサーバーにメッセージが送信されます。" #: src/methods-and-traits/exercise.md #, fuzzy @@ -5941,19 +5788,19 @@ msgid "" "verbosity. Your task is to write a `VerbosityFilter` type that will ignore " "messages above a maximum verbosity." msgstr "" -"ただし、以下の `StderrLogger` は、詳細度(verbosity)に関係なく、すべてのメッ" -"セージをログに記録します。ここでのタスクは、最大の詳細度を超えるメッセージを" -"無視する `VerbosityFilter` 型を作成することです。" +"ただし、以下の `StderrLogger` は、詳細度(verbosity)に関係なく、すべてのメッセー" +"ジをログに記録します。ここでのタスクは、最大の詳細度を超えるメッセージを無視す" +"る `VerbosityFilter` 型を作成することです。" #: src/methods-and-traits/exercise.md msgid "" "This is a common pattern: a struct wrapping a trait implementation and " -"implementing that same trait, adding behavior in the process. What other " -"kinds of wrappers might be useful in a logging utility?" +"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" @@ -6008,12 +5855,12 @@ msgstr "演習: ジェネリックな `min`" #: src/generics/generic-functions.md #, fuzzy msgid "" -"Rust supports generics, which lets you abstract algorithms or data " -"structures (such as sorting or a binary tree) over the types used or stored." +"Rust supports generics, which lets you abstract algorithms or data structures " +"(such as sorting or a binary tree) over the types used or stored." msgstr "" -"Rustはジェネリクス(generics)をサポートします。これにより、使用または保存す" -"る型に関してアルゴリズムやデータ構造(ソートアルゴリズムや、二分木など)を抽" -"象化することができます。" +"Rustはジェネリクス(generics)をサポートします。これにより、使用または保存する型" +"に関してアルゴリズムやデータ構造(ソートアルゴリズムや、二分木など)を抽象化する" +"ことができます。" #: src/generics/generic-functions.md msgid "/// Pick `even` or `odd` depending on the value of `n`.\n" @@ -6038,44 +5885,42 @@ msgstr "\"cat\"" #: src/generics/generic-functions.md msgid "" -"Rust infers a type for T based on the types of the arguments and return " -"value." +"Rust infers a type for T based on the types of the arguments and return value." msgstr "Rust は引数と戻り値の型に基づいて T の型を推測します。" #: src/generics/generic-functions.md msgid "" -"In this example we only use the primitive types `i32` and `&str` for `T`, " -"but we can use any type here, including user-defined types:" +"In this example we only use the primitive types `i32` and `&str` for `T`, but " +"we can use any type here, including user-defined types:" msgstr "" #: src/generics/generic-functions.md msgid "" "This is similar to C++ templates, but Rust partially compiles the generic " -"function immediately, so that function must be valid for all types matching " -"the constraints. For example, try modifying `pick` to return `even + odd` if " -"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust " -"still considers it invalid. C++ would let you do this." +"function immediately, so that function must be valid for all types matching the " +"constraints. For example, try modifying `pick` to return `even + odd` if `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++ ではこれを行うことができます。" +"これは C++ テンプレートに似ていますが、Rust はジェネリック関数を部分的にすぐにコ" +"ンパイルするため、その関数は制約に一致するすべての型に対して有効である必要があり" +"ます。たとえば、`n == 0` の場合は `even + odd` を返すように `pick` を変更してみ" +"てください。整数を使用した `pick` インスタンス化のみが使用されている場合でも、" +"Rust はそれを無効とみなします。C++ ではこれを行うことができます。" #: src/generics/generic-functions.md #, fuzzy msgid "" -"Generic code is turned into non-generic code based on the call sites. This " -"is a zero-cost abstraction: you get exactly the same result as if you had " -"hand-coded the data structures without the abstraction." +"Generic code is turned into non-generic code based on the call sites. This is a " +"zero-cost abstraction: you get exactly the same result as if you had hand-coded " +"the data structures without the abstraction." msgstr "" -"これはゼロコスト抽象化です:抽象化なしに手作業でデータ構造を書いたときと、全" -"く同じ結果を得ることができます。" +"これはゼロコスト抽象化です:抽象化なしに手作業でデータ構造を書いたときと、全く同" +"じ結果を得ることができます。" #: src/generics/generic-data.md msgid "You can use generics to abstract over the concrete field type:" -msgstr "" -"ジェネリクスを使って、具体的なフィールドの型を抽象化することができます:" +msgstr "ジェネリクスを使って、具体的なフィールドの型を抽象化することができます:" #: src/generics/generic-data.md msgid "\"{integer:?} and {float:?}\"" @@ -6087,24 +5932,22 @@ msgstr "\"coords: {:?}\"" #: src/generics/generic-data.md msgid "" -"_Q:_ Why `T` is specified twice in `impl Point {}`? Isn't that " -"redundant?" +"_Q:_ Why `T` is specified twice in `impl Point {}`? Isn't that redundant?" msgstr "" -"_Q:_ なぜ`T`は2回も `impl Point {}` において指定されたのでしょうか?冗" -"長ではありませんか?" +"_Q:_ なぜ`T`は2回も `impl Point {}` において指定されたのでしょうか?冗長" +"ではありませんか?" #: src/generics/generic-data.md msgid "" -"This is because it is a generic implementation section for generic type. " -"They are independently generic." +"This is because it is a generic implementation section for generic type. They " +"are independently generic." msgstr "" -"なぜなら、これはジェネリクスに対してのジェネリックな実装の箇所だからです。そ" -"れらは独立してジェネリックです。" +"なぜなら、これはジェネリクスに対してのジェネリックな実装の箇所だからです。それら" +"は独立してジェネリックです。" #: src/generics/generic-data.md msgid "It means these methods are defined for any `T`." -msgstr "" -"つまり、そのようなメソッドは任意の`T`に対して定義されるということです。" +msgstr "つまり、そのようなメソッドは任意の`T`に対して定義されるということです。" #: src/generics/generic-data.md #, fuzzy @@ -6116,24 +5959,23 @@ msgid "" "`Point` is still generic and you can use `Point`, but methods in this " "block will only be available for `Point`." msgstr "" -"`Point`はそれでもなおジェネリックであり、 `Point`を使うことができます。" -"しかし、このブロックでのメソッドは`Point`に対してのみ利用可能となりま" -"す。" +"`Point`はそれでもなおジェネリックであり、 `Point`を使うことができます。しか" +"し、このブロックでのメソッドは`Point`に対してのみ利用可能となります。" #: src/generics/generic-data.md msgid "" "Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the " -"code to allow points that have elements of different types, by using two " -"type variables, e.g., `T` and `U`." +"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` など)を使用して、異なる型の要素を持つポイントを許可するよう" -"にコードを更新します。" +"新しい変数 `let p = Point { x: 5, y: 10.0 };` を宣言してみてください。2 つの変数" +"(`T` と `U` など)を使用して、異なる型の要素を持つポイントを許可するようにコー" +"ドを更新します。" #: src/generics/generic-traits.md msgid "" -"Traits can also be generic, just like types and functions. A trait's " -"parameters get concrete types when it is used." +"Traits can also be generic, just like types and functions. A trait's parameters " +"get concrete types when it is used." msgstr "" #: src/generics/generic-traits.md @@ -6157,23 +5999,23 @@ msgstr "" #: src/generics/generic-traits.md msgid "" -"Implementations of the trait do not need to cover all possible type " -"parameters. Here, `Foo::from(\"hello\")` would not compile because there is " -"no `From<&str>` implementation for `Foo`." +"Implementations of the trait do not need to cover all possible type parameters. " +"Here, `Foo::from(\"hello\")` would not compile because there is no `From<&str>` " +"implementation for `Foo`." msgstr "" #: src/generics/generic-traits.md msgid "" "Generic traits take types as \"input\", while associated types are a kind of " -"\"output\" type. A trait can have multiple implementations for different " -"input types." +"\"output\" type. A trait can have multiple implementations for different input " +"types." msgstr "" #: src/generics/generic-traits.md msgid "" -"In fact, Rust requires that at most one implementation of a trait match for " -"any type T. Unlike some other languages, Rust has no heuristic for choosing " -"the \"most specific\" match. There is work on adding this support, called " +"In fact, Rust requires that at most one implementation of a trait match for any " +"type T. Unlike some other languages, Rust has no heuristic for choosing the " +"\"most specific\" match. There is work on adding this support, called " "[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization." "html)." msgstr "" @@ -6183,12 +6025,11 @@ msgid "" "When working with generics, you often want to require the types to implement " "some trait, so that you can call this trait's methods." msgstr "" -"ジェネリクスを用いるとき、あるトレイトのメソッドを呼び出せるように、型がその" -"トレイトを実装していることを要求したいことがよくあります。(脚注:本教材では" -"\"Trait bounds\"を「トレイト制約」と翻訳しましたが、Rustの日本語翻訳コミュニ" -"ティでは「トレイト境界」と呼ぶ流派もあり、どちらの翻訳を採用するかについては" -"[議論がなされています](https://github.com/rust-lang-ja/book-ja/" -"issues/172)。)" +"ジェネリクスを用いるとき、あるトレイトのメソッドを呼び出せるように、型がそのトレ" +"イトを実装していることを要求したいことがよくあります。(脚注:本教材では\"Trait " +"bounds\"を「トレイト制約」と翻訳しましたが、Rustの日本語翻訳コミュニティでは「ト" +"レイト境界」と呼ぶ流派もあり、どちらの翻訳を採用するかについては[議論がなされて" +"います](https://github.com/rust-lang-ja/book-ja/issues/172)。)" #: src/generics/trait-bounds.md #, fuzzy @@ -6216,14 +6057,14 @@ msgstr "複数のトレイトが必要な場合は、`+` を使って結合し #: src/generics/trait-bounds.md msgid "Show a `where` clause, students will encounter it when reading code." msgstr "" -"`where` 節の使い方を示しましょう。受講生はコードを読んでいるときに、この" -"`where`節に遭遇します。" +"`where` 節の使い方を示しましょう。受講生はコードを読んでいるときに、この`where`" +"節に遭遇します。" #: src/generics/trait-bounds.md msgid "It declutters the function signature if you have many parameters." msgstr "" -"たくさんのパラメタがある場合に、`where`節は関数のシグネチャを整理整頓してくれ" -"ます。" +"たくさんのパラメタがある場合に、`where`節は関数のシグネチャを整理整頓してくれま" +"す。" #: src/generics/trait-bounds.md msgid "It has additional features making it more powerful." @@ -6231,8 +6072,8 @@ msgstr "`where`節には更に強力な機能があります。" #: src/generics/trait-bounds.md msgid "" -"If someone asks, the extra feature is that the type on the left of \":\" can " -"be arbitrary, like `Option`." +"If someone asks, the extra feature is that the type on the left of \":\" can be " +"arbitrary, like `Option`." msgstr "" "誰かに聞かれた場合で良いですが、その機能というのは、\":\" の左側には " "`Option` のように任意の型を表現できるというものです。" @@ -6243,16 +6084,16 @@ msgid "" "original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`." msgstr "" "なお、Rust はまだ特化(specialization)をサポートしていません。たとえば、元の " -"`duplicate` がある場合は、特化された `duplicate(a: u32)` を追加することはでき" -"ません。" +"`duplicate` がある場合は、特化された `duplicate(a: u32)` を追加することはできま" +"せん。" #: src/generics/impl-trait.md msgid "" "Similar to trait bounds, an `impl Trait` syntax can be used in function " "arguments and return values:" msgstr "" -"トレイト境界と似たように、構文 `impl Trait`は関数の引数と返り値においてのみ利" -"用可能です:" +"トレイト境界と似たように、構文 `impl Trait`は関数の引数と返り値においてのみ利用" +"可能です:" #: src/generics/impl-trait.md msgid "" @@ -6277,8 +6118,8 @@ msgstr "\"debuggable: {debuggable:?}\"" #: src/generics/impl-trait.md #, fuzzy msgid "" -"`impl Trait` allows you to work with types which you cannot name. The " -"meaning of `impl Trait` is a bit different in the different positions." +"`impl Trait` allows you to work with types which you cannot name. The meaning " +"of `impl Trait` is a bit different in the different positions." msgstr "`impl Trait`の意味は、位置によって少し異なります。" #: src/generics/impl-trait.md @@ -6286,8 +6127,8 @@ msgid "" "For a parameter, `impl Trait` is like an anonymous generic parameter with a " "trait bound." msgstr "" -"パラメタに対しては、`impl Trait`は、トレイト境界を持つ匿名のジェネリックパラ" -"メタのようなものです。" +"パラメタに対しては、`impl Trait`は、トレイト境界を持つ匿名のジェネリックパラメタ" +"のようなものです。" #: src/generics/impl-trait.md msgid "" @@ -6295,33 +6136,32 @@ msgid "" "implements the trait, without naming the type. This can be useful when you " "don't want to expose the concrete type in a public API." msgstr "" -"返り値の型に用いる場合は、特定のトレイトを実装する何らかの具象型を返すが、具" -"体的な型名は明示しないということを意味します。このことは公開されるAPIに具象型" -"を晒したくない場合に便利です。" +"返り値の型に用いる場合は、特定のトレイトを実装する何らかの具象型を返すが、具体的" +"な型名は明示しないということを意味します。このことは公開されるAPIに具象型を晒し" +"たくない場合に便利です。" #: src/generics/impl-trait.md msgid "" -"Inference is hard in return position. A function returning `impl Foo` picks " -"the concrete type it returns, without writing it out in the source. A " -"function returning a generic type like `collect() -> B` can return any " -"type satisfying `B`, and the caller may need to choose one, such as with " -"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::" -">()`." +"Inference is hard in return position. A function returning `impl Foo` picks the " +"concrete type it returns, without writing it out in the source. A function " +"returning a generic type like `collect() -> B` can return any type " +"satisfying `B`, and the caller may need to choose one, such as with `let x: " +"Vec<_> = foo.collect()` or with the turbofish, `foo.collect::>()`." msgstr "" -"返り値の位置における型推論は困難です。`impl Foo`を返す関数は、それが返す具象" -"型はソースコードに書かれることないまま、具象型を選びます。`collect() -> B`" -"のようなジェネリック型を返す関数は、`B`を満たすどのような型でも返すことがあり" -"ます。 また、関数の呼び出し元はそのような型を一つを選ぶ必要があるかもしれませ" -"ん。 それは、 `let x: Vec<_> = foo.collect()`としたり、turbofishを用いて`foo." -"collect::>()`とすることで行えます。" +"返り値の位置における型推論は困難です。`impl Foo`を返す関数は、それが返す具象型は" +"ソースコードに書かれることないまま、具象型を選びます。`collect() -> B`のよう" +"なジェネリック型を返す関数は、`B`を満たすどのような型でも返すことがあります。 ま" +"た、関数の呼び出し元はそのような型を一つを選ぶ必要があるかもしれません。 それ" +"は、 `let x: Vec<_> = foo.collect()`としたり、turbofishを用いて`foo.collect::" +">()`とすることで行えます。" #: src/generics/impl-trait.md msgid "" -"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what " -"the error message shows." +"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what the " +"error message shows." msgstr "" -"`debuggable` の型は何でしょうか。`let debuggable: () = ..` を試して、エラー " -"メッセージの内容を確認してください。" +"`debuggable` の型は何でしょうか。`let debuggable: () = ..` を試して、エラー メッ" +"セージの内容を確認してください。" #: src/generics/dyn-trait.md msgid "" @@ -6347,12 +6187,11 @@ msgstr "" #: src/generics/dyn-trait.md msgid "" -"Generics, including `impl Trait`, use monomorphization to create a " -"specialized instance of the function for each different type that the " -"generic is instantiated with. This means that calling a trait method from " -"within a generic function still uses static dispatch, as the compiler has " -"full type information and can resolve which type's trait implementation to " -"use." +"Generics, including `impl Trait`, use monomorphization to create a specialized " +"instance of the function for each different type that the generic is " +"instantiated with. This means that calling a trait method from within a generic " +"function still uses static dispatch, as the compiler has full type information " +"and can resolve which type's trait implementation to use." msgstr "" #: src/generics/dyn-trait.md @@ -6373,13 +6212,12 @@ msgstr "" #: src/generics/dyn-trait.md msgid "" "At runtime, a `&dyn Pet` is represented as a \"fat pointer\", i.e. a pair of " -"two pointers: One pointer points to the concrete object that implements " -"`Pet`, and the other points to the vtable for the trait implementation for " -"that type. When calling the `talk` method on `&dyn Pet` the compiler looks " -"up the function pointer for `talk` in the vtable and then invokes the " -"function, passing the pointer to the `Dog` or `Cat` into that function. The " -"compiler doesn't need to know the concrete type of the `Pet` in order to do " -"this." +"two pointers: One pointer points to the concrete object that implements `Pet`, " +"and the other points to the vtable for the trait implementation for that type. " +"When calling the `talk` method on `&dyn Pet` the compiler looks up the function " +"pointer for `talk` in the vtable and then invokes the function, passing the " +"pointer to the `Dog` or `Cat` into that function. The compiler doesn't need to " +"know the concrete type of the `Pet` in order to do this." msgstr "" #: src/generics/dyn-trait.md @@ -6392,11 +6230,11 @@ msgstr "" #, fuzzy msgid "" "In this short exercise, you will implement a generic `min` function that " -"determines the minimum of two values, using the [`Ord`](https://doc.rust-" -"lang.org/stable/std/cmp/trait.Ord.html) trait." +"determines the minimum of two values, using the [`Ord`](https://doc.rust-lang." +"org/stable/std/cmp/trait.Ord.html) trait." msgstr "" -"この短い演習では、`LessThan` トレイトを使用して、2 つの値の最小値を決定する" -"ジェネリックな `min` 関数を実装します。" +"この短い演習では、`LessThan` トレイトを使用して、2 つの値の最小値を決定するジェ" +"ネリックな `min` 関数を実装します。" #: src/generics/exercise.md msgid "// TODO: implement the `min` function used in `main`.\n" @@ -6436,8 +6274,8 @@ msgid "" "html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum." "Ordering.html) enum." msgstr "" -"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) と " -"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)" +"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) と [`OsString`]" +"(https://doc.rust-lang.org/std/ffi/struct.OsString.html)" #: src/std-types.md src/std-types/option.md msgid "Option" @@ -6464,47 +6302,45 @@ 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 "" -"Rust comes with a standard library which helps establish a set of common " -"types used by Rust libraries and programs. This way, two libraries can work " -"together smoothly because they both use the same `String` type." +"Rust comes with a standard library which helps establish a set of common 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` 型を使用しているた" -"めです。" +"Rust には、Rust のライブラリとプログラムで使用される一般的な型のセットを確立する" +"のに役立つ標準ライブラリが付属しています。2 つのライブラリをスムーズに連携させる" +"ことができるのは、このように両方とも同じ `String` 型を使用しているためです。" #: src/std-types/std.md msgid "" -"In fact, Rust contains several layers of the Standard Library: `core`, " -"`alloc` and `std`." +"In fact, Rust contains several layers of the Standard Library: `core`, `alloc` " +"and `std`." msgstr "" -"実際、Rust には標準ライブラリ(`core`、`alloc`、`std`)の複数のレイヤが含まれ" -"ています。" +"実際、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." +"`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` やアロケータ、さらにはオペレーティング システムの存在にも" -"依存しない、最も基本的な型と関数が含まれます。" +"`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` など、グローバルヒープアロケータを必要とす" -"る型が含まれます。" +"`alloc` には、`Vec`、`Box`、`Arc` など、グローバルヒープアロケータを必要とする型" +"が含まれます。" #: src/std-types/std.md -msgid "" -"Embedded Rust applications often only use `core`, and sometimes `alloc`." +msgid "Embedded Rust applications often only use `core`, and sometimes `alloc`." msgstr "" "多くの場合、埋め込みの Rust アプリは `core` のみを使用し、場合によっては " "`alloc` を使用します。" @@ -6519,13 +6355,13 @@ msgid "" "All of the details about [loops](https://doc.rust-lang.org/stable/reference/" "expressions/loop-expr.html)." msgstr "" -"ループから早く抜け出したい場合は [`break`](https://doc.rust-lang.org/" -"reference/expressions/loop-expr.html#break-expressions) を使用してください。" +"ループから早く抜け出したい場合は [`break`](https://doc.rust-lang.org/reference/" +"expressions/loop-expr.html#break-expressions) を使用してください。" #: src/std-types/docs.md msgid "" -"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive." -"u8.html)." +"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) のようなプリミ" "ティブ型。" @@ -6533,8 +6369,8 @@ msgstr "" #: src/std-types/docs.md msgid "" "Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/" -"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/" -"std/collections/struct.BinaryHeap.html)." +"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." @@ -6550,8 +6386,7 @@ msgstr "実際、独自のコードにドキュメントをつけることがで #: src/std-types/docs.md msgid "" -"/// Determine whether the first argument is divisible by the second " -"argument.\n" +"/// Determine whether the first argument is divisible by the second argument.\n" "///\n" "/// If the second argument is zero, the result is false.\n" msgstr "" @@ -6563,47 +6398,45 @@ msgstr "" msgid "" "The contents are treated as Markdown. All published Rust library crates are " "automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]" -"(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." +"(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 でドキュメ" -"ント化するのが慣用的です。" +"コンテンツはマークダウンとして扱われます。公開されたすべての 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\":" +"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" +"//! This module contains functionality relating to divisibility of integers.\n" msgstr "//! このモジュールには、整数の整除に関連する機能が含まれています。\n" #: src/std-types/docs.md msgid "" -"Show students the generated docs for the `rand` crate at ." +"Show students the generated docs for the `rand` crate at ." msgstr "" -" で `rand` クレート用に生成されたドキュメントを受講者に" -"示します。" +" で `rand` クレート用に生成されたドキュメントを受講者に示" +"します。" #: src/std-types/option.md msgid "" -"We have already seen some use of `Option`. It stores either a value of " -"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/" -"stable/std/string/struct.String.html#method.find) returns an `Option`." +"We have already seen some use of `Option`. It stores either a value of 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` を返します。" +"`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\"" @@ -6635,32 +6468,31 @@ msgid "" "`unwrap` will return the value in an `Option`, or panic. `expect` is similar " "but takes an error message." msgstr "" -"`unwrap` は `Option` 内の値を返すか、パニックになります。`expect` も同様です" -"が、エラーメッセージを受け取ります。" +"`unwrap` は `Option` 内の値を返すか、パニックになります。`expect` も同様ですが、" +"エラーメッセージを受け取ります。" #: src/std-types/option.md msgid "" -"You can panic on None, but you can't \"accidentally\" forget to check for " -"None." +"You can panic on None, but you can't \"accidentally\" forget to check for None." msgstr "" -"None でパニックになる場合もありますが、「誤って」None のチェックを忘れること" -"はありません。" +"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` をより適切に処理します。" +"何かを一緒にハッキングする場合は、あちこちで `unwrap`/`expect` を行うのが一般的" +"ですが、本番環境のコードは通常、`None` をより適切に処理します。" #: src/std-types/option.md msgid "" "The \"niche optimization\" means that `Option` often has the same size in " -"memory as `T`, if there is some representation that is not a valid value of " -"T. For example, a reference cannot be NULL, so `Option<&T>` automatically " -"uses NULL to represent the `None` variant, and thus can be stored in the " -"same memory as `&T`." +"memory as `T`, if there is some representation that is not a valid value of T. " +"For example, a reference cannot be NULL, so `Option<&T>` automatically uses " +"NULL to represent the `None` variant, and thus can be stored in the same memory " +"as `&T`." msgstr "" #: src/std-types/result.md @@ -6670,10 +6502,10 @@ msgid "" "operation, each with a different enum variant. It is 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` バリアントで使用されます)。" +"`Result` は `Option` に似ていますが、オペレーションの成功または失敗を、それぞれ" +"異なる型で示します。これは式の演習で定義されていた `Res` に似ているものの、汎用" +"的で、`Result` の形式を取ります(`T` は `Ok` バリアントで使用され、`E` は " +"`Err` バリアントで使用されます)。" #: src/std-types/result.md src/error-handling/result.md msgid "\"diary.txt\"" @@ -6694,30 +6526,30 @@ msgstr "\"The diary could not be opened: {err}\"" #: src/std-types/result.md msgid "" "As with `Option`, the successful value sits inside of `Result`, forcing the " -"developer to explicitly extract it. This encourages error checking. In the " -"case where an error should never happen, `unwrap()` or `expect()` can be " -"called, and this is a signal of the developer intent too." +"developer to explicitly extract it. This encourages error checking. In the 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()` を呼び出すことが" -"できます。これもデベロッパーのインテントのシグナルです。" +"`Option` と同様に、成功した値は `Result` の内部にあり、デベロッパーはそれを明示" +"的に抽出する必要があります。これにより、エラーチェックが促進されます。エラーが発" +"生してはならない場合は、`unwrap()` または `expect()` を呼び出すことができます。" +"これもデベロッパーのインテントのシグナルです。" #: src/std-types/result.md msgid "" -"`Result` documentation is a recommended read. Not during the course, but it " -"is worth mentioning. It contains a lot of convenience methods and functions " -"that help functional-style programming." +"`Result` documentation is a recommended read. Not during the course, but it is " +"worth mentioning. It contains a lot of convenience methods and functions that " +"help functional-style programming." msgstr "" "`Result` のドキュメントを読むことをすすめましょう。この講座では取り上げません" -"が、言及する価値があります。このドキュメントには、関数型プログラミングに役立" -"つ便利なメソッドや関数が多数含まれています。" +"が、言及する価値があります。このドキュメントには、関数型プログラミングに役立つ便" +"利なメソッドや関数が多数含まれています。" #: src/std-types/result.md #, fuzzy msgid "" -"`Result` is the standard type to implement error handling as we will see on " -"Day 4." +"`Result` is the standard type to implement error handling as we will see on Day " +"4." msgstr "`Result` は、3 日目で説明するエラー処理を実装する標準型です。" #: src/std-types/string.md @@ -6726,8 +6558,8 @@ msgid "" "[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a " "growable UTF-8 encoded string:" msgstr "" -"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) は、標準" -"的なヒープ割り当ての拡張可能な UTF-8 文字列バッファです。" +"[`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 @@ -6758,72 +6590,71 @@ msgstr "\"s3: len = {}, number of chars = {}\"" #: src/std-types/string.md msgid "" "`String` implements [`Deref`](https://doc.rust-lang.org/std/" -"string/struct.String.html#deref-methods-str), which means that you can call " -"all `str` methods on a `String`." +"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` メソッドを呼び出すことができます。" +"`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." +"`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` を使用します。" +"`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)." +"`String::len` returns the size of the `String` in bytes (which can be different " +"from its length in characters)." msgstr "" -"`String::len` は、`String` のサイズをバイト単位で返します(文字数とは異なる場" -"合があります)。" +"`String::len` は、`String` のサイズをバイト単位で返します(文字数とは異なる場合" +"があります)。" #: src/std-types/string.md msgid "" "`String::chars` returns an iterator over the actual characters. Note that a " -"`char` can be different from what a human will consider a \"character\" due " -"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/" +"`char` can be different from what a human will consider a \"character\" due 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` は人間が「文字」と見なすものとは異なる場合があ" -"ります。" +"`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` のことを話して" -"いる可能性があります。" +"人々が文字列について言及する場合、単に `&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` からメソッ" -"ドを透過的に呼び出せるようになります。" +"型が `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` トレイトについてはまだ説明していないため、現時点では主にドキュメント" -"のサイドバーの構造について説明しています。" +"`Deref` トレイトについてはまだ説明していないため、現時点では主にドキュメントのサ" +"イドバーの構造について説明しています。" #: src/std-types/string.md msgid "" -"`String` implements `Deref` which transparently gives it " -"access to `str`'s methods." +"`String` implements `Deref` which transparently gives it access " +"to `str`'s methods." msgstr "" -"`String` は `Deref` を実装し、`str` のメソッドへのアクセスを透" -"過的に許可します。" +"`String` は `Deref` を実装し、`str` のメソッドへのアクセスを透過的" +"に許可します。" #: src/std-types/string.md msgid "Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`." @@ -6835,9 +6666,9 @@ msgid "" "operations you see supported on vectors are also supported on `String`, but " "with some extra guarantees." msgstr "" -"`String` はバイトのベクターのラッパーとして実装されます。ベクターでサポートさ" -"れているオペレーションの多くは `String` でもサポートされていますが、いくつか" -"の保証が追加されています。" +"`String` はバイトのベクターのラッパーとして実装されます。ベクターでサポートされ" +"ているオペレーションの多くは `String` でもサポートされていますが、いくつかの保証" +"が追加されています。" #: src/std-types/string.md msgid "Compare the different ways to index a `String`:" @@ -6845,27 +6676,26 @@ 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." +"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` は境界内の場合" -"や境界外の場合を表します。" +"文字には `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." +"To a substring by using `s3[0..4]`, where that slice is on character boundaries " +"or not." msgstr "" -"部分文字列には `s3[0..4]` を使用します。このスライスは、文字境界にある場合と" -"ない場合があります。" +"部分文字列には `s3[0..4]` を使用します。このスライスは、文字境界にある場合とない" +"場合があります。" #: src/std-types/string.md msgid "" -"Many types can be converted to a string with the [`to_string`](https://doc." -"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. " -"This trait is automatically implemented for all types that implement " -"`Display`, so anything that can be formatted can also be converted to a " -"string." +"Many types can be converted to a string with the [`to_string`](https://doc.rust-" +"lang.org/std/string/trait.ToString.html#tymethod.to_string) method. This trait " +"is automatically implemented for all types that implement `Display`, so " +"anything that can be formatted can also be converted to a string." msgstr "" #: src/std-types/vec.md @@ -6873,8 +6703,8 @@ 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) は、サイズ変更可能" -"な標準のヒープ割り当てバッファです。" +"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) は、サイズ変更可能な" +"標準のヒープ割り当てバッファです。" #: src/std-types/vec.md msgid "\"v1: len = {}, capacity = {}\"" @@ -6906,37 +6736,36 @@ 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` でスライス メソッド" -"を呼び出すことができます。" +"`Vec` は [`Deref`](https://doc.rust-lang.org/std/vec/struct.Vec." +"html#deref-methods-%5BT%5D) を実装しているため、`Vec` でスライス メソッドを呼び" +"出すことができます。" #: src/std-types/vec.md msgid "" -"`Vec` is a type of collection, along with `String` and `HashMap`. The data " -"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." +"`Vec` is a type of collection, along with `String` and `HashMap`. The data 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` とともにコレクションの一種です。含まれて" -"いるデータはヒープに格納されるため、コンパイル時にデータ量を把握する必要はあ" -"りません。データ量は実行時に増加または減少する場合があります。" +"`Vec` は、`String` および `HashMap` とともにコレクションの一種です。含まれている" +"データはヒープに格納されるため、コンパイル時にデータ量を把握する必要はありませ" +"ん。データ量は実行時に増加または減少する場合があります。" #: src/std-types/vec.md msgid "" "Notice how `Vec` is a generic type too, but you don't have to specify `T` " -"explicitly. As always with Rust type inference, the `T` was established " -"during the first `push` call." +"explicitly. As always with Rust type inference, the `T` was established during " +"the first `push` call." msgstr "" -"`Vec` もジェネリック型ですが、`T` を明示的に指定する必要はありません。" -"Rust の型推論でいつも行われるように、最初の `push` 呼び出しで `T` が確立され" -"ています。" +"`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." +"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it supports " +"adding initial elements to the vector." msgstr "" -"`vec![...]` は `Vec::new()` の代わりに使用する正規のマクロで、ベクターへの初" -"期要素の追加をサポートしています。" +"`vec![...]` は `Vec::new()` の代わりに使用する正規のマクロで、ベクターへの初期要" +"素の追加をサポートしています。" #: src/std-types/vec.md msgid "" @@ -6944,18 +6773,18 @@ msgid "" "Alternatively, using `get` will return an `Option`. The `pop` function will " "remove the last element." msgstr "" -"ベクターにインデックスを付けるには `[` `]` を使用しますが、境界外の場合はパ" -"ニックが発生します。または、`get` を使用すると `Option` が返されます。`pop` " -"関数は最後の要素を削除します。" +"ベクターにインデックスを付けるには `[` `]` を使用しますが、境界外の場合はパニッ" +"クが発生します。または、`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." +"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` の値によ" -"り、ドキュメントに記されたすべてのスライスメソッドにアクセスできることだけを" -"知っていれば十分です。" +"スライスについては 3 日目に説明します。受講者は現時点では、型 `Vec` の値により、" +"ドキュメントに記されたすべてのスライスメソッドにアクセスできることだけを知ってい" +"れば十分です。" #: src/std-types/hashmap.md msgid "Standard hash map with protection against HashDoS attacks:" @@ -7006,18 +6835,17 @@ msgstr "\"{page_counts:#?}\"" msgid "" "`HashMap` is not defined in the prelude and needs to be brought into scope." msgstr "" -"`HashMap` はプレリュードで定義されていないため、スコープに含める必要がありま" -"す。" +"`HashMap` はプレリュードで定義されていないため、スコープに含める必要があります。" #: src/std-types/hashmap.md msgid "" "Try the following lines of code. The first line will see if a book is in the " -"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." +"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 行目でハッシュ" -"マップに代替値を挿入します。" +"次のコード行を試します。最初の行で、書籍がハッシュマップにあるかどうかを確認し、" +"ない場合は代替値を返します。書籍が見つからなかった場合、2 行目でハッシュマップに" +"代替値を挿入します。" #: src/std-types/hashmap.md msgid "\"Harry Potter and the Sorcerer's Stone\"" @@ -7033,67 +6861,66 @@ msgstr "`vec!` とは異なり、標準の `hashmap!` マクロはありませ #: src/std-types/hashmap.md msgid "" -"Although, since Rust 1.56, HashMap implements [`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), which allows " -"us to easily initialize a hash map from a literal array:" -msgstr "" -"しかし、Rust 1.56 以降では、HashMap は [`From<[(K, V); N]>`](https://doc." +"Although, since Rust 1.56, HashMap implements [`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) を実装しています。これによ" -"り、リテラル配列からハッシュマップを簡単に初期化できます。" +"+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." +"Alternatively HashMap can be built from any `Iterator` which yields key-value " +"tuples." msgstr "" -"別の方法として、HashMap は、Key-Value タプルを生成する任意の `Iterator` から" -"作成することもできます。" +"別の方法として、HashMap は、Key-Value タプルを生成する任意の `Iterator` から作成" +"することもできます。" #: src/std-types/hashmap.md msgid "" "This type has several \"method-specific\" return types, such as `std::" -"collections::hash_map::Keys`. These types often appear in searches of the " -"Rust docs. Show students the docs for this type, and the helpful link back " -"to the `keys` method." +"collections::hash_map::Keys`. These types often appear in searches of the 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` メソッドに戻るのに役立つリンクを受講者に示" -"します。" +"この型には、`std::collections::hash_map::Keys` などの「メソッド固有の」戻り値の" +"型がいくつかあります。これらの型は、Rust ドキュメントの検索でよく使用されます。" +"この型のドキュメントと、`keys` メソッドに戻るのに役立つリンクを受講者に示しま" +"す。" #: src/std-types/exercise.md msgid "" "In this exercise you will take a very simple data structure and make it " "generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/" -"stable/std/collections/struct.HashMap.html) to keep track of which values " -"have been seen and how many times each one has appeared." +"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) を使用して、どの値が確認され、各値が何回出現したかを追跡" -"します。" +"collections::HashMap`](https://doc.rust-lang.org/stable/std/collections/struct." +"HashMap.html) を使用して、どの値が確認され、各値が何回出現したかを追跡します。" #: src/std-types/exercise.md msgid "" -"The initial version of `Counter` is hard coded to only work for `u32` " -"values. Make the struct and its methods generic over the type of value being " -"tracked, that way `Counter` can track any type of value." +"The initial version of `Counter` is hard coded to only work for `u32` 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` であらゆる型の値を追跡できます。" +"`Counter` の初期バージョンは、`u32` の値でのみ機能するようにハードコードされてい" +"ます。追跡する値の型に対して構造体とそのメソッドをジェネリック化します。これによ" +"り、`Counter` であらゆる型の値を追跡できます。" #: src/std-types/exercise.md msgid "" -"If you finish early, try using the [`entry`](https://doc.rust-lang.org/" -"stable/std/collections/struct.HashMap.html#method.entry) method to halve the " -"number of hash lookups required to implement the `count` method." +"If you finish early, try using the [`entry`](https://doc.rust-lang.org/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` メ" -"ソッドの実装に必要なハッシュ ルックアップの回数を半分にしてみましょう。" +"collections/struct.HashMap.html#method.entry) メソッドを使用して、`count` メソッ" +"ドの実装に必要なハッシュ ルックアップの回数を半分にしてみましょう。" #: src/std-types/exercise.md src/std-types/solution.md msgid "" @@ -7150,8 +6977,8 @@ msgstr "`Default`、構造体更新記法" #: src/std-traits.md msgid "" -"As with the standard-library types, spend time reviewing the documentation " -"for each trait." +"As with the standard-library types, spend time reviewing the documentation for " +"each trait." msgstr "" "標準ライブラリ型と同様に、時間をかけて各トレイトのドキュメントを確認します。" @@ -7161,11 +6988,11 @@ 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." +"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`" @@ -7176,14 +7003,14 @@ 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` を持つ部分的な" -"等価関係です。`==` 演算子と `!=` 演算子は、これらのメソッドを呼び出します。" +"`PartialEq` は、必須のメソッド `eq` と指定されたメソッド `ne` を持つ部分的な等価" +"関係です。`==` 演算子と `!=` 演算子は、これらのメソッドを呼び出します。" #: src/std-traits/comparisons.md msgid "" -"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) " -"and implies `PartialEq`. Functions that require full equivalence will use " -"`Eq` as a trait bound." +"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) and " +"implies `PartialEq`. Functions that require full equivalence will use `Eq` as a " +"trait bound." msgstr "" "`Eq` は完全な等価関係(反射的、対称的、推移的)であり、`PartialEq` を意味しま" "す。完全な等価関係を必要とする関数は、トレイト境界として `Eq` を使用します。" @@ -7197,8 +7024,8 @@ msgid "" "`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is " "used to implement the `<`, `<=`, `>=`, and `>` operators." msgstr "" -"`PartialOrd` は `partial_cmp` メソッドを使って部分的な順序を定義します。これ" -"は、`<`、`<=`、`>=`、`>` 演算子を実装するために使用されます。" +"`PartialOrd` は `partial_cmp` メソッドを使って部分的な順序を定義します。これは、" +"`<`、`<=`、`>=`、`>` 演算子を実装するために使用されます。" #: src/std-traits/comparisons.md msgid "`Ord` is a total ordering, with `cmp` returning `Ordering`." @@ -7209,24 +7036,23 @@ msgid "" "`PartialEq` can be implemented between different types, but `Eq` cannot, " "because it is reflexive:" msgstr "" -"`PartialEq` は異なる型の間で実装できますが、`Eq` は反射的であるため、実装でき" -"ません。" +"`PartialEq` は異なる型の間で実装できますが、`Eq` は反射的であるため、実装できま" +"せん。" #: src/std-traits/comparisons.md msgid "" -"In practice, it's common to derive these traits, but uncommon to implement " -"them." +"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):" +"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) 内のトレイトを介して実装されます。" +"演算子のオーバーロードは、[`std::ops`](https://doc.rust-lang.org/std/ops/index." +"html) 内のトレイトを介して実装されます。" #: src/std-traits/operators.md #, fuzzy @@ -7240,8 +7066,7 @@ msgstr "議論のポイント:" #: src/std-traits/operators.md msgid "" "You could implement `Add` for `&Point`. In which situations is that useful?" -msgstr "" -"`&Point` に `Add` を実装できます。これはどのような状況で役に立ちますか?" +msgstr "`&Point` に `Add` を実装できます。これはどのような状況で役に立ちますか?" #: src/std-traits/operators.md msgid "" @@ -7250,8 +7075,8 @@ msgid "" "`&T` as well. This avoids unnecessary cloning on the call site." msgstr "" "回答: `Add:add` は `self` を使用します。演算子をオーバーロードする型 `T` が " -"`Copy` でない場合は、`&T` の演算子もオーバーロードすることを検討する必要があ" -"ります。これにより、呼び出し箇所での不要なクローン作成を回避できます。" +"`Copy` でない場合は、`&T` の演算子もオーバーロードすることを検討する必要がありま" +"す。これにより、呼び出し箇所での不要なクローン作成を回避できます。" #: src/std-traits/operators.md msgid "" @@ -7264,39 +7089,38 @@ msgstr "" #: src/std-traits/operators.md msgid "" "Short answer: Function type parameters are controlled by the caller, but " -"associated types (like `Output`) are controlled by the implementer of a " -"trait." +"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`." +"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/operators.md msgid "" -"The `Not` trait (`!` operator) is notable because it does not \"boolify\" " -"like the same operator in C-family languages; instead, for integer types it " -"negates each bit of the number, which arithmetically is equivalent to " -"subtracting it from -1: `!5 == -6`." +"The `Not` trait (`!` operator) is notable because it does not \"boolify\" like " +"the same operator in C-family languages; instead, for integer types it negates " +"each bit of the number, which arithmetically is equivalent to subtracting it " +"from -1: `!5 == -6`." msgstr "" #: src/std-traits/from-and-into.md #, fuzzy msgid "" -"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From." -"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to " -"facilitate type conversions. Unlike `as`, these traits correspond to " -"lossless, infallible conversions." +"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) " +"and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to " +"facilitate type conversions. Unlike `as`, these traits correspond to lossless, " +"infallible conversions." msgstr "" -"型は、型変換を容易にする [`From`](https://doc.rust-lang.org/std/convert/" -"trait.From.html) と [`Into`](https://doc.rust-lang.org/std/convert/trait." -"Into.html) を実装しています。" +"型は、型変換を容易にする [`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}\"" @@ -7305,40 +7129,39 @@ msgstr "\"{s}, {addr}, {one}, {bigger}\"" #: src/std-traits/from-and-into.md msgid "" "[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is " -"automatically implemented when [`From`](https://doc.rust-lang.org/std/" -"convert/trait.From.html) is implemented:" +"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) が自動的" -"に実装されます。" +"[`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." +"That's why it is common to only implement `From`, as your type will get `Into` " +"implementation too." msgstr "" -"このように `Into` も実装されるため、型には `From` のみを実装するのが一般的で" -"す。" +"このように `Into` も実装されるため、型には `From` のみを実装するのが一般的です。" #: src/std-traits/from-and-into.md msgid "" "When declaring a function argument input type like \"anything that can be " -"converted into a `String`\", the rule is opposite, you should use `Into`. " -"Your function will accept types that implement `From` and those that _only_ " +"converted into a `String`\", the rule is opposite, you should use `Into`. Your " +"function will accept types that implement `From` and those that _only_ " "implement `Into`." msgstr "" -"「`String` に変換できるすべて」のような関数引数の入力型を宣言する場合、この" -"ルールは逆となり、`Into`を使用する必要があります。関数は、`From` を実装する型" -"と、`Into` _のみ_ を実装する型を受け入れます。" +"「`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." +"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 セマン" -"ティクスに従います。" +"Rust には _暗黙的_ な型変換はありませんが、`as` による明示的なキャストはサポート" +"されています。これらのキャストは通常、それらが定義されている C セマンティクスに" +"従います。" #: src/std-traits/casting.md msgid "\"as u16: {}\"" @@ -7355,41 +7178,40 @@ msgstr "\"as u8: {}\"" #: src/std-traits/casting.md msgid "" "The results of `as` are _always_ defined in Rust and consistent across " -"platforms. This might not match your intuition for changing sign or casting " -"to a smaller type -- check the docs, and comment for clarity." +"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 で _常に_ 定義され、プラットフォーム間で一貫しています。こ" -"れは、正負の符号を変えたり、より小さな型にキャストしたりする際に得られる直感" -"に反しているかもしれません。ドキュメントを確認し、明確にするためにコメントを" -"記述してください。" +"`as` の結果は Rust で _常に_ 定義され、プラットフォーム間で一貫しています。これ" +"は、正負の符号を変えたり、より小さな型にキャストしたりする際に得られる直感に反し" +"ているかもしれません。ドキュメントを確認し、明確にするためにコメントを記述してく" +"ださい。" #: src/std-traits/casting.md msgid "" -"Casting with `as` is a relatively sharp tool that is easy to use " -"incorrectly, and can be a source of subtle bugs as future maintenance work " -"changes the types that are used or the ranges of values in types. Casts are " -"best used only when the intent is to indicate unconditional truncation (e.g. " -"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what " -"was in the high bits)." +"Casting with `as` is a relatively sharp tool that is easy to use incorrectly, " +"and can be a source of subtle bugs as future maintenance work changes the types " +"that are used or the ranges of values in types. Casts are best used only when " +"the intent is to indicate unconditional truncation (e.g. 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 ビットを選択する場合)。" +"ん。また、将来のメンテナンス作業で、使用される型や型の値の範囲が変更された際に、" +"わかりにくいバグが発生する可能性があります。キャストは、無条件の切り捨てを示すこ" +"とを目的としている場合にのみ、最適に使用されます(たとえば、上位ビットの内容に関" +"係なく、`as u32` で `u64` の下位 32 ビットを選択する場合)。" #: src/std-traits/casting.md msgid "" -"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` " -"over `as` to confirm that the cast is in fact infallible. For fallible " -"casts, `TryFrom` and `TryInto` are available when you want to handle casts " -"that fit differently from those that don't." +"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` over " +"`as` to confirm that the cast is in fact infallible. For fallible 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` を" -"使用できます。" +"絶対に正しいキャスト(例: `u32` から `u64` へのキャスト)では、キャストが実際に" +"完璧であることを確認するために、`as` ではなく `From` または `Into` を使用するこ" +"とをおすすめします。正しくない可能性があるキャストについては、絶対に正しいキャス" +"トとは異なる方法でそれらを処理したい場合に、`TryFrom` と `TryInto` を使用できま" +"す。" #: src/std-traits/casting.md msgid "Consider taking a break after this slide." @@ -7397,25 +7219,23 @@ msgstr "このスライドの後で休憩を取ることを検討してくださ #: src/std-traits/casting.md msgid "" -"`as` is similar to a C++ static cast. Use of `as` in cases where data might " -"be lost is generally discouraged, or at least deserves an explanatory " -"comment." +"`as` is similar to a C++ static cast. Use of `as` in cases where data might be " +"lost is generally discouraged, or at least deserves an explanatory comment." msgstr "" -"`as` は C++ の静的キャストに似ています。データが失われる可能性がある状況で " -"`as` を使用することは、一般的に推奨されません。使用する場合は、少なくとも説明" -"のコメントを記述することをおすすめします。" +"`as` は C++ の静的キャストに似ています。データが失われる可能性がある状況で `as` " +"を使用することは、一般的に推奨されません。使用する場合は、少なくとも説明のコメン" +"トを記述することをおすすめします。" #: src/std-traits/casting.md msgid "This is common in casting integers to `usize` for use as an index." msgstr "" -"これは、整数を`usize` にキャストしてインデックスとして使用する場合に一般的で" -"す。" +"これは、整数を`usize` にキャストしてインデックスとして使用する場合に一般的です。" #: src/std-traits/read-and-write.md msgid "" -"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and " -"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can " -"abstract over `u8` sources:" +"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`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` " @@ -7438,8 +7258,8 @@ 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` シンクを抽象化できます。" +"同様に、[`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) を使用する" +"と、`u8` シンクを抽象化できます。" #: src/std-traits/read-and-write.md msgid "\"\\n\"" @@ -7459,8 +7279,8 @@ 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) トレイ" -"トは、型のデフォルト値を生成します。" +"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) トレイト" +"は、型のデフォルト値を生成します。" #: src/std-traits/default.md msgid "\"John Smith\"" @@ -7478,8 +7298,7 @@ msgstr "\"Y is set!\"" msgid "\"{almost_default_struct:#?}\"" msgstr "\"{almost_default_struct:#?}\"" -#: src/std-traits/default.md src/lifetimes/exercise.md -#: src/lifetimes/solution.md +#: src/std-traits/default.md src/lifetimes/exercise.md src/lifetimes/solution.md msgid "\"{:#?}\"" msgstr "\"{:#?}\"" @@ -7490,11 +7309,11 @@ 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." +"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." @@ -7502,11 +7321,11 @@ msgstr "つまり、構造体内のすべての型にも `Default` を実装す #: src/std-traits/default.md msgid "" -"Standard Rust types often implement `Default` with reasonable values (e.g. " -"`0`, `\"\"`, etc)." +"Standard Rust types often implement `Default` with reasonable values (e.g. `0`, " +"`\"\"`, etc)." msgstr "" -"標準の Rust 型は多くの場合、妥当な値(`0`、`\"\"` など)の `Default` を実装し" -"ます。" +"標準の Rust 型は多くの場合、妥当な値(`0`、`\"\"` など)の `Default` を実装しま" +"す。" #: src/std-traits/default.md msgid "The partial struct initialization works nicely with default." @@ -7517,31 +7336,30 @@ msgid "" "The Rust standard library is aware that types can implement `Default` and " "provides convenience methods that use it." msgstr "" -"Rust 標準ライブラリは、型が `Default` を実装できることを認識しており、それを" -"使用するコンビニエンス メソッドを提供しています。" +"Rust 標準ライブラリは、型が `Default` を実装できることを認識しており、それを使用" +"するコンビニエンス メソッドを提供しています。" #: src/std-traits/default.md msgid "" -"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/" -"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-" -"with-struct-update-syntax)." +"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/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)と呼ばれています。" +"`..` 構文は、[構造体更新記法](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 "" -"Closures or lambda expressions have types which cannot be named. However, " -"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn." -"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:" +"Closures or lambda expressions have types which cannot be named. However, they " +"implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.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) トレイトを備えていま" -"す。" +"クロージャやラムダ式には、名前を付けることができない型があります。ただし、これら" +"は特別な [`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 #, fuzzy @@ -7566,41 +7384,41 @@ msgstr "\"multiply_sum: {}\"" #: src/std-traits/closures.md #, fuzzy msgid "" -"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values. It can " -"be called needing only a shared reference to the closure, which means the " -"closure can be executed repeatedly and even concurrently." +"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values. It can be " +"called needing only a shared reference to the closure, which means the closure " +"can be executed repeatedly and even concurrently." msgstr "" -"`Fn`(例: `add_3`)は、キャプチャした値を使用も変更もしないか、または何もキャ" -"プチャしない場合があります。これは同時に複数回呼び出すことができます。" +"`Fn`(例: `add_3`)は、キャプチャした値を使用も変更もしないか、または何もキャプ" +"チャしない場合があります。これは同時に複数回呼び出すことができます。" #: src/std-traits/closures.md #, fuzzy msgid "" -"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure " -"object is accessed via exclusive reference, so it can be called repeatedly " -"but not concurrently." +"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure object " +"is accessed via exclusive reference, so it can be called repeatedly but not " +"concurrently." msgstr "" -"`FnMut`(例: `accumulate`)は、キャプチャした値を変更することがあります。複数" -"回呼び出すことはできますが、同時に呼び出すことはできません。" +"`FnMut`(例: `accumulate`)は、キャプチャした値を変更することがあります。複数回" +"呼び出すことはできますが、同時に呼び出すことはできません。" #: src/std-traits/closures.md #, fuzzy msgid "" -"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. " -"Doing so consumes the closure and any values captured by move." +"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. Doing " +"so consumes the closure and any values captured by move." msgstr "" -"`FnOnce`(例: `multiply_sum`)がある場合は、1 回だけ呼び出すことができます。" -"これは、キャプチャした値を使用する場合があります。" +"`FnOnce`(例: `multiply_sum`)がある場合は、1 回だけ呼び出すことができます。これ" +"は、キャプチャした値を使用する場合があります。" #: src/std-traits/closures.md msgid "" -"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. " -"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." +"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. 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` を使用できます。" +"`FnMut` は `FnOnce` のサブタイプで、`Fn` は `FnMut` と `FnOnce` のサブタイプで" +"す。つまり、`FnOnce` が呼び出される場合は常に `FnMut` を使用でき、`FnMut` また" +"は `FnOnce` が呼び出される場合は常に `Fn` を使用できます。" #: src/std-traits/closures.md msgid "" @@ -7619,8 +7437,8 @@ msgid "" "(which can be passed to a consumer of any of the 3 closure traits), then " "`FnMut`, and lastly `FnOnce`." msgstr "" -"一方、クロージャがある場合、最も柔軟性の高い方法は、まず `Fn`(どこでも渡すこ" -"とができるため)、次に `FnMut`、最後に `FnOnce` を使用することです。" +"一方、クロージャがある場合、最も柔軟性の高い方法は、まず `Fn`(どこでも渡すこと" +"ができるため)、次に `FnMut`、最後に `FnOnce` を使用することです。" #: src/std-traits/closures.md #, fuzzy @@ -7629,15 +7447,14 @@ msgid "" "`multiply_sum`), depending on what the closure captures. Function pointers " "(references to `fn` items) implement `Copy` and `Fn`." msgstr "" -"コンパイラは、クロージャがキャプチャする内容に応じて、`Copy`(例: `add_3`)" -"と `Clone`(例: `multiply_sum`)も推測します。" +"コンパイラは、クロージャがキャプチャする内容に応じて、`Copy`(例: `add_3`)と " +"`Clone`(例: `multiply_sum`)も推測します。" #: src/std-traits/closures.md msgid "" "By default, closures will capture each variable from an outer scope by the " -"least demanding form of access they can (by shared reference if possible, " -"then exclusive reference, then by move). The `move` keyword forces capture " -"by value." +"least demanding form of access they can (by shared reference if possible, then " +"exclusive reference, then by move). The `move` keyword forces capture by value." msgstr "" #: src/std-traits/closures.md src/smart-pointers/trait-objects.md @@ -7655,15 +7472,15 @@ msgstr "\"Greetings\"" #: src/std-traits/exercise.md msgid "" -"In this example, you will implement the classic [\"ROT13\" cipher](https://" -"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and " -"implement the missing bits. Only rotate ASCII alphabetic characters, to " -"ensure the result is still valid UTF-8." +"In this example, you will implement the classic [\"ROT13\" cipher](https://en." +"wikipedia.org/wiki/ROT13). Copy this code to the playground, and 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 アルファベット文字の" -"みをローテーションします。" +"この例では、古典的な [「ROT13」暗号](https://en.wikipedia.org/wiki/ROT13)を実装" +"します。このコードをプレイグラウンドにコピーし、欠落しているビットを実装してくだ" +"さい。結果が有効な UTF-8 のままになるように、ASCII アルファベット文字のみをロー" +"テーションします。" #: src/std-traits/exercise.md msgid "// Implement the `Read` trait for `RotDecoder`.\n" @@ -7679,11 +7496,11 @@ 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?" +"What happens if you chain two `RotDecoder` instances together, each rotating by " +"13 characters?" msgstr "" -"それぞれが 13 文字ずつローテーションされる 2 つの `RotDecoder` インスタンスを" -"連結するとどうなるでしょうか。" +"それぞれが 13 文字ずつローテーションされる 2 つの `RotDecoder` インスタンスを連" +"結するとどうなるでしょうか。" #: src/std-traits/solution.md msgid "'A'" @@ -7699,8 +7516,8 @@ msgstr "本日の内容:" #: src/welcome-day-3.md msgid "" -"Memory management, lifetimes, and the borrow checker: how Rust ensures " -"memory safety." +"Memory management, lifetimes, and the borrow checker: how Rust ensures memory " +"safety." msgstr "" "メモリ管理、ライフタイム、借用チェッカー: Rust がメモリの安全性を確保する仕組" "み。" @@ -7770,16 +7587,16 @@ msgid "" "Creating a `String` puts fixed-sized metadata on the stack and dynamically " "sized data, the actual string, on the heap:" msgstr "" -"`String` を作成すると、スタックには固定サイズのメタデータが配置され、ヒープに" -"はサイズが動的に決定されるデータ(実際の文字列)が配置されます。" +"`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." +"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` により実現されているため、容量と長さがあり、可変であれば" -"ヒープ上の再割り当てによって拡張できることを説明します。" +"`String` は `Vec` により実現されているため、容量と長さがあり、可変であればヒープ" +"上の再割り当てによって拡張できることを説明します。" #: src/memory-management/review.md msgid "" @@ -7788,18 +7605,18 @@ 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) を使用し" -"てカスタム アロケータを実装できることを説明してください。" +"受講者から尋ねられた場合は、[システム アロケータ](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!" +"We can inspect the memory layout with `unsafe` Rust. However, you should point " +"out that this is rightfully unsafe!" msgstr "" -"`unsafe` Rust を使用してメモリ レイアウトを調べることが出来ます。ただし、これ" -"は当然ながら安全でないことを指摘する必要があります。" +"`unsafe` Rust を使用してメモリ レイアウトを調べることが出来ます。ただし、これは" +"当然ながら安全でないことを指摘する必要があります。" #: src/memory-management/review.md src/testing/unit-tests.md msgid "' '" @@ -7812,8 +7629,7 @@ msgstr "\"world\"" #: src/memory-management/review.md msgid "" "// DON'T DO THIS AT HOME! For educational purposes only.\n" -" // String provides no guarantees about its layout, so this could lead " -"to\n" +" // String provides no guarantees about its layout, so this could lead to\n" " // undefined behavior.\n" msgstr "" "// 自宅では行わないでください。これは説明のみを目的としています。\n" @@ -7838,11 +7654,10 @@ msgstr "" "プログラマーがヒープメモリを割り当てまたは解放するタイミングを決定します。" #: src/memory-management/approaches.md -msgid "" -"Programmer must determine whether a pointer still points to valid memory." +msgid "Programmer must determine whether a pointer still points to valid memory." msgstr "" -"プログラマーは、ポインタがまだ有効なメモリを指しているかどうかを判断する必要" -"があります。" +"プログラマーは、ポインタがまだ有効なメモリを指しているかどうかを判断する必要があ" +"ります。" #: src/memory-management/approaches.md msgid "Studies show, programmers make mistakes." @@ -7852,22 +7667,19 @@ msgstr "調査によると、プログラマーは判断を誤ることがあり msgid "" "Full safety via automatic memory management at runtime: Java, Python, Go, " "Haskell, ..." -msgstr "" -"実行時の自動メモリ管理による完全な安全性: 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 "" -"ランタイム システムにより、メモリは参照できなくなるまで解放されません。" +msgstr "ランタイム システムにより、メモリは参照できなくなるまで解放されません。" #: src/memory-management/approaches.md #, fuzzy msgid "Typically implemented with reference counting or garbage collection." msgstr "" -"通常、参照カウント、ガベージ コレクション、または RAII を使用して実装されま" -"す。" +"通常、参照カウント、ガベージ コレクション、または RAII を使用して実装されます。" #: src/memory-management/approaches.md msgid "Rust offers a new mix:" @@ -7885,92 +7697,91 @@ msgstr "これは、明示的な所有権の概念によって実現されます #: src/memory-management/approaches.md msgid "" -"This slide is intended to help students coming from other languages to put " -"Rust in context." +"This slide is intended to help students coming from other languages to put Rust " +"in context." msgstr "" -"このスライドは、他の言語を習得済みの受講者に、その文脈の中で Rust を理解して" -"もらうことを目的としています。" +"このスライドは、他の言語を習得済みの受講者に、その文脈の中で Rust を理解してもら" +"うことを目的としています。" #: src/memory-management/approaches.md msgid "" "C must manage heap manually with `malloc` and `free`. Common errors include " -"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." +"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`の呼び出しを忘れる、同じポインタに対して複数回呼" -"び出す、ポイントしているメモリが解放された後にポインタを逆参照する、などがあ" -"ります。" +"C では、`malloc` と `free` を使用してヒープを手動で管理する必要があります。よく" +"あるエラーとしては、`free`の呼び出しを忘れる、同じポインタに対して複数回呼び出" +"す、ポイントしているメモリが解放された後にポインタを逆参照する、などがあります。" #: src/memory-management/approaches.md msgid "" "C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take " -"advantage of language guarantees about calling destructors to ensure memory " -"is freed when a function returns. It is still quite easy to mis-use these " -"tools and create similar bugs to C." +"advantage of language guarantees about calling destructors to ensure memory 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 と同様のバグを作成すること" -"がよくあります。" +"C++ にはスマート ポインタ(`unique_ptr`、`shared_ptr` など)のツールがあり、デス" +"トラクタの呼び出しに関する言語保証を利用して、関数が戻ったときにメモリが解放され" +"るようにします。これらのツールを誤用して C と同様のバグを作成することがよくあり" +"ます。" #: src/memory-management/approaches.md msgid "" -"Java, Go, and Python rely on the garbage collector to identify memory that " -"is no longer reachable and discard it. This guarantees that any pointer can " -"be dereferenced, eliminating use-after-free and other classes of bugs. But, " -"GC has a runtime cost and is difficult to tune properly." +"Java, Go, and Python rely on the garbage collector to identify memory that is " +"no longer reachable and discard it. This guarantees that any pointer can 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 (ガーベジコレクション) にはランタイ" -"ムコストがかかり、適切なチューニングが困難です。" +"Java、Go、Pythonでは、アクセスできなくなったメモリの特定と破棄をガーベジコレクタ" +"に依存します。これにより、あらゆるポインタの逆参照が可能になり、解放後の使用など" +"のバグがなくなります。ただし、GC (ガーベジコレクション) にはランタイムコストがか" +"かり、適切なチューニングが困難です。" #: src/memory-management/approaches.md msgid "" -"Rust's ownership and borrowing model can, in many cases, get the performance " -"of C, with alloc and free operations precisely where they are required -- " -"zero cost. It also provides tools similar to C++'s smart pointers. When " -"required, other options such as reference counting are available, and there " -"are even third-party crates available to support runtime garbage collection " -"(not covered in this class)." +"Rust's ownership and borrowing model can, in many cases, get the performance of " +"C, with alloc and free operations precisely where they are required -- zero " +"cost. It also provides tools similar to C++'s smart pointers. When required, " +"other options such as reference counting are available, and there are even " +"third-party crates available to support runtime garbage collection (not covered " +"in this class)." msgstr "" "Rust の所有権と借用モデルは、多くの場合、割り当てオペレーションと解放オペレー" -"ションを正確に必要な場所で行うことにより、ゼロコストで C のパフォーマンスを実" -"現できます。また、C++ のスマートポインタに似たツールも用意されています。必要" -"に応じて、参照カウントなどの他のオプションを利用できます。また、ランタイムガ" -"ベージコレクションをサポートするためのサードパーティのクレートも使用できます" -"(このクラスでは扱いません)。" +"ションを正確に必要な場所で行うことにより、ゼロコストで 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:" +"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." +"We say that the variable _owns_ the value. Every Rust value has precisely one " +"owner at all times." msgstr "" -"これを、変数が値を _所有_ していると表現します。すべての Rustの値所有者は常" -"に 1 人です。" +"これを、変数が値を _所有_ していると表現します。すべての 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)_ され、データが解放されます。ここでデ" -"ストラクタを実行してリソースを解放できます。" +"スコープから外れると変数が破棄 _(drop)_ され、データが解放されます。ここでデスト" +"ラクタを実行してリソースを解放できます。" #: src/memory-management/ownership.md msgid "" "Students familiar with garbage-collection implementations will know that a " -"garbage collector starts with a set of \"roots\" to find all reachable " -"memory. Rust's \"single owner\" principle is a similar idea." +"garbage collector starts with a set of \"roots\" to find all reachable memory. " +"Rust's \"single owner\" principle is a similar idea." msgstr "" "ガベージ コレクションの実装に精通している受講者は、ガベージ コレクタが一連の" "「ルート」から開始して到達可能なすべてのメモリを見つけることを知っています。" @@ -7994,8 +7805,7 @@ msgstr "`s1` を `s2` に代入すると、所有権が移動します。" #: src/memory-management/move.md msgid "When `s1` goes out of scope, nothing happens: it does not own anything." -msgstr "" -"`s1` がスコープ外になると、何も所有してないからです(何も所有しません)。" +msgstr "`s1` がスコープ外になると、何も所有してないからです(何も所有しません)。" #: src/memory-management/move.md msgid "When `s2` goes out of scope, the string data is freed." @@ -8059,8 +7869,8 @@ 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 src/memory-management/clone.md msgid "\"Hello {name}\"" @@ -8077,28 +7887,27 @@ 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!)." +"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++ のデフォルトとは逆であることを説明します。" +"これは、`std::move` を使用しない限り(かつムーブ コンストラクタが定義されていな" +"い限り)値をコピーする、C++ のデフォルトとは逆であることを説明します。" #: src/memory-management/move.md msgid "" -"It is only the ownership that moves. Whether any machine code is generated " -"to manipulate the data itself is a matter of optimization, and such copies " -"are aggressively optimized away." +"It is only the ownership that moves. Whether any machine code is generated 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)." +msgid "Simple values (such as integers) can be marked `Copy` (see later slides)." msgstr "" -"単純な値(整数など)には `Copy` のマークを付けることができます(後のスライド" -"を参照)。" +"単純な値(整数など)には `Copy` のマークを付けることができます(後のスライドを参" +"照)。" #: src/memory-management/move.md msgid "In Rust, clones are explicit (by using `clone`)." @@ -8113,8 +7922,8 @@ 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` が使用できなくなります。" +"`say_hello` の最初の呼び出しで、`main` は `name` の所有権を放棄します。その後は " +"`main` 内で `name` が使用できなくなります。" #: src/memory-management/move.md msgid "" @@ -8125,28 +7934,28 @@ msgstr "" #: 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." +"`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` は所有権を保持できます。" +"`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()`)を渡すこ" -"ともできます。" +"または、`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++ に比べて意図せずコピーを作成するリスクが" -"低減されています。" +"Rust では、ムーブ セマンティクスをデフォルトにし、クローンをプログラマに明示的に" +"行わせています。これにより、C++ に比べて意図せずコピーを作成するリスクが低減され" +"ています。" #: src/memory-management/move.md #, fuzzy @@ -8189,36 +7998,36 @@ 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 とは若干異なります。`=` を使用するとデータがコピーさ" -"れるため、文字列データのクローンを作成する必要があるためです。そうしないと、" -"いずれかの文字列がスコープ外になったときに二重解放が発生します。" +"C++ のアプローチは、Rust とは若干異なります。`=` を使用するとデータがコピーされ" +"るため、文字列データのクローンを作成する必要があるためです。そうしないと、いずれ" +"かの文字列がスコープ外になったときに二重解放が発生します。" #: src/memory-management/move.md msgid "" "C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), " "which is used to indicate when a value may be moved from. If the example had " -"been `s2 = std::move(s1)`, no heap allocation would take place. After the " -"move, `s1` would be in a valid but unspecified state. Unlike Rust, the " -"programmer is allowed to keep using `s1`." +"been `s2 = std::move(s1)`, no heap allocation would take place. After the 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` を引き続き使用できます。" +"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." +"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type which " +"is being copied or moved." msgstr "" -"Rust とは異なり、C++ の `=` は、コピーまたは移動される型によって決定される任" -"意のコードを実行できます。" +"Rust とは異なり、C++ の `=` は、コピーまたは移動される型によって決定される任意の" +"コードを実行できます。" #: src/memory-management/clone.md msgid "" -"Sometimes you _want_ to make a copy of a value. The `Clone` trait " -"accomplishes this." +"Sometimes you _want_ to make a copy of a value. The `Clone` trait accomplishes " +"this." msgstr "値のコピーを作成したい場合は、`Clone` トレイトを使用できます。" #: src/memory-management/clone.md @@ -8227,21 +8036,21 @@ msgid "" "The idea of `Clone` is to make it easy to spot where heap allocations are " "occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`." msgstr "" -"`Clone` はヒープ割当が起きる場所を見つけやすくすることを目的としたものです。" -"`.clone()` のほか、`Vec::new` や `Box::new` などを探してください。" +"`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." +"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/clone.md msgid "" -"`clone` generally performs a deep copy of the value, meaning that if you e." -"g. clone an array, all of the elements of the array are cloned as well." +"`clone` generally performs a deep copy of the value, meaning that if you e.g. " +"clone an array, all of the elements of the array are cloned as well." msgstr "" #: src/memory-management/clone.md @@ -8251,11 +8060,10 @@ msgid "" msgstr "" #: src/memory-management/copy-types.md -msgid "" -"While move semantics are the default, certain types are copied by default:" +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." @@ -8264,8 +8072,7 @@ 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." @@ -8284,23 +8091,22 @@ 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++)." +msgid "Copying does not allow for custom logic (unlike copy constructors in C++)." msgstr "" -"コピーではカスタムロジックは使用できません(C++ のコピーコンストラクタとは異" -"なります)。" +"コピーではカスタムロジックは使用できません(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` トレイトを実装するこ" -"とでカスタム動作も可能になります。" +"クローン作成はより一般的なオペレーションであり、`Clone` トレイトを実装することで" +"カスタム動作も可能になります。" #: src/memory-management/copy-types.md msgid "Copying does not work on types that implement the `Drop` trait." @@ -8312,19 +8118,19 @@ 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." +"Add a `String` field to `struct Point`. It will not compile because `String` is " +"not a `Copy` type." msgstr "" -"`String` フィールドを`struct Point` に追加します。`String` が `Copy` 型ではな" -"いため、コンパイルできなくなります。" +"`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!` でコンパイラ エラー" -"が発生します。" +"`derive` 属性から `Copy` を削除します。`p1` の `println!` でコンパイラ エラーが" +"発生します。" #: src/memory-management/copy-types.md msgid "Show that it works if you clone `p1` instead." @@ -8333,9 +8139,9 @@ msgstr "代わりに `p1` のクローンを作成すれば解決できること #: src/memory-management/copy-types.md msgid "" "Shared references are `Copy`/`Clone`, mutable references are not. This is " -"because Rust requires that mutable references be exclusive, so while it's " -"valid to make a copy of a shared reference, creating a copy of a mutable " -"reference would violate Rust's borrowing rules." +"because Rust requires that mutable references be exclusive, so while it's valid " +"to make a copy of a shared reference, creating a copy of a mutable reference " +"would violate Rust's borrowing rules." msgstr "" #: src/memory-management/drop.md @@ -8347,8 +8153,8 @@ 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) を実装している値" -"では、スコープから外れるときに実行するコードを指定できます。" +"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) を実装している値で" +"は、スコープから外れるときに実行するコードを指定できます。" #: src/memory-management/drop.md msgid "\"Dropping {}\"" @@ -8396,35 +8202,34 @@ 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` 実装が呼び出されます。" +"値がドロップされる際、`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` を実装しているかどうかにかかわらず、すべてのフィールドもドロッ" -"プされます。" +"その後、`Drop` を実装しているかどうかにかかわらず、すべてのフィールドもドロップ" +"されます。" #: src/memory-management/drop.md msgid "" "`std::mem::drop` is just an empty function that takes any value. The " "significance is that it takes ownership of the value, so at the end of its " -"scope it gets dropped. This makes it a convenient way to explicitly drop " -"values earlier than they would otherwise go out of scope." +"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` は、任意の値を受け取る空の関数にすぎません。重要なのは、この" -"関数が値の所有権を取得することで、スコープの最後で値がドロップされることで" -"す。これは、スコープ外になる前に値を明示的にドロップするための便利な方法で" -"す。" +"`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` で何らかの処理(ロックの解放、ファイルのクローズなど)を行" -"うオブジェクトに使用すると便利です。" +"この方法は、`drop` で何らかの処理(ロックの解放、ファイルのクローズなど)を行う" +"オブジェクトに使用すると便利です。" #: src/memory-management/drop.md msgid "Why doesn't `Drop::drop` take `self`?" @@ -8435,8 +8240,8 @@ 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` が呼び出され、スタック オーバーフローが発生します。" +"短い回答: その場合、ブロックの最後に `std::mem::drop` が呼び出されるため、別の " +"`Drop::drop` が呼び出され、スタック オーバーフローが発生します。" #: src/memory-management/drop.md msgid "Try replacing `drop(a)` with `a.drop()`." @@ -8445,8 +8250,8 @@ msgstr "`drop(a)` を `a.drop()` に置き換えてみてください。" #: src/memory-management/exercise.md msgid "" "In this example, we will implement a complex data type that owns all of its " -"data. We will use the \"builder pattern\" to support building a new value " -"piece-by-piece, using convenience functions." +"data. We will use the \"builder pattern\" to support building a new value piece-" +"by-piece, using convenience functions." msgstr "" "この例では、すべてのデータを持つ複雑なデータ型を実装します。「ビルダー パター" "ン」で便利な関数を使用して、新しい値を 1 つずつ構築できるようにします。" @@ -8568,8 +8373,8 @@ 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) は、ヒープ上の" -"データへの所有ポインタです。" +"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) は、ヒープ上のデー" +"タへの所有ポインタです。" #: src/smart-pointers/box.md msgid "\"five: {}\"" @@ -8577,22 +8382,21 @@ msgstr "\"five: {}\"" #: src/smart-pointers/box.md msgid "" -"`Box` implements `Deref`, which means that you can [call " -"methods from `T` directly on a `Box`](https://doc.rust-lang.org/std/ops/" -"trait.Deref.html#more-on-deref-coercion)." +"`Box` implements `Deref`, which means that you can [call 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)ことができます。" +"ソッドを直接呼び出す](https://doc.rust-lang.org/std/ops/trait.Deref.html#more-" +"on-deref-coercion)ことができます。" #: src/smart-pointers/box.md #, fuzzy msgid "" -"Recursive data types or data types with dynamic sizes cannot be stored " -"inline without a pointer indirection. `Box` accomplishes that indirection:" +"Recursive data types or data types with dynamic sizes cannot be stored inline " +"without a pointer indirection. `Box` accomplishes that indirection:" msgstr "" -"再帰データ型、またはサイズが動的なデータ型では、`Box` を使用する必要がありま" -"す。" +"再帰データ型、またはサイズが動的なデータ型では、`Box` を使用する必要があります。" #: src/smart-pointers/box.md msgid "/// A non-empty list: first element and the rest of the list.\n" @@ -8610,8 +8414,8 @@ msgstr "\"{list:?}\"" msgid "" "```bob\n" " Stack Heap\n" -".- - - - - - - - - - - - - - . .- - - - - - - - - - - - - - - - - - - - " -"- - - - -.\n" +".- - - - - - - - - - - - - - . .- - - - - - - - - - - - - - - - - - - - - - " +"- - -.\n" ": : : :\n" ": " "list : : :\n" @@ -8623,14 +8427,14 @@ msgid "" "+----+ :\n" ": : : :\n" ": : : :\n" -"'- - - - - - - - - - - - - - ' '- - - - - - - - - - - - - - - - - - - - " -"- - - - -'\n" +"'- - - - - - - - - - - - - - ' '- - - - - - - - - - - - - - - - - - - - - - " +"- - -'\n" "```" msgstr "" "```bob\n" " Stack Heap\n" -".- - - - - - - - - - - - - - . .- - - - - - - - - - - - - - - - - - - - " -"- - - - -.\n" +".- - - - - - - - - - - - - - . .- - - - - - - - - - - - - - - - - - - - - - " +"- - -.\n" ": : : :\n" ": " "list : : :\n" @@ -8642,17 +8446,17 @@ msgstr "" "+----+ :\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." +"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be not " +"null." msgstr "" -"`Box` は C++ の `std::unique_ptr` と似ていますが、null ではないことが保証され" -"ている点が異なります。" +"`Box` は C++ の `std::unique_ptr` と似ていますが、null ではないことが保証されて" +"いる点が異なります。" #: src/smart-pointers/box.md msgid "A `Box` can be useful when you:" @@ -8664,65 +8468,64 @@ msgid "" "have a type whose size can't be known at compile time, but the Rust compiler " "wants to know an exact size." msgstr "" -"コンパイル時にサイズを把握できない型があるが、Rust コンパイラがその正確なサイ" -"ズを知る必要がある場合。" +"コンパイル時にサイズを把握できない型があるが、Rust コンパイラがその正確なサイズ" +"を知る必要がある場合。" #: src/smart-pointers/box.md msgid "" "want to transfer ownership of a large amount of data. To avoid copying large " -"amounts of data on the stack, instead store the data on the heap in a `Box` " -"so only the pointer is moved." +"amounts of data on the stack, instead store the data on the heap in a `Box` so " +"only the pointer is moved." msgstr "" -"大量のデータの所有権をムーブしたい場合。スタック上の大量のデータがコピーされ" -"ないようにするには、代わりに`Box` によりヒープ上にデータを格納し、ポインタの" -"みが移動されるようにします。" +"大量のデータの所有権をムーブしたい場合。スタック上の大量のデータがコピーされない" +"ようにするには、代わりに`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 be able to compute a fixed size for the " -"struct in memory (the `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` は無限サイズにな" -"ります)。" +" 仮に`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." +"`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 の次の要素を指すだけだけだからです。" +"`Box` がこの問題を解決できるのは、そのサイズが通常のポインタと同じであり、単に" +"ヒープ内の List の次の要素を指すだけだけだからです。" #: src/smart-pointers/box.md #, fuzzy msgid "" -"Remove the `Box` in the List definition and show the compiler error. We get " -"the message \"recursive without indirection\", because for data recursion, " -"we have to use indirection, a `Box` or reference of some kind, instead of " -"storing the value directly." +"Remove the `Box` in the List definition and show the compiler error. We get the " +"message \"recursive without indirection\", because for data recursion, we have " +"to use indirection, a `Box` or reference of some kind, instead of storing the " +"value directly." msgstr "" -"List 定義の `Box` を削除して、コンパイラ エラーを表示します。\"Recursive " -"with indirection\" は、値を直接保持するのではなく、Boxや何らかの参照を使用し" -"たら良いことを示唆するものです。" +"List 定義の `Box` を削除して、コンパイラ エラーを表示します。\"Recursive with " +"indirection\" は、値を直接保持するのではなく、Boxや何らかの参照を使用したら良い" +"ことを示唆するものです。" #: src/smart-pointers/box.md msgid "" -"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. " -"This makes `Box` one of the types that allow the compiler to optimize " -"storage of some enums (the \"niche optimization\")." +"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. This " +"makes `Box` one of the types that allow the compiler to optimize storage of " +"some enums (the \"niche optimization\")." msgstr "" #: src/smart-pointers/rc.md msgid "" -"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-" -"counted shared pointer. Use this when you need to refer to the same data " -"from multiple places:" +"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-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) は、参照カウントされ" -"た共有ポインタです。複数の場所から同じデータを参照する必要がある場合に使用し" -"ます。" +"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) は、参照カウントされた共" +"有ポインタです。複数の場所から同じデータを参照する必要がある場合に使用します。" #: src/smart-pointers/rc.md msgid "\"a: {a}\"" @@ -8735,27 +8538,26 @@ msgstr "\"b: {b}\"" #: src/smart-pointers/rc.md #, fuzzy msgid "" -"See [`Arc`](../concurrency/shared-state/arc.md) and [`Mutex`](https://doc." -"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded " -"context." +"See [`Arc`](../concurrency/shared-state/arc.md) and [`Mutex`](https://doc.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) を" -"ご覧ください。" +"マルチスレッドのコンテキストに関しては、[`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." +"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)_ すると、ドロップされるサイクルを作成でき" -"ます。" +"共有ポインタを [`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." +"`Rc`'s count ensures that its contained value is valid for as long as there are " +"references." msgstr "`Rc` のカウントは、参照がある限り有効であることを保証します。" #: src/smart-pointers/rc.md @@ -8764,21 +8566,21 @@ msgstr "Rust の `Rc` は C++ の `std::shared_ptr` に似ています。" #: src/smart-pointers/rc.md msgid "" -"`Rc::clone` is cheap: it creates a pointer to the same allocation and " -"increases the reference count. Does not make a deep clone and can generally " -"be ignored when looking for performance issues in code." +"`Rc::clone` is cheap: it creates a pointer to the same allocation and 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`の動作は軽量です。同じ割り当て領域へのポインタを作成し、参照カウン" -"トを増やすだけです。デープクローンを作成しないので、性能上の問題箇所をコード" -"から探す場合には通常無視することが出来ます。" +"`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」)、" -"可変参照を返します。" +"`make_mut` は、必要に応じて内部の値のクローンを作成し(「clone-on-write」)、可" +"変参照を返します。" #: src/smart-pointers/rc.md msgid "Use `Rc::strong_count` to check the reference count." @@ -8786,18 +8588,18 @@ 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`)." +"`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)_ オブ" -"ジェクトを提供します。" +"`Rc::downgrade` は、(多くの場合、`RefCell` と組み合わせて)適切にドロップされる" +"サイクルを作成するための弱参照カウント _(weakly reference-counted)_ オブジェクト" +"を提供します。" #: src/smart-pointers/trait-objects.md msgid "" "We previously saw how trait objects can be used with references, e.g `&dyn " -"Pet`. However, we can also use trait objects with smart pointers like `Box` " -"to create an owned trait object: `Box`." +"Pet`. However, we can also use trait objects with smart pointers like `Box` to " +"create an owned trait object: `Box`." msgstr "" #: src/smart-pointers/trait-objects.md @@ -8809,15 +8611,15 @@ msgstr "`pets`を割り当てた後のメモリレイアウト:" msgid "" "```bob\n" " Stack Heap\n" -".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - " -"- -.\n" +".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - - " +"-.\n" ": : : :\n" ": \"pets: Vec\" : : \"data: Cat\" +----+----+----" "+----+ :\n" -": +-----------+-------+ : : +-------+-------+ | F | i | d | " -"o | :\n" -": | ptr | o---+---+--. : | lives | 9 | +----+----+----" -"+----+ :\n" +": +-----------+-------+ : : +-------+-------+ | F | i | d | o " +"| :\n" +": | ptr | o---+---+--. : | lives | 9 | +----+----+----+----" +"+ :\n" ": | len | 2 | : | : +-------+-------+ " "^ :\n" ": | capacity | 2 | : | : ^ " @@ -8836,38 +8638,38 @@ msgid "" "+ :\n" " : | " "| :\n" -" `- - -| - - |- - - - - - - - - - - - - - - " -"- -'\n" +" `- - -| - - |- - - - - - - - - - - - - - - - " +"-'\n" " | |\n" -" | | " -"\"Program text\"\n" -" .- - -| - - |- - - - - - - - - - - - - - - " -"- -.\n" +" | | \"Program " +"text\"\n" +" .- - -| - - |- - - - - - - - - - - - - - - - " +"-.\n" " : | | " "vtable :\n" " : | | +----------------------" "+ :\n" -" : | `----->| \"::" -"talk\" | :\n" +" : | `----->| \"::talk\" " +"| :\n" " : | +----------------------" "+ :\n" " : | " "vtable :\n" " : | +----------------------" "+ :\n" -" : '----------->| \"::" -"talk\" | :\n" +" : '----------->| \"::talk\" " +"| :\n" " : +----------------------" "+ :\n" " : :\n" -" '- - - - - - - - - - - - - - - - - - - - - " -"- -'\n" +" '- - - - - - - - - - - - - - - - - - - - - - " +"-'\n" "```" msgstr "" "```bob\n" " スタック ヒープ\n" -".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - " -"- -.\n" +".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - - " +"-.\n" ": : : :\n" ": pets : : +----+----+----+----" "+ :\n" @@ -8918,8 +8720,8 @@ msgstr "" " : +----------------------" "+ :\n" " : :\n" -" '- - - - - - - - - - - - - - - - - - - - - " -"- -'\n" +" '- - - - - - - - - - - - - - - - - - - - - - " +"-'\n" "```" #: src/smart-pointers/trait-objects.md @@ -8927,48 +8729,48 @@ msgid "" "Types that implement a given trait may be of different sizes. This makes it " "impossible to have things like `Vec` in the example above." msgstr "" -"同じトレイトを実装する型であってもそのサイズは異なることがあります。そのた" -"め、上の例でVecと書くことはできません。" +"同じトレイトを実装する型であってもそのサイズは異なることがあります。そのため、上" +"の例でVecと書くことはできません。" #: src/smart-pointers/trait-objects.md msgid "" "`dyn Pet` is a way to tell the compiler about a dynamically sized type that " "implements `Pet`." msgstr "" -"`dyn Pet` はコンパイラに、この型が`Pet`トレイトを実装する動的なサイズの型であ" -"ることを伝えます。" +"`dyn Pet` はコンパイラに、この型が`Pet`トレイトを実装する動的なサイズの型である" +"ことを伝えます。" #: src/smart-pointers/trait-objects.md msgid "" -"In the example, `pets` is allocated on the stack and the vector data is on " -"the heap. The two vector elements are _fat pointers_:" +"In the example, `pets` is allocated on the stack and the vector data is on the " +"heap. The two vector elements are _fat pointers_:" msgstr "" -"上の例では `pets` はスタックに確保され、ベクターのデータはヒープ上にありま" -"す。二つのベクターの要素は _ファットポインタ_ です:" +"上の例では `pets` はスタックに確保され、ベクターのデータはヒープ上にあります。二" +"つのベクターの要素は _ファットポインタ_ です:" #: src/smart-pointers/trait-objects.md msgid "" "A fat pointer is a double-width pointer. It has two components: a pointer to " "the actual object and a pointer to the [virtual method table](https://en." -"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` " -"implementation of that particular object." +"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` implementation " +"of that particular object." msgstr "" -"ファットポインタはdouble-widthポインタです。これは二つの要素からなります:実" -"際のオブジェクトへのポインタと、そのオブジェクトの`Pet`の実装のための[仮想関" -"数テーブル](https://ja.wikipedia.org/wiki/" +"ファットポインタはdouble-widthポインタです。これは二つの要素からなります:実際の" +"オブジェクトへのポインタと、そのオブジェクトの`Pet`の実装のための[仮想関数テーブ" +"ル](https://ja.wikipedia.org/wiki/" "%E4%BB%AE%E6%83%B3%E9%96%A2%E6%95%B0%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB) " "(vtable)です。" #: src/smart-pointers/trait-objects.md msgid "" -"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` " -"has a `lives` field." +"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` has " +"a `lives` field." msgstr "" -"\"Fido\"と名付けられた`Dog`のデータは`name` と `age` のフィールドに対応しま" -"す。(訳注: \"Fido\"とはよくある犬の愛称で、日本語でいう「ポチ」のような名前" -"です。)例の`Cat`には`lives` フィールドがあります。(訳注: ここで`Cat`が" -"`lives`というフィールドを持ち、9で初期化しているのは\"A cat has nine lives\" " -"—猫は9つの命を持つ—ということわざに由来します。)" +"\"Fido\"と名付けられた`Dog`のデータは`name` と `age` のフィールドに対応します。" +"(訳注: \"Fido\"とはよくある犬の愛称で、日本語でいう「ポチ」のような名前です。)" +"例の`Cat`には`lives` フィールドがあります。(訳注: ここで`Cat`が`lives`という" +"フィールドを持ち、9で初期化しているのは\"A cat has nine lives\" —猫は9つの命を" +"持つ—ということわざに由来します。)" #: src/smart-pointers/trait-objects.md msgid "Compare these outputs in the above example:" @@ -8976,15 +8778,15 @@ msgstr "上の例において、下のコードによる出力結果を比べて #: src/smart-pointers/exercise.md msgid "" -"A binary tree is a tree-type data structure where every node has two " -"children (left and right). We will create a tree where each node stores a " -"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." +"A binary tree is a tree-type data structure where every node has two children " +"(left and right). We will create a tree where each node stores a 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 の右側のサブツリー内のすべてのノードにはより大きい値が含まれます。" +"バイナリツリーは、すべてのノードに 2 つの子(左と右)があるツリー型のデータ構造" +"です。ここでは、各ノードが値を格納するツリーを作成します。ある特定のノード N に" +"ついて、N の左側のサブツリー内のすべてのノードにはより小さい値が含まれ、N の右側" +"のサブツリー内のすべてのノードにはより大きい値が含まれます。" #: src/smart-pointers/exercise.md msgid "Implement the following types, so that the given tests pass." @@ -8992,8 +8794,8 @@ msgstr "次の型を実装して、指定されたテストが通るようにし #: src/smart-pointers/exercise.md msgid "" -"Extra Credit: implement an iterator over a binary tree that returns the " -"values in order." +"Extra Credit: implement an iterator over a binary tree that returns the values " +"in order." msgstr "追加の実習: バイナリツリーに値を順番に返すイテレータを実装します。" #: src/smart-pointers/exercise.md src/smart-pointers/solution.md @@ -9039,8 +8841,8 @@ 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." @@ -9055,8 +8857,8 @@ 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 日目の参照に関する資料を振り返りですが、少し対象を広げ、" -"関数の引数と戻り値も含めています。" +"このスライドでは、1 日目の参照に関する資料を振り返りですが、少し対象を広げ、関数" +"の引数と戻り値も含めています。" #: src/borrowing/shared.md #, fuzzy @@ -9067,40 +8869,40 @@ msgstr "スタックの戻り値に関する注意事項:" #, fuzzy msgid "" "Demonstrate that the return from `add` is cheap because the compiler can " -"eliminate the copy operation, by inlining the call to add into main. Change " -"the above code to print stack addresses and run it on the [Playground]" -"(https://play.rust-lang.org/?" +"eliminate the copy operation, by inlining the call to add into main. Change the " +"above code to print stack addresses and run it on the [Playground](https://play." +"rust-lang.org/?" "version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) " "or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the " -"\"DEBUG\" optimization level, the addresses should change, while they stay " -"the same when changing to the \"RELEASE\" setting:" +"\"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/?" +"コンパイラはコピー オペレーションを省略できるため、`add` からのリターンはコスト" +"であることを示します。スタック アドレスを出力するように上記のコードを変更し、" +"[Playground](https://play.rust-lang.org/?" "version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671)" "で実行するか、[Godbolt](https://rust.godbolt.org/) のアセンブリを確認します。" -"「DEBUG」最適化レベルではアドレスが変更されますが、「RELEASE」設定に変更した" -"場合はアドレスが変更されません。" +"「DEBUG」最適化レベルではアドレスが変更されますが、「RELEASE」設定に変更した場合" +"はアドレスが変更されません。" #: src/borrowing/shared.md msgid "" -"The Rust compiler can do automatic inlining, that can be disabled on a " -"function level with `#[inline(never)]`." +"The Rust compiler can do automatic inlining, that can be disabled on a function " +"level with `#[inline(never)]`." msgstr "" #: src/borrowing/shared.md msgid "" "Once disabled, the printed address will change on all optimization levels. " -"Looking at Godbolt or Playground, one can see that in this case, the return " -"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up " -"the point will be returned in 2 registers (eax and edx)." +"Looking at Godbolt or Playground, one can see that in this case, the return of " +"the value depends on the ABI, e.g. on amd64 the two i32 that is making up the " +"point will be returned in 2 registers (eax and edx)." msgstr "" #: 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:" +"Rust's _borrow checker_ puts constraints on the ways you can borrow values. For " +"a given value, at any time:" msgstr "" "Rust の _借用チェッカー_ は、値を借用する方法に制限を設けます。任意の値に対し" "て、常に次の制限が課されます。" @@ -9118,64 +8920,63 @@ 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` を通" -"じて不変として借用されているため、コンパイルできません。" +"上記のコードは、`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." +"Move the `println!` statement for `b` before the scope that introduces `c` to " +"make the code compile." msgstr "" -"`b` の `println!` ステートメントを `c` を導入するスコープの前に移動して、コー" -"ドをコンパイル出来るようにします。" +"`b` の `println!` ステートメントを `c` を導入するスコープの前に移動して、コード" +"をコンパイル出来るようにします。" #: src/borrowing/borrowck.md msgid "" -"After that change, the compiler realizes that `b` is only ever used before " -"the new mutable borrow of `a` through `c`. This is a feature of the borrow " -"checker called \"non-lexical lifetimes\"." +"After that change, the compiler realizes that `b` is only ever used before 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 " +"この変更後、コンパイラは c を通じたa の可変参照よりも前にしかbが使われていないこ" +"とを認識します。これは「ノンレキシカル ライフタイム(_\"non-lexical " "lifetimes\"_)」と呼ばれる借用チェッカーの機能です。" #: src/borrowing/borrowck.md msgid "" -"The exclusive reference constraint is quite strong. Rust uses it to ensure " -"that data races do not occur. Rust also _relies_ on this constraint to " -"optimize code. For example, a value behind a shared reference can be safely " -"cached in a register for the lifetime of that reference." +"The exclusive reference constraint is quite strong. Rust uses it to ensure that " +"data races do not occur. Rust also _relies_ on this constraint to 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 はこの制約を使用して、データへの競合が発生" -"しないようにするとともに、コードを最適化しています。たとえば、共有参照を通し" -"て得られる値は、その参照が存続する間、安全にレジスタにキャッシュすることが出" -"来ます" +"排他参照制約は非常に強力です。Rust はこの制約を使用して、データへの競合が発生し" +"ないようにするとともに、コードを最適化しています。たとえば、共有参照を通して得ら" +"れる値は、その参照が存続する間、安全にレジスタにキャッシュすることが出来ます" #: src/borrowing/borrowck.md msgid "" "The borrow checker is designed to accommodate many common patterns, such as " -"taking exclusive references to different fields in a struct at the same " -"time. But, there are some situations where it doesn't quite \"get it\" and " -"this often results in \"fighting with the borrow checker.\"" +"taking exclusive references to different fields in a struct at the same 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/examples.md msgid "" "As a concrete example of how these borrowing rules prevent memory errors, " -"consider the case of modifying a collection while there are references to " -"its elements:" +"consider the case of modifying a collection while there are references to its " +"elements:" msgstr "" #: src/borrowing/examples.md @@ -9188,30 +8989,30 @@ msgstr "" #: src/borrowing/examples.md msgid "" -"In both of these cases, modifying the collection by pushing new elements " -"into it can potentially invalidate existing references to the collection's " -"elements if the collection has to reallocate." +"In both of these cases, modifying the collection by pushing new elements into " +"it can potentially invalidate existing references to the collection's elements " +"if the collection has to reallocate." msgstr "" #: src/borrowing/interior-mutability.md msgid "" -"In some situations, it's necessary to modify data behind a shared (read-" -"only) reference. For example, a shared data structure might have an internal " -"cache, and wish to update that cache from read-only methods." +"In some situations, it's necessary to modify data behind a shared (read-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 "" -"The \"interior mutability\" pattern allows exclusive (mutable) access behind " -"a shared reference. The standard library provides several ways to do this, " -"all while still ensuring safety, typically by performing a runtime check." +"The \"interior mutability\" pattern allows exclusive (mutable) access behind 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 "`Cell`" @@ -9225,8 +9026,8 @@ msgid "" "the inner value. Since there are no references, borrowing rules cannot be " "broken." msgstr "" -"`Cell` は、値をラップし、`Cell` の共有参照を通してでもその値を取得または設定" -"可能にしています。ただし、その内包する値への参照は許していません。" +"`Cell` は、値をラップし、`Cell` の共有参照を通してでもその値を取得または設定可能" +"にしています。ただし、その内包する値への参照は許していません。" #: src/borrowing/interior-mutability.md msgid "// Note that `cell` is NOT declared as mutable.\n" @@ -9245,8 +9046,8 @@ msgstr "" #: src/borrowing/interior-mutability.md msgid "" -"These types perform dynamic checks using a counter in the `RefCell` to " -"prevent existence of a `RefMut` alongside another `Ref`/`RefMut`." +"These types perform dynamic checks using a counter in the `RefCell` to prevent " +"existence of a `RefMut` alongside another `Ref`/`RefMut`." msgstr "" #: src/borrowing/interior-mutability.md @@ -9269,24 +9070,23 @@ msgstr "\"{:?}\"" #: src/borrowing/interior-mutability.md msgid "" -"The main thing to take away from this slide is that Rust provides _safe_ " -"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." +"The main thing to take away from this slide is that Rust provides _safe_ 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` を取り上げます。" +"このスライドで重要なのは、Rust には、共有参照の背後にあるデータを変更する安全な" +"方法が用意されているということです。安全性を確保するにはさまざまな方法があります" +"が、ここでは `RefCell` と `Cell` を取り上げます。" #: src/borrowing/interior-mutability.md msgid "" "`RefCell` enforces Rust's usual borrowing rules (either multiple shared " -"references or a single exclusive reference) with a runtime check. In this " -"case, all borrows are very short and never overlap, so the checks always " -"succeed." +"references or a single exclusive reference) with a runtime check. In this case, " +"all borrows are very short and never overlap, so the checks always succeed." msgstr "" -"`RefCell` は、ランタイム チェックとともに Rust の通常の借用ルール(複数の共有" -"参照または単一の排他参照)を適用します。この場合、すべての借用は非常に短く、" -"重複しないため、チェックは常に成功します。" +"`RefCell` は、ランタイム チェックとともに Rust の通常の借用ルール(複数の共有参" +"照または単一の排他参照)を適用します。この場合、すべての借用は非常に短く、重複し" +"ないため、チェックは常に成功します。" #: src/borrowing/interior-mutability.md msgid "" @@ -9302,23 +9102,23 @@ msgid "" "have its own cost." msgstr "" "`Cell` は安全性を確保するためのよりシンプルな手段であり、`&self` を受け取る " -"`set` メソッドを備えています。ランタイム チェックは必要ありませんが、値を移動" -"する必要があり、それによってコストが発生することがあります。" +"`set` メソッドを備えています。ランタイム チェックは必要ありませんが、値を移動す" +"る必要があり、それによってコストが発生することがあります。" #: src/borrowing/interior-mutability.md msgid "" -"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` " -"can't be passed between threads. This prevents two threads trying to access " -"the cell at once." +"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` can't " +"be passed between threads. This prevents two threads trying to access the cell " +"at once." msgstr "" #: 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." +"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 "" @@ -9334,20 +9134,17 @@ 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\"" +"\"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\"" +"\"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/example-service/client.md +#: src/android/build-rules/library.md src/android/aidl/example-service/client.md msgid "\"Bob\"" msgstr "\"Bob\"" @@ -9360,20 +9157,20 @@ msgid "" "A reference has a _lifetime_, which must not \"outlive\" the value it refers " "to. This is verified by the borrow checker." msgstr "" -"参照にはライフタイムがあり、これは参照する値よりも「長く存続」してはなりませ" -"ん。これは借用チェッカーによって検証されます。" +"参照にはライフタイムがあり、これは参照する値よりも「長く存続」してはなりません。" +"これは借用チェッカーによって検証されます。" #: src/lifetimes/lifetime-annotations.md msgid "" -"The lifetime can be implicit - this is what we have seen so far. Lifetimes " -"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with " -"`'` and `'a` is a typical default name. Read `&'a Point` as \"a borrowed " -"`Point` which is valid for at least the lifetime `a`\"." +"The lifetime can be implicit - this is what we have seen so far. Lifetimes can " +"also be explicit: `&'a Point`, `&'document str`. Lifetimes start with `'` 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`」とと解釈します。" +"`&'document str` のように明示的に指定することもできます。ライフタイムは `'` で始" +"まり、`'a` が一般的なデフォルト名です。`&'a Point` は、「少なくともライフタイム " +"`a` の間は有効な、借用した `Point`」とと解釈します。" #: src/lifetimes/lifetime-annotations.md msgid "" @@ -9381,18 +9178,18 @@ msgid "" "yourself. Explicit lifetime annotations create constraints where there is " "ambiguity; the compiler verifies that there is a valid solution." msgstr "" -"ライフタイムは常にコンパイラによって推測されます。自分でライフタイムを割り当" -"てることはできません。明示的なライフタイム アノテーションを使用すると、あいま" -"いなところに制約を課すことができます。それに対し、コンパイラはその制約を満た" -"すライフタイムを設定できることを検証します。" +"ライフタイムは常にコンパイラによって推測されます。自分でライフタイムを割り当てる" +"ことはできません。明示的なライフタイム アノテーションを使用すると、あいまいなと" +"ころに制約を課すことができます。それに対し、コンパイラはその制約を満たすライフタ" +"イムを設定できることを検証します。" #: src/lifetimes/lifetime-annotations.md msgid "" "Lifetimes become more complicated when considering passing values to and " "returning values from functions." msgstr "" -"関数に値を渡し、関数から値を返すことを考慮する場合、ライフタイムはより複雑に" -"なります。" +"関数に値を渡し、関数から値を返すことを考慮する場合、ライフタイムはより複雑になり" +"ます。" #: src/lifetimes/lifetime-annotations.md msgid "// What is the lifetime of p3?\n" @@ -9410,10 +9207,10 @@ msgid "" "requires explicit annotations of lifetimes on function arguments and return " "values." msgstr "" -"この例では、コンパイラは `p3` のライフライムを推測するこが出来ませんん。関数" -"本体の内部を見ると、`p3` のライフタイムは `p1` と `p2` のいずれか短いしかし想" -"定できることがわかります。ただし、型と同様に、Rust では関数の引数や戻り値にラ" -"イフタイムの明示的なアノテーションが必要です。" +"この例では、コンパイラは `p3` のライフライムを推測するこが出来ませんん。関数本体" +"の内部を見ると、`p3` のライフタイムは `p1` と `p2` のいずれか短いしかし想定でき" +"ることがわかります。ただし、型と同様に、Rust では関数の引数や戻り値にライフタイ" +"ムの明示的なアノテーションが必要です。" #: src/lifetimes/lifetime-annotations.md msgid "Add `'a` appropriately to `left_most`:" @@ -9424,12 +9221,11 @@ msgid "" "This says, \"given p1 and p2 which both outlive `'a`, the return value lives " "for at least `'a`." msgstr "" -"これは、「p1 と p2 の両方が `'a` より長く存続すると、戻り値は少なくとも `'a` " -"の間存続する」という意味になります。" +"これは、「p1 と p2 の両方が `'a` より長く存続すると、戻り値は少なくとも `'a` の" +"間存続する」という意味になります。" #: src/lifetimes/lifetime-annotations.md -msgid "" -"In common cases, lifetimes can be elided, as described on the next slide." +msgid "In common cases, lifetimes can be elided, as described on the next slide." msgstr "" "一般的なケースでは、次のスライドで説明するようにライフタイムを省略できます。" @@ -9439,93 +9235,90 @@ msgstr "関数とライフタイム" #: src/lifetimes/lifetime-elision.md msgid "" -"Lifetimes for function arguments and return values must be fully specified, " -"but Rust allows lifetimes to be elided in most cases with [a few simple " -"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not " +"Lifetimes for function arguments and return values must be fully specified, but " +"Rust allows lifetimes to be elided in most cases with [a few simple 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)により、ライフタイムを省略できます。これは推論ではな" -"く、構文の省略形にすぎません。" +"関数の引数や戻り値のライフタイムは完全に指定する必要がありますが、Rust ではほと" +"んどの場合、[いくつかの簡単なルール](https://doc.rust-lang.org/nomicon/lifetime-" +"elision.html)により、ライフタイムを省略できます。これは推論ではなく、構文の省略" +"形にすぎません。" #: src/lifetimes/lifetime-elision.md msgid "Each argument which does not have a lifetime annotation is given one." msgstr "" -"ライフタイム アノテーションが付いていない各引数には、1 つのライフタイムが与え" -"られます。" +"ライフタイム アノテーションが付いていない各引数には、1 つのライフタイムが与えら" +"れます。" #: src/lifetimes/lifetime-elision.md msgid "" -"If there is only one argument lifetime, it is given to all un-annotated " -"return values." +"If there is only one argument lifetime, it is given to all un-annotated return " +"values." msgstr "" -"引数のライフタイムが 1 つしかない場合、アノテーションのない戻り値すべてにその" -"ライフタイムが与えられます。" +"引数のライフタイムが 1 つしかない場合、アノテーションのない戻り値すべてにそのラ" +"イフタイムが与えられます。" #: src/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." +"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` である場合、アノ" -"テーションのない戻り値すべてにそのライフタイムが与えられます。" +"引数のライフタイムが複数あり、最初のライフタイムが `self` である場合、アノテー" +"ションのない戻り値すべてにそのライフタイムが与えられます。" #: src/lifetimes/lifetime-elision.md msgid "In this example, `cab_distance` is trivially elided." -msgstr "" -"この例では、`cab_distance` に関するライフタイムの記述は省略されています。" +msgstr "この例では、`cab_distance` に関するライフタイムの記述は省略されています。" #: src/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` 関数は、明示的なアノテーションを必要とする複数の参照を引数に含む関" -"数のもう一つの例です。" +"`nearest` 関数は、明示的なアノテーションを必要とする複数の参照を引数に含む関数の" +"もう一つの例です。" #: src/lifetimes/lifetime-elision.md msgid "Try adjusting the signature to \"lie\" about the lifetimes returned:" msgstr "" -"返されるライフタイムについて嘘のアノテーションを付けるようにシグネチャを調整" -"してみましょう。" +"返されるライフタイムについて嘘のアノテーションを付けるようにシグネチャを調整して" +"みましょう。" #: src/lifetimes/lifetime-elision.md msgid "" -"This won't compile, demonstrating that the annotations are checked for " -"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." +"This won't compile, demonstrating that the annotations are checked for 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を使用する場" -"合に、これはよくあるエラーの原因となっています。" +"そうするとコンパイルが通らなくなります。これは、すなわち、コンパイラがアノテー" +"ションの妥当性をチェックしているということを示すものです。ただし、これは生のポイ" +"ンタ(安全ではない)には当てはまりません。アンセーフRustを使用する場合に、これは" +"よくあるエラーの原因となっています。" #: src/lifetimes/lifetime-elision.md msgid "" -"Students may ask when to use lifetimes. Rust borrows _always_ have " -"lifetimes. Most of the time, elision and type inference mean these don't " -"need to be written out. In more complicated cases, lifetime annotations can " -"help resolve ambiguity. Often, especially when prototyping, it's easier to " -"just work with owned data by cloning values where necessary." +"Students may ask when to use lifetimes. Rust borrows _always_ have lifetimes. " +"Most of the time, elision and type inference mean these don't need to be " +"written out. In more complicated cases, lifetime annotations can help resolve " +"ambiguity. Often, especially when prototyping, it's easier to just work with " +"owned data by cloning values where necessary." msgstr "" -"ライフタイムをどのような場合に使うべきか、受講者から質問を受けるかもしれませ" -"ん。Rust の借用では常にライフタイムを使用します。ほとんどの場合、省略や型推" -"論 により、ライフタイムを記述する必要はありません。より複雑なケースでは、ライ" -"フタイム アノテーションを使用することであいまいさを解決できます。多くの場合、" -"特にプロトタイピングでは、必要に応じて値をクローニングして所有データを処理す" -"る方が簡単です。" +"ライフタイムをどのような場合に使うべきか、受講者から質問を受けるかもしれません。" +"Rust の借用では常にライフタイムを使用します。ほとんどの場合、省略や型推論 によ" +"り、ライフタイムを記述する必要はありません。より複雑なケースでは、ライフタイム " +"アノテーションを使用することであいまいさを解決できます。多くの場合、特にプロトタ" +"イピングでは、必要に応じて値をクローニングして所有データを処理する方が簡単です。" #: src/lifetimes/struct-lifetimes.md msgid "Lifetimes in Data Structures" msgstr "データ構造とライフタイム" #: src/lifetimes/struct-lifetimes.md -msgid "" -"If a data type stores borrowed data, it must be annotated with a lifetime:" +msgid "If a data type stores borrowed data, it must be annotated with a lifetime:" msgstr "" -"データ型が借用データを内部に保持する場合、ライフタイムアノテーションを付ける" -"必要があります。" +"データ型が借用データを内部に保持する場合、ライフタイムアノテーションを付ける必要" +"があります。" #: src/lifetimes/struct-lifetimes.md msgid "\"Bye {text}!\"" @@ -9554,26 +9347,25 @@ msgid "" "`Highlight` that uses that data." msgstr "" "上記の例では、`Highlight` のアノテーションにより、内包される`&str` の参照先の" -"データは、少なくともそのデータを使用する `Highlight` のインスタンスが存在する" -"限り存続しなければならなくなります。" +"データは、少なくともそのデータを使用する `Highlight` のインスタンスが存在する限" +"り存続しなければならなくなります。" #: src/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." +"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/lifetimes/struct-lifetimes.md msgid "" -"Types with borrowed data force users to hold on to the original data. This " -"can be useful for creating lightweight views, but it generally makes them " -"somewhat harder to use." +"Types with borrowed data force users to hold on to the original data. This can " +"be useful for creating lightweight views, but it generally makes them somewhat " +"harder to use." msgstr "" -"消費したデータが含まれる型では、ユーザーは元のデータを保持せざるを得なくなり" -"ます。これは軽量のビューを作成する場合に便利ですが、一般的には使いにくくなり" -"ます。" +"消費したデータが含まれる型では、ユーザーは元のデータを保持せざるを得なくなりま" +"す。これは軽量のビューを作成する場合に便利ですが、一般的には使いにくくなります。" #: src/lifetimes/struct-lifetimes.md msgid "When possible, make data structures own their data directly." @@ -9583,37 +9375,37 @@ msgstr "可能であれば、データ構造がデータを直接所有できる msgid "" "Some structs with multiple references inside can have more than one lifetime " "annotation. This can be necessary if there is a need to describe lifetime " -"relationships between the references themselves, in addition to the lifetime " -"of the struct itself. Those are very advanced use cases." +"relationships between the references themselves, in addition to the lifetime of " +"the struct itself. Those are very advanced use cases." msgstr "" -"内部に複数の参照がある構造体には、複数のライフタイム アノテーションが含まれる" -"場合があります。これが必要になるのは、構造体自体のライフタイムだけでなく、参" -"照同士のライフタイムの関係を記述する必要がある場合です。これは非常に高度な" -"ユースケースです。" +"内部に複数の参照がある構造体には、複数のライフタイム アノテーションが含まれる場" +"合があります。これが必要になるのは、構造体自体のライフタイムだけでなく、参照同士" +"のライフタイムの関係を記述する必要がある場合です。これは非常に高度なユースケース" +"です。" #: src/lifetimes/exercise.md msgid "" "In this exercise, you will build a parser for the [protobuf binary encoding]" -"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's " -"simpler than it seems! This illustrates a common parsing pattern, passing " -"slices of data. The underlying data itself is never copied." +"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's 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/)用のパーサーを作成します。見かけよりも簡単ですの" -"で、心配はいりません。これは、データのスライスを渡す一般的な解析パターンを示" -"しています。基になるデータ自体がコピーされることはありません。" +"この演習では、[protobuf バイナリ エンコード](https://protobuf.dev/programming-" +"guides/encoding/)用のパーサーを作成します。見かけよりも簡単ですので、心配はいり" +"ません。これは、データのスライスを渡す一般的な解析パターンを示しています。基にな" +"るデータ自体がコピーされることはありません。" #: src/lifetimes/exercise.md msgid "" "Fully parsing a protobuf message requires knowing the types of the fields, " -"indexed by their field numbers. That is typically provided in a `proto` " -"file. In this exercise, we'll encode that information into `match` " -"statements in functions that get called for each field." +"indexed by their field numbers. That is typically provided in a `proto` file. " +"In this exercise, we'll encode that information into `match` statements in " +"functions that get called for each field." msgstr "" -"protobuf メッセージを完全に解析するには、フィールド番号でインデックス付けされ" -"たフィールドの型を知る必要があります。これは通常、`proto` ファイルで提供され" -"ます。この演習では、フィールドごとに呼び出される関数の `match` ステートメント" -"に、その情報をエンコードします。" +"protobuf メッセージを完全に解析するには、フィールド番号でインデックス付けされた" +"フィールドの型を知る必要があります。これは通常、`proto` ファイルで提供されます。" +"この演習では、フィールドごとに呼び出される関数の `match` ステートメントに、その" +"情報をエンコードします。" #: src/lifetimes/exercise.md msgid "We'll use the following proto:" @@ -9621,28 +9413,27 @@ msgstr "次の proto を使用します。" #: src/lifetimes/exercise.md msgid "" -"A proto message is encoded as a series of fields, one after the next. Each " -"is implemented as a \"tag\" followed by the value. The tag contains a field " -"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." +"A proto message is encoded as a series of fields, one after the next. Each is " +"implemented as a \"tag\" followed by the value. The tag contains a field 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`)と、バイト ストリームからペイロードがど" -"のように決定されるかを定義するワイヤータイプが含まれます。" +"proto メッセージは、連続するフィールドとしてエンコードされます。それぞれが後ろに" +"値を伴う「タグ」として実装されます。タグにはフィールド番号(例: `Person` メッ" +"セージの `id` フィールドには `2`)と、バイト ストリームからペイロードがどのよう" +"に決定されるかを定義するワイヤータイプが含まれます。" #: src/lifetimes/exercise.md msgid "" "Integers, including the tag, are represented with a variable-length encoding " -"called VARINT. Luckily, `parse_varint` is defined for you below. The given " -"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and " -"to parse a message into a series of calls to those callbacks." +"called VARINT. Luckily, `parse_varint` is defined for you below. The given 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` フィールドを処理し、メッセージを解析して" -"これらのコールバックに対する一連の呼び出しに変換するコールバックも定義してい" -"ます。" +"`parse_varint` は以下ですでに定義されています。また、このコードでは、`Person` " +"フィールドと `PhoneNumber` フィールドを処理し、メッセージを解析してこれらのコー" +"ルバックに対する一連の呼び出しに変換するコールバックも定義しています。" #: src/lifetimes/exercise.md msgid "" @@ -9664,28 +9455,23 @@ msgstr "/// Varint WireType は、値が単一の VARINT であることを示 #, fuzzy msgid "" "/// The I64 WireType indicates that the value is precisely 8 bytes in\n" -" /// little-endian order containing a 64-bit signed integer or double " -"type.\n" +" /// little-endian order containing a 64-bit signed integer or double type.\n" " //I64, -- not needed for this exercise\n" -" /// The Len WireType indicates that the value is a length represented as " -"a\n" +" /// The Len WireType indicates that the value is a length represented as a\n" " /// VARINT followed by exactly that number of bytes.\n" msgstr "" "//I64、 -- この演習では不要\n" -" /// Len WireType は、値が VARINT で表され、その後にちょうどそのバイト数" -"が\n" +" /// Len WireType は、値が VARINT で表され、その後にちょうどそのバイト数が\n" " /// 続くものであることを示します。\n" #: src/lifetimes/exercise.md src/lifetimes/solution.md #, fuzzy msgid "" "// The I32 WireType indicates that the value is precisely 4 bytes in\n" -" // little-endian order containing a 32-bit signed integer or float " -"type.\n" +" // little-endian order containing a 32-bit signed integer or float type.\n" " //I32, -- not needed for this exercise\n" msgstr "" -"/// I32 WireType は、値が 32 ビット符号付き整数を含むリトル エンディアン" -"で、\n" +"/// I32 WireType は、値が 32 ビット符号付き整数を含むリトル エンディアンで、\n" " /// 正確に 4 バイトであることを示します。\n" #: src/lifetimes/exercise.md src/lifetimes/solution.md @@ -9737,8 +9523,7 @@ msgid "\"Expected `u64` to be a `Varint` field\"" msgstr "" #: src/lifetimes/exercise.md src/lifetimes/solution.md -msgid "" -"/// Parse a VARINT, returning the parsed value and the remaining bytes.\n" +msgid "/// Parse a VARINT, returning the parsed value and the remaining bytes.\n" msgstr "/// VARINT を解析し、解析した値と残りのバイトを返します。\n" #: src/lifetimes/exercise.md src/lifetimes/solution.md @@ -9771,11 +9556,9 @@ msgstr "/// フィールドを解析して残りのバイトを返します。\n #: src/lifetimes/exercise.md msgid "" -"\"Based on the wire type, build a Field, consuming as many bytes as " -"necessary.\"" +"\"Based on the wire type, build a Field, consuming as many bytes as necessary.\"" msgstr "" -"\"ワイヤータイプに応じて、フィールドを構築し、必要な量のバイトを消費しま" -"す。\"" +"\"ワイヤータイプに応じて、フィールドを構築し、必要な量のバイトを消費します。\"" #: src/lifetimes/exercise.md msgid "\"Return the field, and any un-consumed bytes.\"" @@ -9800,11 +9583,11 @@ msgstr "// TODO: Person と PhoneNumber の ProtoMessage を実装します。\n #: src/lifetimes/exercise.md msgid "" -"In this exercise there are various cases where protobuf parsing might fail, " -"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in " -"the data buffer. In normal Rust code we'd handle this with the `Result` " -"enum, but for simplicity in this exercise we panic if any errors are " -"encountered. On day 4 we'll cover error handling in Rust in more detail." +"In this exercise there are various cases where protobuf parsing might fail, e." +"g. if you try to parse an `i32` when there are fewer than 4 bytes left in the " +"data buffer. In normal Rust code we'd handle this with the `Result` enum, but " +"for simplicity in this exercise we panic if any errors are encountered. On day " +"4 we'll cover error handling in Rust in more detail." msgstr "" #: src/lifetimes/solution.md @@ -9849,8 +9632,7 @@ msgstr "4 日目のトレーニングにようこそ" msgid "" "Today we will cover topics relating to building large-scale software in Rust:" msgstr "" -"本日は、Rust での大規模なソフトウェアのビルドに関連するトピックを取り上げま" -"す。" +"本日は、Rust での大規模なソフトウェアのビルドに関連するトピックを取り上げます。" #: src/welcome-day-4.md msgid "Iterators: a deep dive on the `Iterator` trait." @@ -9897,16 +9679,16 @@ msgstr "FromIterator" #: src/iterators/iterator.md msgid "" -"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) " -"trait supports iterating over values in a collection. It requires a `next` " -"method and provides lots of methods. Many standard library types implement " -"`Iterator`, and you can implement it yourself, too:" +"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) trait " +"supports iterating over values in a collection. It requires a `next` 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` が実装されていますが、自分で実装する" -"こともできます。" +"は、コレクション内の一連の要素に対して順番に処理を適用することを可能にします。こ" +"のトレイトはnextメソッドを必要とし、それにより多くのメソッドを提供します。多くの" +"標準ライブラリ型で `Iterator` が実装されていますが、自分で実装することもできま" +"す。" #: src/iterators/iterator.md msgid "\"fib({i}): {n}\"" @@ -9914,42 +9696,41 @@ msgstr "\"fib({i}): {n}\"" #: src/iterators/iterator.md msgid "" -"The `Iterator` trait implements many common functional programming " -"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is " -"the trait where you can find all the documentation about them. In Rust these " -"functions should produce the code as efficient as equivalent imperative " -"implementations." +"The `Iterator` trait implements many common functional programming operations " +"over collections (e.g. `map`, `filter`, `reduce`, etc). This is the trait where " +"you can find all the documentation about them. In Rust these functions should " +"produce the code as efficient as equivalent imperative implementations." msgstr "" -"`Iterator` トレイトは、コレクションに対する多くの一般的な関数型プログラミン" -"グ オペレーション(例: `map`、`filter`、`reduce` など)を実装します。このトレ" -"イトのドキュメントにおいて、これらのすべてのオペレーションに関する説明を確認" -"できます。Rust では、これらの関数により、同等の命令型実装と同じくらい効率的な" -"コードが生成されます。" +"`Iterator` トレイトは、コレクションに対する多くの一般的な関数型プログラミング オ" +"ペレーション(例: `map`、`filter`、`reduce` など)を実装します。このトレイトのド" +"キュメントにおいて、これらのすべてのオペレーションに関する説明を確認できます。" +"Rust では、これらの関数により、同等の命令型実装と同じくらい効率的なコードが生成" +"されます。" #: src/iterators/iterator.md msgid "" "`IntoIterator` is the trait that makes for loops work. It is implemented by " -"collection types such as `Vec` and references to them such as `&Vec` " -"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." +"collection types such as `Vec` and references to them such as `&Vec` 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()` が" -"存在しないのはこのためです。" +"(`Vec` など)と、それらに対する参照(`&Vec`、`&[T]` など)において実装さ" +"れています。また、範囲を表す型においても実装されています。`for i in some_vec " +"{ .. }` を使用してベクターを反復処理できるのに、`some_vec.next()` が存在しないの" +"はこのためです。" #: src/iterators/intoiterator.md msgid "" "The `Iterator` trait tells you how to _iterate_ once you have created an " -"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/" -"iter/trait.IntoIterator.html) defines how to create an iterator for a type. " -"It is used automatically by the `for` loop." +"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/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` ループによって自動的に使用されます。" +"`Iterator` トレイトは、イテレータを作成した後に反復処理を行う方法を示します。関" +"連するトレイト [`IntoIterator`](https://doc.rust-lang.org/std/iter/trait." +"IntoIterator.html) は、ある型に対するイテレータを作成する方法を定義します。これ" +"は `for` ループによって自動的に使用されます。" #: src/iterators/intoiterator.md msgid "\"point = {x}, {y}\"" @@ -9960,8 +9741,8 @@ msgid "" "Click through to the docs for `IntoIterator`. Every implementation of " "`IntoIterator` must declare two types:" msgstr "" -"`IntoIterator`のドキュメントをクリックしてご覧ください。`IntoIterator` のすべ" -"ての実装で、次の 2 つの型を宣言する必要があります。" +"`IntoIterator`のドキュメントをクリックしてご覧ください。`IntoIterator` のすべて" +"の実装で、次の 2 つの型を宣言する必要があります。" #: src/iterators/intoiterator.md msgid "`Item`: the type to iterate over, such as `i8`," @@ -9976,8 +9757,8 @@ 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`を返します。" +"`IntoIter`と`Item`は関連があり、イテレータは`Item`と同じ型を持つ必要があります。" +"すなわち、`Option`を返します。" #: src/iterators/intoiterator.md msgid "The example iterates over all combinations of x and y coordinates." @@ -9988,38 +9769,37 @@ 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` の所有権を取得することに着目してくだ" -"さい。" +"`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` に保存します。" +"この問題を修正するには、`&Grid` に `IntoIterator` を実装し、`Grid` への参照を " +"`GridIter` に保存します。" #: src/iterators/intoiterator.md msgid "" -"The same problem can occur for standard library types: `for e in " -"some_vector` will take ownership of `some_vector` and iterate over owned " -"elements from that vector. Use `for e in &some_vector` instead, to iterate " -"over references to elements of `some_vector`." +"The same problem can occur for standard library types: `for e in some_vector` " +"will take ownership of `some_vector` and iterate over owned 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` を使用します。" +"標準ライブラリ型でも同じ問題が発生する可能性があります。`for e in some_vector` " +"は、`some_vector` の所有権を取得し、そのベクターの所有要素を反復処理します。" +"`some_vector` の要素への参照を反復処理するには、代わりに `for e in " +"&some_vector` を使用します。" #: src/iterators/fromiterator.md msgid "" "[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) " -"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/" -"std/iter/trait.Iterator.html)." +"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." +"[`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 @@ -10036,21 +9816,20 @@ msgstr "このメソッドで `B` を指定するには、次の 2 つの方法 #: src/iterators/fromiterator.md msgid "" -"With the \"turbofish\": `some_iterator.collect::()`, as " -"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` " -"elements." +"With the \"turbofish\": `some_iterator.collect::()`, as shown. " +"The `_` shorthand used here lets Rust infer the type of the `Vec` elements." msgstr "" "「turbofish」を使用する場合: 例えば、上記における、`some_iterator.collect::" -"()`。ここで使用されている_ はRustに`Vecの`要素の方を推測させ" -"るためのものです。" +"()`。ここで使用されている_ は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()`。" -"この形式を使用するように例を書き換えてください。" +"型推論を使用する場合: `let prime_squares: Vec<_> = some_iterator.collect()`。こ" +"の形式を使用するように例を書き換えてください。" #: src/iterators/fromiterator.md msgid "" @@ -10064,13 +9843,13 @@ msgstr "" #: src/iterators/exercise.md msgid "" -"In this exercise, you will need to find and use some of the provided methods " -"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) " -"trait to implement a complex calculation." +"In this exercise, you will need to find and use some of the provided methods 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) トレイトで提供されているメソッドをいくつか" -"を探して使用する必要があります。" +"この演習では、複雑な計算を実装するために[`Iterator`](https://doc.rust-lang.org/" +"std/iter/trait.Iterator.html) トレイトで提供されているメソッドをいくつかを探して" +"使用する必要があります。" #: src/iterators/exercise.md msgid "" @@ -10078,14 +9857,12 @@ msgid "" "pass. Use an iterator expression and `collect` the result to construct the " "return value." msgstr "" -"次のコードを にコピーし、テストが通るようにして" -"ください。イテレータ式を使用し、その結果を`collect`することで戻り値を生成しま" -"す。" +"次のコードを にコピーし、テストが通るようにしてく" +"ださい。イテレータ式を使用し、その結果を`collect`することで戻り値を生成します。" #: src/iterators/exercise.md src/iterators/solution.md msgid "" -"/// Calculate the differences between elements of `values` offset by " -"`offset`,\n" +"/// Calculate the differences between elements of `values` offset by `offset`,\n" "/// wrapping around from the end of `values` to the beginning.\n" "///\n" "/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\n" @@ -10101,8 +9878,7 @@ msgstr "use、super、self" #: src/modules/modules.md msgid "We have seen how `impl` blocks let us namespace functions to a type." -msgstr "" -"`impl` ブロックで関数を型の名前空間に所属させる方法はすでに見てきました。" +msgstr "`impl` ブロックで関数を型の名前空間に所属させる方法はすでに見てきました。" #: src/modules/modules.md msgid "Similarly, `mod` lets us namespace types and functions:" @@ -10118,42 +9894,40 @@ 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." +"Packages provide functionality and include a `Cargo.toml` file that describes " +"how to build a bundle of 1+ crates." msgstr "" -"パッケージ(package)は機能を提供するものであり、一つ以上のクレートをビルドする" -"方法を記述した`Cargo.toml` ファイルを含むものです。" +"パッケージ(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." +"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 はそれを別のファイルで探します。" +msgid "Omitting the module content will tell Rust to look for it in another file:" +msgstr "モジュールの定義内容を省略すると、Rust はそれを別のファイルで探します。" #: src/modules/filesystem.md #, fuzzy msgid "" -"This tells Rust that the `garden` module content is found at `src/garden." -"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/" -"vegetables.rs`." +"This tells Rust that the `garden` module content is found at `src/garden.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` にあります。" +"これにより、`garden` モジュールの定義内容が `src/garden.rs` にあることを Rust に" +"伝えます。同様に、`garden::vegetables` モジュールは `src/garden/vegetables.rs` " +"にあります。" #: src/modules/filesystem.md msgid "The `crate` root is in:" @@ -10169,13 +9943,12 @@ msgstr "`src/main.rs`(バイナリ クレートの場合)" #: src/modules/filesystem.md msgid "" -"Modules defined in files can be documented, too, using \"inner doc " -"comments\". These document the item that contains them -- in this case, a " -"module." +"Modules defined in files can be documented, too, using \"inner doc comments\". " +"These document the item that contains them -- in this case, a module." msgstr "" -"ファイルで定義されたモジュールに対して、「内部ドキュメント用コメント」を使用" -"して説明を加えることもできます。これらのコメントは、それが含まれるアイテム" -"(この場合はモジュール)に対する説明になります。" +"ファイルで定義されたモジュールに対して、「内部ドキュメント用コメント」を使用して" +"説明を加えることもできます。これらのコメントは、それが含まれるアイテム(この場合" +"はモジュール)に対する説明になります。" #: src/modules/filesystem.md msgid "" @@ -10203,29 +9976,28 @@ 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 以降のエディションでも依然としてサポート" -"されています。" +"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." +"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で区別するのが難しい場合があるか" -"らです。" +"`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:" +"The place rust will look for modules can be changed with a compiler directive:" msgstr "" "Rust がモジュールを検索する場所は、コンパイラ ディレクティブで変更できます。" @@ -10235,11 +10007,11 @@ 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." +"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` という名" -"前のファイルにモジュールのテストを配置する場合に便利です。" +"これは、たとえば Go でよく行われているように、`some_module_test.rs` という名前の" +"ファイルにモジュールのテストを配置する場合に便利です。" #: src/modules/visibility.md msgid "Modules are a privacy boundary:" @@ -10257,8 +10029,8 @@ 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`." +"In other words, if an item is visible in module `foo`, it's visible in all the " +"descendants of `foo`." msgstr "" "言い換えれば、あるアイテムがモジュール `foo` から見える場合、そのアイテムは " "`foo` のすべての子孫から見えます。" @@ -10285,8 +10057,8 @@ msgstr "モジュールを公開するには `pub` キーワードを使用し #: src/modules/visibility.md msgid "" -"Additionally, there are advanced `pub(...)` specifiers to restrict the scope " -"of public visibility." +"Additionally, there are advanced `pub(...)` specifiers to restrict the scope of " +"public visibility." msgstr "" "また、高度な `pub(...)` 指定子を使用して、公開範囲を制限することもできます。" @@ -10295,8 +10067,8 @@ 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) をご覧ください。" +"[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." @@ -10305,24 +10077,24 @@ 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)." +"In any case, visibility must be granted to an ancestor module (and all of its " +"descendants)." msgstr "" -"どのような場合も、祖先モジュール(およびそのすべての子孫)に可視性を与える必" -"要があります。" +"どのような場合も、祖先モジュール(およびそのすべての子孫)に可視性を与える必要が" +"あります。" #: 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:" +"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` を使用して別のモジュールのシンボルをスコープに取り込むこ" -"とができます。次のような記述はモジュールの先頭においてよく見られます。" +"モジュールは、`use` を使用して別のモジュールのシンボルをスコープに取り込むことが" +"できます。次のような記述はモジュールの先頭においてよく見られます。" #: src/modules/paths.md msgid "Paths" @@ -10358,62 +10130,60 @@ 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" +"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` に、以下のように記述します。" +"シンボルは、より短いパスで「再エクスポート」するのが一般的です。たとえば、クレー" +"ト内の最上位の `lib.rs` に、以下のように記述します。" #: src/modules/paths.md msgid "" "making `DiskStorage` and `NetworkStorage` available to other crates with a " "convenient, short path." msgstr "" -"これにより、短く使いやすいパスを使用して、`DiskStorage` と `NetworkStorage` " -"を他のクレートで使用できるようになります。" +"これにより、短く使いやすいパスを使用して、`DiskStorage` と `NetworkStorage` を他" +"のクレートで使用できるようになります。" #: src/modules/paths.md msgid "" "For the most part, only items that appear in a module need to be `use`'d. " -"However, a trait must be in scope to call any methods on that trait, even if " -"a type implementing that trait is already in scope. For example, to use the " +"However, a trait must be in scope to call any methods on that trait, even if a " +"type implementing that trait is already in scope. For example, to use the " "`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` という記述が必要" -"になります。" +"ほとんどの場合、`use` を指定する必要があるのはモジュール内で実際に直接使用される" +"アイテムのみです。ただし、あるトレイトを実装する型がすでにスコープに含まれている" +"場合でも、そのトレイトのメソッドを呼び出すには、そのトレイトがスコープに含まれて" +"いる必要があります。たとえば、`Read` トレイトを実装する型で `read_to_string` メ" +"ソッドを使用するには、`use std::io::Read` という記述が必要になります。" #: src/modules/paths.md msgid "" -"The `use` statement can have a wildcard: `use std::io::*`. This is " -"discouraged because it is not clear which items are imported, and those " -"might change over time." +"The `use` statement can have a wildcard: `use std::io::*`. This is discouraged " +"because it is not clear which items are imported, and those might change over " +"time." msgstr "" -"`use` ステートメントには `use std::io::*` というようにワイルドカードを含める" -"ことができます。この方法は、どのアイテムがインポートされるのかが明確ではな" -"く、時間の経過とともに変化する可能性があるため、おすすめしません。" +"`use` ステートメントには `use std::io::*` というようにワイルドカードを含めること" +"ができます。この方法は、どのアイテムがインポートされるのかが明確ではなく、時間の" +"経過とともに変化する可能性があるため、おすすめしません。" #: src/modules/exercise.md msgid "" -"In this exercise, you will reorganize a small GUI Library implementation. " -"This library defines a `Widget` trait and a few implementations of that " -"trait, as well as a `main` function." +"In this exercise, you will reorganize a small GUI Library implementation. This " +"library defines a `Widget` trait and a few implementations of that trait, as " +"well as a `main` function." msgstr "" "この演習では、小規模な GUI ライブラリ実装を再編成します。このライブラリでは、" -"`Widget` トレイト、そのトレイトのいくつかの実装、`main` 関数を定義していま" -"す。" +"`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 @@ -10425,16 +10195,16 @@ 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 プロジェクトを作成する必要があります。" +"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/main.rs` を編集して `mod` ステートメントを追加し、`src` ディレク" +"トリにファイルを追加します。" #: src/modules/exercise.md msgid "Source" @@ -10466,8 +10236,7 @@ msgstr "// 枠線用に 4 つのパディングを追加します。\n" #: src/modules/exercise.md msgid "" -"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use " -"the\n" +"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use the\n" " // ?-operator here instead of .unwrap().\n" msgstr "" "// TODO: Result<(), std::fmt::Error> を返すように draw_into を変更します。次" @@ -10516,13 +10285,12 @@ msgstr "\"Click me!\"" #: src/modules/exercise.md msgid "" -"Encourage students to divide the code in a way that feels natural for them, " -"and get accustomed to the required `mod`, `use`, and `pub` declarations. " -"Afterward, discuss what organizations are most idiomatic." +"Encourage students to divide the code in a way that feels natural for them, and " +"get accustomed to the required `mod`, `use`, and `pub` declarations. Afterward, " +"discuss what organizations are most idiomatic." msgstr "" -"自分にとって自然な方法でコードを分割し、必要な `mod`、`use`、`pub` 宣言に慣れ" -"るよう受講者に促します。その後、どの構成が最も慣用的であるかについて話し合い" -"ます。" +"自分にとって自然な方法でコードを分割し、必要な `mod`、`use`、`pub` 宣言に慣れる" +"よう受講者に促します。その後、どの構成が最も慣用的であるかについて話し合います。" #: src/modules/solution.md msgid "// ---- src/widgets.rs ----\n" @@ -10587,8 +10355,8 @@ msgid "" " // the ?-operator here instead of .unwrap().\n" msgstr "" "// TODO: エラー処理について学習した後で、\n" -" // Result<(), std::fmt::Error> を返すように draw_into を変更できま" -"す。次に、ここで\n" +" // Result<(), std::fmt::Error> を返すように draw_into を変更できます。次" +"に、ここで\n" " // .unwrap() の代わりに ? 演算子を使用します。\n" #: src/modules/solution.md @@ -10601,8 +10369,7 @@ msgstr "ユニットテスト" #: src/testing/unit-tests.md msgid "Rust and Cargo come with a simple unit test framework:" -msgstr "" -"Rust と Cargo には、シンプルな単体テスト フレームワークが付属しています。" +msgstr "Rust と Cargo には、シンプルな単体テスト フレームワークが付属しています。" #: src/testing/unit-tests.md msgid "Unit tests are supported throughout your code." @@ -10614,13 +10381,13 @@ msgstr "統合テストは`tests/`ディレクトリ内に記述します。" #: src/testing/unit-tests.md msgid "" -"Tests are marked with `#[test]`. Unit tests are often put in a nested " -"`tests` module, using `#[cfg(test)]` to conditionally compile them only when " -"building tests." +"Tests are marked with `#[test]`. Unit tests are often put in a nested `tests` " +"module, using `#[cfg(test)]` to conditionally compile them only when building " +"tests." msgstr "" -"テストには `#[test]` のマークが付きます。多くの場合、単体テストは通常ネストさ" -"れた`tests`モジュールに配置され、`#[cfg(test)]`によりテストのビルド時にのみコ" -"ンパイルされるようになります。" +"テストには `#[test]` のマークが付きます。多くの場合、単体テストは通常ネストされ" +"た`tests`モジュールに配置され、`#[cfg(test)]`によりテストのビルド時にのみコンパ" +"イルされるようになります。" #: src/testing/unit-tests.md msgid "\"Hello World\"" @@ -10633,8 +10400,8 @@ msgstr "これにより、プライベート ヘルパーの単体テストを #: src/testing/unit-tests.md msgid "The `#[cfg(test)]` attribute is only active when you run `cargo test`." msgstr "" -"`#[cfg(test)]` 属性が付与されたコードは `cargo test` の実行時にのみ有効になり" -"ます。" +"`#[cfg(test)]` 属性が付与されたコードは `cargo test` の実行時にのみ有効になりま" +"す。" #: src/testing/unit-tests.md msgid "Run the tests in the playground in order to show their results." @@ -10646,8 +10413,7 @@ msgstr "インテグレーションテスト" #: src/testing/other.md msgid "If you want to test your library as a client, use an integration test." -msgstr "" -"ライブラリをクライアントとしてテストする場合は、統合テストを使用します。" +msgstr "ライブラリをクライアントとしてテストする場合は、統合テストを使用します。" #: src/testing/other.md msgid "Create a `.rs` file under `tests/`:" @@ -10689,8 +10455,7 @@ msgstr "" #: src/testing/other.md msgid "Code blocks in `///` comments are automatically seen as Rust code." -msgstr "" -"`///` コメント内のコードブロックは、自動的に Rust コードとみなされます。" +msgstr "`///` コメント内のコードブロックは、自動的に Rust コードとみなされます。" #: src/testing/other.md msgid "The code will be compiled and executed as part of `cargo test`." @@ -10698,11 +10463,11 @@ msgstr "コードは `cargo test` の一環としてコンパイルされ、実 #: src/testing/other.md msgid "" -"Adding `#` in the code will hide it from the docs, but will still compile/" -"run it." +"Adding `#` in the code will hide it from the docs, but will still compile/run " +"it." msgstr "" -"コードに `#` を追加すると、ドキュメントには表示されなくなりますが、コンパイル" -"と実行は引き続き行われます。" +"コードに `#` を追加すると、ドキュメントには表示されなくなりますが、コンパイルと" +"実行は引き続き行われます。" #: src/testing/other.md msgid "" @@ -10710,18 +10475,18 @@ msgid "" "version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0)." msgstr "" "[Rust プレイグラウンド](https://play.rust-lang.org/?" -"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0) " -"で上記のコードをテストします。" +"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0) で" +"上記のコードをテストします。" #: src/testing/lints.md msgid "" -"The Rust compiler produces fantastic error messages, as well as helpful " -"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even " -"more lints, organized into groups that can be enabled per-project." +"The Rust compiler produces fantastic error messages, as well as helpful 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 がグループにまと" -"められており、プロジェクトごとに有効にできます。" +"(https://doc.rust-lang.org/clippy/) では、さらに多くの lint がグループにまとめら" +"れており、プロジェクトごとに有効にできます。" #: src/testing/lints.md msgid "\"X probably fits in a u16, right? {}\"" @@ -10729,41 +10494,41 @@ msgstr "\"X probably fits in a u16, right? {}\"" #: src/testing/lints.md msgid "" -"Run the code sample and examine the error message. There are also lints " -"visible here, but those will not be shown once the code compiles. Switch to " -"the Playground site to show those lints." +"Run the code sample and examine the error message. There are also lints visible " +"here, but those will not be shown once the code compiles. Switch to the " +"Playground site to show those lints." msgstr "" -"コードサンプルを実行してエラー メッセージを確認します。ここにも lint が表示さ" -"れていますが、コードのコンパイルが一度コンパイル出来ると表示されなくなりま" -"す。これらの lint を表示するには、プレイグラウンド サイトに切り替えます。" +"コードサンプルを実行してエラー メッセージを確認します。ここにも lint が表示され" +"ていますが、コードのコンパイルが一度コンパイル出来ると表示されなくなります。これ" +"らの lint を表示するには、プレイグラウンド サイトに切り替えます。" #: src/testing/lints.md msgid "" -"After resolving the lints, run `clippy` on the playground site to show " -"clippy warnings. Clippy has extensive documentation of its lints, and adds " -"new lints (including default-deny lints) all the time." +"After resolving the lints, run `clippy` on the playground site to show 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(デフォルトでエラーになるリント を含む)が常に追加されています。" +"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." +"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` or " +"via your editor." msgstr "" -"`help: ...` が付くエラーや警告は、`cargo fix` またはエディタを使用して修正で" -"きます。" +"`help: ...` が付くエラーや警告は、`cargo fix` またはエディタを使用して修正できま" +"す。" #: src/testing/exercise.md msgid "" -"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used " -"to validate credit card numbers. The algorithm takes a string as input and " -"does the following to validate the credit card number:" +"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used 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) は、クレ" -"ジット カード番号の検証に使用されます。このアルゴリズムは文字列を入力として受" -"け取り、以下の処理を行ってクレジット カード番号を検証します。" +"[Luhn アルゴリズム](https://en.wikipedia.org/wiki/Luhn_algorithm) は、クレジッ" +"ト カード番号の検証に使用されます。このアルゴリズムは文字列を入力として受け取" +"り、以下の処理を行ってクレジット カード番号を検証します。" #: src/testing/exercise.md #, fuzzy @@ -10775,17 +10540,17 @@ 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 倍にします。" +"**右から左に**見ていきながら、それぞれ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` になります。" +"桁を 2 倍にした後、結果が 9 より大きい場合はその桁を合計します。したがって、`7` " +"を 2 倍すると `14` になり、`1 + 4 = 5` になります。" #: src/testing/exercise.md msgid "Sum all the undoubled and doubled digits." @@ -10798,22 +10563,21 @@ msgstr "クレジット カード番号は、合計が `0` で終わる場合に #: src/testing/exercise.md #, fuzzy msgid "" -"The provided code provides a buggy implementation of the luhn algorithm, " -"along with two basic unit tests that confirm that most of the algorithm is " +"The provided code provides a buggy implementation of the luhn algorithm, along " +"with two basic unit tests that confirm that most of the algorithm is " "implemented correctly." msgstr "" -"提供されているコードでは、luhn アルゴリズムのバグのある実装と、ほとんどのアル" -"ゴリズムが正しく実装されていることを確認する 2 つの基本的な単体テストを提供し" -"ています。" +"提供されているコードでは、luhn アルゴリズムのバグのある実装と、ほとんどのアルゴ" +"リズムが正しく実装されていることを確認する 2 つの基本的な単体テストを提供してい" +"ます。" #: src/testing/exercise.md msgid "" -"Copy the code below to and write additional " -"tests to uncover bugs in the provided implementation, fixing any bugs you " -"find." +"Copy the code below to and write additional 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\"" @@ -10937,8 +10701,7 @@ msgstr "\"v[100]: {}\"" #: src/error-handling/panics.md msgid "Panics are for unrecoverable and unexpected errors." -msgstr "" -"パニックは、回復不能なエラーや予期しないエラーに使用するためのものです。" +msgstr "パニックは、回復不能なエラーや予期しないエラーに使用するためのものです。" #: src/error-handling/panics.md msgid "Panics are symptoms of bugs in the program." @@ -10955,31 +10718,28 @@ msgstr "アサーション(`assert!` など)は失敗時にパニックに #: src/error-handling/panics.md msgid "Purpose-specific panics can use the `panic!` macro." -msgstr "" -"特定の目的でパニックさせてあい場合には、`panic!` マクロを使用できます。" +msgstr "特定の目的でパニックさせてあい場合には、`panic!` マクロを使用できます。" #: src/error-handling/panics.md msgid "" -"A panic will \"unwind\" the stack, dropping values just as if the functions " -"had returned." +"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." +msgid "Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable." msgstr "" -"クラッシュが許容されない場合は、パニックが発生しない API(`Vec::get` など)を" -"使用します。" +"クラッシュが許容されない場合は、パニックが発生しない API(`Vec::get` など)を使" +"用します。" #: src/error-handling/panics.md msgid "" -"By default, a panic will cause the stack to unwind. The unwinding can be " -"caught:" +"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!\"" @@ -10995,31 +10755,29 @@ msgstr "\"oh no!\"" #: src/error-handling/panics.md msgid "" -"Catching is unusual; do not attempt to implement exceptions with " -"`catch_unwind`!" +"Catching is unusual; do not attempt to implement exceptions with `catch_unwind`!" msgstr "" -"キャッチは一般的ではないため、`catch_unwind` を使用して例外処理を実装しようと" -"しないでください。" +"キャッチは一般的ではないため、`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 つのリクエストがクラッシュした場合でも実行し続ける必要があるサー" -"バーで有用です。" +"これは、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'` が設定されている場合は機能しませ" -"ん。" +"これは、`Cargo.toml` で `panic = 'abort'` が設定されている場合は機能しません。" #: src/error-handling/result.md msgid "" -"Our primary mechanism for error handling in Rust is the [`Result`](https://" -"doc.rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly " -"saw when discussing standard library types." +"Our primary mechanism for error handling in Rust is the [`Result`](https://doc." +"rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly saw " +"when discussing standard library types." msgstr "" #: src/error-handling/result.md @@ -11038,17 +10796,16 @@ msgstr "" msgid "" "Like with `Option`, there is no way to forget to handle an error: You cannot " "access either the success value or the error value without first pattern " -"matching on the `Result` to check which variant you have. Methods like " -"`unwrap` make it easier to write quick-and-dirty code that doesn't do robust " -"error handling, but means that you can always see in your source code where " -"proper error handling is being skipped." +"matching on the `Result` to check which variant you have. Methods like `unwrap` " +"make it easier to write quick-and-dirty code that doesn't do robust error " +"handling, but means that you can always see in your source code where proper " +"error handling is being skipped." msgstr "" #: src/error-handling/result.md msgid "" "It may be helpful to compare error handling in Rust to error handling " -"conventions that students may be familiar with from other programming " -"languages." +"conventions that students may be familiar with from other programming languages." msgstr "" #: src/error-handling/result.md @@ -11059,8 +10816,7 @@ msgstr "" msgid "" "In most languages with exceptions, whether or not a function can throw an " "exception is not visible as part of its type signature. This generally means " -"that you can't tell when calling a function if it may throw an exception or " -"not." +"that you can't tell when calling a function if it may throw an exception or not." msgstr "" #: src/error-handling/result.md @@ -11084,21 +10840,20 @@ msgstr "" #: src/error-handling/result.md msgid "" "Depending on the language it may be possible to forget to check the error " -"value, in which case you may be accessing an uninitialized or otherwise " -"invalid success value." +"value, in which case you may be accessing an uninitialized or otherwise invalid " +"success value." msgstr "" #: src/error-handling/try.md msgid "" -"Runtime errors like connection-refused or file-not-found are handled with " -"the `Result` type, but matching this type on every call can be cumbersome. " -"The try-operator `?` is used to return errors to the caller. It lets you " -"turn the common" +"Runtime errors like connection-refused or file-not-found are handled with the " +"`Result` type, but matching this type on every call can be cumbersome. 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 演算子 `?` は、呼び出し元にエラーを返すのに使用されます。これにより、一般" -"的な以下のコードを、はるかにシンプルなコードに変換できます。" +"connection-refused や file-not-found などのランタイム エラーは `Result` 型で処理" +"されますが、すべての呼び出しでこの型を照合するのは面倒な場合があります。try 演算" +"子 `?` は、呼び出し元にエラーを返すのに使用されます。これにより、一般的な以下の" +"コードを、はるかにシンプルなコードに変換できます。" #: src/error-handling/try.md msgid "into the much simpler" @@ -11135,21 +10890,21 @@ msgid "" "Use the `fs::write` call to test out the different scenarios: no file, empty " "file, file with username." msgstr "" -"`fs::write` 呼び出しを使用して、さまざまなシナリオ(ファイルがない、空のファ" -"イル、ユーザー名のあるファイルなど)をテストします。" +"`fs::write` 呼び出しを使用して、さまざまなシナリオ(ファイルがない、空のファイ" +"ル、ユーザー名のあるファイルなど)をテストします。" #: src/error-handling/try.md #, fuzzy msgid "" "Note that `main` can return a `Result<(), E>` as long as it implements `std::" -"process::Termination`. In practice, this means that `E` implements `Debug`. " -"The executable will print the `Err` variant and return a nonzero exit status " -"on error." +"process::Termination`. In practice, this means that `E` implements `Debug`. 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バリアントを出力し、ゼロ以" -"外の終了ステータスを返します。" +"なお、`main` は `std::process:Termination` を実装している限り、Result<(), E>` を" +"返すことができます。つまり、実際には `E` が`Debug` を実装していることを意味しま" +"す。この実行可能ファイルはエラー発生時にErrバリアントを出力し、ゼロ以外の終了ス" +"テータスを返します。" #: src/error-handling/try-conversions.md msgid "" @@ -11167,9 +10922,9 @@ msgid "" "type returned by the function. This makes it easy to encapsulate errors into " "higher-level errors." msgstr "" -"ここでの `From::from` 呼び出しは、エラー型を関数が返す型に変換しようとしてい" -"ることを意味します。これにより、エラーを上位レベルのエラーに簡単にカプセル化" -"できます。" +"ここでの `From::from` 呼び出しは、エラー型を関数が返す型に変換しようとしているこ" +"とを意味します。これにより、エラーを上位レベルのエラーに簡単にカプセル化できま" +"す。" #: src/error-handling/try-conversions.md #, fuzzy @@ -11188,16 +10943,16 @@ msgstr "//fs::write(\"config.dat\", \"\").unwrap();\n" #: src/error-handling/try-conversions.md msgid "" "The `?` operator must return a value compatible with the return type of the " -"function. For `Result`, it means that the error types have to be compatible. " -"A function that returns `Result` can only use `?` on a value " -"of type `Result` if `ErrorOuter` and `ErrorInner` are the " -"same type or if `ErrorOuter` implements `From`." +"function. For `Result`, it means that the error types have to be compatible. A " +"function that returns `Result` can only use `?` on a value of " +"type `Result` if `ErrorOuter` and `ErrorInner` are the same type " +"or if `ErrorOuter` implements `From`." msgstr "" "`?` 演算子は、関数の戻り値の型と互換性のある値を返す必要があります。つまり、" -"`Result` の場合、エラー型に互換性がなければなりません。`Result` を返す関数は、`ErrorOuter` と `ErrorInner` が同じ型であるか、" -"`ErrorOuter` が `From` を実装している場合にのみ、型 `Result` の値に `?` を使用できます。" +"`Result` の場合、エラー型に互換性がなければなりません。`Result` " +"を返す関数は、`ErrorOuter` と `ErrorInner` が同じ型であるか、`ErrorOuter` が " +"`From` を実装している場合にのみ、型 `Result` の値に " +"`?` を使用できます。" #: src/error-handling/try-conversions.md msgid "" @@ -11210,11 +10965,11 @@ msgstr "" #: src/error-handling/try-conversions.md msgid "" "There is no compatibility requirement for `Option`. A function returning " -"`Option` can use the `?` operator on `Option` for arbitrary `T` and " -"`U` types." +"`Option` can use the `?` operator on `Option` for arbitrary `T` and `U` " +"types." msgstr "" -"`Option`には互換性の要件はありません。`Option`を返す関数は、任意のT型とU型" -"に対して、?演算子をOptionに適用できます。" +"`Option`には互換性の要件はありません。`Option`を返す関数は、任意のT型とU型に" +"対して、?演算子をOptionに適用できます。" #: src/error-handling/try-conversions.md msgid "" @@ -11222,8 +10977,8 @@ 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` に `?` を使用できません。その逆も同様です。ただ" +"し、`Option::ok_or` は `Option` を `Result` に変換でき、`Result::ok` は " "`Result` を `Option` に変換できます。" #: src/error-handling/error.md @@ -11232,15 +10987,13 @@ msgstr "動的なエラー型" #: src/error-handling/error.md msgid "" -"Sometimes we want to allow any type of error to be returned without writing " -"our own enum covering all the different possibilities. The `std::error::" -"Error` trait makes it easy to create a trait object that can contain any " -"error." +"Sometimes we want to allow any type of error to be returned without writing our " +"own enum covering all the different possibilities. The `std::error::Error` " +"trait makes it easy to create a trait object that can contain any error." msgstr "" -"さまざまな可能性をカバーする独自の列挙型を記述することなく、あらゆる種類のエ" -"ラーを返せるようにしたい場合があります。`std::error::Error` トレイトを使用す" -"ると、あらゆるエラーを含めることができるトレイト オブジェクトを簡単に作成でき" -"ます。" +"さまざまな可能性をカバーする独自の列挙型を記述することなく、あらゆる種類のエラー" +"を返せるようにしたい場合があります。`std::error::Error` トレイトを使用すると、あ" +"らゆるエラーを含めることができるトレイト オブジェクトを簡単に作成できます。" #: src/error-handling/error.md msgid "\"count.dat\"" @@ -11260,8 +11013,8 @@ 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`)." +"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` から)を返すことができます。" @@ -11269,15 +11022,15 @@ msgstr "" #: src/error-handling/error.md msgid "" "Boxing errors saves on code, but gives up the ability to cleanly handle " -"different error cases differently in the program. As such it's generally not " -"a good idea to use `Box` in the public API of a library, but it " -"can be a good option in a program where you just want to display the error " -"message somewhere." +"different error cases differently in the program. As such it's generally not a " +"good idea to use `Box` in the public API of a library, but it can be " +"a good option in a program where you just want to display the error message " +"somewhere." msgstr "" -"エラーをボックス化することでコードを節約できますが、プログラムで異なるエラー" -"ケースを異なる方法で適切に処理する機能が失われます。そのため、ライブラリの公" -"開 API で `Box` を使用することは通常おすすめしませんが、エラー " -"メッセージをどこかに表示したいだけのプログラムでは適切な選択肢となりえます。" +"エラーをボックス化することでコードを節約できますが、プログラムで異なるエラーケー" +"スを異なる方法で適切に処理する機能が失われます。そのため、ライブラリの公開 API " +"で `Box` を使用することは通常おすすめしませんが、エラー メッセージを" +"どこかに表示したいだけのプログラムでは適切な選択肢となりえます。" #: src/error-handling/error.md msgid "" @@ -11318,28 +11071,26 @@ 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` によって提供されます。このマクロには、エラー" -"型を簡潔に定義するのに役立つ属性が数多く用意されています。" +"`Error` 導出マクロは `thiserror` によって提供されます。このマクロには、エラー型" +"を簡潔に定義するのに役立つ属性が数多く用意されています。" #: src/error-handling/thiserror.md msgid "The message from `#[error]` is used to derive the `Display` trait." msgstr "" -"`#[error]` からのメッセージは、`Display` トレイトを導出するために使用されま" -"す。" +"`#[error]` からのメッセージは、`Display` トレイトを導出するために使用されます。" #: src/error-handling/thiserror.md msgid "" -"Note that the (`thiserror::`)`Error` derive macro, while it has the effect " -"of implementing the (`std::error::`)`Error` trait, is not the same this; " -"traits and macros do not share a namespace." +"Note that the (`thiserror::`)`Error` derive macro, while it has the effect of " +"implementing the (`std::error::`)`Error` trait, is not the same this; traits " +"and macros do not share a namespace." msgstr "" #: src/error-handling/anyhow.md msgid "" -"The [`anyhow`](https://docs.rs/anyhow/) crate provides a rich error type " -"with support for carrying additional contextual information, which can be " -"used to provide a semantic trace of what the program was doing leading up to " -"the error." +"The [`anyhow`](https://docs.rs/anyhow/) crate provides a rich error type with " +"support for carrying additional contextual information, which can be used to " +"provide a semantic trace of what the program was doing leading up to the error." msgstr "" #: src/error-handling/anyhow.md @@ -11359,13 +11110,13 @@ msgstr "\"Failed to read\"" #: src/error-handling/anyhow.md msgid "" -"`anyhow::Error` is essentially a wrapper around `Box`. As such " -"it's again generally not a good choice for the public API of a library, but " -"is widely used in applications." +"`anyhow::Error` is essentially a wrapper around `Box`. As such 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 としては一般的には適していませんが、アプリでは広く使" -"用されています。" +"`anyhow::Error` は基本的に `Box` のラッパーとなっています。そのため、" +"ライブラリの公開 API としては一般的には適していませんが、アプリでは広く使用され" +"ています。" #: src/error-handling/anyhow.md msgid "`anyhow::Result` is a type alias for `Result`." @@ -11374,31 +11125,30 @@ msgstr "`anyhow::Result` は `Result` の型エイリアス #: src/error-handling/anyhow.md #, fuzzy msgid "" -"Functionality provided by `anyhow::Error` may be familiar to Go developers, " -"as it provides similar behavior to the Go `error` type and `Result` is much like a Go `(T, error)` (with the convention that " -"only one element of the pair is meaningful)." +"Functionality provided by `anyhow::Error` may be familiar to Go developers, as " +"it provides similar behavior to the Go `error` type and `Result` is much like a Go `(T, error)` (with the convention that only one " +"element of the pair is meaningful)." msgstr "" -"`anyhow::Result` が提供する機能は、Go の `(T, error)` と同様の使用パターン" -"とエルゴノミクスを備えているため、Go デベロッパーにはなじみがあるかもしれませ" -"ん。" +"`anyhow::Result` が提供する機能は、Go の `(T, error)` と同様の使用パターンと" +"エルゴノミクスを備えているため、Go デベロッパーにはなじみがあるかもしれません。" #: src/error-handling/anyhow.md msgid "" -"`anyhow::Context` is a trait implemented for the standard `Result` and " -"`Option` types. `use anyhow::Context` is necessary to enable `.context()` " -"and `.with_context()` on those types." +"`anyhow::Context` is a trait implemented for the standard `Result` and `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` が必要です。" +"`anyhow::Context` は、標準の `Result` 型と `Option` 型に実装されたトレイトです。" +"これらの型で `.context()` と `.with_context()` を有効にするには、`use anyhow::" +"Context` が必要です。" #: src/error-handling/anyhow.md msgid "" "`anyhow::Error` has support for downcasting, much like `std::any::Any`; the " -"specific error type stored inside can be extracted for examination if " -"desired with [`Error::downcast`](https://docs.rs/anyhow/latest/anyhow/struct." -"Error.html#method.downcast)." +"specific error type stored inside can be extracted for examination if desired " +"with [`Error::downcast`](https://docs.rs/anyhow/latest/anyhow/struct.Error." +"html#method.downcast)." msgstr "" #: src/error-handling/exercise.md @@ -11406,25 +11156,24 @@ msgstr "" msgid "" "The following implements a very simple parser for an expression language. " "However, it handles errors by panicking. Rewrite it to instead use idiomatic " -"error handling and propagate errors to a return from `main`. Feel free to " -"use [`thiserror`](https://docs.rs/thiserror) and [`anyhow`](https://docs.rs/" -"anyhow)." +"error handling and propagate errors to a return from `main`. Feel free to use " +"[`thiserror`](https://docs.rs/thiserror) and [`anyhow`](https://docs.rs/anyhow)." msgstr "" -"ここでは、式を表す言語の非常にシンプルなパーサーを実装します。ただし、エラー" -"に対してはパニックしています。代わりに慣用的なエラー処理を使用し、`main` から" -"の戻り値にエラーを伝播するように書き換えてください。`thiserror` と `anyhow`を" -"自由に使用してかまいません。" +"ここでは、式を表す言語の非常にシンプルなパーサーを実装します。ただし、エラーに対" +"してはパニックしています。代わりに慣用的なエラー処理を使用し、`main` からの戻り" +"値にエラーを伝播するように書き換えてください。`thiserror` と `anyhow`を自由に使" +"用してかまいません。" #: src/error-handling/exercise.md #, fuzzy msgid "" -"**Hint:** start by fixing error handling in the `parse` function. Once that " -"is working correctly, update `Tokenizer` to implement " -"`Iterator>` and handle that in the parser." +"**Hint:** start by fixing error handling in the `parse` function. Once that is " +"working correctly, update `Tokenizer` to implement `Iterator>` and handle that in the parser." msgstr "" "ヒント: まず、`parse` 関数のエラー処理を修正します。それができたら" -"`Iterator>` を実装するように`Tokenizer` を" -"更新し、その結果をパーサーで処理するようにしてください。" +"`Iterator>` を実装するように`Tokenizer` を更" +"新し、その結果をパーサーで処理するようにしてください。" #: src/error-handling/exercise.md src/error-handling/solution.md msgid "/// An arithmetic operator.\n" @@ -11517,27 +11266,26 @@ msgstr "**安全な Rust:** メモリセーフで、未定義の動作は起こ #: src/unsafe-rust/unsafe.md msgid "" -"**Unsafe Rust:** can trigger undefined behavior if preconditions are " -"violated." +"**Unsafe Rust:** can trigger undefined behavior if preconditions are violated." msgstr "" -"**アンセーフRust:** 前提条件に違反した場合、未定義の動作がトリガーされる可能" -"性があります。" +"**アンセーフ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." +"We saw mostly safe Rust in this course, but it's important to know what Unsafe " +"Rust is." msgstr "" -"このコースでは主に安全な Rust を見てきましたが、安全でない Rust とは何かを理" -"解しておくことが重要です。" +"このコースでは主に安全な 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:" @@ -11566,24 +11314,23 @@ msgstr "`unsafe` トレイトの実装。" #: src/unsafe-rust/unsafe.md msgid "" "We will briefly cover unsafe capabilities next. For full details, please see " -"[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/)." +"[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/) をご覧ください。" +"次に、安全でない機能について簡単に説明します。詳しくは、[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 "" -"Unsafe Rust does not mean the code is incorrect. It means that developers " -"have turned off some compiler safety features and have to write correct code " -"by themselves. It means the compiler no longer enforces Rust's memory-safety " -"rules." +"Unsafe Rust does not mean the code is incorrect. It means that developers have " +"turned off some compiler safety features and have to write correct code by " +"themselves. It means the compiler no longer enforces Rust's memory-safety rules." msgstr "" -"アンセーフRustは、コードが正しくないことを意味するものではありません。デベ" -"ロッパーが一部のコンパイラ安全性機能をオフにし、自分で正しいコードを記述しな" -"ければならないことを意味します。また、コンパイラがRustのメモリ安全性に関する" -"ルールを強制しなくなるということを意味します。" +"アンセーフRustは、コードが正しくないことを意味するものではありません。デベロッ" +"パーが一部のコンパイラ安全性機能をオフにし、自分で正しいコードを記述しなければな" +"らないことを意味します。また、コンパイラがRustのメモリ安全性に関するルールを強制" +"しなくなるということを意味します。" #: src/unsafe-rust/dereferencing.md msgid "Creating pointers is safe, but dereferencing them requires `unsafe`:" @@ -11597,8 +11344,7 @@ msgstr "\"careful!\"" #, fuzzy msgid "" "// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\n" -" // be non-null and properly aligned, the objects underlying the " -"references\n" +" // be non-null and properly aligned, the objects underlying the references\n" " // from which they were obtained are live throughout the whole unsafe\n" " // block, and they are not accessed either through the references or\n" " // concurrently through any other pointers.\n" @@ -11639,13 +11385,13 @@ msgstr "" #: src/unsafe-rust/dereferencing.md msgid "" -"It is good practice (and required by the Android Rust style guide) to write " -"a comment for each `unsafe` block explaining how the code inside it " -"satisfies the safety requirements of the unsafe operations it is doing." +"It is good practice (and required by the Android Rust style guide) to write 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 スタイルガイドでも必須とされています)。" +"`unsafe`ブロックごとにコメントを記述し、そのブロック内のコードが行うアンセーフな" +"操作がどのように安全性要件を満たしているのかを記述することをおすすめします" +"(Android Rust スタイルガイドでも必須とされています)。" #: src/unsafe-rust/dereferencing.md msgid "" @@ -11653,8 +11399,8 @@ msgid "" "[_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) でなければならないことを意味します。つまり、次のよ" -"うになります。" +"std/ptr/index.html#safety) でなければならないことを意味します。つまり、次のよう" +"になります。" #: src/unsafe-rust/dereferencing.md msgid "The pointer must be non-null." @@ -11662,11 +11408,11 @@ msgstr "ポインタは null 以外でなければならないこと。" #: src/unsafe-rust/dereferencing.md msgid "" -"The pointer must be _dereferenceable_ (within the bounds of a single " -"allocated object)." +"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." @@ -11678,11 +11424,11 @@ 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." +"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." @@ -11690,14 +11436,13 @@ msgstr "ほとんどの場合、ポインタも適切にアラインされる必 #: src/unsafe-rust/dereferencing.md msgid "" -"The \"NOT SAFE\" section gives an example of a common kind of UB bug: `*r1` " -"has the `'static` lifetime, so `r3` has type `&'static String`, and thus " -"outlives `s`. Creating a reference from a pointer requires _great care_." +"The \"NOT SAFE\" section gives an example of a common kind of UB bug: `*r1` 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` より長く存続します。ポインタからの参照の作成には細心の注意が必要で" -"す。" +"`*r1` のライフタイムは `'static` であるため、`r3` の型は `&'static String` とな" +"り、`s` より長く存続します。ポインタからの参照の作成には細心の注意が必要です。" #: src/unsafe-rust/mutable-static.md msgid "It is safe to read an immutable static variable:" @@ -11716,8 +11461,8 @@ 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 "" @@ -11731,30 +11476,30 @@ msgstr "\"COUNTER: {COUNTER}\"" #: src/unsafe-rust/mutable-static.md msgid "" "The program here is safe because it is single-threaded. However, the Rust " -"compiler is conservative and will assume the worst. Try removing the " -"`unsafe` and see how the compiler explains that it is undefined behavior to " -"mutate a static from multiple threads." +"compiler is conservative and will assume the worst. Try removing the `unsafe` " +"and see how the compiler explains that it is undefined behavior to mutate a " +"static from multiple threads." msgstr "" -"このプログラムはシングルスレッドなので安全です。しかし、Rust コンパイラは保守" -"的で、最悪の事態を想定します。`unsafe` を削除すると、複数のスレッドから静的変" -"数を変更することは未定義の動作であることを説明するメッセージがコンパイラによ" -"り表示されるはずです。" +"このプログラムはシングルスレッドなので安全です。しかし、Rust コンパイラは保守的" +"で、最悪の事態を想定します。`unsafe` を削除すると、複数のスレッドから静的変数を" +"変更することは未定義の動作であることを説明するメッセージがコンパイラにより表示さ" +"れるはずです。" #: src/unsafe-rust/mutable-static.md msgid "" -"Using a mutable static is generally a bad idea, but there are some cases " -"where it might make sense in low-level `no_std` code, such as implementing a " -"heap allocator or working with some C APIs." +"Using a mutable static is generally a bad idea, but there are some cases 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` コードでは適している場合も" -"あります。" +"一般的に、可変静的変数を使用することはおすすめしませんが、ヒープ アロケータの実" +"装や一部の 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: {}\"" @@ -11770,23 +11515,23 @@ 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." +"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 とのやり取りで必要になることがあります。" +"Rust では、通常は列挙型を使用できるため、共用体はほとんど必要ありません。共用体" +"は、C ライブラリ API とのやり取りで必要になることがあります。" #: src/unsafe-rust/unions.md msgid "" "If you just want to reinterpret bytes as a different type, you probably want " -"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn." -"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/" -"crates/zerocopy) crate." +"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.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) クレートのような安全なラッパーを使用することをおす" -"すめします。" +"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" @@ -11794,11 +11539,11 @@ msgstr "Unsafe関数の呼び出し" #: src/unsafe-rust/unsafe-functions.md msgid "" -"A function or method can be marked `unsafe` if it has extra preconditions " -"you must uphold to avoid undefined behaviour:" +"A function or method can be marked `unsafe` if it has extra preconditions you " +"must uphold to avoid undefined behaviour:" msgstr "" -"未定義の動作を回避するために満たす必要がある追加の前提条件がある関数またはメ" -"ソッドは、`unsafe` とマークできます。" +"未定義の動作を回避するために満たす必要がある追加の前提条件がある関数またはメソッ" +"ドは、`unsafe` とマークできます。" #: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md #: src/unsafe-rust/solution.md src/android/interoperability/with-c.md @@ -11862,8 +11607,8 @@ msgid "" "You can mark your own functions as `unsafe` if they require particular " "conditions to avoid undefined behaviour." msgstr "" -"未定義の動作を回避するために特定の条件が必要な場合は、独自の関数を `unsafe` " -"とマークできます。" +"未定義の動作を回避するために特定の条件が必要な場合は、独自の関数を `unsafe` と" +"マークできます。" #: src/unsafe-rust/unsafe-functions.md msgid "" @@ -11892,45 +11637,44 @@ msgstr "\"a = {}, b = {}\"" #, fuzzy msgid "" "`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can " -"create UB if the range is incorrect. `abs` is unsafe for a different reason: " -"it is an external function (FFI). Calling external functions is usually only " -"a problem when those functions do things with pointers which 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 " -"関数には任意の状況下で未定義の動作が含まれる可能性があります。" +"create UB if the range is incorrect. `abs` is unsafe for a different reason: it " +"is an external function (FFI). Calling external functions is usually only a " +"problem when those functions do things with pointers which 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)." +"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))。" +"この例の `\"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." +"We wouldn't actually use pointers for a `swap` function - it can be done safely " +"with references." msgstr "" -"実際には、`swap` 関数ではポインタは使用しません。これは参照を使用することで安" -"全に実行できます。" +"実際には、`swap` 関数ではポインタは使用しません。これは参照を使用することで安全" +"に実行できます。" #: src/unsafe-rust/unsafe-functions.md msgid "" -"Note that unsafe code is allowed within an unsafe function without an " -"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. " -"Try adding it and see what happens. This will likely change in a future Rust " -"edition." +"Note that unsafe code is allowed within an unsafe function without an `unsafe` " +"block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. 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 エディションで変更される可" -"能性があります。" +"アンセーフな関数内では、アンセーフなコードを`unsafe`ブロックなしに記述することが" +"できます。これは `#[deny(unsafe_op_in_unsafe_fn)]` で禁止できます。追加するとど" +"うなるか見てみましょう。これは、今後の Rust エディションで変更される可能性があり" +"ます。" #: src/unsafe-rust/unsafe-traits.md msgid "Implementing Unsafe Traits" @@ -11941,8 +11685,8 @@ msgid "" "Like with functions, you can mark a trait as `unsafe` if the implementation " "must guarantee particular conditions to avoid undefined behaviour." msgstr "" -"関数と同様に、未定義の動作を回避するために実装で特定の条件を保証する必要があ" -"る場合は、トレイトを `unsafe` としてマークできます。" +"関数と同様に、未定義の動作を回避するために実装で特定の条件を保証する必要がある場" +"合は、トレイトを `unsafe` としてマークできます。" #: src/unsafe-rust/unsafe-traits.md #, fuzzy @@ -11950,8 +11694,8 @@ msgid "" "For example, the `zerocopy` crate has an unsafe trait that looks [something " "like this](https://docs.rs/zerocopy/latest/zerocopy/trait.IntoBytes.html):" msgstr "" -"たとえば、`zerocopy` クレートには [このような](https://docs.rs/zerocopy/" -"latest/zerocopy/trait.AsBytes.html) 安全でないトレイトがあります。" +"たとえば、`zerocopy` クレートには [このような](https://docs.rs/zerocopy/latest/" +"zerocopy/trait.AsBytes.html) 安全でないトレイトがあります。" #: src/unsafe-rust/unsafe-traits.md msgid "" @@ -11973,14 +11717,13 @@ 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` " -"セクションが必要です。" +"Rustdoc には、トレイトを安全に実装するための要件について説明した `# Safety` セク" +"ションが必要です。" #: src/unsafe-rust/unsafe-traits.md #, fuzzy msgid "" -"The actual safety section for `IntoBytes` is rather longer and more " -"complicated." +"The actual safety section for `IntoBytes` is rather longer and more complicated." msgstr "`AsBytes` の実際の安全性セクションはより長く、複雑です。" #: src/unsafe-rust/unsafe-traits.md @@ -11997,9 +11740,9 @@ 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` 関数の安全なラッパーを作成します。" +"Rust は、外部関数インターフェース(FFI)を介した関数呼び出しを強力にサポートして" +"います。これを使用して、ディレクトリ内のファイル名を読み取るために Cプログラムで" +"使用する `libc` 関数の安全なラッパーを作成します。" #: src/unsafe-rust/exercise.md msgid "You will want to consult the manual pages:" @@ -12023,8 +11766,8 @@ 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/) モジュールも参照してくださ" -"い。ここには、この演習で必要な文字列型が多数掲載されています。" +"[`std::ffi`](https://doc.rust-lang.org/std/ffi/) モジュールも参照してください。" +"ここには、この演習で必要な文字列型が多数掲載されています。" #: src/unsafe-rust/exercise.md msgid "Encoding" @@ -12039,8 +11782,8 @@ 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)" +"[`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" @@ -12068,11 +11811,11 @@ 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)" +"[`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)" +"[`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" @@ -12088,8 +11831,7 @@ msgstr "以下のすべての型間で変換を行います。" #: src/unsafe-rust/exercise.md msgid "" -"`&str` to `CString`: you need to allocate space for a trailing `\\0` " -"character," +"`&str` to `CString`: you need to allocate space for a trailing `\\0` character," msgstr "" "`&str` から `CString`: 末尾の `\\0` 文字にも領域を割り当てる必要があります。" @@ -12101,8 +11843,7 @@ msgstr "`CString` から `*const i8`: C 関数を呼び出すためのポイン msgid "" "`*const i8` to `&CStr`: you need something which can find the trailing `\\0` " "character," -msgstr "" -"`*const i8` から `&CStr`: 末尾の `\\0` 文字を検出できるものが必要です。" +msgstr "`*const i8` から `&CStr`: 末尾の `\\0` 文字を検出できるものが必要です。" #: src/unsafe-rust/exercise.md msgid "" @@ -12117,9 +11858,9 @@ 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) を使用して作成します。" +"`&[u8]` から `&OsStr`: `&OsStr` は `OsString` に変換するための中間ステップであ" +"り、[`OsStrExt`](https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) " +"を使用して作成します。" #: src/unsafe-rust/exercise.md msgid "" @@ -12134,8 +11875,8 @@ 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 に関する有益" -"な章があります。" +"[Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) にも、FFI に関する有益な章" +"があります。" #: src/unsafe-rust/exercise.md msgid "" @@ -12180,18 +11921,16 @@ msgid "" " //\n" " // \"Platforms that existed before these updates were available\" " "refers\n" -" // to macOS (as opposed to iOS / wearOS / etc.) on Intel and " -"PowerPC.\n" +" // 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" +"// 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" +" // 「これらのアップデートが利用可能になる前に存在していたプラットフォー" +"ム(\"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\"" @@ -12310,21 +12049,21 @@ msgstr "Android での Rust へようこそ" #: src/android.md msgid "" -"Rust is supported for system software on Android. This means that you can " -"write new services, libraries, drivers or even firmware in Rust (or improve " -"existing code as needed)." +"Rust is supported for system software on Android. This means that you can write " +"new services, libraries, drivers or even firmware in Rust (or improve existing " +"code as needed)." msgstr "" "Rust は Android のシステム ソフトウェアでサポートされています。つまり、新しい" -"サービス、ライブラリ、ドライバ、さらにはファームウェアを Rust で作成できます" -"(または、必要に応じて既存のコードを改善できます)。" +"サービス、ライブラリ、ドライバ、さらにはファームウェアを Rust で作成できます(ま" +"たは、必要に応じて既存のコードを改善できます)。" #: src/android.md msgid "" -"The speaker may mention any of the following given the increased use of Rust " -"in Android:" +"The speaker may mention any of the following given the increased use of Rust in " +"Android:" msgstr "" -"Android で Rust が使用されることが増えているため、次のいずれかに言及すること" -"をおすすめします。" +"Android で Rust が使用されることが増えているため、次のいずれかに言及することをお" +"すすめします。" #: src/android.md #, fuzzy @@ -12332,8 +12071,8 @@ 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)" +"サービスの例: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-over-" +"http3-in-android.html)" #: src/android.md #, fuzzy @@ -12347,8 +12086,8 @@ msgstr "" #: src/android.md #, fuzzy msgid "" -"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-" -"rust-binder-v1-0-08ba9197f637@google.com/)." +"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/)" @@ -12359,8 +12098,8 @@ 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)" +"ファームウェア: [pKVM ファームウェア](https://security.googleblog.com/2023/10/" +"bare-metal-rust-in-android.html)" #: src/android/setup.md msgid "" @@ -12368,23 +12107,22 @@ msgid "" "sure you have access to one or create a new one with:" msgstr "" "コードのテストのためにCuttlefish Android Virtual Device を使用します。既存の" -"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) をご覧ください。" +"詳しくは、[Android デベロッパー Codelab](https://source.android.com/docs/setup/" +"start) をご覧ください。" #: src/android/setup.md msgid "" -"The code on the following pages can be found in the [`src/android/` " -"directory](https://github.com/google/comprehensive-rust/tree/main/src/" -"android) of the course material. Please `git clone` the repository to follow " -"along." +"The code on the following pages can be found in the [`src/android/` directory]" +"(https://github.com/google/comprehensive-rust/tree/main/src/android) of the " +"course material. Please `git clone` the repository to follow along." msgstr "" #: src/android/setup.md @@ -12392,22 +12130,22 @@ msgid "" "Cuttlefish is a reference Android device designed to work on generic Linux " "desktops. MacOS support is also planned." msgstr "" -"Cuttlefish は、一般的な Linux デスクトップで動作するように設計されたリファレ" -"ンス Android デバイスです。macOS のサポートも予定されています。" +"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." +"The Cuttlefish system image maintains high fidelity to real devices, and is the " +"ideal emulator to run many Rust use cases." msgstr "" -"Cuttlefish システム イメージは、実際のデバイスに対する高い忠実度を維持してい" -"るため、多くの Rust ユースケースを実行するのに理想的なエミュレータです。" +"Cuttlefish システム イメージは、実際のデバイスに対する高い忠実度を維持しているた" +"め、多くの Rust ユースケースを実行するのに理想的なエミュレータです。" #: src/android/build-rules.md msgid "The Android build system (Soong) supports Rust via a number of modules:" msgstr "" -"Android ビルドシステム(Soong)は、さまざまなモジュールを通じて Rust をサポー" -"トしています。" +"Android ビルドシステム(Soong)は、さまざまなモジュールを通じて Rust をサポート" +"しています。" #: src/android/build-rules.md msgid "Module Type" @@ -12440,11 +12178,11 @@ 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." +"Produces a Rust C library usable by `cc` modules, and provides both static and " +"shared variants." msgstr "" -"`cc` モジュールで使用できる Rust C ライブラリを生成し、静的バリアントと共有バ" -"リアントの両方を提供します。" +"`cc` モジュールで使用できる Rust C ライブラリを生成し、静的バリアントと共有バリ" +"アントの両方を提供します。" #: src/android/build-rules.md msgid "`rust_proc_macro`" @@ -12452,11 +12190,10 @@ msgstr "`rust_proc_macro`" #: src/android/build-rules.md msgid "" -"Produces a `proc-macro` Rust library. These are analogous to compiler " -"plugins." +"Produces a `proc-macro` Rust library. These are analogous to compiler plugins." msgstr "" -"`proc-macro` Rust ライブラリを生成します。これらはコンパイラ プラグインに似て" -"います。" +"`proc-macro` Rust ライブラリを生成します。これらはコンパイラ プラグインに似てい" +"ます。" #: src/android/build-rules.md msgid "`rust_test`" @@ -12480,11 +12217,11 @@ msgstr "`rust_protobuf`" #: src/android/build-rules.md msgid "" -"Generates source and produces a Rust library that provides an interface for " -"a particular protobuf." +"Generates source and produces a Rust library that provides an interface for a " +"particular protobuf." msgstr "" -"ソースを生成し、特定の protobuf 用のインターフェースを提供する Rust ライブラ" -"リを生成します。" +"ソースを生成し、特定の protobuf 用のインターフェースを提供する Rust ライブラリを" +"生成します。" #: src/android/build-rules.md msgid "`rust_bindgen`" @@ -12495,8 +12232,8 @@ msgid "" "Generates source and produces a Rust library containing Rust bindings to C " "libraries." msgstr "" -"ソースを生成し、C ライブラリへの Rust バインディングを含む Rust ライブラリを" -"生成します。" +"ソースを生成し、C ライブラリへの Rust バインディングを含む Rust ライブラリを生成" +"します。" #: src/android/build-rules.md msgid "We will look at `rust_binary` and `rust_library` next." @@ -12511,31 +12248,30 @@ msgid "" "Cargo is not optimized for multi-language repos, and also downloads packages " "from the internet." msgstr "" -"Cargo は多言語リポジトリ用に最適化されていません。また、インターネットから" -"パッケージをダウンロードします。" +"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." +"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 を使用することで、そのギャップを埋めることができます。" +"コンプライアンスおよびパフォーマンス上の理由から、Android ではクレートをツリー内" +"に配置する必要があります。また、C /C++ / Java コードとの相互運用性も必要です。" +"Soong を使用することで、そのギャップを埋めることができます。" #: src/android/build-rules.md #, fuzzy msgid "" -"Soong has many similarities to [Bazel](https://bazel.build/), which is the " -"open-source variant of Blaze (used in google3)." +"Soong has many similarities to [Bazel](https://bazel.build/), which is the open-" +"source variant of Blaze (used in google3)." msgstr "" -"Soong には、Blaze(google3 で使用)のオープンソース版である Bazel と多くの類" -"似点があります。" +"Soong には、Blaze(google3 で使用)のオープンソース版である Bazel と多くの類似点" +"があります。" #: src/android/build-rules.md msgid "Fun fact: Data from Star Trek is a Soong-type Android." -msgstr "" -"豆知識: スタートレックの「データ」は、スン(Soong)型アンドロイドです。" +msgstr "豆知識: スタートレックの「データ」は、スン(Soong)型アンドロイドです。" #: src/android/build-rules/binary.md msgid "Rust Binaries" @@ -12543,11 +12279,11 @@ 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:" +"Let us start with a simple application. At the root of an AOSP checkout, create " +"the following files:" msgstr "" -"簡単なアプリから始めましょう。AOSP チェックアウトのルートで、次のファイルを作" -"成します。" +"簡単なアプリから始めましょう。AOSP チェックアウトのルートで、次のファイルを作成" +"します。" #: src/android/build-rules/binary.md src/android/build-rules/library.md msgid "_hello_rust/Android.bp_:" @@ -12619,9 +12355,9 @@ 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/) に取り込まれて" -"いるクレートです。" +"`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\"" @@ -12643,9 +12379,8 @@ msgstr "// ダイナミック リンク エラーを回避するために必要 msgid "\"greetings\"" msgstr "\"greetings\"" -#: src/android/build-rules/library.md -#: src/android/aidl/example-service/service.md src/android/testing.md -#: src/android/interoperability/java.md +#: src/android/build-rules/library.md src/android/aidl/example-service/service.md +#: src/android/testing.md src/android/interoperability/java.md msgid "\"src/lib.rs\"" msgstr "\"src/lib.rs\"" @@ -12690,8 +12425,8 @@ 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) がサポートされています。" +"Rust では [Android インターフェース定義言語(AIDL)](https://developer.android." +"com/guide/components/aidl) がサポートされています。" #: src/android/aidl.md msgid "Rust code can call existing AIDL servers," @@ -12704,8 +12439,8 @@ msgstr "Rust では新しい AIDL サーバーを作成できます。" #: src/android/aidl/birthday-service.md msgid "" "To illustrate how to use Rust with Binder, we're going to walk through the " -"process of creating a Binder interface. We're then going to both implement " -"the described service and write client code that talks to that service." +"process of creating a Binder interface. We're then going to both implement the " +"described service and write client code that talks to that service." msgstr "" #: src/android/aidl/example-service/interface.md @@ -12720,8 +12455,7 @@ msgstr "サービスの API を宣言するには、AIDL インターフェー #: src/android/aidl/example-service/service-bindings.md #: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md #: src/android/aidl/types/file-descriptor.md -msgid "" -"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" +msgid "_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" msgstr "" "_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" @@ -12777,8 +12511,8 @@ msgstr "生成された Rust:" #: src/android/aidl/example-service/service-bindings.md msgid "" -"Your service will need to implement this trait, and your client will use " -"this trait to talk to the service." +"Your service will need to implement this trait, and your client will use this " +"trait to talk to the service." msgstr "" #: src/android/aidl/example-service/service-bindings.md @@ -12789,8 +12523,8 @@ msgstr "" #: src/android/aidl/example-service/service-bindings.md msgid "" -"Point out how the generated function signature, specifically the argument " -"and return types, correspond the interface definition." +"Point out how the generated function signature, specifically the argument and " +"return types, correspond the interface definition." msgstr "" #: src/android/aidl/example-service/service-bindings.md @@ -12854,8 +12588,8 @@ msgstr "\"libbinder_rs\"" #: src/android/aidl/example-service/service.md msgid "" -"Point out the path to the generated `IBirthdayService` trait, and explain " -"why each of the segments is necessary." +"Point out the path to the generated `IBirthdayService` trait, and explain why " +"each of the segments is necessary." msgstr "" #: src/android/aidl/example-service/service.md @@ -12903,11 +12637,11 @@ msgstr "// ダイナミック リンク エラーを回避するためです。\ #: src/android/aidl/example-service/server.md msgid "" -"The process for taking a user-defined service implementation (in this case " -"the `BirthdayService` type, which implements the `IBirthdayService`) and " -"starting it as a Binder service has multiple steps, and may appear more " -"complicated than students are used to if they've used Binder from C++ or " -"another language. Explain to students why each step is necessary." +"The process for taking a user-defined service implementation (in this case the " +"`BirthdayService` type, which implements the `IBirthdayService`) and starting " +"it as a Binder service has multiple steps, and may appear more complicated than " +"students are used to if they've used Binder from C++ or another language. " +"Explain to students why each step is necessary." msgstr "" #: src/android/aidl/example-service/server.md @@ -12925,14 +12659,14 @@ msgstr "" #: src/android/aidl/example-service/server.md msgid "" -"Call `add_service`, giving it a service identifier and your service object " -"(the `BnBirthdayService` object in the example)." +"Call `add_service`, giving it a service identifier and your service object (the " +"`BnBirthdayService` object in the example)." msgstr "" #: src/android/aidl/example-service/server.md msgid "" -"Call `join_thread_pool` to add the current thread to Binder's thread pool " -"and start listening for connections." +"Call `join_thread_pool` to add the current thread to Binder's thread pool and " +"start listening for connections." msgstr "" #: src/android/aidl/example-service/deploy.md @@ -12943,16 +12677,14 @@ msgstr "次に、サービスをビルド、push、開始します。" msgid "" "```shell\n" "m birthday_server\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\" /data/local/" -"tmp\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" "```" msgstr "" "```shell\n" "m birthday_server\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\" /data/local/" -"tmp\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" "```" @@ -12985,8 +12717,7 @@ msgid "/// Call the birthday service.\n" msgstr "/// 誕生日サービスを呼び出します。\n" #: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md -#: src/android/aidl/types/parcelables.md -#: src/android/aidl/types/file-descriptor.md +#: src/android/aidl/types/parcelables.md src/android/aidl/types/file-descriptor.md msgid "\"Failed to connect to BirthdayService\"" msgstr "\"Failed to connect to BirthdayService\"" @@ -13020,15 +12751,13 @@ msgstr "デバイスでクライアントをビルド、push、実行します msgid "" "```shell\n" "m birthday_client\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\" /data/local/" -"tmp\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\" /data/local/tmp\n" "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 push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\" /data/local/tmp\n" "adb shell /data/local/tmp/birthday_client Charlie 60\n" "```" @@ -13041,32 +12770,31 @@ msgstr "" #: src/android/aidl/example-service/client.md msgid "" "`Strong` is a custom smart pointer type for Binder. It handles both an in-" -"process ref count for the service trait object, and the global Binder ref " -"count that tracks how many processes have a reference to the object." +"process ref count for the service trait object, and the global Binder ref count " +"that tracks how many processes have a reference to the object." msgstr "" #: src/android/aidl/example-service/client.md msgid "" -"Note that the trait object that the client uses to talk to the service uses " -"the exact same trait that the server implements. For a given Binder " -"interface, there is a single Rust trait generated that both client and " -"server use." +"Note that the trait object that the client uses to talk to the service uses the " +"exact same trait that the server implements. For a given Binder interface, " +"there is a single Rust trait generated that both client and server use." msgstr "" #: src/android/aidl/example-service/client.md msgid "" -"Use the same service identifier used when registering the service. This " -"should ideally be defined in a common crate that both the client and server " -"can depend on." +"Use the same service identifier used when registering the service. This should " +"ideally be defined in a common crate that both the client and server can depend " +"on." msgstr "" #: src/android/aidl/example-service/changing-definition.md msgid "" -"Let us extend the API with more functionality: we want to let clients " -"specify a list of lines for the birthday card:" +"Let us extend the API with more functionality: we want to let clients specify a " +"list of lines for the birthday card:" msgstr "" -"APIを拡張して、クライアントが誕生日カードに追加する複数行のメッセージを指定で" -"きるようにします。" +"APIを拡張して、クライアントが誕生日カードに追加する複数行のメッセージを指定でき" +"るようにします。" #: src/android/aidl/example-service/changing-definition.md msgid "This results in an updated trait definition for `IBirthdayService`:" @@ -13074,9 +12802,9 @@ msgstr "" #: src/android/aidl/example-service/changing-definition.md msgid "" -"Note how the `String[]` in the AIDL definition is translated as a " -"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the " -"generated bindings wherever possible:" +"Note how the `String[]` in the AIDL definition is translated as a `&[String]` " +"in Rust, i.e. that idiomatic Rust types are used in the generated bindings " +"wherever possible:" msgstr "" #: src/android/aidl/example-service/changing-definition.md @@ -13260,10 +12988,9 @@ msgstr "`Vec`" #: src/android/aidl/types/arrays.md msgid "" -"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` " -"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. " -"`int[3][4]`). In the Java backend, fixed-size arrays are represented as " -"array types." +"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` becomes " +"`[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. `int[3][4]`). In " +"the Java backend, fixed-size arrays are represented as array types." msgstr "" #: src/android/aidl/types/arrays.md @@ -13272,15 +12999,14 @@ msgstr "" #: src/android/aidl/types/objects.md msgid "" -"AIDL objects can be sent either as a concrete AIDL type or as the type-" -"erased `IBinder` interface:" +"AIDL objects can be sent either as a concrete AIDL type or as the type-erased " +"`IBinder` interface:" msgstr "" #: src/android/aidl/types/objects.md #, fuzzy msgid "" -"_birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider." -"aidl_:" +"_birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.aidl_:" msgstr "" "_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" @@ -13366,8 +13092,7 @@ msgstr "" #: src/android/aidl/types/file-descriptor.md msgid "" "// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\n" -" // an `OwnedFd`, which can be cloned and then used to create a " -"`File`\n" +" // an `OwnedFd`, which can be cloned and then used to create a `File`\n" " // object.\n" msgstr "" @@ -13378,9 +13103,9 @@ msgstr "\"Invalid length\"" #: src/android/aidl/types/file-descriptor.md msgid "" -"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a " -"`File` (or any other type that wraps an `OwnedFd`), and can be used to " -"create a new `File` handle on the other side." +"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a `File` " +"(or any other type that wraps an `OwnedFd`), and can be used to create a new " +"`File` handle on the other side." msgstr "" #: src/android/aidl/types/file-descriptor.md @@ -13396,8 +13121,8 @@ msgstr "Android での Rust へようこそ" #: src/android/testing.md msgid "" -"Building on [Testing](../testing.md), we will now look at how unit tests " -"work in AOSP. Use the `rust_test` module for your unit tests:" +"Building on [Testing](../testing.md), we will now look at how unit tests work " +"in AOSP. Use the `rust_test` module for your unit tests:" msgstr "" #: src/android/testing.md @@ -13472,8 +13197,8 @@ msgid "" "INFO: Elapsed time: 2.666s, Critical Path: 2.40s\n" "INFO: 3 processes: 2 internal, 1 linux-sandbox.\n" "INFO: Build completed successfully, 3 total actions\n" -"//comprehensive-rust-android/testing:libleftpad_test_host PASSED " -"in 2.3s\n" +"//comprehensive-rust-android/testing:libleftpad_test_host PASSED in " +"2.3s\n" " PASSED libleftpad_test.tests::long_string (0.0s)\n" " PASSED libleftpad_test.tests::short_string (0.0s)\n" "Test cases: finished with 2 passing and 0 failing out of 2 test cases\n" @@ -13491,8 +13216,8 @@ msgid "" "The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test " "assertions using _matchers_:" msgstr "" -"[GoogleTest](https://docs.rs/googletest/) クレートにより、マッチャーを使用し" -"た柔軟なテスト アサーションが可能になります。" +"[GoogleTest](https://docs.rs/googletest/) クレートにより、マッチャーを使用した柔" +"軟なテスト アサーションが可能になります。" #: src/android/testing/googletest.md msgid "\"baz\"" @@ -13507,18 +13232,18 @@ msgid "" "If we change the last element to `\"!\"`, the test fails with a structured " "error message pin-pointing the error:" msgstr "" -"最後の要素を `\"!\"` に変更すると、テストは失敗し、エラー箇所を示す構造化され" -"たエラー メッセージが表示されます。" +"最後の要素を `\"!\"` に変更すると、テストは失敗し、エラー箇所を示す構造化された" +"エラー メッセージが表示されます。" #: src/android/testing/googletest.md msgid "" -"GoogleTest is not part of the Rust Playground, so you need to run this " -"example in a local environment. Use `cargo add googletest` to quickly add it " -"to an existing Cargo project." +"GoogleTest is not part of the Rust Playground, so you need to run this 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 プロ" -"ジェクトにすばやく追加します。" +"GoogleTest は Rust プレイグラウンドの一部ではないため、この例はローカル環境で実" +"行する必要があります。`cargo add googletest` を使用して、既存の Cargo プロジェク" +"トにすばやく追加します。" #: src/android/testing/googletest.md msgid "" @@ -13526,24 +13251,23 @@ 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)をインポートします。" +"`use googletest::prelude::*;` 行は、[一般的に使用されるマクロと型](https://docs." +"rs/googletest/latest/googletest/prelude/index.html)をインポートします。" #: src/android/testing/googletest.md msgid "" "This just scratches the surface, there are many builtin matchers. Consider " -"going through the first chapter of [\"Advanced testing for Rust " -"applications\"](https://rust-exercises.com/advanced-testing/), a self-guided " -"Rust course: it provides a guided introduction to the library, with " -"exercises to help you get comfortable with `googletest` macros, its matchers " -"and its overall philosophy." +"going through the first chapter of [\"Advanced testing for Rust applications\"]" +"(https://rust-exercises.com/advanced-testing/), a self-guided Rust course: it " +"provides a guided introduction to the library, with exercises to help you get " +"comfortable with `googletest` macros, its matchers and its overall philosophy." msgstr "" #: src/android/testing/googletest.md #, fuzzy msgid "" -"A particularly nice feature is that mismatches in multi-line strings are " -"shown as a diff:" +"A particularly nice feature is that mismatches in multi-line strings are shown " +"as a diff:" msgstr "特に便利なのは、複数行の文字列の不一致が差分として表示される機能です。" #: src/android/testing/googletest.md @@ -13575,104 +13299,102 @@ 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に移植したものです。" +"このクレートは [GoogleTest for C++](https://google.github.io/googletest/) をRust" +"に移植したものです。" #: src/android/testing/mocking.md msgid "" -"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. " -"You need to refactor your code to use traits, which you can then quickly " -"mock:" +"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. You " +"need to refactor your code to use traits, which you can then quickly mock:" msgstr "" -"モックには、[Mockall](https://docs.rs/mockall/) というライブラリが広く使用さ" -"れています。トレイトを使用するようにコードをリファクタリングする必要がありま" -"す。これにより、すぐにモックできるようになります。" +"モックには、[Mockall](https://docs.rs/mockall/) というライブラリが広く使用されて" +"います。トレイトを使用するようにコードをリファクタリングする必要があります。これ" +"により、すぐにモックできるようになります。" #: src/android/testing/mocking.md #, fuzzy msgid "" -"Mockall is the recommended mocking library in Android (AOSP). There are " -"other [mocking libraries available on crates.io](https://crates.io/keywords/" -"mock), in particular in the area of mocking HTTP 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." +"Mockall is the recommended mocking library in Android (AOSP). There are other " +"[mocking libraries available on crates.io](https://crates.io/keywords/mock), in " +"particular in the area of mocking HTTP 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 と 同様で、特定のトレイトのモック実装を簡単に得ることがで" -"きます。" +"ここでは、Mockall が推奨モック ライブラリである Android(AOSP)向けのアドバイス" +"を行います。特に HTTP サービスのモックに関しては、[crates.io で他のモック ライブ" +"ラリが公開されています](https://crates.io/keywords/mock)。他のモック ライブラリ" +"も Mockall と 同様で、特定のトレイトのモック実装を簡単に得ることができます。" #: src/android/testing/mocking.md msgid "" "Note that mocking is somewhat _controversial_: mocks allow you to completely " -"isolate a test from its dependencies. The immediate result is faster and " -"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." +"isolate a test from its dependencies. The immediate result is faster and 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/android/testing/mocking.md msgid "" -"If at all possible, it is recommended that you use the real dependencies. As " -"an example, many databases allow you to configure an in-memory backend. This " -"means that you get the correct behavior in your tests, plus they are fast " -"and will automatically clean up after themselves." +"If at all possible, it is recommended that you use the real dependencies. As an " +"example, many databases allow you to configure an in-memory backend. This means " +"that you get the correct behavior in your tests, plus they are fast and will " +"automatically clean up after themselves." msgstr "" -"可能な限り、実際の依存関係を使用することをおすすめします。たとえば、多くの" -"データベースではインメモリ バックエンドを構成できます。つまり、テストで正しい" -"動作が得られ、しかも高速で、テスト後は自動的にクリーンアップされます。" +"可能な限り、実際の依存関係を使用することをおすすめします。たとえば、多くのデータ" +"ベースではインメモリ バックエンドを構成できます。つまり、テストで正しい動作が得" +"られ、しかも高速で、テスト後は自動的にクリーンアップされます。" #: src/android/testing/mocking.md msgid "" "Similarly, many web frameworks allow you to start an in-process server which " -"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." +"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` 上のランダムなポートにバ" -"インドするプロセス内サーバーを起動できます。このような構成は実際の環境でコー" -"ドをテストすることを可能にするので、フレームワークをモックすることよりも常に" -"優先して利用しましょう。" +"同様に、多くのウェブ フレームワークでは、`localhost` 上のランダムなポートにバイ" +"ンドするプロセス内サーバーを起動できます。このような構成は実際の環境でコードをテ" +"ストすることを可能にするので、フレームワークをモックすることよりも常に優先して利" +"用しましょう。" #: src/android/testing/mocking.md msgid "" -"Mockall is not part of the Rust Playground, so you need to run this example " -"in a local environment. Use `cargo add mockall` to quickly add Mockall to an " +"Mockall is not part of the Rust Playground, so you need to run this example 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 " -"プロジェクトにすばやく追加します。" +"Mockall は Rust プレイグラウンドの一部ではないため、この例はローカル環境で実行す" +"る必要があります。`cargo add mockall` を使用して、Mockall を既存の Cargo プロ" +"ジェクトにすばやく追加します。" #: src/android/testing/mocking.md msgid "" "Mockall has a lot more functionality. In particular, you can set up " -"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:" +"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 時間後に空腹になる猫をモッ" -"クするためにこれを使用します。" +"Mockall にはさらに多くの機能があります。特に、渡される引数に応じて期待値を設定で" +"きます。ここでは、最後に餌を与えてらえてから 3 時間後に空腹になる猫をモックする" +"ためにこれを使用します。" #: src/android/testing/mocking.md msgid "" "You can use `.times(n)` to limit the number of times a mock method can be " -"called to `n` --- the mock will automatically panic when dropped if this " -"isn't satisfied." +"called to `n` --- the mock will automatically panic when dropped if this isn't " +"satisfied." msgstr "" -"`.times(n)` を使用すると、モックメソッドが呼び出される回数を`n` に制限できま" -"す。これが満たされない場合、モックはドロップ時に自動的にパニックになります。" +"`.times(n)` を使用すると、モックメソッドが呼び出される回数を`n` に制限できます。" +"これが満たされない場合、モックはドロップ時に自動的にパニックになります。" #: src/android/logging.md msgid "" -"You should use the `log` crate to automatically log to `logcat` (on-device) " -"or `stdout` (on-host):" +"You should use the `log` crate to automatically log to `logcat` (on-device) or " +"`stdout` (on-host):" msgstr "" -"`log` クレートを使用して、自動的に (デバイス上では)`logcat` または (ホスト" -"上では)`stdout`にログを記録するようにします。" +"`log` クレートを使用して、自動的に (デバイス上では)`logcat` または (ホスト上" +"では)`stdout`にログを記録するようにします。" #: src/android/logging.md msgid "_hello_rust_logs/Android.bp_:" @@ -13727,15 +13449,13 @@ msgstr "デバイスでバイナリをビルド、push、実行します。" msgid "" "```shell\n" "m hello_rust_logs\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\" /data/local/" -"tmp\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\" /data/local/tmp\n" "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 push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\" /data/local/tmp\n" "adb shell /data/local/tmp/hello_rust_logs\n" "```" @@ -13745,8 +13465,8 @@ msgstr "`adb logcat` でログを表示できます。" #: src/android/logging.md msgid "" -"The logger implementation in `liblogger` is only needed in the final binary, " -"if you're logging from a library you only need the `log` facade crate." +"The logger implementation in `liblogger` is only needed in the final binary, if " +"you're logging from a library you only need the `log` facade crate." msgstr "" #: src/android/interoperability.md @@ -13780,9 +13500,8 @@ 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 から呼び出すことができま" -"す。" +"Rust は、C の呼び出し規則によるオブジェクト ファイルのリンクを完全にサポートして" +"います。同様に、Rust 関数をエクスポートして C から呼び出すことができます。" #: src/android/interoperability/with-c.md msgid "You can do it by hand if you want:" @@ -13798,16 +13517,16 @@ msgid "" "We already saw this in the [Safe FFI Wrapper exercise](../../unsafe-rust/" "exercise.md)." msgstr "" -"これは、[安全な FFI ラッパーの演習](../../exercises/day-3/safe-ffi-wrapper." -"md)ですでに取り扱いました。" +"これは、[安全な 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." @@ -13819,11 +13538,11 @@ 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." +"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 ヘッダー ファイルからバインディングを自動生成できます。" +"[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:" @@ -13878,8 +13597,8 @@ 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_:" @@ -13928,10 +13647,8 @@ msgstr "//! Bindgen のデモ。\n" #: src/android/interoperability/with-c/bindgen.md msgid "" "// SAFETY: The pointer we pass is valid because it came from a Rust\n" -" // reference, and the `name` it contains refers to `name` above which " -"also\n" -" // remains valid. `print_card` doesn't store either pointer to use " -"later\n" +" // reference, and the `name` it contains refers to `name` above which also\n" +" // remains valid. `print_card` doesn't store either pointer to use later\n" " // after it returns.\n" msgstr "" @@ -13954,8 +13671,8 @@ msgstr "" #: 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\"" @@ -14051,15 +13768,13 @@ msgstr "\"main.c\"" msgid "" "```shell\n" "m analyze_numbers\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\" /data/local/" -"tmp\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\" /data/local/tmp\n" "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 push \"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\" /data/local/tmp\n" "adb shell /data/local/tmp/analyze_numbers\n" "```" @@ -14076,11 +13791,11 @@ msgstr "" #: src/android/interoperability/cpp.md msgid "" -"The [CXX crate](https://cxx.rs/) makes it possible to do safe " -"interoperability between Rust and C++." +"The [CXX crate](https://cxx.rs/) makes it possible to do safe interoperability " +"between Rust and C++." msgstr "" -"[CXX クレート](https://cxx.rs/)を使用すると、Rust と C++ の間で安全な相互運用" -"性を確保できます。" +"[CXX クレート](https://cxx.rs/)を使用すると、Rust と C++ の間で安全な相互運用性" +"を確保できます。" #: src/android/interoperability/cpp.md msgid "The overall approach looks like this:" @@ -14092,9 +13807,9 @@ 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 ブロックを使用して指定します。" +"CXX は、各言語から他の言語に公開される関数シグネチャの記述に依存します。この記述" +"は、`#[cxx::bridge]` 属性マクロでアノテーションされた Rust モジュール内の " +"extern ブロックを使用して指定します。" #: src/android/interoperability/cpp/bridge.md msgid "\"org::blobstore\"" @@ -14143,23 +13858,23 @@ msgstr "ブリッジは通常、クレート内の `ffi` モジュールで宣 #: src/android/interoperability/cpp/bridge.md msgid "" "From the declarations made in the bridge module, CXX will generate matching " -"Rust and C++ type/function definitions in order to expose those items to " -"both languages." +"Rust and C++ type/function definitions in order to expose those items to both " +"languages." msgstr "" -"ブリッジ モジュールで行われた宣言から、CXX はマッチする Rust と C++ の型 / 関" -"数の定義を生成し、これらのアイテムを両方の言語に公開します。" +"ブリッジ モジュールで行われた宣言から、CXX はマッチする Rust と C++ の型 / 関数" +"の定義を生成し、これらのアイテムを両方の言語に公開します。" #: src/android/interoperability/cpp/bridge.md msgid "" -"To view the generated Rust code, use [cargo-expand](https://github.com/" -"dtolnay/cargo-expand) to view the expanded proc macro. For most of the " -"examples you would use `cargo expand ::ffi` to expand just the `ffi` module " -"(though this doesn't apply for Android projects)." +"To view the generated Rust code, use [cargo-expand](https://github.com/dtolnay/" +"cargo-expand) to view the expanded proc macro. For most of the 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 プロジェクトには当てはまりません)。" +"生成された 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`." @@ -14187,20 +13902,20 @@ msgid "" "Items declared in the `extern \"Rust\"` reference items that are in scope in " "the parent module." msgstr "" -"親モジュールのスコープ内にある `extern \"Rust\"` 参照アイテムで宣言されたアイ" -"テム。" +"親モジュールのスコープ内にある `extern \"Rust\"` 参照アイテムで宣言されたアイテ" +"ム。" #: src/android/interoperability/cpp/rust-bridge.md msgid "" -"The CXX code generator uses your `extern \"Rust\"` section(s) to produce a C+" -"+ header file containing the corresponding C++ declarations. The generated " -"header has the same path as the Rust source file containing the bridge, " -"except with a .rs.h file extension." +"The CXX code generator uses your `extern \"Rust\"` section(s) to produce a C++ " +"header file containing the corresponding C++ declarations. The generated 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 ソースファイルと" -"同じになります。" +"CXX コード ジェネレータは、`extern \"Rust\"` セクションを使用して、対応する C++ " +"宣言を含む C++ ヘッダー ファイルを生成します。生成されるヘッダーのパスは、rs.hと" +"いうファイル拡張子部分を除き、ブリッジを含む Rust ソースファイルと同じになりま" +"す。" #: src/android/interoperability/cpp/generated-cpp.md msgid "Results in (roughly) the following C++:" @@ -14224,21 +13939,21 @@ msgstr "\"org$blobstore$cxxbridge1$BlobstoreClient$put\"" #: src/android/interoperability/cpp/cpp-bridge.md msgid "" -"The programmer does not need to promise that the signatures they have typed " -"in are accurate. CXX performs static assertions that the signatures exactly " +"The programmer does not need to promise that the signatures they have typed in " +"are accurate. CXX performs static assertions that the signatures exactly " "correspond with what is declared in C++." msgstr "" -"プログラマーは、入力したシグネチャが正確であることを保証する必要はありませ" -"ん。CXX は、シグネチャが C++ で宣言されたものと完全に対応するということを静的" -"に保証します。" +"プログラマーは、入力したシグネチャが正確であることを保証する必要はありません。" +"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." +"`unsafe extern` blocks allow you to declare C++ functions that are safe to call " +"from Rust." msgstr "" -"`unsafe extern` ブロックを使用すると、Rust から安全に呼び出せる C++ 関数を宣" -"言できます。" +"`unsafe extern` ブロックを使用すると、Rust から安全に呼び出せる C++ 関数を宣言で" +"きます。" #: src/android/interoperability/cpp/shared-types.md msgid "// A=1, J=11, Q=12, K=13\n" @@ -14255,9 +13970,9 @@ msgid "" "derive `Hash` also generates an implementation of `std::hash` for the " "corresponding C++ type." msgstr "" -"共有型の `#[derive()]` では、サポートされるトレイトの数が限られています。対応" -"する機能は C++ コードでも生成されます。たとえば、`Hash` を導出すると、対応す" -"る C++ 型の `std::hash` の実装も生成されます。" +"共有型の `#[derive()]` では、サポートされるトレイトの数が限られています。対応す" +"る機能は C++ コードでも生成されます。たとえば、`Hash` を導出すると、対応する C+" +"+ 型の `std::hash` の実装も生成されます。" #: src/android/interoperability/cpp/shared-enums.md msgid "Generated Rust:" @@ -14270,14 +13985,13 @@ msgstr "生成された C++:" #: src/android/interoperability/cpp/shared-enums.md msgid "" "On the Rust side, the code generated for shared enums is actually a struct " -"wrapping a numeric value. This is because it is not UB in C++ for an enum " -"class to hold a value different from all of the listed variants, and our " -"Rust representation needs to have the same behavior." +"wrapping a numeric value. This is because it is not UB in C++ for an enum 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 表現は同じ動作をする必要があるため" -"です。" +"Rust 側では、共有列挙型に対して生成されるコードは、実際には数値をラップした構造" +"体です。これは、列挙型クラスがリストされたすべてのバリアントとは異なる値を保持す" +"ることは C++ では UB ではなく、Rust 表現は同じ動作をする必要があるためです。" #: src/android/interoperability/cpp/rust-result.md msgid "\"fallible1 requires depth > 0\"" @@ -14296,20 +14010,19 @@ msgstr "`Result` を返す Rust 関数は、C++ 側で例外に変換されま #: src/android/interoperability/cpp/rust-result.md msgid "" "The exception thrown will always be of type `rust::Error`, which primarily " -"exposes a way to get the error message string. The error message will come " -"from the error type's `Display` impl." +"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` の実装から" -"取得されます。" +"スローされる例外は常に `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." +"A panic unwinding from Rust to C++ will always cause the process to immediately " +"terminate." msgstr "" -"Rust から C++ にパニック アンワインドを行うと、プロセスは必ず直ちに終了しま" -"す。" +"Rust から C++ にパニック アンワインドを行うと、プロセスは必ず直ちに終了します。" #: src/android/interoperability/cpp/cpp-exception.md msgid "\"example/include/example.h\"" @@ -14321,23 +14034,22 @@ 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." +"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` 値として返します。" +"`Result` を返すように宣言された C++ 関数は、C++ 側でスローされたあらゆる例外を" +"キャッチし、呼び出し元の Rust 関数に `Err` 値として返します。" #: src/android/interoperability/cpp/cpp-exception.md msgid "" -"If an exception is thrown from an extern \"C++\" function that is not " -"declared by the CXX bridge to return `Result`, the program calls C++'s `std::" -"terminate`. The behavior is equivalent to the same exception being thrown " -"through a `noexcept` C++ function." +"If an exception is thrown from an extern \"C++\" function that is not declared " +"by the CXX bridge to return `Result`, the program calls C++'s `std::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++ 関数でスローされた場合と同等" -"です。" +"CXX ブリッジでResultを返すように宣言されていないextern \"C++\"関数から例外がス" +"ローされると、`Result`が返されると、プログラムは C++ の`std::terminate`を呼び出" +"します。この動作は、同じ例外が`noexcept` C++ 関数でスローされた場合と同等です。" #: src/android/interoperability/cpp/type-mapping.md msgid "C++ Type" @@ -14398,40 +14110,39 @@ 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." +"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:" +"Note that Rust's `String` does not map directly to `std::string`. There are a " +"few reasons for this:" msgstr "" -"Rust の `String` は `std::string` に直接マッピングされません。これには次のよ" -"うな理由があります。" +"Rust の `String` は `std::string` に直接マッピングされません。これには次のような" +"理由があります。" #: src/android/interoperability/cpp/type-mapping.md -msgid "" -"`std::string` does not uphold the UTF-8 invariant that `String` requires." +msgid "`std::string` does not uphold the UTF-8 invariant that `String` requires." 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." +"The two types have different layouts in memory and so can't be passed directly " +"between languages." msgstr "" -"この 2 つの型はメモリ内のレイアウトが異なるため、言語間で直接渡すことはできま" -"せん。" +"この 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 に値で渡すことはできません。" +"`std::string` は、Rust のムーブ セマンティクスと一致しないムーブコンストラクタを" +"必要とするため、`std::string` を Rust に値で渡すことはできません。" #: src/android/interoperability/cpp/android-build-cpp.md #: src/android/interoperability/cpp/android-cpp-genrules.md @@ -14445,8 +14156,8 @@ 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++ ライブラリをビルドします。" +"`cc_library_static` を作成して、CXX で生成されたヘッダーとソースファイルを含む " +"C++ ライブラリをビルドします。" #: src/android/interoperability/cpp/android-build-cpp.md #: src/android/interoperability/cpp/android-build-rust.md @@ -14474,43 +14185,41 @@ msgstr "\"libcxx_test_bridge_code\"" #: src/android/interoperability/cpp/android-build-cpp.md msgid "" "Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are " -"the dependencies for the CXX-generated C++ bindings. We'll show how these " -"are setup on the next slide." +"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++ バインディングに対する依存関係であることを説明します。次のスライ" -"ドで、これらがどのような記述になっているかを説明します。" +"`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." +"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` ライブラリに依" -"存する必要があることにも注意してください。" +"また、一般的な CXX 定義を取得するためには、`cxx-bridge-header` ライブラリに依存" +"する必要があることにも注意してください。" #: src/android/interoperability/cpp/android-build-cpp.md msgid "" -"Full docs for using CXX in Android can be found in [the Android docs]" -"(https://source.android.com/docs/setup/build/rust/building-rust-modules/" -"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share " -"that link with the class so that students know where they can find these " -"instructions again in the future." +"Full docs for using CXX in Android can be found in [the Android docs](https://" +"source.android.com/docs/setup/build/rust/building-rust-modules/android-rust-" +"patterns#rust-cpp-interop-using-cxx). You may want to share 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)をご覧ください。その" -"リンクをクラスと共有して、受講者が後で手順を確認できるようにすることをおすす" -"めします。" +"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` への入力として使用されま" -"す。" +"genrule を 2 つ作成します。1 つは CXX ヘッダーの生成用、もう 1 つは CXX ソース" +"ファイルの生成用です。これらは `cc_library_static` への入力として使用されます。" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "" @@ -14554,8 +14263,8 @@ 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 ツールとして利用できます。" +"`cxxbridge` ツールは、ブリッジ モジュールの C++ 側を生成するスタンドアロン ツー" +"ルです。Android に組み込まれており、Soong ツールとして利用できます。" #: src/android/interoperability/cpp/android-cpp-genrules.md msgid "" @@ -14564,8 +14273,8 @@ msgid "" "convention isn't enforced, though." msgstr "" "慣例として、Rust ソースファイルが `lib.rs` の場合、ヘッダー ファイルの名前は " -"`lib.rs.h`、ソースファイルの名前は `lib.rs.cc` となります。ただし、この命名規" -"則は強制ではありません。" +"`lib.rs.h`、ソースファイルの名前は `lib.rs.cc` となります。ただし、この命名規則" +"は強制ではありません。" #: src/android/interoperability/cpp/android-build-rust.md msgid "" @@ -14591,9 +14300,9 @@ msgid "" "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/) を使用すると、互換性のあるライブラリを" -"作成できます。" +"Java_Native_Interface) を介して共有オブジェクトを読み込むことができます。[`jni` " +"クレート](https://docs.rs/jni/) を使用すると、互換性のあるライブラリを作成できま" +"す。" #: src/android/interoperability/java.md msgid "First, we create a Rust function to export to Java:" @@ -14668,51 +14377,51 @@ msgstr "Chromium の Rust へようこそ" #: src/chromium.md msgid "" -"Rust is supported for third-party libraries in Chromium, with first-party " -"glue code to connect between Rust and existing Chromium C++ code." +"Rust is supported for third-party libraries in Chromium, with first-party glue " +"code to connect between Rust and existing Chromium C++ code." msgstr "" -"Rust は Chromium のサードパーティ ライブラリでサポートされています。Rust と既" -"存の Chromium C++ コードを接続するには、ファースト パーティのグルーコードを使" -"用します。" +"Rust は Chromium のサードパーティ ライブラリでサポートされています。Rust と既存" +"の Chromium C++ コードを接続するには、ファースト パーティのグルーコードを使用し" +"ます。" #: src/chromium.md msgid "" -"Today, we'll call into Rust to do something silly with strings. If you've " -"got a corner of the code where you're displaying a UTF8 string to the user, " -"feel free to follow this recipe in your part of the codebase instead of the " -"exact part we talk about." +"Today, we'll call into Rust to do something silly with strings. If you've got a " +"corner of the code where you're displaying a UTF8 string to the user, feel free " +"to follow this recipe in your part of the codebase instead of the exact part we " +"talk about." msgstr "" -"本日は、Rust で文字列を使って面白いことをしたいと思います。もし自分の担当部分" -"にUTF8 文字列を表示するコードがある場合は、ここで述べた部分ではなく、自分の" -"コードに対してこの手順を実行して構いません。" +"本日は、Rust で文字列を使って面白いことをしたいと思います。もし自分の担当部分に" +"UTF8 文字列を表示するコードがある場合は、ここで述べた部分ではなく、自分のコード" +"に対してこの手順を実行して構いません。" #: src/chromium/setup.md msgid "" -"Make sure you can build and run Chromium. Any platform and set of build " -"flags is OK, so long as your code is relatively recent (commit position " -"1223636 onwards, corresponding to November 2023):" +"Make sure you can build and run Chromium. Any platform and set of build flags " +"is OK, so long as your code is relatively recent (commit position 1223636 " +"onwards, corresponding to November 2023):" msgstr "" -"Chromium をビルドして実行できることを確認します。コードが比較的最近のもの" -"(2023 年 11 月に対応するコミット位置 1223636 以降)であれば、任意のプラット" -"フォームとビルドフラグのセットで問題ありません。" +"Chromium をビルドして実行できることを確認します。コードが比較的最近のもの(2023 " +"年 11 月に対応するコミット位置 1223636 以降)であれば、任意のプラットフォームと" +"ビルドフラグのセットで問題ありません。" #: src/chromium/setup.md msgid "" -"(A component, debug build is recommended for quickest iteration time. This " -"is the default!)" +"(A component, debug build is recommended for quickest iteration time. This is " +"the default!)" msgstr "" -"(反復処理の時間を最短にするには、コンポーネントのデバッグビルドをおすすめし" -"ます。これがデフォルトです)" +"(反復処理の時間を最短にするには、コンポーネントのデバッグビルドをおすすめしま" +"す。これがデフォルトです)" #: src/chromium/setup.md msgid "" -"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-" -"the-code/) if you aren't already at that point. Be warned: setting up to " -"build Chromium takes time." +"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-the-" +"code/) if you aren't already at that point. Be warned: setting up to build " +"Chromium takes time." msgstr "" "まだ確認していない場合は、[Chromium のビルド方法](https://www.chromium.org/" -"developers/how-tos/get-the-code/) を確認してください。なお、Chromium をビルド" -"するためのセットアップには時間がかかります。" +"developers/how-tos/get-the-code/) を確認してください。なお、Chromium をビルドす" +"るためのセットアップには時間がかかります。" #: src/chromium/setup.md msgid "It's also recommended that you have Visual Studio code installed." @@ -14725,13 +14434,13 @@ msgstr "演習について" #: src/chromium/setup.md msgid "" "This part of the course has a series of exercises which build on each other. " -"We'll be doing them spread throughout the course instead of just at the end. " -"If you don't have time to complete a certain part, don't worry: you can " -"catch up in the next slot." +"We'll be doing them spread throughout the course instead of just at the end. If " +"you don't have time to complete a certain part, don't worry: you can catch up " +"in the next slot." msgstr "" -"コースのこのパートには、相互に関連した一連の演習があります。コースの最後だけ" -"でなく、全体を通して演習を行います。特定のパートを完了する時間がない場合も、" -"後で追いつけばよいため心配はいりません。" +"コースのこのパートには、相互に関連した一連の演習があります。コースの最後だけでな" +"く、全体を通して演習を行います。特定のパートを完了する時間がない場合も、後で追い" +"つけばよいため心配はいりません。" #: src/chromium/cargo.md #, fuzzy @@ -14740,9 +14449,9 @@ msgid "" "(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated " "set of dependencies." msgstr "" -"Rust コミュニティでは通常、`cargo` と [crates.io](https://crates.io/) のライ" -"ブラリを使用します。Chromium は、`gn` と `ninja`、および厳選された依存関係の" -"セットを使用してビルドされています。" +"Rust コミュニティでは通常、`cargo` と [crates.io](https://crates.io/) のライブラ" +"リを使用します。Chromium は、`gn` と `ninja`、および厳選された依存関係のセットを" +"使用してビルドされています。" #: src/chromium/cargo.md msgid "When writing code in Rust, your choices are:" @@ -14750,31 +14459,31 @@ msgstr "Rust でコードを記述する際は、次の選択肢があります #: src/chromium/cargo.md msgid "" -"Use `gn` and `ninja` with the help of the templates from `//build/rust/*." -"gni` (e.g. `rust_static_library` that we'll meet later). This uses " -"Chromium's audited toolchain and crates." +"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.gni` " +"(e.g. `rust_static_library` that we'll meet later). This uses Chromium's " +"audited toolchain and crates." msgstr "" -"`//build/rust/*.gni` のテンプレート(例: 後で説明する `rust_static_library`)" -"を参考にして、`gn` と `ninja` を使用します。これには、Chromium の監査済みの" -"ツールチェーンとクレートが使用されます。" +"`//build/rust/*.gni` のテンプレート(例: 後で説明する `rust_static_library`)を" +"参考にして、`gn` と `ninja` を使用します。これには、Chromium の監査済みのツール" +"チェーンとクレートが使用されます。" #: src/chromium/cargo.md msgid "" -"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and " -"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/" -"docs/rust.md#Using-cargo)" +"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and crates]" +"(https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust." +"md#Using-cargo)" msgstr "" -"`cargo` を使用しますが、実際の利用を[Chromium の監査済みのツールチェーンとク" -"レートに制限します](https://chromium.googlesource.com/chromium/src/+/refs/" -"heads/main/docs/rust.md#Using-cargo)。" +"`cargo` を使用しますが、実際の利用を[Chromium の監査済みのツールチェーンとクレー" +"トに制限します](https://chromium.googlesource.com/chromium/src/+/refs/heads/" +"main/docs/rust.md#Using-cargo)。" #: src/chromium/cargo.md msgid "" "Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates " "downloaded from the internet](https://crates.io/)" msgstr "" -"`cargo` を使用し、[ツールチェーン](https://rustup.rs/) や [インターネットから" -"ダウンロードしたクレート](https://crates.io/) を信頼します。" +"`cargo` を使用し、[ツールチェーン](https://rustup.rs/) や [インターネットからダ" +"ウンロードしたクレート](https://crates.io/) を信頼します。" #: src/chromium/cargo.md msgid "" @@ -14782,10 +14491,9 @@ msgid "" "code can be built into the Chromium browser. At the same time, Cargo is an " "important part of the Rust ecosystem and you should keep it in your toolbox." msgstr "" -"ここからは、`gn` と `ninja` に焦点を当てます。これらを使用することで、" -"Chromium ブラウザに Rust コードを組み込むことができます。それとは別に、Cargo " -"は Rust エコシステムの重要な部分であり、使いこなせるようになっているべきで" -"す。" +"ここからは、`gn` と `ninja` に焦点を当てます。これらを使用することで、Chromium " +"ブラウザに Rust コードを組み込むことができます。それとは別に、Cargo は Rust エコ" +"システムの重要な部分であり、使いこなせるようになっているべきです。" #: src/chromium/cargo.md #, fuzzy @@ -14798,127 +14506,122 @@ msgstr "少人数のグループに分け、以下を行います。" #: src/chromium/cargo.md msgid "" -"Brainstorm scenarios where `cargo` may offer an advantage and assess the " -"risk profile of these scenarios." +"Brainstorm scenarios where `cargo` may offer an advantage and assess the risk " +"profile of these scenarios." msgstr "" -"`cargo` がメリットをもたらす可能性のあるシナリオをブレインストーミングし、そ" -"れらのシナリオのリスク プロファイルを評価します。" +"`cargo` がメリットをもたらす可能性のあるシナリオをブレインストーミングし、それら" +"のシナリオのリスク プロファイルを評価します。" #: src/chromium/cargo.md msgid "" "Discuss which tools, libraries, and groups of people need to be trusted when " "using `gn` and `ninja`, offline `cargo`, etc." msgstr "" -"`gn` や `ninja`、オフラインの `cargo` などを使用する際に、どのツール、ライブ" -"ラリ、人々を信頼しなければならないかについて話し合います。" +"`gn` や `ninja`、オフラインの `cargo` などを使用する際に、どのツール、ライブラ" +"リ、人々を信頼しなければならないかについて話し合います。" #: src/chromium/cargo.md msgid "" "Ask students to avoid peeking at the speaker notes before completing the " -"exercise. Assuming folks taking the course are physically together, ask them " -"to discuss in small groups of 3-4 people." +"exercise. Assuming folks taking the course are physically together, ask them to " +"discuss in small groups of 3-4 people." msgstr "" "受講者に、演習を完了する前にスピーカー ノートをのぞかないようお願いしてくださ" -"い。コースの受講者同士が地理的に集まっていると仮定して、3~4 人の少人数のグ" -"ループで話し合ってもらうようにお願いしてください。" +"い。コースの受講者同士が地理的に集まっていると仮定して、3~4 人の少人数のグルー" +"プで話し合ってもらうようにお願いしてください。" #: src/chromium/cargo.md msgid "" -"Notes/hints related to the first part of the exercise (\"scenarios where " -"Cargo may offer an advantage\"):" -msgstr "" -"演習の前半に関するメモとヒント(「Cargo がメリットをもたらすシナリオ」):" +"Notes/hints related to the first part of the exercise (\"scenarios where Cargo " +"may offer an advantage\"):" +msgstr "演習の前半に関するメモとヒント(「Cargo がメリットをもたらすシナリオ」):" #: src/chromium/cargo.md msgid "" -"It's fantastic that when writing a tool, or prototyping a part of Chromium, " -"one has access to the rich ecosystem of crates.io libraries. There is a " -"crate for almost anything and they are usually quite pleasant to use. " -"(`clap` for command-line parsing, `serde` for serializing/deserializing to/" -"from various formats, `itertools` for working with iterators, etc.)." +"It's fantastic that when writing a tool, or prototyping a part of Chromium, one " +"has access to the rich ecosystem of crates.io libraries. There is a crate for " +"almost anything and they are usually quite pleasant to use. (`clap` for command-" +"line parsing, `serde` for serializing/deserializing to/from various formats, " +"`itertools` for working with iterators, etc.)." msgstr "" -"ツールの作成時や Chromium の一部のプロトタイピング時に、crates.io ライブラリ" -"の充実したエコシステムにアクセスできるのは素晴らしいことです。ほぼすべての事" -"柄についてクレートが用意されており、大概の場合はとても快適に使用できます(コ" -"マンドラインを解析するための `clap`、さまざまな形式との間でシリアル化または逆" -"シリアル化を行うための `serde`、イテレータを操作するための `itertools` な" -"ど)。" +"ツールの作成時や Chromium の一部のプロトタイピング時に、crates.io ライブラリの充" +"実したエコシステムにアクセスできるのは素晴らしいことです。ほぼすべての事柄につい" +"てクレートが用意されており、大概の場合はとても快適に使用できます(コマンドライン" +"を解析するための `clap`、さまざまな形式との間でシリアル化または逆シリアル化を行" +"うための `serde`、イテレータを操作するための `itertools` など)。" #: src/chromium/cargo.md msgid "" -"`cargo` makes it easy to try a library (just add a single line to `Cargo." -"toml` and start writing code)" +"`cargo` makes it easy to try a library (just add a single line to `Cargo.toml` " +"and start writing code)" msgstr "" -"`cargo` を使用すると、ライブラリを簡単に試すことができます(`Cargo.toml` に " -"1 行追加してコードの記述を開始するだけです)。" +"`cargo` を使用すると、ライブラリを簡単に試すことができます(`Cargo.toml` に 1 行" +"追加してコードの記述を開始するだけです)。" #: src/chromium/cargo.md msgid "" "It may be worth comparing how CPAN helped make `perl` a popular choice. Or " "comparing with `python` + `pip`." msgstr "" -"`perl` の普及に役立った CPAN や、`python` における `pip` と比較してみると良い" -"かもしれません。" +"`perl` の普及に役立った CPAN や、`python` における `pip` と比較してみると良いか" +"もしれません。" #: src/chromium/cargo.md msgid "" "Development experience is made really nice not only by core Rust tools (e.g. " "using `rustup` to switch to a different `rustc` version when testing a crate " -"that needs to work on nightly, current stable, and older stable) but also by " -"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for " -"streamlining and sharing security audits; `criterion` crate gives a " -"streamlined way to run benchmarks)." -msgstr "" -"主要な Rust ツール(ナイトリー、現在の安定版、古い安定版で動作する必要がある" -"クレートをテストするときに、別の `rustc` バージョンに切り替えるのに使用する " -"`rustup` など)だけでなく、サードパーティ ツールのエコシステム(Mozilla が提" -"供するセキュリティ監査の容易化と共有のため `cargo vet`、ベンチマークを容易に" -"実行する方法を提供する `criterion` クレートなど)により、開発エクスペリエンス" -"は非常に快適となっています。" +"that needs to work on nightly, current stable, and older stable) but also by an " +"ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for " +"streamlining and sharing security audits; `criterion` crate gives a streamlined " +"way to run benchmarks)." +msgstr "" +"主要な Rust ツール(ナイトリー、現在の安定版、古い安定版で動作する必要があるク" +"レートをテストするときに、別の `rustc` バージョンに切り替えるのに使用する " +"`rustup` など)だけでなく、サードパーティ ツールのエコシステム(Mozilla が提供す" +"るセキュリティ監査の容易化と共有のため `cargo vet`、ベンチマークを容易に実行する" +"方法を提供する `criterion` クレートなど)により、開発エクスペリエンスは非常に快" +"適となっています。" #: src/chromium/cargo.md msgid "" "`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`." msgstr "" -"`cargo` を使用すると、`cargo install --locked cargo-vet` を介してツールを簡単" -"に追加できます。" +"`cargo` を使用すると、`cargo install --locked cargo-vet` を介してツールを簡単に" +"追加できます。" #: src/chromium/cargo.md msgid "It may be worth comparing with Chrome Extensions or VScode extensions." -msgstr "" -"Chrome 拡張機能や VScode 拡張機能と比較してみるのも良いかもしれません。" +msgstr "Chrome 拡張機能や VScode 拡張機能と比較してみるのも良いかもしれません。" #: src/chromium/cargo.md -msgid "" -"Broad, generic examples of projects where `cargo` may be the right choice:" +msgid "Broad, generic examples of projects where `cargo` may be the right choice:" msgstr "" -"`cargo` が適切な選択となるような、幅広い汎用的なプロジェクトの例を以下に示し" -"ます。" +"`cargo` が適切な選択となるような、幅広い汎用的なプロジェクトの例を以下に示しま" +"す。" #: src/chromium/cargo.md msgid "" -"Perhaps surprisingly, Rust is becoming increasingly popular in the industry " -"for writing command line tools. The breadth and ergonomics of libraries is " -"comparable to Python, while being more robust (thanks to the rich " -"typesystem) and running faster (as a compiled, rather than interpreted " -"language)." +"Perhaps surprisingly, Rust is becoming increasingly popular in the industry for " +"writing command line tools. The breadth and ergonomics of libraries is " +"comparable to Python, while being more robust (thanks to the rich typesystem) " +"and running faster (as a compiled, rather than interpreted language)." msgstr "" -"意外かもしれませんが、業界ではコマンドライン ツールの作成に使用する言語とし" -"て、Rust の人気が高まっています。ライブラリの幅とエルゴノミクスの点で Python " -"に匹敵しつつも、豊富な型システムのおかげで堅牢で、(インタプリタ言語ではなく" -"コンパイル言語なので)実行速度が高速です。" +"意外かもしれませんが、業界ではコマンドライン ツールの作成に使用する言語として、" +"Rust の人気が高まっています。ライブラリの幅とエルゴノミクスの点で Python に匹敵" +"しつつも、豊富な型システムのおかげで堅牢で、(インタプリタ言語ではなくコンパイル" +"言語なので)実行速度が高速です。" #: src/chromium/cargo.md msgid "" "Participating in the Rust ecosystem requires using standard Rust tools like " -"Cargo. Libraries that want to get external contributions, and want to be " -"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) " -"should probably use Cargo." +"Cargo. Libraries that want to get external contributions, and want to be used " +"outside of Chromium (e.g. in Bazel or Android/Soong build environments) should " +"probably use Cargo." msgstr "" -"Rust エコシステムに参加するには、Cargo などの標準の Rust ツールを使用する必要" -"があります。外部からコントリビューションを受け、Chromium 以外(Bazel や " -"Android / Soong のビルド環境など)での使用が推奨されるライブラリでは、Cargo " -"を使用することをおすすめします。" +"Rust エコシステムに参加するには、Cargo などの標準の Rust ツールを使用する必要が" +"あります。外部からコントリビューションを受け、Chromium 以外(Bazel や Android / " +"Soong のビルド環境など)での使用が推奨されるライブラリでは、Cargo を使用すること" +"をおすすめします。" #: src/chromium/cargo.md msgid "Examples of Chromium-related projects that are `cargo`\\-based:" @@ -14926,11 +14629,11 @@ msgstr "`cargo` ベースの Chromium 関連プロジェクトの例:" #: src/chromium/cargo.md msgid "" -"`serde_json_lenient` (experimented with in other parts of Google which " -"resulted in PRs with performance improvements)" +"`serde_json_lenient` (experimented with in other parts of Google which resulted " +"in PRs with performance improvements)" msgstr "" -"`serde_json_lenient`(Google の他の部門でテストした結果、PR のパフォーマンス" -"が向上)" +"`serde_json_lenient`(Google の他の部門でテストした結果、PR のパフォーマンスが向" +"上)" #: src/chromium/cargo.md msgid "Fontations libraries like `font-types`" @@ -14938,8 +14641,8 @@ msgstr "`font-types` などのフォント化ライブラリ" #: src/chromium/cargo.md msgid "" -"`gnrt` tool (we will meet it later in the course) which depends on `clap` " -"for command-line parsing and on `toml` for configuration files." +"`gnrt` tool (we will meet it later in the course) which depends on `clap` for " +"command-line parsing and on `toml` for configuration files." msgstr "" "`gnrt` ツール(このコースの後半で取り上げます)は、コマンドラインの解析には " "`clap` を使用し、構成ファイルには `toml` を使用します。" @@ -14947,13 +14650,11 @@ msgstr "" #: src/chromium/cargo.md #, fuzzy msgid "" -"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` " -"when building and bootstrapping Rust standard library when building Rust " -"toolchain." +"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` when " +"building and bootstrapping Rust standard library when building Rust toolchain." msgstr "" -"免責条項: `cargo` を使用する唯一の理由は、Rust ツールチェーンのビルド中、" -"Rust 標準ライブラリのビルドとブートストラップを行う際に `gn` を使用できないこ" -"とでした。" +"免責条項: `cargo` を使用する唯一の理由は、Rust ツールチェーンのビルド中、Rust 標" +"準ライブラリのビルドとブートストラップを行う際に `gn` を使用できないことでした。" #: src/chromium/cargo.md #, fuzzy @@ -14962,10 +14663,10 @@ msgid "" "third-party libraries downloaded from the internet, but `run_gnrt.py` asks " "`cargo` that only `--locked` content is allowed via `Cargo.lock`.)" msgstr "" -"`run_gnrt.py` は、Chromiumプロジェクト内の `cargo` と `rustc` のコピーを使用" -"します。`gnrt` はインターネットからダウンロードされたサードパーティ ライブラ" -"リに依存しており、`run_gnrt.py` で `Cargo.lock` を介して `--locked` コンテン" -"ツのみを許可することを `cargo` に要求します。" +"`run_gnrt.py` は、Chromiumプロジェクト内の `cargo` と `rustc` のコピーを使用しま" +"す。`gnrt` はインターネットからダウンロードされたサードパーティ ライブラリに依存" +"しており、`run_gnrt.py` で `Cargo.lock` を介して `--locked` コンテンツのみを許可" +"することを `cargo` に要求します。" #: src/chromium/cargo.md msgid "" @@ -14980,17 +14681,17 @@ msgid "" "Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust " "compiler team), binary Rust compiler downloaded for bootstrapping" msgstr "" -"LLVM ライブラリ、Clang コンパイラ、`rustc` ソース(GitHub から取得され、Rust " -"コンパイラ チームによるレビューを受けたもの)、ブートストラップ用にダウンロー" -"ドされたバイナリ Rust コンパイラに依存する `rustc`(Rust コンパイラ)" +"LLVM ライブラリ、Clang コンパイラ、`rustc` ソース(GitHub から取得され、Rust コ" +"ンパイラ チームによるレビューを受けたもの)、ブートストラップ用にダウンロードさ" +"れたバイナリ Rust コンパイラに依存する `rustc`(Rust コンパイラ)" #: src/chromium/cargo.md msgid "" "`rustup` (it may be worth pointing out that `rustup` is developed under the " "umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)" msgstr "" -"`rustup`(`rustup` は `rustc`と同じく https://github.com/rust-lang/ 組織の傘" -"下で開発されていることを説明すると良いかもしれません)" +"`rustup`(`rustup` は `rustc`と同じく https://github.com/rust-lang/ 組織の傘下で" +"開発されていることを説明すると良いかもしれません)" #: src/chromium/cargo.md msgid "`cargo`, `rustfmt`, etc." @@ -15001,8 +14702,8 @@ msgid "" "Various internal infrastructure (bots that build `rustc`, system for " "distributing the prebuilt toolchain to Chromium engineers, etc.)" msgstr "" -"さまざまな内部インフラストラクチャ(`rustc` をビルドする bot、事前構築済みの" -"ツールチェーンを Chromium エンジニアに配布するためのシステムなど)" +"さまざまな内部インフラストラクチャ(`rustc` をビルドする bot、事前構築済みのツー" +"ルチェーンを Chromium エンジニアに配布するためのシステムなど)" #: src/chromium/cargo.md msgid "Cargo tools like `cargo audit`, `cargo vet`, etc." @@ -15010,17 +14711,17 @@ msgstr "`cargo audit` や `cargo vet` などの Cargo ツール" #: src/chromium/cargo.md msgid "" -"Rust libraries vendored into `//third_party/rust` (audited by " -"security@chromium.org)" +"Rust libraries vendored into `//third_party/rust` (audited by security@chromium." +"org)" msgstr "" -"`//third_party/rust` に取り込まれたRust ライブラリ(security@chromium.org が" -"監査)" +"`//third_party/rust` に取り込まれたRust ライブラリ(security@chromium.org が監" +"査)" #: src/chromium/cargo.md msgid "Other Rust libraries (some niche, some quite popular and commonly used)" msgstr "" -"その他の Rust ライブラリ(ニッチなものもあれば、非常に人気がありよく使用され" -"るものもあります)" +"その他の Rust ライブラリ(ニッチなものもあれば、非常に人気がありよく使用されるも" +"のもあります)" #: src/chromium/policy.md msgid "Chromium Rust policy" @@ -15028,36 +14729,34 @@ msgstr "Chromium の Rust ポリシー" #: src/chromium/policy.md msgid "" -"Chromium does not yet allow first-party Rust except in rare cases as " -"approved by Chromium's [Area Tech Leads](https://source.chromium.org/" -"chromium/chromium/src/+/main:ATL_OWNERS)." +"Chromium does not yet allow first-party Rust except in rare cases as approved " +"by Chromium's [Area Tech Leads](https://source.chromium.org/chromium/chromium/" +"src/+/main:ATL_OWNERS)." msgstr "" -"Chromium では、Chromium の [エリア テクニカル リード](https://source." -"chromium.org/chromium/chromium/src/+/main:ATL_OWNERS) によって承認されている" -"まれなケースを除き、ファースト パーティでのRust使用はまだ許可されていません。" +"Chromium では、Chromium の [エリア テクニカル リード](https://source.chromium." +"org/chromium/chromium/src/+/main:ATL_OWNERS) によって承認されているまれなケース" +"を除き、ファースト パーティでのRust使用はまだ許可されていません。" #: src/chromium/policy.md msgid "" -"Chromium's policy on third party libraries is outlined [here](https://" -"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party." -"md#rust) - Rust is allowed for third party libraries under various " -"circumstances, including if they're the best option for performance or for " -"security." +"Chromium's policy on third party libraries is outlined [here](https://chromium." +"googlesource.com/chromium/src/+/main/docs/adding_to_third_party.md#rust) - Rust " +"is allowed for third party libraries under various circumstances, including if " +"they're the best option for performance or for security." msgstr "" "サードパーティ ライブラリに関する Chromium のポリシーについては、[こちら]" "(https://chromium.googlesource.com/chromium/src/+/main/docs/" -"adding_to_third_party.md#rust) をご覧ください。Rust は、パフォーマンスやセ" -"キュリティを高めるうえで最適な選択肢である場合を含め、さまざまな状況でサード" -"パーティ ライブラリに使用することが許可されています。" +"adding_to_third_party.md#rust) をご覧ください。Rust は、パフォーマンスやセキュリ" +"ティを高めるうえで最適な選択肢である場合を含め、さまざまな状況でサードパーティ " +"ライブラリに使用することが許可されています。" #: src/chromium/policy.md msgid "" -"Very few Rust libraries directly expose a C/C++ API, so that means that " -"nearly all such libraries will require a small amount of first-party glue " -"code." +"Very few Rust libraries directly expose a C/C++ API, so that means that nearly " +"all such libraries will require a small amount of first-party glue code." msgstr "" -"C / C++ API を直接公開する Rust ライブラリはほとんどないため、こうしたライブ" -"ラリのほぼすべてで、少量のファースト パーティ グルーコードが必要になります。" +"C / C++ API を直接公開する Rust ライブラリはほとんどないため、こうしたライブラリ" +"のほぼすべてで、少量のファースト パーティ グルーコードが必要になります。" #: src/chromium/policy.md msgid "" @@ -15111,11 +14810,11 @@ msgstr "" #: src/chromium/policy.md msgid "" -"First-party Rust glue code for a particular third-party crate should " -"normally be kept in `third_party/rust///wrapper`." +"First-party Rust glue code for a particular third-party crate should normally " +"be kept in `third_party/rust///wrapper`." msgstr "" -"特定のサードパーティ クレート用のファースト パーティ Rust グルーコードは通" -"常、`third_party/rust///wrapper` に置かれるべきです。" +"特定のサードパーティ クレート用のファースト パーティ Rust グルーコードは通常、" +"`third_party/rust///wrapper` に置かれるべきです。" #: src/chromium/policy.md msgid "Because of this, today's course will be heavily focused on:" @@ -15140,13 +14839,13 @@ msgstr "ビルドのルール" #: src/chromium/build-rules.md msgid "" -"Rust code is usually built using `cargo`. Chromium builds with `gn` and " -"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust " -"is no exception." +"Rust code is usually built using `cargo`. Chromium builds with `gn` and `ninja` " +"for efficiency --- its static rules allow maximum parallelism. Rust is no " +"exception." msgstr "" -"Rust コードは通常、`cargo` を使用してビルドされます。Chromium は効率を高める" -"ために `gn` と `ninja`を使用してビルドされますが、その静的ルールによって最大" -"限の並列処理が可能になります。Rust も例外ではありません。" +"Rust コードは通常、`cargo` を使用してビルドされます。Chromium は効率を高めるため" +"に `gn` と `ninja`を使用してビルドされますが、その静的ルールによって最大限の並列" +"処理が可能になります。Rust も例外ではありません。" #: src/chromium/build-rules.md msgid "Adding Rust code to Chromium" @@ -15180,46 +14879,46 @@ msgstr "" #: src/chromium/build-rules.md msgid "" -"You can also add `deps` on other Rust targets. Later we'll use this to " -"depend upon third party code." +"You can also add `deps` on other Rust targets. Later we'll use this to depend " +"upon third party code." msgstr "" -"他の Rust ターゲットに `deps` を追加することもできます。後でこれを使用して、" -"サードパーティのコードへの依存を設定します。" +"他の Rust ターゲットに `deps` を追加することもできます。後でこれを使用して、サー" +"ドパーティのコードへの依存を設定します。" #: src/chromium/build-rules.md msgid "" "You must specify _both_ the crate root, _and_ a full list of sources. The " -"`crate_root` is the file given to the Rust compiler representing the root " -"file of the compilation unit --- typically `lib.rs`. `sources` is a complete " -"list of all source files which `ninja` needs in order to determine when " -"rebuilds are necessary." +"`crate_root` is the file given to the Rust compiler representing the root file " +"of the compilation unit --- typically `lib.rs`. `sources` is a complete list of " +"all source files which `ninja` needs in order to determine when rebuilds are " +"necessary." msgstr "" "クレートルートとソースの完全なリストの両方を指定する必要があります。" -"`crate_root` は Rust コンパイラに渡されるファイルで、コンパイル単位のルート" -"ファイル(通常は `lib.rs`)を表します。`sources` はすべてのソースファイルの完" -"全なリストで、再ビルドが必要なタイミングを `ninja` が判断するために必要です。" +"`crate_root` は Rust コンパイラに渡されるファイルで、コンパイル単位のルートファ" +"イル(通常は `lib.rs`)を表します。`sources` はすべてのソースファイルの完全なリ" +"ストで、再ビルドが必要なタイミングを `ninja` が判断するために必要です。" #: src/chromium/build-rules.md msgid "" -"(There's no such thing as a Rust `source_set`, because in Rust, an entire " -"crate is a compilation unit. A `static_library` is the smallest unit.)" +"(There's no such thing as a Rust `source_set`, because in Rust, an entire crate " +"is a compilation unit. A `static_library` is the smallest unit.)" msgstr "" -"(Rust ではクレート全体がコンパイル単位であるため、`source_set`と呼べるような" -"ものは存在しません。`static_library` が最小単位です)。" +"(Rust ではクレート全体がコンパイル単位であるため、`source_set`と呼べるようなも" +"のは存在しません。`static_library` が最小単位です)。" #: src/chromium/build-rules.md msgid "" -"Students might be wondering why we need a gn template, rather than using " -"[gn's built-in support for Rust static libraries](https://gn.googlesource." -"com/gn/+/main/docs/reference.md#func_static_library). The answer is that " -"this template provides support for CXX interop, Rust features, and unit " -"tests, some of which we'll use later." +"Students might be wondering why we need a gn template, rather than using [gn's " +"built-in support for Rust static libraries](https://gn.googlesource.com/gn/+/" +"main/docs/reference.md#func_static_library). The answer is that this template " +"provides support for CXX interop, Rust features, and unit tests, some of which " +"we'll use later." msgstr "" -"受講者は、なぜ [Rust の静的ライブラリに対する gn の組み込みサポート](https://" -"gn.googlesource.com/gn/+/main/docs/reference.md#func_static_library) ではな" -"く、gn テンプレートを使用する必要があるのか疑問に思うかもしれません。その答え" -"は、このテンプレートが CXX 相互運用、Rustのfeatures、単体テストをサポートして" -"いるためです。その一部は後で使用します。" +"受講者は、なぜ [Rust の静的ライブラリに対する gn の組み込みサポート](https://gn." +"googlesource.com/gn/+/main/docs/reference.md#func_static_library) ではなく、gn " +"テンプレートを使用する必要があるのか疑問に思うかもしれません。その答えは、このテ" +"ンプレートが CXX 相互運用、Rustのfeatures、単体テストをサポートしているためで" +"す。その一部は後で使用します。" #: src/chromium/build-rules/unsafe.md msgid "Including `unsafe` Rust Code" @@ -15227,15 +14926,14 @@ msgstr "`unsafe` Rust コードの追加" #: src/chromium/build-rules/unsafe.md msgid "" -"Unsafe Rust code is forbidden in `rust_static_library` by default --- it " -"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to " -"the gn target. (Later in the course we'll see circumstances where this is " -"necessary.)" +"Unsafe Rust code is forbidden in `rust_static_library` by default --- it won't " +"compile. If you need unsafe Rust code, add `allow_unsafe = true` to the gn " +"target. (Later in the course we'll see circumstances where this is necessary.)" msgstr "" -"安全でない Rust コードはデフォルトでは `rust_static_library` で禁止されてお" -"り、コンパイルできません。安全でない Rust コードが必要な場合は、gn ターゲット" -"に `allow_unsafe = true` を追加します(これが必要になる状況については、この" -"コースの後半で説明します)。" +"安全でない Rust コードはデフォルトでは `rust_static_library` で禁止されており、" +"コンパイルできません。安全でない Rust コードが必要な場合は、gn ターゲットに " +"`allow_unsafe = true` を追加します(これが必要になる状況については、このコースの" +"後半で説明します)。" #: src/chromium/build-rules/unsafe.md msgid "" @@ -15268,8 +14966,8 @@ msgstr "" #: src/chromium/build-rules/depending.md msgid "Simply add the above target to the `deps` of some Chromium C++ target." msgstr "" -"上記のターゲットをいくつかの Chromium C++ ターゲットの `deps` に追加するだけ" -"です。" +"上記のターゲットをいくつかの Chromium C++ ターゲットの `deps` に追加するだけで" +"す。" #: src/chromium/build-rules/depending.md msgid "" @@ -15303,28 +15001,28 @@ msgstr "" #: src/chromium/build-rules/vscode.md msgid "" -"Types are elided in Rust code, which makes a good IDE even more useful than " -"for C++. Visual Studio code works well for Rust in Chromium. To use it," +"Types are elided in Rust code, which makes a good IDE even more useful than for " +"C++. Visual Studio code works well for Rust in Chromium. To use it," msgstr "" -"Rust コードでは型が省略されているため、優れた IDE は C++ の場合よりもさらに有" -"用です。Visual Studio Code は Chromium の Rust で適切に機能します。Visual " -"Studio Code を使用するにあたり、以下の点を確認してください。" +"Rust コードでは型が省略されているため、優れた IDE は C++ の場合よりもさらに有用" +"です。Visual Studio Code は Chromium の Rust で適切に機能します。Visual Studio " +"Code を使用するにあたり、以下の点を確認してください。" #: src/chromium/build-rules/vscode.md msgid "" -"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of " -"Rust support" +"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of Rust " +"support" msgstr "" -"VSCode に、以前の形式の Rust サポートではなく、`rust-analyzer` 拡張機能がある" -"ことを確認" +"VSCode に、以前の形式の Rust サポートではなく、`rust-analyzer` 拡張機能があるこ" +"とを確認" #: src/chromium/build-rules/vscode.md msgid "" "`gn gen out/Debug --export-rust-project` (or equivalent for your output " "directory)" msgstr "" -"`gn gen out/Debug --export-rust-project`(またはあなたのプロジェクトにおける" -"同様の出力ディレクトリ)" +"`gn gen out/Debug --export-rust-project`(またはあなたのプロジェクトにおける同様" +"の出力ディレクトリ)" #: src/chromium/build-rules/vscode.md msgid "`ln -s out/Debug/rust-project.json rust-project.json`" @@ -15332,40 +15030,38 @@ msgstr "`ln -s out/Debug/rust-project.json rust-project.json`" #: src/chromium/build-rules/vscode.md msgid "" -"A demo of some of the code annotation and exploration features of rust-" -"analyzer might be beneficial if the audience are naturally skeptical of IDEs." +"A demo of some of the code annotation and exploration features of rust-analyzer " +"might be beneficial if the audience are naturally skeptical of IDEs." msgstr "" -"IDE に懐疑的な受講者に対しては、rust-analyzer のコード アノテーションと探索機" -"能のデモを行うと良いかもしれません。" +"IDE に懐疑的な受講者に対しては、rust-analyzer のコード アノテーションと探索機能" +"のデモを行うと良いかもしれません。" #: src/chromium/build-rules/vscode.md msgid "" "The following steps may help with the demo (but feel free to instead use a " "piece of Chromium-related Rust that you are most familiar with):" msgstr "" -"以下の手順に沿ってデモを行うことをおすすめします(代わりに自分が最も精通して" -"いる Chromium 関連の Rustコードを使用しても構いません)。" +"以下の手順に沿ってデモを行うことをおすすめします(代わりに自分が最も精通してい" +"る Chromium 関連の Rustコードを使用しても構いません)。" #: src/chromium/build-rules/vscode.md msgid "Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`" -msgstr "" -"`components/qr_code_generator/qr_code_generator_ffi_glue.rs` を開きます。" +msgstr "`components/qr_code_generator/qr_code_generator_ffi_glue.rs` を開きます。" #: src/chromium/build-rules/vscode.md msgid "" "Place the cursor over the `QrCode::new` call (around line 26) in " "\\`qr_code_generator_ffi_glue.rs" msgstr "" -"\\`qr_code_generator_ffi_glue.rs の `QrCode::new` 呼び出し(26 行目付近)に" -"カーソルを合わせます。" +"\\`qr_code_generator_ffi_glue.rs の `QrCode::new` 呼び出し(26 行目付近)にカー" +"ソルを合わせます。" #: src/chromium/build-rules/vscode.md msgid "" -"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = " -"K)." +"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = K)." msgstr "" -"**show documentation** のデモを行います(一般的なバインディング: vscode = " -"ctrl ki、vim/CoC = K)。" +"**show documentation** のデモを行います(一般的なバインディング: vscode = ctrl " +"ki、vim/CoC = K)。" #: src/chromium/build-rules/vscode.md msgid "" @@ -15373,8 +15069,8 @@ msgid "" "(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)" msgstr "" "**go to definition** のデモを行います(一般的なバインディング: vscode = F12、" -"vim/CoC = g d)(これにより、`//third_party/rust/.../qr_code-.../src/lib.rs` " -"に移動します)。" +"vim/CoC = g d)(これにより、`//third_party/rust/.../qr_code-.../src/lib.rs` に" +"移動します)。" #: src/chromium/build-rules/vscode.md msgid "" @@ -15382,27 +15078,27 @@ msgid "" "164; the outline is in the file explorer pane in vscode; typical vim/CoC " "bindings = space o)" msgstr "" -"**outline** のデモを行い、`QrCode::with_bits` メソッドに移動します(164 行目" -"付近。アウトラインは VSCode のファイル エクスプローラ ペインにあります。一般" -"的な vim/CoC バインディング = space o)。" +"**outline** のデモを行い、`QrCode::with_bits` メソッドに移動します(164 行目付" +"近。アウトラインは VSCode のファイル エクスプローラ ペインにあります。一般的な " +"vim/CoC バインディング = space o)。" #: src/chromium/build-rules/vscode.md #, fuzzy msgid "" -"Demo **type annotations** (there are quite a few nice examples in the " -"`QrCode::with_bits` method)" +"Demo **type annotations** (there are quite a few nice examples in the `QrCode::" +"with_bits` method)" msgstr "" -"**type annotations**のデモを行います(`QrCode::with_bits` メソッドにいくつか" -"の適切な例があります)。" +"**type annotations**のデモを行います(`QrCode::with_bits` メソッドにいくつかの適" +"切な例があります)。" #: src/chromium/build-rules/vscode.md msgid "" -"It may be worth pointing out that `gn gen ... --export-rust-project` will " -"need to be rerun after editing `BUILD.gn` files (which we will do a few " -"times throughout the exercises in this session)." +"It may be worth pointing out that `gn gen ... --export-rust-project` will need " +"to be rerun after editing `BUILD.gn` files (which we will do a few times " +"throughout the exercises in this session)." msgstr "" -"`BUILD.gn` ファイルの編集後は `gn gen ... --export-rust-project` を再実行する" -"必要があることを説明してください(このセッションの演習全体で数回行います)。" +"`BUILD.gn` ファイルの編集後は `gn gen ... --export-rust-project` を再実行する必" +"要があることを説明してください(このセッションの演習全体で数回行います)。" #: src/exercises/chromium/build-rules.md #, fuzzy @@ -15414,8 +15110,8 @@ msgid "" "In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` " "containing:" msgstr "" -"Chromium のビルドで、以下を含む新しい Rust ターゲットを `//ui/base/BUILD.gn` " -"に追加します。" +"Chromium のビルドで、以下を含む新しい Rust ターゲットを `//ui/base/BUILD.gn` に" +"追加します。" #: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md #: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md @@ -15426,43 +15122,41 @@ msgstr "" #: src/exercises/chromium/build-rules.md #, fuzzy msgid "" -"**Important**: note that `no_mangle` here is considered a type of unsafety " -"by the Rust compiler, so you'll need to allow unsafe code in your `gn` " -"target." +"**Important**: note that `no_mangle` here is considered a type of unsafety by " +"the Rust compiler, so you'll need to allow unsafe code in your `gn` target." msgstr "" -"**重要**: ここでの `no_mangle` は Rust コンパイラでは安全でない型とみなされる" -"ため、`gn` ターゲットで安全でないコードを許可する必要があります。" +"**重要**: ここでの `no_mangle` は Rust コンパイラでは安全でない型とみなされるた" +"め、`gn` ターゲットで安全でないコードを許可する必要があります。" #: src/exercises/chromium/build-rules.md msgid "" "Add this new Rust target as a dependency of `//ui/base:base`. Declare this " -"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll " -"see how this can be automated by bindings generation tools):" +"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll see " +"how this can be automated by bindings generation tools):" msgstr "" -"この新しい Rust ターゲットを `//ui/base:base` の依存関係として追加します。こ" -"の関数を `ui/base/resource/resource_bundle.cc` の先頭で宣言します(後ほど、バ" -"インディング生成ツールでこれを自動化する方法を説明します)。" +"この新しい Rust ターゲットを `//ui/base:base` の依存関係として追加します。この関" +"数を `ui/base/resource/resource_bundle.cc` の先頭で宣言します(後ほど、バイン" +"ディング生成ツールでこれを自動化する方法を説明します)。" #: src/exercises/chromium/build-rules.md msgid "" -"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - " -"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build " -"and run Chromium, and ensure that \"Hello from Rust!\" is printed lots of " -"times." +"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - we " +"suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build and run " +"Chromium, and ensure that \"Hello from Rust!\" is printed lots of times." msgstr "" -"この関数を `ui/base/resource/resource_bundle.cc` 内のどこかから呼び出します。" -"おすすめは`ResourceBundle::MaybeMangleLocalizedString` の先頭から呼び出すこと" -"です。Chromium をビルドして実行し、\"Hello from Rust!\" が何度も出力されてい" -"ることを確認します。" +"この関数を `ui/base/resource/resource_bundle.cc` 内のどこかから呼び出します。お" +"すすめは`ResourceBundle::MaybeMangleLocalizedString` の先頭から呼び出すことで" +"す。Chromium をビルドして実行し、\"Hello from Rust!\" が何度も出力されていること" +"を確認します。" #: src/exercises/chromium/build-rules.md msgid "" -"If you use VSCode, now set up Rust to work well in VSCode. It will be useful " -"in subsequent exercises. If you've succeeded, you will be able to use right-" -"click \"Go to definition\" on `println!`." +"If you use VSCode, now set up Rust to work well in VSCode. It will be useful in " +"subsequent exercises. If you've succeeded, you will be able to use right-click " +"\"Go to definition\" on `println!`." msgstr "" -"VSCode を使用している場合は、VSCode で適切に動作するように Rust を設定しま" -"す。これは、後続の演習で役立ちます。設定が完了したら、`println!` で \"Go to " +"VSCode を使用している場合は、VSCode で適切に動作するように Rust を設定します。こ" +"れは、後続の演習で役立ちます。設定が完了したら、`println!` で \"Go to " "definition\" を右クリックで利用できるようになります。" #: src/exercises/chromium/build-rules.md @@ -15472,9 +15166,9 @@ msgstr "参考情報" #: src/exercises/chromium/build-rules.md msgid "" -"The options available to the [`rust_static_library` gn template](https://" -"source.chromium.org/chromium/chromium/src/+/main:build/rust/" -"rust_static_library.gni;l=16)" +"The options available to the [`rust_static_library` gn template](https://source." +"chromium.org/chromium/chromium/src/+/main:build/rust/rust_static_library.gni;" +"l=16)" msgstr "" "[`rust_static_library` gn テンプレート](https://source.chromium.org/chromium/" "chromium/src/+/main:build/rust/rust_static_library.gni;l=16) で使用できるオプ" @@ -15491,16 +15185,15 @@ msgstr "" #: src/exercises/chromium/build-rules.md msgid "" -"Information about [`extern \"C\"`](https://doc.rust-lang.org/std/keyword." -"extern.html)" +"Information about [`extern \"C\"`](https://doc.rust-lang.org/std/keyword.extern." +"html)" msgstr "" -"[`extern \"C\"`](https://doc.rust-lang.org/std/keyword.extern.html) に関する" -"情報" +"[`extern \"C\"`](https://doc.rust-lang.org/std/keyword.extern.html) に関する情報" #: src/exercises/chromium/build-rules.md msgid "" -"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/" -"gn/+/main/docs/reference.md#compilation-database) switch" +"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/gn/" +"+/main/docs/reference.md#compilation-database) switch" msgstr "" "gn の [`--export-rust-project`](https://gn.googlesource.com/gn/+/main/docs/" "reference.md#compilation-database) スイッチに関する情報" @@ -15510,48 +15203,47 @@ msgid "" "[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/" "languages/rust)" msgstr "" -"[VSCode に rust-analyzer をインストールする方法](https://code.visualstudio." -"com/docs/languages/rust)" +"[VSCode に rust-analyzer をインストールする方法](https://code.visualstudio.com/" +"docs/languages/rust)" #: src/exercises/chromium/build-rules.md msgid "" -"This example is unusual because it boils down to the lowest-common-" -"denominator interop language, C. Both C++ and Rust can natively declare and " -"call C ABI functions. Later in the course, we'll connect C++ directly to " -"Rust." +"This example is unusual because it boils down to the lowest-common-denominator " +"interop language, C. Both C++ and Rust can natively declare and call C ABI " +"functions. Later in the course, we'll connect C++ directly to Rust." msgstr "" "この例は、共通の相互運用言語である C に集約されているため、一般的ではありませ" -"ん。C++ と Rust はどちらも、C ABI 関数をネイティブに宣言して呼び出すことがで" -"きます。コースの後半で、C++ を Rust に直接接続します。" +"ん。C++ と Rust はどちらも、C ABI 関数をネイティブに宣言して呼び出すことができま" +"す。コースの後半で、C++ を Rust に直接接続します。" #: src/exercises/chromium/build-rules.md #, fuzzy msgid "" "`allow_unsafe = true` is required here because `#[unsafe(no_mangle)]` might " -"allow Rust to generate two functions with the same name, and Rust can no " -"longer guarantee that the right one is called." +"allow Rust to generate two functions with the same name, and Rust can no longer " +"guarantee that the right one is called." msgstr "" -"ここで `allow_unsafe = true` は必須です。`#[no_mangle]` により、Rust は同じ名" -"前の関数を2つ生成するようになり、Rust は正しい関数が呼び出されることを保証で" -"きなくなるためです。" +"ここで `allow_unsafe = true` は必須です。`#[no_mangle]` により、Rust は同じ名前" +"の関数を2つ生成するようになり、Rust は正しい関数が呼び出されることを保証できなく" +"なるためです。" #: src/exercises/chromium/build-rules.md msgid "" "If you need a pure Rust executable, you can also do that using the " "`rust_executable` gn template." msgstr "" -"純粋な Rust 実行可能ファイルが必要な場合は、`rust_executable` gn テンプレート" -"を使用して行うこともできます。" +"純粋な Rust 実行可能ファイルが必要な場合は、`rust_executable` gn テンプレートを" +"使用して行うこともできます。" #: src/chromium/testing.md msgid "" "Rust community typically authors unit tests in a module placed in the same " -"source file as the code being tested. This was covered [earlier](../testing." -"md) in the course and looks like this:" +"source file as the code being tested. This was covered [earlier](../testing.md) " +"in the course and looks like this:" msgstr "" "Rust コミュニティは通常、テスト対象のコードと同じソースファイルに配置されたモ" -"ジュールで単体テストを作成します。これは本コースの [前の部分](../testing.md) " -"で説明しており、以下のようになります。" +"ジュールで単体テストを作成します。これは本コースの [前の部分](../testing.md) で" +"説明しており、以下のようになります。" #: src/chromium/testing.md msgid "" @@ -15560,23 +15252,21 @@ msgid "" "and helps to avoid rebuilding `.rs` files a second time (in the `test` " "configuration)." msgstr "" -"Chromium では単体テストを別のソースファイルに配置しており、Rust でもこの方針" -"を継続します。これにより、テストが常に検出可能になり、2 度目に(`test` 構成" -"で)`.rs` ファイルを再ビルドする必要がなくなります。" +"Chromium では単体テストを別のソースファイルに配置しており、Rust でもこの方針を継" +"続します。これにより、テストが常に検出可能になり、2 度目に(`test` 構成で)`." +"rs` ファイルを再ビルドする必要がなくなります。" #: src/chromium/testing.md -msgid "" -"This results in the following options for testing Rust code in Chromium:" +msgid "This results in the following options for testing Rust code in Chromium:" msgstr "" "その結果、Chromium で Rust コードをテストするための次の選択肢が提供されます。" #: src/chromium/testing.md msgid "" -"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/" -"rust`." +"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/rust`." msgstr "" -"ネイティブ Rust テスト(例: `#[test]`)。`//third_party/rust` 以外では推奨さ" -"れません。" +"ネイティブ Rust テスト(例: `#[test]`)。`//third_party/rust` 以外では推奨されま" +"せん。" #: src/chromium/testing.md msgid "" @@ -15584,19 +15274,19 @@ msgid "" "when Rust code is just a thin FFI layer and the existing unit tests provide " "sufficient coverage for the feature." msgstr "" -"C++ で作成され、FFI 呼び出しを介して Rust を実行する `gtest` テスト。Rust " -"コードが単なる薄いFFI レイヤであり、既存の単体テストで今後この機能が漏れなく" -"カバーされる場合には十分です。" +"C++ で作成され、FFI 呼び出しを介して Rust を実行する `gtest` テスト。Rust コード" +"が単なる薄いFFI レイヤであり、既存の単体テストで今後この機能が漏れなくカバーされ" +"る場合には十分です。" #: src/chromium/testing.md msgid "" "`gtest` tests authored in Rust and using the crate under test through its " -"public API (using `pub mod for_testing { ... }` if needed). This is the " -"subject of the next few slides." +"public API (using `pub mod for_testing { ... }` if needed). This is the subject " +"of the next few slides." msgstr "" -"Rust で作成され、公開 API を介してテスト対象のクレートを使用する `gtest` テス" -"ト(必要に応じて `pub mod for_testing { ... }` を使用)。これについては、次の" -"数枚のスライドで説明します。" +"Rust で作成され、公開 API を介してテスト対象のクレートを使用する `gtest` テスト" +"(必要に応じて `pub mod for_testing { ... }` を使用)。これについては、次の数枚" +"のスライドで説明します。" #: src/chromium/testing.md msgid "" @@ -15604,30 +15294,29 @@ msgid "" "exercised by Chromium bots. (Such testing is needed rarely --- only after " "adding or updating third-party crates.)" msgstr "" -"サードパーティ クレートのネイティブ Rust テストが最終的に Chromium bot によっ" -"て実行される必要があることを説明します(このようなテストが必要になることは" -"めったになく、サードパーティのクレートを追加または更新した後にのみ必要となり" -"ます)。" +"サードパーティ クレートのネイティブ Rust テストが最終的に Chromium bot によって" +"実行される必要があることを説明します(このようなテストが必要になることはめったに" +"なく、サードパーティのクレートを追加または更新した後にのみ必要となります)。" #: src/chromium/testing.md msgid "" "Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be " "used:" msgstr "" -"C++ の`gtest` と Rust の`gtest` をどのような場合に使うべきか、いくつかの例を" -"使って説明するとよいでしょう。" +"C++ の`gtest` と Rust の`gtest` をどのような場合に使うべきか、いくつかの例を使っ" +"て説明するとよいでしょう。" #: src/chromium/testing.md msgid "" "QR has very little functionality in the first-party Rust layer (it's just a " -"thin FFI glue) and therefore uses the existing C++ unit tests for testing " -"both the C++ and the Rust implementation (parameterizing the tests so they " -"enable or disable Rust using a `ScopedFeatureList`)." +"thin FFI glue) and therefore uses the existing C++ unit tests for testing both " +"the C++ and the Rust implementation (parameterizing the tests so they enable or " +"disable Rust using a `ScopedFeatureList`)." msgstr "" -"QR には、ファースト パーティの Rust レイヤの機能はほとんどありません(単なる" -"シン FFI グルーです)。そのため、C++ と Rust の実装の両方をテストするには、既" -"存の C++ 単体テストを使用します(テストをパラメータ化し、`ScopedFeatureList` " -"を使用して Rust を有効化または無効化できるようになっています)。" +"QR には、ファースト パーティの Rust レイヤの機能はほとんどありません(単なるシ" +"ン FFI グルーです)。そのため、C++ と Rust の実装の両方をテストするには、既存の " +"C++ 単体テストを使用します(テストをパラメータ化し、`ScopedFeatureList` を使用し" +"て Rust を有効化または無効化できるようになっています)。" #: src/chromium/testing.md msgid "" @@ -15636,10 +15325,10 @@ msgid "" "missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such " "functionality may benefit from separate tests authored in Rust." msgstr "" -"仮定の、または開発中の PNG 統合では、`libpng` では提供されているのに、`png` " -"クレートでは欠落しているピクセル変換(RGBA => BGRA、ガンマ補正など)のメモリ" -"セーフな実装が必要となる場合があります。このような機能の開発においては、別途" -"Rustでテストを作成することが役立つ場合があります。" +"仮定の、または開発中の PNG 統合では、`libpng` では提供されているのに、`png` ク" +"レートでは欠落しているピクセル変換(RGBA => BGRA、ガンマ補正など)のメモリセーフ" +"な実装が必要となる場合があります。このような機能の開発においては、別途Rustでテス" +"トを作成することが役立つ場合があります。" #: src/chromium/testing/rust-gtest-interop.md msgid "" @@ -15647,24 +15336,22 @@ msgid "" "main/testing/rust_gtest_interop/README.md) library provides a way to:" msgstr "" "[`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/main/" -"testing/rust_gtest_interop/README.md) ライブラリを使用すると、次のことができ" -"ます。" +"testing/rust_gtest_interop/README.md) ライブラリを使用すると、次のことができま" +"す。" #: src/chromium/testing/rust-gtest-interop.md msgid "" -"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` " -"attribute)" +"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` attribute)" msgstr "" -"Rust 関数を `gtest` テストケースとして使用する(`#[gtest(...)]` 属性を使" -"用)。" +"Rust 関数を `gtest` テストケースとして使用する(`#[gtest(...)]` 属性を使用)。" #: src/chromium/testing/rust-gtest-interop.md msgid "" -"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not " -"panicking and not terminating the test when the assertion fails)." +"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not panicking " +"and not terminating the test when the assertion fails)." msgstr "" -"`expect_eq!` などのマクロを使用する(`assert_eq!`と似ていますが、アサーション" -"が失敗してもパニックせず、テストを終了しません)。" +"`expect_eq!` などのマクロを使用する(`assert_eq!`と似ていますが、アサーションが" +"失敗してもパニックせず、テストを終了しません)。" #: src/chromium/testing/rust-gtest-interop.md #, fuzzy @@ -15673,11 +15360,11 @@ msgstr "例" #: src/chromium/testing/build-gn.md msgid "" -"The simplest way to build Rust `gtest` tests is to add them to an existing " -"test binary that already contains tests authored in C++. For example:" +"The simplest way to build Rust `gtest` tests is to add them to an existing test " +"binary that already contains tests authored in C++. For example:" msgstr "" -"Rust の `gtest` テストをビルドする最も簡単な方法は、C++ で作成されたテストが" -"すでに含まれている既存のテストバイナリに追加することです。次に例を示します。" +"Rust の `gtest` テストをビルドする最も簡単な方法は、C++ で作成されたテストがすで" +"に含まれている既存のテストバイナリに追加することです。次に例を示します。" #: src/chromium/testing/build-gn.md msgid "" @@ -15702,8 +15389,8 @@ msgid "" "Authoring Rust tests in a separate `static_library` also works, but requires " "manually declaring the dependency on the support libraries:" msgstr "" -"別途、`static_library` で Rust テストを作成することも可能ですが、サポート ラ" -"イブラリへの依存関係を手動で宣言する必要があります。" +"別途、`static_library` で Rust テストを作成することも可能ですが、サポート ライブ" +"ラリへの依存関係を手動で宣言する必要があります。" #: src/chromium/testing/build-gn.md msgid "" @@ -15745,19 +15432,19 @@ msgstr "" #: src/chromium/testing/chromium-import-macro.md msgid "" -"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to " -"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't " -"provided an explicit `crate_name` for `my_rust_lib` so its crate name is " -"computed based on the full target path and name. Fortunately we can avoid " -"working with such an unwieldy name by using the `chromium::import!` macro " -"from the automatically-imported `chromium` crate:" +"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to import " +"and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't provided an " +"explicit `crate_name` for `my_rust_lib` so its crate name is computed based on " +"the full target path and name. Fortunately we can avoid working with such an " +"unwieldy name by using the `chromium::import!` macro from the automatically-" +"imported `chromium` crate:" msgstr "" -"GN の `deps` に `:my_rust_lib` を追加した後も、`my_rust_lib_unittest.rs` か" -"ら `my_rust_lib` をインポートして使用する方法について学ぶ必要があります。" -"`my_rust_lib` には明示的な `crate_name` が指定されていないため、クレート名は" -"ターゲットのフルパスと名前に基づいて生成されます。幸い、自動的にインポートさ" -"れる `chromium` クレートから `chromium::import!` マクロを使用すれば、このよう" -"な扱いにくい名前の使用を回避できます。" +"GN の `deps` に `:my_rust_lib` を追加した後も、`my_rust_lib_unittest.rs` から " +"`my_rust_lib` をインポートして使用する方法について学ぶ必要があります。" +"`my_rust_lib` には明示的な `crate_name` が指定されていないため、クレート名はター" +"ゲットのフルパスと名前に基づいて生成されます。幸い、自動的にインポートされる " +"`chromium` クレートから `chromium::import!` マクロを使用すれば、このような扱いに" +"くい名前の使用を回避できます。" #: src/chromium/testing/chromium-import-macro.md msgid "\"//ui/base:my_rust_lib\"" @@ -15769,9 +15456,9 @@ msgstr "内部で、マクロは次のように展開されます。" #: src/chromium/testing/chromium-import-macro.md msgid "" -"More information can be found in [the doc comment](https://source.chromium." -"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/" -"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:" +"More information can be found in [the doc comment](https://source.chromium.org/" +"chromium/chromium/src/+/main:build/rust/chromium_prelude/chromium_prelude.rs?" +"q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:" "third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro." msgstr "" "詳しくは、`chromium::import` マクロの [ドキュメント コメント](https://source." @@ -15784,14 +15471,13 @@ msgid "" "`rust_static_library` supports specifying an explicit name via `crate_name` " "property, but doing this is discouraged. And it is discouraged because the " "crate name has to be globally unique. crates.io guarantees uniqueness of its " -"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool " -"covered in a later section) use short crate names." +"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool covered " +"in a later section) use short crate names." msgstr "" "`rust_static_library` は、`crate_name` プロパティによる明示的な名前の指定をサ" -"ポートしていますが、クレート名はグローバルに一意である必要があるため、これは" -"推奨されません。crates.io はクレート名の一意性を保証しているため、" -"`cargo_crate` GN ターゲット(後述の `gnrt` ツールで生成)は短いクレート名を使" -"用します。" +"ポートしていますが、クレート名はグローバルに一意である必要があるため、これは推奨" +"されません。crates.io はクレート名の一意性を保証しているため、`cargo_crate` GN " +"ターゲット(後述の `gnrt` ツールで生成)は短いクレート名を使用します。" #: src/exercises/chromium/testing.md #, fuzzy @@ -15808,18 +15494,17 @@ msgstr "Chromium ビルドで以下を行ってください。" #: src/exercises/chromium/testing.md msgid "" -"Add a testable function next to `hello_from_rust`. Some suggestions: adding " -"two integers received as arguments, computing the nth Fibonacci number, " -"summing integers in a slice, etc." +"Add a testable function next to `hello_from_rust`. Some suggestions: adding two " +"integers received as arguments, computing the nth Fibonacci number, summing " +"integers in a slice, etc." msgstr "" -"`hello_from_rust` の横にテスト可能な関数を追加します。たとえば、引数として受" -"け取った 2 つの整数を追加する、n 番目のフィボナッチ数を計算する、スライス内の" -"整数を合計する、などが考えられます。" +"`hello_from_rust` の横にテスト可能な関数を追加します。たとえば、引数として受け" +"取った 2 つの整数を追加する、n 番目のフィボナッチ数を計算する、スライス内の整数" +"を合計する、などが考えられます。" #: src/exercises/chromium/testing.md msgid "Add a separate `..._unittest.rs` file with a test for the new function." -msgstr "" -"新しい関数のテストを含む別個の `..._unittest.rs` ファイルを追加します。" +msgstr "新しい関数のテストを含む別個の `..._unittest.rs` ファイルを追加します。" #: src/exercises/chromium/testing.md msgid "Add the new tests to `BUILD.gn`." @@ -15831,19 +15516,18 @@ msgstr "テストをビルドして実行し、新しいテストが機能する #: src/chromium/interoperability-with-cpp.md msgid "" -"The Rust community offers multiple options for C++/Rust interop, with new " -"tools being developed all the time. At the moment, Chromium uses a tool " -"called CXX." +"The Rust community offers multiple options for C++/Rust interop, with new tools " +"being developed all the time. At the moment, Chromium uses a tool called CXX." msgstr "" -"Rust コミュニティには C++ と Rust の相互運用のためのオプションが複数用意され" -"ており、絶えず新しいツールが開発されています。現在のところ、Chromium では " -"CXX というツールを使用しています。" +"Rust コミュニティには C++ と Rust の相互運用のためのオプションが複数用意されてお" +"り、絶えず新しいツールが開発されています。現在のところ、Chromium では CXX という" +"ツールを使用しています。" #: src/chromium/interoperability-with-cpp.md msgid "" -"You describe your whole language boundary in an interface definition " -"language (which looks a lot like Rust) and then CXX tools generate " -"declarations for functions and types in both Rust and C++." +"You describe your whole language boundary in an interface definition language " +"(which looks a lot like Rust) and then CXX tools generate declarations for " +"functions and types in both Rust and C++." msgstr "" "言語境界全体をインターフェース定義言語(Rust によく似ています)で記述すると、" "CXX ツールが Rust と C++ の両方で関数と型の宣言を生成します。" @@ -15859,35 +15543,34 @@ msgstr "" #: src/chromium/interoperability-with-cpp.md msgid "" "Talk through the diagram. Explain that behind the scenes, this is doing just " -"the same as you previously did. Point out that automating the process has " -"the following benefits:" +"the same as you previously did. Point out that automating the process has the " +"following benefits:" msgstr "" -"図を見ながら話しましょう。裏で行われる処理は以前とまったく同じであり、このプ" -"ロセスを自動化すると次のようなメリットがあることを説明します。" +"図を見ながら話しましょう。裏で行われる処理は以前とまったく同じであり、このプロセ" +"スを自動化すると次のようなメリットがあることを説明します。" #: src/chromium/interoperability-with-cpp.md msgid "" "The tool guarantees that the C++ and Rust sides match (e.g. you get compile " "errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust " -"definitions, but with out-of-sync manual bindings you'd get Undefined " -"Behavior)" +"definitions, but with out-of-sync manual bindings you'd get Undefined Behavior)" msgstr "" "このツールは、C++ 側と Rust 側が一致することを保証します(たとえば、`#[cxx::" -"bridge]` が実際の C++ または Rust の定義と一致しない場合、コンパイル エラーが" -"発生しますが、同期されていない手動バインディングを使用すると、未定義の動作が" -"発生します)。" +"bridge]` が実際の C++ または Rust の定義と一致しない場合、コンパイル エラーが発" +"生しますが、同期されていない手動バインディングを使用すると、未定義の動作が発生し" +"ます)。" #: src/chromium/interoperability-with-cpp.md msgid "" "The tool automates generation of FFI thunks (small, C-ABI-compatible, free " "functions) for non-C features (e.g. enabling FFI calls into Rust or C++ " -"methods; manual bindings would require authoring such top-level, free " -"functions manually)" +"methods; manual bindings would require authoring such top-level, free functions " +"manually)" msgstr "" -"このツールは、C 以外の機能に対する FFI サンク(小さな C-ABI 互換のフリー関" -"数)の生成を自動化します(Rust または C++ メソッドへの FFI 呼び出しの有効化な" -"ど。手動バインディングでは、このようなトップレベルのフリー関数を手動で作成す" -"る必要があります)。" +"このツールは、C 以外の機能に対する FFI サンク(小さな C-ABI 互換のフリー関数)の" +"生成を自動化します(Rust または C++ メソッドへの FFI 呼び出しの有効化など。手動" +"バインディングでは、このようなトップレベルのフリー関数を手動で作成する必要があり" +"ます)。" #: src/chromium/interoperability-with-cpp.md msgid "The tool and the library can handle a set of core types - for example:" @@ -15895,28 +15578,26 @@ msgstr "ツールとライブラリは、次のような一連の主要な型を #: src/chromium/interoperability-with-cpp.md msgid "" -"`&[T]` can be passed across the FFI boundary, even though it doesn't " -"guarantee any particular ABI or memory layout. With manual bindings `std::" -"span` / `&[T]` have to be manually destructured and rebuilt out of a " -"pointer and length - this is error-prone given that each language represents " -"empty slices slightly differently)" +"`&[T]` can be passed across the FFI boundary, even though it doesn't guarantee " +"any particular ABI or memory layout. With manual bindings `std::span` / " +"`&[T]` have to be manually destructured and rebuilt out of a pointer and length " +"- this is error-prone given that each language represents empty slices slightly " +"differently)" msgstr "" -"`&[T]` は、特定の ABI やメモリ レイアウトを保証するものではありませんが、FFI " -"の境界を超えて渡すことができます。手動バインディングでは、`std::span` / " -"`&[T]` を手動で分離し、ポインタと長さから再構築する必要があります。言語ごとに" -"空のスライスの表現方法が若干異なるため、エラーが発生しやすくなります。" +"`&[T]` は、特定の ABI やメモリ レイアウトを保証するものではありませんが、FFI の" +"境界を超えて渡すことができます。手動バインディングでは、`std::span` / `&[T]` " +"を手動で分離し、ポインタと長さから再構築する必要があります。言語ごとに空のスライ" +"スの表現方法が若干異なるため、エラーが発生しやすくなります。" #: src/chromium/interoperability-with-cpp.md msgid "" "Smart pointers like `std::unique_ptr`, `std::shared_ptr`, and/or `Box` " "are natively supported. With manual bindings, one would have to pass C-ABI-" -"compatible raw pointers, which would increase lifetime and memory-safety " -"risks." +"compatible raw pointers, which would increase lifetime and memory-safety risks." msgstr "" -"`std::unique_ptr`、`std::shared_ptr`、`Box` などのスマート ポインタは、" -"ネイティブにサポートされています。手動バインディングでは、C-ABI 互換の未加工" -"ポインタを渡す必要があるため、ライフタイムとメモリ安全性に関するリスクが高ま" -"ります。" +"`std::unique_ptr`、`std::shared_ptr`、`Box` などのスマート ポインタは、ネ" +"イティブにサポートされています。手動バインディングでは、C-ABI 互換の未加工ポイン" +"タを渡す必要があるため、ライフタイムとメモリ安全性に関するリスクが高まります。" #: src/chromium/interoperability-with-cpp.md msgid "" @@ -15925,17 +15606,17 @@ msgid "" "build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-" "terminate a string)." msgstr "" -"`rust::String` 型と `CxxString` 型は、言語間の文字列表現の違いを理解し、維持" -"します(たとえば、`rust::String::lossy` は、非 UTF8 の入力から Rust 文字列を" -"作成できます。また、`rust::String::c_str` は文字列を NUL 終端できます)。" +"`rust::String` 型と `CxxString` 型は、言語間の文字列表現の違いを理解し、維持しま" +"す(たとえば、`rust::String::lossy` は、非 UTF8 の入力から Rust 文字列を作成でき" +"ます。また、`rust::String::c_str` は文字列を NUL 終端できます)。" #: src/chromium/interoperability-with-cpp/example-bindings.md msgid "" "CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` " "modules inside `.rs` source code." msgstr "" -"CXX では、C++ と Rust の境界全体を `.rs` ソースコード内の `cxx::bridge` モ" -"ジュールで宣言する必要があります。" +"CXX では、C++ と Rust の境界全体を `.rs` ソースコード内の `cxx::bridge` モジュー" +"ルで宣言する必要があります。" #: src/chromium/interoperability-with-cpp/example-bindings.md msgid "\"example/include/blobstore.h\"" @@ -15951,14 +15632,14 @@ msgstr "以下を説明します。" #: src/chromium/interoperability-with-cpp/example-bindings.md msgid "" -"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` " -"procedural macro does complex things to it. The generated code is quite a " -"bit more sophisticated - though this does still result in a `mod` called " -"`ffi` in your code." +"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` procedural " +"macro does complex things to it. The generated code is quite a bit more " +"sophisticated - though this does still result in a `mod` called `ffi` in your " +"code." msgstr "" -"これは通常の Rust `mod` のように見えますが、`#[cxx::bridge]` プロシージャル " -"マクロはこれに対して複雑な処理を行います。生成されるコードはもっと洗練されて" -"いますが、それでもコードには `ffi` という `mod` が作成されます。" +"これは通常の Rust `mod` のように見えますが、`#[cxx::bridge]` プロシージャル マク" +"ロはこれに対して複雑な処理を行います。生成されるコードはもっと洗練されています" +"が、それでもコードには `ffi` という `mod` が作成されます。" #: src/chromium/interoperability-with-cpp/example-bindings.md msgid "Native support for C++'s `std::unique_ptr` in Rust" @@ -15979,19 +15660,18 @@ msgstr "Rust から C++ および C++ の型への呼び出し(下部)" #: src/chromium/interoperability-with-cpp/example-bindings.md msgid "" -"**Common misconception**: It _looks_ like a C++ header is being parsed by " -"Rust, but this is misleading. This header is never interpreted by Rust, but " -"simply `#include`d in the generated C++ code for the benefit of C++ " -"compilers." +"**Common misconception**: It _looks_ like a C++ header is being parsed by Rust, " +"but this is misleading. This header is never interpreted by Rust, but simply " +"`#include`d in the generated C++ code for the benefit of C++ compilers." msgstr "" -"**よくある誤解**: Rust で C++ ヘッダーが解析されているように見えますが、これ" -"は誤解です。このヘッダーは Rust では解釈されず、C++ コンパイラのために生成さ" -"れた C++ コードに `#include` されているだけです。" +"**よくある誤解**: Rust で C++ ヘッダーが解析されているように見えますが、これは誤" +"解です。このヘッダーは Rust では解釈されず、C++ コンパイラのために生成された C+" +"+ コードに `#include` されているだけです。" #: src/chromium/interoperability-with-cpp/limitations-of-cxx.md msgid "" -"By far the most useful page when using CXX is the [type reference](https://" -"cxx.rs/bindings.html)." +"By far the most useful page when using CXX is the [type reference](https://cxx." +"rs/bindings.html)." msgstr "" "CXX を使用するときに最も役立つページは、[型リファレンス](https://cxx.rs/" "bindings.html) です。" @@ -16002,8 +15682,7 @@ msgstr "CXX は基本的に、次のようなケースに適しています。" #: src/chromium/interoperability-with-cpp/limitations-of-cxx.md msgid "" -"Your Rust-C++ interface is sufficiently simple that you can declare all of " -"it." +"Your Rust-C++ interface is sufficiently simple that you can declare all of it." msgstr "Rust-C++ インターフェースが十分にシンプルで、すべてを宣言できる場合。" #: src/chromium/interoperability-with-cpp/limitations-of-cxx.md @@ -16011,8 +15690,8 @@ msgid "" "You're using only the types natively supported by CXX already, for example " "`std::unique_ptr`, `std::string`, `&[u8]` etc." msgstr "" -"すでに CXX でネイティブにサポートされている型のみを使用している場合(例: " -"`std::unique_ptr`、`std::string`、`&[u8]`)。" +"すでに CXX でネイティブにサポートされている型のみを使用している場合(例: `std::" +"unique_ptr`、`std::string`、`&[u8]`)。" #: src/chromium/interoperability-with-cpp/limitations-of-cxx.md msgid "" @@ -16023,23 +15702,20 @@ msgstr "" #: src/chromium/interoperability-with-cpp/limitations-of-cxx.md msgid "" -"These limitations constrain us to using Rust in Chromium only for well " -"isolated \"leaf nodes\" rather than for arbitrary Rust-C++ interop. When " -"considering a use-case for Rust in Chromium, a good starting point is to " -"draft the CXX bindings for the language boundary to see if it appears simple " -"enough." +"These limitations constrain us to using Rust in Chromium only for well isolated " +"\"leaf nodes\" rather than for arbitrary Rust-C++ interop. When considering a " +"use-case for Rust in Chromium, a good starting point is to draft the CXX " +"bindings for the language boundary to see if it appears simple enough." msgstr "" -"こうした制限により、Chromium では 任意の Rust と C++ の相互運用は行われず、" -"Rustの使用は十分に独立したコードに限定されています。Chromium での Rust のユー" -"スケースを検討する際は、まず、言語境界の CXX バインディングの下書きを作成し" -"て、シンプルに見えるかどうかを確認することをおすすめします。" +"こうした制限により、Chromium では 任意の Rust と C++ の相互運用は行われず、Rust" +"の使用は十分に独立したコードに限定されています。Chromium での Rust のユースケー" +"スを検討する際は、まず、言語境界の CXX バインディングの下書きを作成して、シンプ" +"ルに見えるかどうかを確認することをおすすめします。" #: src/chromium/interoperability-with-cpp/limitations-of-cxx.md msgid "" -"You should also discuss some of the other sticky points with CXX, for " -"example:" -msgstr "" -"また、CXX のその他の厄介な点を説明する必要があります。次に例を示します。" +"You should also discuss some of the other sticky points with CXX, for example:" +msgstr "また、CXX のその他の厄介な点を説明する必要があります。次に例を示します。" #: src/chromium/interoperability-with-cpp/limitations-of-cxx.md msgid "" @@ -16052,12 +15728,11 @@ msgstr "関数ポインタが使いにくい。" #: src/chromium/interoperability-with-cpp/error-handling.md msgid "" -"CXX's [support for `Result`](https://cxx.rs/binding/result.html) relies " -"on C++ exceptions, so we can't use that in Chromium. Alternatives:" +"CXX's [support for `Result`](https://cxx.rs/binding/result.html) relies on " +"C++ exceptions, so we can't use that in Chromium. Alternatives:" msgstr "" -"CXX の [`Result` のサポート](https://cxx.rs/binding/result.html) は、C+" -"+ 例外に依存しているため、Chromium では使用できません。以下の代替手段がありま" -"す。" +"CXX の [`Result` のサポート](https://cxx.rs/binding/result.html) は、C++ 例" +"外に依存しているため、Chromium では使用できません。以下の代替手段があります。" #: src/chromium/interoperability-with-cpp/error-handling.md msgid "The `T` part of `Result` can be:" @@ -16065,12 +15740,12 @@ msgstr "`Result` の `T` の部分:" #: src/chromium/interoperability-with-cpp/error-handling.md msgid "" -"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can " -"be passed across the FFI boundary - for example `T` has to be:" +"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can be " +"passed across the FFI boundary - for example `T` has to be:" msgstr "" -"out パラメータを介して返すことができます(例: `&mut T`)。そのためには、`T` " -"を FFI の境界を越えて渡せる必要があります。たとえば、`T` には以下を指定する必" -"要があります。" +"out パラメータを介して返すことができます(例: `&mut T`)。そのためには、`T` を " +"FFI の境界を越えて渡せる必要があります。たとえば、`T` には以下を指定する必要があ" +"ります。" #: src/chromium/interoperability-with-cpp/error-handling.md msgid "A primitive type (like `u32` or `usize`)" @@ -16081,17 +15756,17 @@ msgid "" "A type natively supported by `cxx` (like `UniquePtr`) that has a suitable " "default value to use in a failure case (_unlike_ `Box`)." msgstr "" -"(`Box` とは異なり)適切なデフォルト値を持つ`cxx` でネイティブにサポートされ" -"ている型(`UniquePtr` など)。" +"(`Box` とは異なり)適切なデフォルト値を持つ`cxx` でネイティブにサポートされて" +"いる型(`UniquePtr` など)。" #: src/chromium/interoperability-with-cpp/error-handling.md msgid "" -"Retained on the Rust side, and exposed via reference. This may be needed " -"when `T` is a Rust type, which cannot be passed across the FFI boundary, and " -"cannot be stored in `UniquePtr`." +"Retained on the Rust side, and exposed via reference. This may be needed when " +"`T` is a Rust type, which cannot be passed across the FFI boundary, and cannot " +"be stored in `UniquePtr`." msgstr "" -"Rust 側で保持し、参照を介して公開できます。これは、`T` が Rust 型の場合に必要" -"になることがあります。Rust 型は FFI の境界を超えて渡すことができず、" +"Rust 側で保持し、参照を介して公開できます。これは、`T` が Rust 型の場合に必要に" +"なることがあります。Rust 型は FFI の境界を超えて渡すことができず、" "`UniquePtr` に格納することもできません。" #: src/chromium/interoperability-with-cpp/error-handling.md @@ -16103,16 +15778,16 @@ msgid "" "Returned as a boolean (e.g. `true` representing success, and `false` " "representing failure)" msgstr "" -"ブール値として返すことができます(たとえば、`true` は成功、`false` は失敗を表" -"します)。" +"ブール値として返すことができます(たとえば、`true` は成功、`false` は失敗を表し" +"ます)。" #: src/chromium/interoperability-with-cpp/error-handling.md msgid "" -"Preserving error details is in theory possible, but so far hasn't been " -"needed in practice." +"Preserving error details is in theory possible, but so far hasn't been needed " +"in practice." msgstr "" -"理論上はエラーの詳細を保持できますが、これまでは実際に必要になることはありま" -"せんでした。" +"理論上はエラーの詳細を保持できますが、これまでは実際に必要になることはありません" +"でした。" #: src/chromium/interoperability-with-cpp/error-handling-qr.md #, fuzzy @@ -16122,15 +15797,15 @@ msgstr "エラー処理" #: src/chromium/interoperability-with-cpp/error-handling-qr.md msgid "" "The QR code generator is [an example](https://source.chromium.org/chromium/" -"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue." -"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is " -"used to communicate success vs failure, and where the successful result can " -"be passed across the FFI boundary:" +"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.rs;" +"l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is used " +"to communicate success vs failure, and where the successful result can be " +"passed across the FFI boundary:" msgstr "" -"QR コード生成ツールは、ブール値が成功または失敗を伝達し、成功の結果を FFI の" -"境界を超えて受け渡すことができる [一例](https://source.chromium.org/chromium/" -"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue." -"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) です。" +"QR コード生成ツールは、ブール値が成功または失敗を伝達し、成功の結果を FFI の境界" +"を超えて受け渡すことができる [一例](https://source.chromium.org/chromium/" +"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.rs;" +"l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) です。" #: src/chromium/interoperability-with-cpp/error-handling-qr.md msgid "\"qr_code_generator\"" @@ -16138,36 +15813,34 @@ msgstr "\"qr_code_generator\"" #: src/chromium/interoperability-with-cpp/error-handling-qr.md msgid "" -"Students may be curious about the semantics of the `out_qr_size` output. " -"This is not the size of the vector, but the size of the QR code (and " -"admittedly it is a bit redundant - this is the square root of the size of " -"the vector)." +"Students may be curious about the semantics of the `out_qr_size` output. This " +"is not the size of the vector, but the size of the QR code (and admittedly it " +"is a bit redundant - this is the square root of the size of the vector)." msgstr "" -"受講者は `out_qr_size` 出力のセマンティクスに関心を持っている可能性がありま" -"す。これはベクターのサイズではなく、QR コードのサイズです(つまり、この情報は" -"冗長であり、ベクターのサイズの平方根に相当します)。" +"受講者は `out_qr_size` 出力のセマンティクスに関心を持っている可能性があります。" +"これはベクターのサイズではなく、QR コードのサイズです(つまり、この情報は冗長で" +"あり、ベクターのサイズの平方根に相当します)。" #: src/chromium/interoperability-with-cpp/error-handling-qr.md msgid "" "It may be worth pointing out the importance of initializing `out_qr_size` " -"before calling into the Rust function. Creation of a Rust reference that " -"points to uninitialized memory results in Undefined Behavior (unlike in C++, " -"when only the act of dereferencing such memory results in UB)." +"before calling into the Rust function. Creation of a Rust reference that points " +"to uninitialized memory results in Undefined Behavior (unlike in C++, when only " +"the act of dereferencing such memory results in UB)." msgstr "" -"Rust 関数を呼び出す前に `out_qr_size` を初期化することの重要性を説明しましょ" -"う。初期化されていないメモリを指す Rust 参照を作成すると、未定義の動作となり" -"ます(そのようなメモリを逆参照する操作のみが UB になるC++ とは異なります)。" +"Rust 関数を呼び出す前に `out_qr_size` を初期化することの重要性を説明しましょう。" +"初期化されていないメモリを指す Rust 参照を作成すると、未定義の動作となります(そ" +"のようなメモリを逆参照する操作のみが UB になるC++ とは異なります)。" #: src/chromium/interoperability-with-cpp/error-handling-qr.md msgid "" "If students ask about `Pin`, then explain why CXX needs it for mutable " -"references to C++ data: the answer is that C++ data can’t be moved around " -"like Rust data, because it may contain self-referential pointers." +"references to C++ data: the answer is that C++ data can’t be moved around like " +"Rust data, because it may contain self-referential pointers." msgstr "" -"`Pin` について受講者から尋ねられた場合は、CXX が C++ データへの可変参照のため" -"に `Pin` を必要とする理由を説明します。つまり、C++ のデータには自己参照ポイン" -"タが含まれている可能性があるため、Rust のデータのように移動することができませ" -"ん。" +"`Pin` について受講者から尋ねられた場合は、CXX が C++ データへの可変参照のために " +"`Pin` を必要とする理由を説明します。つまり、C++ のデータには自己参照ポインタが含" +"まれている可能性があるため、Rust のデータのように移動することができません。" #: src/chromium/interoperability-with-cpp/error-handling-png.md #, fuzzy @@ -16176,11 +15849,11 @@ msgstr "エラー処理" #: src/chromium/interoperability-with-cpp/error-handling-png.md msgid "" -"A prototype of a PNG decoder illustrates what can be done when the " -"successful result cannot be passed across the FFI boundary:" +"A prototype of a PNG decoder illustrates what can be done when the successful " +"result cannot be passed across the FFI boundary:" msgstr "" -"PNG デコーダのプロトタイプは、成功した結果を FFI の境界を越えて渡せない場合に" -"何ができるかを示しています。" +"PNG デコーダのプロトタイプは、成功した結果を FFI の境界を越えて渡せない場合に何" +"ができるかを示しています。" #: src/chromium/interoperability-with-cpp/error-handling-png.md msgid "\"gfx::rust_bindings\"" @@ -16204,15 +15877,14 @@ msgstr "/// `crate::png::PngReader` 型の C++ バインディング\n" #: src/chromium/interoperability-with-cpp/error-handling-png.md msgid "" -"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these " -"types cannot cross the FFI boundary without indirection of a `Box`. We " -"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ " -"to store Rust objects by value." +"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these types " +"cannot cross the FFI boundary without indirection of a `Box`. We can't have " +"an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ to store Rust " +"objects by value." msgstr "" -"`PngReader` と `ResultOfPngReader`は Rust 型です。これらの型のオブジェクト" -"は、`Box` を介さずに FFI 境界を越えることはできません。CXX では Rust オブ" -"ジェクトを値で格納できないため、`out_parameter: &mut PngReader` と書くことは" -"できません。" +"`PngReader` と `ResultOfPngReader`は Rust 型です。これらの型のオブジェクトは、" +"`Box` を介さずに FFI 境界を越えることはできません。CXX では Rust オブジェクト" +"を値で格納できないため、`out_parameter: &mut PngReader` と書くことはできません。" #: src/chromium/interoperability-with-cpp/error-handling-png.md msgid "" @@ -16223,9 +15895,9 @@ msgid "" "appropriate methods of `Result` (e.g. into `is_err`, `unwrap`, and/or " "`as_mut`)." msgstr "" -"この例は、CXX が任意のジェネリクスやテンプレートをサポートしていなくても、手" -"動で非ジェネリック型に特化 / 単相化することで、FFI 境界を越えて渡せることを示" -"しています。この例では、`ResultOfPngReader` は`Result` の適切なメソッド" +"この例は、CXX が任意のジェネリクスやテンプレートをサポートしていなくても、手動で" +"非ジェネリック型に特化 / 単相化することで、FFI 境界を越えて渡せることを示してい" +"ます。この例では、`ResultOfPngReader` は`Result` の適切なメソッド" "(`is_err`、`unwrap`、`as_mut` など)に渡される非ジェネリック型です。" #: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md @@ -16234,12 +15906,12 @@ msgstr "Chromium で cxx を使用する" #: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md msgid "" -"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-" -"node where we want to use Rust. You'd typically have one for each " +"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-node " +"where we want to use Rust. You'd typically have one for each " "`rust_static_library`. Just add" msgstr "" -"Chromium では、Rust を使用するリーフノードごとに独立した `#[cxx::bridge] " -"mod` を定義します。通常は、`rust_static_library` ごとに 1 つずつになります。" +"Chromium では、Rust を使用するリーフノードごとに独立した `#[cxx::bridge] mod` を" +"定義します。通常は、`rust_static_library` ごとに 1 つずつになります。" #: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md msgid "" @@ -16260,8 +15932,8 @@ msgid "" "to your existing `rust_static_library` target alongside `crate_root` and " "`sources`." msgstr "" -"上記のコードを、`crate_root` や `sources`と並んで、既存の " -"`rust_static_library` ターゲットに追加するだけです。" +"上記のコードを、`crate_root` や `sources`と並んで、既存の `rust_static_library` " +"ターゲットに追加するだけです。" #: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md msgid "C++ headers will be generated at a sensible location, so you can just" @@ -16274,50 +15946,49 @@ msgstr "\"ui/base/my_rust_file.rs.h\"" #: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md msgid "" -"You will find some utility functions in `//base` to convert to/from Chromium " -"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://" -"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;" -"l=21)." +"You will find some utility functions in `//base` to convert to/from Chromium C+" +"+ types to CXX Rust types --- for example [`SpanToRustSlice`](https://source." +"chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;l=21)." msgstr "" -"`//base` には、Chromium C++ 型から CXX Rust 型(およびその逆方向)への変換を" -"行うためのユーティリティ関数がいくつかあります(例: [`SpanToRustSlice`]" -"(https://source.chromium.org/chromium/chromium/src/+/main:base/containers/" -"span_rust.h;l=21))。" +"`//base` には、Chromium C++ 型から CXX Rust 型(およびその逆方向)への変換を行う" +"ためのユーティリティ関数がいくつかあります(例: [`SpanToRustSlice`](https://" +"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;" +"l=21))。" #: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md msgid "Students may ask --- why do we still need `allow_unsafe = true`?" msgstr "" -"受講者から、`allow_unsafe = true` がなぜここでも必要なのかを尋ねられる可能性" -"があります。" +"受講者から、`allow_unsafe = true` がなぜここでも必要なのかを尋ねられる可能性があ" +"ります。" #: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md msgid "" "The broad answer is that no C/C++ code is \"safe\" by the normal Rust " -"standards. Calling back and forth to C/C++ from Rust may do arbitrary things " -"to memory, and compromise the safety of Rust's own data layouts. Presence of " -"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise " -"ratio of such a keyword, and is [controversial](https://steveklabnik.com/" -"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust " -"binary can cause unexpected behavior from Rust's perspective." +"standards. Calling back and forth to C/C++ from Rust may do arbitrary things to " +"memory, and compromise the safety of Rust's own data layouts. Presence of _too " +"many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise ratio of " +"such a keyword, and is [controversial](https://steveklabnik.com/writing/the-cxx-" +"debate), but strictly, bringing any foreign code into a Rust binary can cause " +"unexpected behavior from Rust's perspective." msgstr "" "大まかに答えると、C/C++ コードは通常の Rust 標準では「安全」ではありません。" -"Rust から C/C++ に行ったり来たりすると、メモリに対して任意の処理が行われ、" -"Rust 独自のデータ レイアウトの安全性が損なわれる可能性があります。C/C++ の相" -"互運用で `unsafe` キーワードが多すぎると、`unsafe`に対する注目度が薄れるの" -"で、これには [賛否両論があります](https://steveklabnik.com/writing/the-cxx-" -"debate)。ただし厳密には、外部コードを Rust バイナリに取り込むと、Rust の観点" -"からは想定していない動作が発生する可能性があります。" +"Rust から C/C++ に行ったり来たりすると、メモリに対して任意の処理が行われ、Rust " +"独自のデータ レイアウトの安全性が損なわれる可能性があります。C/C++ の相互運用で " +"`unsafe` キーワードが多すぎると、`unsafe`に対する注目度が薄れるので、これには " +"[賛否両論があります](https://steveklabnik.com/writing/the-cxx-debate)。ただし厳" +"密には、外部コードを Rust バイナリに取り込むと、Rust の観点からは想定していない" +"動作が発生する可能性があります。" #: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md msgid "" "The narrow answer lies in the diagram at the top of [this page](../" "interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust " -"`unsafe` and `extern \"C\"` functions just like we did manually in the " -"previous section." +"`unsafe` and `extern \"C\"` functions just like we did manually in the previous " +"section." msgstr "" -"具体的な答えは、[このページ](../interoperability-with-cpp.md) の上部の図にあ" -"ります。裏では、CXX は Rust の `unsafe` 関数と `extern \"C\"` 関数を生成しま" -"す。これは前のセクションで手動で行ったのとまったく同じです。" +"具体的な答えは、[このページ](../interoperability-with-cpp.md) の上部の図にありま" +"す。裏では、CXX は Rust の `unsafe` 関数と `extern \"C\"` 関数を生成します。これ" +"は前のセクションで手動で行ったのとまったく同じです。" #: src/exercises/chromium/interoperability-with-cpp.md #, fuzzy @@ -16330,13 +16001,13 @@ msgstr "パート 1" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" -"In the Rust file you previously created, add a `#[cxx::bridge]` which " -"specifies a single function, to be called from C++, called " -"`hello_from_rust`, taking no parameters and returning no value." +"In the Rust file you previously created, add a `#[cxx::bridge]` which specifies " +"a single function, to be called from C++, called `hello_from_rust`, taking no " +"parameters and returning no value." msgstr "" "先ほど作成した Rust ファイルに、C++ から呼び出す単一の関数を示す `#[cxx::" -"bridge]` を追加します。これは `hello_from_rust` という関数で、パラメータを受" -"け取らず、値も返しません。" +"bridge]` を追加します。これは `hello_from_rust` という関数で、パラメータを受け取" +"らず、値も返しません。" #: src/exercises/chromium/interoperability-with-cpp.md #, fuzzy @@ -16344,8 +16015,8 @@ msgid "" "Modify your previous `hello_from_rust` function to remove `extern \"C\"` and " "`#[unsafe(no_mangle)]`. This is now just a standard Rust function." msgstr "" -"前の `hello_from_rust` 関数を変更して `extern \"C\"` と `#[no_mangle]` を削除" -"します。これで標準の Rust 関数になります。" +"前の `hello_from_rust` 関数を変更して `extern \"C\"` と `#[no_mangle]` を削除し" +"ます。これで標準の Rust 関数になります。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "Modify your `gn` target to build these bindings." @@ -16353,11 +16024,11 @@ msgstr "`gn` ターゲットを変更して、これらのバインディング #: src/exercises/chromium/interoperability-with-cpp.md msgid "" -"In your C++ code, remove the forward-declaration of `hello_from_rust`. " -"Instead, include the generated header file." +"In your C++ code, remove the forward-declaration of `hello_from_rust`. Instead, " +"include the generated header file." msgstr "" -"C++ コードで、`hello_from_rust` の前方宣言を削除し、代わりに生成されたヘッ" -"ダー ファイルをインクルードします。" +"C++ コードで、`hello_from_rust` の前方宣言を削除し、代わりに生成されたヘッダー " +"ファイルをインクルードします。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "Build and run!" @@ -16388,8 +16059,8 @@ msgid "" "An additional header file which you can `include!` from your `cxx::bridge`. " "You'll need to declare your C++ function in that new header file." msgstr "" -"`cxx::bridge` から `include!` できる追加のヘッダー ファイル。その新しいヘッ" -"ダー ファイルで C++ 関数を宣言する必要があります。" +"`cxx::bridge` から `include!` できる追加のヘッダー ファイル。その新しいヘッダー " +"ファイルで C++ 関数を宣言する必要があります。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" @@ -16398,16 +16069,15 @@ msgid "" "extern-c++.html#functions-and-member-functions)." msgstr "" "このような関数を呼び出す `unsafe` ブロック。または [こちら](https://cxx.rs/" -"extern-c++.html#functions-and-member-functions) に記載されているとおり、" -"`#[cxx::bridge]` 内で `unsafe` キーワードを指定する必要があります。" +"extern-c++.html#functions-and-member-functions) に記載されているとおり、`#[cxx::" +"bridge]` 内で `unsafe` キーワードを指定する必要があります。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" -"You may also need to `#include \"third_party/rust/cxx/v1/crate/include/cxx." -"h\"`" +"You may also need to `#include \"third_party/rust/cxx/v1/crate/include/cxx.h\"`" msgstr "" -"`#include \"third_party/rust/cxx/v1/crate/include/cxx.h\"` も必要になるかもし" -"れません。" +"`#include \"third_party/rust/cxx/v1/crate/include/cxx.h\"` も必要になるかもしれ" +"ません。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "Pass a C++ string from C++ into Rust." @@ -16422,32 +16092,32 @@ msgid "" "Intentionally get the Rust function signatures mismatched from the `#[cxx::" "bridge]`, and get used to the errors you see." msgstr "" -"意図的に`#[cxx::bridge]`と一致しないようにRust 関数のシグネチャを変更し、表示" -"されるエラーに慣れるようにします。" +"意図的に`#[cxx::bridge]`と一致しないようにRust 関数のシグネチャを変更し、表示さ" +"れるエラーに慣れるようにします。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" "Intentionally get the C++ function signatures mismatched from the `#[cxx::" "bridge]`, and get used to the errors you see." msgstr "" -"意図的に`#[cxx::bridge]`と一致しないようにC++ 関数のシグネチャを変更し、表示" -"されるエラーに慣れるようにします。" +"意図的に`#[cxx::bridge]`と一致しないようにC++ 関数のシグネチャを変更し、表示され" +"るエラーに慣れるようにします。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" -"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can " -"own some C++ object." +"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can own " +"some C++ object." msgstr "" -"なんらかの型の `std::unique_ptr` を C++ から Rust に渡して、Rust がいくつか" -"の C++ オブジェクトを所有できるようにします。" +"なんらかの型の `std::unique_ptr` を C++ から Rust に渡して、Rust がいくつかの C+" +"+ オブジェクトを所有できるようにします。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" -"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you " -"need a `Box`)." +"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you need " +"a `Box`)." msgstr "" -"Rust オブジェクトを作成して C++ に渡して、C++ がそれを所有できるようにします" -"(ヒント: `Box` が必要です)。" +"Rust オブジェクトを作成して C++ に渡して、C++ がそれを所有できるようにします(ヒ" +"ント: `Box` が必要です)。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "Declare some methods on a C++ type. Call them from Rust." @@ -16467,9 +16137,9 @@ msgid "" "couple of use-cases for Rust in Chromium where the interface would be " "sufficiently simple. Sketch how you might define that interface." msgstr "" -"CXX の相互運用性の長所と制限事項について理解したところで、インターフェースが" -"非常にシンプルな、Chromium での Rust のユースケースをいくつか考えてみましょ" -"う。このインターフェースをどのように定義すればよいか考えてみましょう。" +"CXX の相互運用性の長所と制限事項について理解したところで、インターフェースが非常" +"にシンプルな、Chromium での Rust のユースケースをいくつか考えてみましょう。この" +"インターフェースをどのように定義すればよいか考えてみましょう。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "The [`cxx` binding reference](https://cxx.rs/bindings.html)" @@ -16489,24 +16159,24 @@ msgstr "次のような質問が寄せられる可能性があります。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" -"I'm seeing a problem initializing a variable of type X with type Y, where X " -"and Y are both function types. This is because your C++ function doesn't " -"quite match the declaration in your `cxx::bridge`." +"I'm seeing a problem initializing a variable of type X with type Y, where X and " +"Y are both function types. This is because your C++ function doesn't quite " +"match the declaration in your `cxx::bridge`." msgstr "" -"X と Y の両方が関数型である場合に、型 X の変数を型 Y で初期化すると問題が発生" -"します。これは、C++ 関数が `cxx::bridge` 内の宣言と完全に一致しないためです。" +"X と Y の両方が関数型である場合に、型 X の変数を型 Y で初期化すると問題が発生し" +"ます。これは、C++ 関数が `cxx::bridge` 内の宣言と完全に一致しないためです。" #: src/exercises/chromium/interoperability-with-cpp.md msgid "" "I seem to be able to freely convert C++ references into Rust references. " "Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-" -"sized. For CXX trivial types yes, it's _possible_ to cause UB, although " -"CXX's design makes it quite difficult to craft such an example." +"sized. For CXX trivial types yes, it's _possible_ to cause UB, although CXX's " +"design makes it quite difficult to craft such an example." msgstr "" -"C++ 参照を Rust 参照に自由に変換できるようですが、UB のリスクはないでしょう" -"か?CXX の不透明型の場合、サイズがゼロであるため、そのリスクはありません。" -"CXX のトリビアル型では UB が発生する可能性がありますが、CXX の設計上、そのよ" -"うな例を作成するのは非常に困難です。" +"C++ 参照を Rust 参照に自由に変換できるようですが、UB のリスクはないでしょうか?" +"CXX の不透明型の場合、サイズがゼロであるため、そのリスクはありません。CXX のトリ" +"ビアル型では UB が発生する可能性がありますが、CXX の設計上、そのような例を作成す" +"るのは非常に困難です。" #: src/chromium/adding-third-party-crates.md msgid "" @@ -16514,9 +16184,9 @@ msgid "" "crates.io). It's _very easy_ for Rust crates to depend upon one another. So " "they do!" msgstr "" -"Rust ライブラリは「クレート」と呼ばれ、[crates.io](https://crates.io) にあり" -"ます。Rust クレートを互いに依存させるのは非常に簡単であり、実際にそのように" -"なっています" +"Rust ライブラリは「クレート」と呼ばれ、[crates.io](https://crates.io) にありま" +"す。Rust クレートを互いに依存させるのは非常に簡単であり、実際にそのようになって" +"います" #: src/chromium/adding-third-party-crates.md msgid "Property" @@ -16574,16 +16244,16 @@ msgid "" "All crates use a common build system so we can automate their inclusion into " "Chromium..." msgstr "" -"すべてのクレートが共通のビルドシステムを使用しているため、Chromium への取り込" -"みを自動化できます。" +"すべてのクレートが共通のビルドシステムを使用しているため、Chromium への取り込み" +"を自動化できます。" #: src/chromium/adding-third-party-crates.md msgid "" -"... but, crates typically have transitive dependencies, so you will likely " -"have to bring in multiple libraries." +"... but, crates typically have transitive dependencies, so you will likely have " +"to bring in multiple libraries." msgstr "" -"しかし、クレートには通常、推移的依存関係があるため、複数のライブラリを取り込" -"むことが必要になる可能性があります。" +"しかし、クレートには通常、推移的依存関係があるため、複数のライブラリを取り込むこ" +"とが必要になる可能性があります。" #: src/chromium/adding-third-party-crates.md msgid "We'll discuss:" @@ -16607,14 +16277,13 @@ msgstr " `Cargo.toml` ファイルによりクレートを追加する方法" #: src/chromium/adding-third-party-crates/configuring-cargo-toml.md msgid "" -"Chromium has a single set of centrally-managed direct crate dependencies. " -"These are managed through a single [`Cargo.toml`](https://source.chromium." -"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo." -"toml):" +"Chromium has a single set of centrally-managed direct crate dependencies. These " +"are managed through a single [`Cargo.toml`](https://source.chromium.org/" +"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.toml):" msgstr "" -"Chromium には、一元管理される直接的なクレート依存関係が 1 セットあります。こ" -"れらは単一の [`Cargo.toml`](https://source.chromium.org/chromium/chromium/" -"src/+/main:third_party/rust/chromium_crates_io/Cargo.toml) で管理されます。" +"Chromium には、一元管理される直接的なクレート依存関係が 1 セットあります。これら" +"は単一の [`Cargo.toml`](https://source.chromium.org/chromium/chromium/src/+/" +"main:third_party/rust/chromium_crates_io/Cargo.toml) で管理されます。" #: src/chromium/adding-third-party-crates/configuring-cargo-toml.md msgid "" @@ -16637,21 +16306,21 @@ msgstr "" #: src/chromium/adding-third-party-crates/configuring-cargo-toml.md msgid "" "As with any other `Cargo.toml`, you can specify [more details about the " -"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-" -"dependencies.html) --- most commonly, you'll want to specify the `features` " -"that you wish to enable in the crate." +"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies." +"html) --- most commonly, you'll want to specify the `features` that you wish to " +"enable in the crate." msgstr "" "他の `Cargo.toml` と同様に、[依存関係の詳細](https://doc.rust-lang.org/cargo/" -"reference/specifying-dependencies.html) を指定できます。通常は、クレートで有" -"効にする `features` を指定します。" +"reference/specifying-dependencies.html) を指定できます。通常は、クレートで有効に" +"する `features` を指定します。" #: src/chromium/adding-third-party-crates/configuring-cargo-toml.md msgid "" "When adding a crate to Chromium, you'll often need to provide some extra " "information in an additional file, `gnrt_config.toml`, which we'll meet next." msgstr "" -"Chromium にクレートを追加する際は、多くの場合、 `gnrt_config.toml`という追加" -"ファイルに情報を指定する必要があります。これについては後で説明します。" +"Chromium にクレートを追加する際は、多くの場合、 `gnrt_config.toml`という追加ファ" +"イルに情報を指定する必要があります。これについては後で説明します。" #: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md msgid "" @@ -16661,16 +16330,15 @@ msgid "" msgstr "" "`Cargo.toml` のほかに、[`gnrt_config.toml`](https://source.chromium.org/" "chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config." -"toml) があります。これには、クレートを扱うための Chromium 固有の拡張機能が含" -"まれています。" +"toml) があります。これには、クレートを扱うための Chromium 固有の拡張機能が含まれ" +"ています。" #: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md msgid "" -"If you add a new crate, you should specify at least the `group`. This is one " -"of:" +"If you add a new crate, you should specify at least the `group`. This is one of:" msgstr "" -"新しいクレートを追加する場合は、少なくとも次のいずれかの `group` を指定する必" -"要があります。" +"新しいクレートを追加する場合は、少なくとも次のいずれかの `group` を指定する必要" +"があります。" #: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md #: src/chromium/adding-third-party-crates/depending-on-a-crate.md @@ -16679,27 +16347,27 @@ msgstr "次に例を示します。" #: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md msgid "" -"Depending on the crate source code layout, you may also need to use this " -"file to specify where its `LICENSE` file(s) can be found." +"Depending on the crate source code layout, you may also need to use this file " +"to specify where its `LICENSE` file(s) can be found." msgstr "" -"クレートのソースコードのレイアウトによっては、このファイルを使用して " -"`LICENSE` ファイルを見つける場所も指定する必要があります。" +"クレートのソースコードのレイアウトによっては、このファイルを使用して `LICENSE` " +"ファイルを見つける場所も指定する必要があります。" #: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md msgid "" -"Later, we'll see some other things you will need to configure in this file " -"to resolve problems." +"Later, we'll see some other things you will need to configure in this file to " +"resolve problems." msgstr "" -"後ほど、いくつかの問題を解決するためにこのファイルに指定する必要がある設定に" -"ついて取り扱います。" +"後ほど、いくつかの問題を解決するためにこのファイルに指定する必要がある設定につい" +"て取り扱います。" #: src/chromium/adding-third-party-crates/downloading-crates.md msgid "" "A tool called `gnrt` knows how to download crates and how to generate `BUILD." "gn` rules." msgstr "" -"`gnrt` というツールは、クレートのダウンロード方法と `BUILD.gn` ルールの生成方" -"法を把握しています。" +"`gnrt` というツールは、クレートのダウンロード方法と `BUILD.gn` ルールの生成方法" +"を把握しています。" #: src/chromium/adding-third-party-crates/downloading-crates.md msgid "To start, download the crate you want like this:" @@ -16707,14 +16375,13 @@ msgstr "まず、必要なクレートを次のようにダウンロードしま #: src/chromium/adding-third-party-crates/downloading-crates.md msgid "" -"Although the `gnrt` tool is part of the Chromium source code, by running " -"this command you will be downloading and running its dependencies from " -"`crates.io`. See [the earlier section](../cargo.md) discussing this security " -"decision." +"Although the `gnrt` tool is part of the Chromium source code, by running this " +"command you will be downloading and running its dependencies from `crates.io`. " +"See [the earlier section](../cargo.md) discussing this security decision." msgstr "" -"`gnrt` ツールは Chromium のソースコードの一部ですが、このコマンドを実行する" -"と、`crates.io` から依存関係をダウンロードして実行します。これに関するセキュ" -"リティ上の決定については、[前のセクション](../cargo.md) をご覧ください。" +"`gnrt` ツールは Chromium のソースコードの一部ですが、このコマンドを実行すると、" +"`crates.io` から依存関係をダウンロードして実行します。これに関するセキュリティ上" +"の決定については、[前のセクション](../cargo.md) をご覧ください。" #: src/chromium/adding-third-party-crates/downloading-crates.md msgid "This `vendor` command may download:" @@ -16734,8 +16401,8 @@ msgid "" "New versions of other crates, as required by `cargo` to resolve the complete " "set of crates required by Chromium." msgstr "" -" `cargo` によって指示される、Chromium で必要となるクレートの完全セットを得る" -"ための他のクレートの新しいバージョン。" +" `cargo` によって指示される、Chromium で必要となるクレートの完全セットを得るため" +"の他のクレートの新しいバージョン。" #: src/chromium/adding-third-party-crates/downloading-crates.md msgid "" @@ -16744,12 +16411,11 @@ msgid "" "patching fails you may need to take manual action." msgstr "" "Chromium では、一部のクレートに対するパッチが `//third_party/rust/" -"chromium_crates_io/patches` に保存されています。これらは自動的に再適用されま" -"すが、パッチ適用が失敗した場合は、手動による解決が必要になる場合があります。" +"chromium_crates_io/patches` に保存されています。これらは自動的に再適用されます" +"が、パッチ適用が失敗した場合は、手動による解決が必要になる場合があります。" #: src/chromium/adding-third-party-crates/generating-gn-build-rules.md -msgid "" -"Once you've downloaded the crate, generate the `BUILD.gn` files like this:" +msgid "Once you've downloaded the crate, generate the `BUILD.gn` files like this:" msgstr "" "クレートをダウンロードしたら、以下のように `BUILD.gn` ファイルを作成します。" @@ -16762,8 +16428,8 @@ msgid "" "At least one new crate source code in `third_party/rust/chromium_crates_io/" "vendor`" msgstr "" -"`third_party/rust/chromium_crates_io/vendor` に 1 つ以上の新しいクレート ソー" -"スコードがあること" +"`third_party/rust/chromium_crates_io/vendor` に 1 つ以上の新しいクレート ソース" +"コードがあること" #: src/chromium/adding-third-party-crates/generating-gn-build-rules.md msgid "" @@ -16780,11 +16446,11 @@ msgstr "適切な `README.chromium` があること" #: src/chromium/adding-third-party-crates/generating-gn-build-rules.md #, fuzzy msgid "" -"The \"major semver version\" is a [Rust \"semver\" version number](https://" -"doc.rust-lang.org/cargo/reference/semver.html)." +"The \"major semver version\" is a [Rust \"semver\" version number](https://doc." +"rust-lang.org/cargo/reference/semver.html)." msgstr "" -"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)(ワー" -"クスペース)" +"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)(ワーク" +"スペース)" #: src/chromium/adding-third-party-crates/generating-gn-build-rules.md msgid "" @@ -16793,32 +16459,31 @@ msgstr "特に `third_party/rust` 以下に生成されるものをよく確認 #: src/chromium/adding-third-party-crates/generating-gn-build-rules.md msgid "" -"Talk a little about semver --- and specifically the way that in Chromium " -"it's to allow multiple incompatible versions of a crate, which is " -"discouraged but sometimes necessary in the Cargo ecosystem." +"Talk a little about semver --- and specifically the way that in Chromium it's " +"to allow multiple incompatible versions of a crate, which is discouraged but " +"sometimes necessary in the Cargo ecosystem." msgstr "" -"semver について、特に Chromium では互換性のないクレートのバージョンが複数許可" -"されることを説明しておきましょう。これは推奨されませんが、Cargo エコシステム" -"で必要になることがあります。" +"semver について、特に Chromium では互換性のないクレートのバージョンが複数許可さ" +"れることを説明しておきましょう。これは推奨されませんが、Cargo エコシステムで必要" +"になることがあります。" #: src/chromium/adding-third-party-crates/resolving-problems.md msgid "" "If your build fails, it may be because of a `build.rs`: programs which do " -"arbitrary things at build time. This is fundamentally at odds with the " -"design of `gn` and `ninja` which aim for static, deterministic, build rules " -"to maximize parallelism and repeatability of builds." +"arbitrary things at build time. This is fundamentally at odds with the design " +"of `gn` and `ninja` which aim for static, deterministic, build rules to " +"maximize parallelism and repeatability of builds." msgstr "" -"ビルドが失敗した場合、`build.rs`(ビルド時に任意の処理を行うプログラム)が原" -"因である可能性があります。これは、ビルドの並列性と再現性を最大化するために静" -"的で決定的なビルドルールを目指す `gn` と `ninja` の設計とは、基本的に矛盾して" -"います。" +"ビルドが失敗した場合、`build.rs`(ビルド時に任意の処理を行うプログラム)が原因で" +"ある可能性があります。これは、ビルドの並列性と再現性を最大化するために静的で決定" +"的なビルドルールを目指す `gn` と `ninja` の設計とは、基本的に矛盾しています。" #: src/chromium/adding-third-party-crates/resolving-problems.md msgid "" "Some `build.rs` actions are automatically supported; others require action:" msgstr "" -"一部の `build.rs` アクションは自動的にサポートされますが、他のアクションには" -"対応が必要です。" +"一部の `build.rs` アクションは自動的にサポートされますが、他のアクションには対応" +"が必要です。" #: src/chromium/adding-third-party-crates/resolving-problems.md msgid "build script effect" @@ -16878,30 +16543,29 @@ msgid "" "Fortunately, most crates don't contain a build script, and fortunately, most " "build scripts only do the top two actions." msgstr "" -"幸い、ほとんどのクレートにはビルド スクリプトが含まれておらず、ほとんどのビル" -"ド スクリプトは上位 2 つのアクションのみを実行します。" +"幸い、ほとんどのクレートにはビルド スクリプトが含まれておらず、ほとんどのビルド " +"スクリプトは上位 2 つのアクションのみを実行します。" #: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md msgid "" "If `ninja` complains about missing files, check the `build.rs` to see if it " "writes source code files." msgstr "" -"`ninja`がファイルを見つけられないというメッセージを表示する場合は、`build." -"rs` がソースコード ファイルを作成しているかどうかを確認します。" +"`ninja`がファイルを見つけられないというメッセージを表示する場合は、`build.rs` が" +"ソースコード ファイルを作成しているかどうかを確認します。" #: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md msgid "" -"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to " -"add `build-script-outputs` to the crate. If this is a transitive dependency, " -"that is, one on which Chromium code should not directly depend, also add " -"`allow-first-party-usage=false`. There are several examples already in that " -"file:" +"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to add " +"`build-script-outputs` to the crate. If this is a transitive dependency, that " +"is, one on which Chromium code should not directly depend, also add `allow-" +"first-party-usage=false`. There are several examples already in that file:" msgstr "" -"もしファイルが作成されるようになっていたら、[`gnrt_config.toml`](../" -"configuring-gnrt-config-toml.md) を変更して、クレートに `build-script-" -"outputs` を追加します。これが推移的依存関係(Chromium コードが直接依存すべき" -"でない依存関係)の場合は、`allow-first-party-usage=false` も追加します。この" -"ファイルには、すでにいくつかの例が含まれています。" +"もしファイルが作成されるようになっていたら、[`gnrt_config.toml`](../configuring-" +"gnrt-config-toml.md) を変更して、クレートに `build-script-outputs` を追加しま" +"す。これが推移的依存関係(Chromium コードが直接依存すべきでない依存関係)の場合" +"は、`allow-first-party-usage=false` も追加します。このファイルには、すでにいくつ" +"かの例が含まれています。" #: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md msgid "" @@ -16920,27 +16584,27 @@ msgstr "" #: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md msgid "" "Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate " -"`BUILD.gn` files to inform ninja that this particular output file is input " -"to subsequent build steps." +"`BUILD.gn` files to inform ninja that this particular output file is input to " +"subsequent build steps." msgstr "" -"次に、[`gnrt.py -- gen`](../generating-gn-build-rules.md) を再実行して " -"`BUILD.gn` ファイルを再生成し、この特定の出力ファイルが後続のビルドステップで" -"入力されることを ninja に教えます。" +"次に、[`gnrt.py -- gen`](../generating-gn-build-rules.md) を再実行して `BUILD." +"gn` ファイルを再生成し、この特定の出力ファイルが後続のビルドステップで入力される" +"ことを ninja に教えます。" #: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md msgid "" -"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and " -"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://" -"crates.io/crates/bindgen) within their build scripts. These actions can't be " -"supported in a Chromium context --- our gn, ninja and LLVM build system is " -"very specific in expressing relationships between build actions." +"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and link " +"C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://crates.io/" +"crates/bindgen) within their build scripts. These actions can't be supported in " +"a Chromium context --- our gn, ninja and LLVM build system is very specific in " +"expressing relationships between build actions." msgstr "" -"一部のクレートは、[`cc`](https://crates.io/crates/cc) クレートを使用して、" -"C / C++ ライブラリのビルドとリンクを行います。他のクレートは、ビルド スクリプ" -"ト内で [`bindgen`](https://crates.io/crates/bindgen) を使用して C / C++ を解" -"析します。これらのアクションは、Chromium のコンテキストではサポートできませ" -"ん。Chromiumの gn、ninja、LLVM ビルドシステムは、ビルド アクション間の関係を" -"非常に具体的に表現するためです。" +"一部のクレートは、[`cc`](https://crates.io/crates/cc) クレートを使用して、C / C+" +"+ ライブラリのビルドとリンクを行います。他のクレートは、ビルド スクリプト内で " +"[`bindgen`](https://crates.io/crates/bindgen) を使用して C / C++ を解析します。" +"これらのアクションは、Chromium のコンテキストではサポートできません。Chromiumの " +"gn、ninja、LLVM ビルドシステムは、ビルド アクション間の関係を非常に具体的に表現" +"するためです。" #: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md msgid "So, your options are:" @@ -16956,27 +16620,27 @@ msgstr "クレートにパッチを適用する" #: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md msgid "" -"Patches should be kept in `third_party/rust/chromium_crates_io/patches/" -"` - see for example the [patches against the `cxx` crate](https://" -"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/" -"chromium_crates_io/patches/cxx/) - and will be applied automatically by " -"`gnrt` each time it upgrades the crate." -msgstr "" -"パッチは `third_party/rust/chromium_crates_io/patches/` に保存する必要" -"があります。たとえば、[`cxx` クレートに対するパッチ](https://source.chromium." +"Patches should be kept in `third_party/rust/chromium_crates_io/patches/` " +"- see for example the [patches against the `cxx` crate](https://source.chromium." "org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/patches/" -"cxx/) をご覧ください。また、パッチはクレートがアップグレードされるたびに " -"`gnrt` によって自動的に適用されます。" +"cxx/) - and will be applied automatically by `gnrt` each time it upgrades the " +"crate." +msgstr "" +"パッチは `third_party/rust/chromium_crates_io/patches/` に保存する必要が" +"あります。たとえば、[`cxx` クレートに対するパッチ](https://source.chromium.org/" +"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/patches/cxx/) " +"をご覧ください。また、パッチはクレートがアップグレードされるたびに `gnrt` によっ" +"て自動的に適用されます。" #: src/chromium/adding-third-party-crates/depending-on-a-crate.md msgid "" -"Once you've added a third-party crate and generated build rules, depending " -"on a crate is simple. Find your `rust_static_library` target, and add a " -"`dep` on the `:lib` target within your crate." +"Once you've added a third-party crate and generated build rules, depending on a " +"crate is simple. Find your `rust_static_library` target, and add a `dep` on the " +"`:lib` target within your crate." msgstr "" -"サードパーティ クレートを追加してビルドルールを生成したら、クレートへの依存を" -"簡単に設定できます。`rust_static_library` ターゲットを見つけて、クレート内の " -"`:lib` ターゲットに `dep` を追加します。" +"サードパーティ クレートを追加してビルドルールを生成したら、クレートへの依存を簡" +"単に設定できます。`rust_static_library` ターゲットを見つけて、クレート内の `:" +"lib` ターゲットに `dep` を追加します。" #: src/chromium/adding-third-party-crates/depending-on-a-crate.md msgid "Specifically," @@ -16986,15 +16650,14 @@ msgstr "具体的には次のようにします。" msgid "" "```bob\n" " +------------+ +----------------------+\n" -"\"//third_party/rust\" | crate name | \"/v\" | major semver version | \":" -"lib\"\n" +"\"//third_party/rust\" | crate name | \"/v\" | major semver version | \":lib\"\n" " +------------+ +----------------------+\n" "```" msgstr "" "```bob\n" " +------------+ +------------------------------+\n" -"\"//third_party/rust\" | クレート名 | \"/v\" | semver のメジャー バージョン " -"| \":lib\"\n" +"\"//third_party/rust\" | クレート名 | \"/v\" | semver のメジャー バージョン | " +"\":lib\"\n" " +------------+ +------------------------------+\n" "```" @@ -17024,44 +16687,41 @@ msgstr "サードパーティ クレートの監査" msgid "" "Adding new libraries is subject to Chromium's standard [policies](https://" "chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust." -"md#Third_party-review), but of course also subject to security review. As " -"you may be bringing in not just a single crate but also transitive " -"dependencies, there may be a lot of code to review. On the other hand, safe " -"Rust code can have limited negative side effects. How should you review it?" -msgstr "" -"新しいライブラリを追加する場合、Chromium の標準の [ポリシー](https://" -"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust." -"md#Third_party-review) が適用されますが、当然ながらセキュリティ審査の対象にも" -"なります。1 つのクレートだけでなく推移的依存関係も取り込む場合、審査すべき" -"コードが多数存在することがあります。その一方で、安全な Rust コードの取り込み" -"に関しては、悪い副作用は限定的となります。クレートの審査はどのように行われる" -"べきでしょうか。" +"md#Third_party-review), but of course also subject to security review. As you " +"may be bringing in not just a single crate but also transitive dependencies, " +"there may be a lot of code to review. On the other hand, safe Rust code can " +"have limited negative side effects. How should you review it?" +msgstr "" +"新しいライブラリを追加する場合、Chromium の標準の [ポリシー](https://chromium." +"googlesource.com/chromium/src/+/refs/heads/main/docs/rust.md#Third_party-" +"review) が適用されますが、当然ながらセキュリティ審査の対象にもなります。1 つのク" +"レートだけでなく推移的依存関係も取り込む場合、審査すべきコードが多数存在すること" +"があります。その一方で、安全な Rust コードの取り込みに関しては、悪い副作用は限定" +"的となります。クレートの審査はどのように行われるべきでしょうか。" #: src/chromium/adding-third-party-crates/reviews-and-audits.md msgid "" -"Over time Chromium aims to move to a process based around [cargo vet]" -"(https://mozilla.github.io/cargo-vet/)." +"Over time Chromium aims to move to a process based around [cargo vet](https://" +"mozilla.github.io/cargo-vet/)." msgstr "" -"Chromium は今後 [cargo vet](https://mozilla.github.io/cargo-vet/) を中心とし" -"たプロセスに移行されていく予定ですが、" +"Chromium は今後 [cargo vet](https://mozilla.github.io/cargo-vet/) を中心としたプ" +"ロセスに移行されていく予定ですが、" #: src/chromium/adding-third-party-crates/reviews-and-audits.md -msgid "" -"Meanwhile, for each new crate addition, we are checking for the following:" +msgid "Meanwhile, for each new crate addition, we are checking for the following:" msgstr "" "それまでの間、新しいクレートが追加されるたびに、以下のチェックを行います。" #: src/chromium/adding-third-party-crates/reviews-and-audits.md msgid "" -"Understand why each crate is used. What's the relationship between crates? " -"If the build system for each crate contains a `build.rs` or procedural " -"macros, work out what they're for. Are they compatible with the way Chromium " -"is normally built?" +"Understand why each crate is used. What's the relationship between crates? If " +"the build system for each crate contains a `build.rs` or procedural macros, " +"work out what they're for. Are they compatible with the way Chromium is " +"normally built?" msgstr "" -"各クレートが使用されている理由と、クレート同士の関係を理解します。各クレート" -"のビルドシステムに`build.rs` または手続き型マクロが含まれている場合は、その目" -"的を調べます。また、Chromium の通常のビルド方法と互換性があるかどうかも確認し" -"ます。" +"各クレートが使用されている理由と、クレート同士の関係を理解します。各クレートのビ" +"ルドシステムに`build.rs` または手続き型マクロが含まれている場合は、その目的を調" +"べます。また、Chromium の通常のビルド方法と互換性があるかどうかも確認します。" #: src/chromium/adding-third-party-crates/reviews-and-audits.md msgid "Check each crate seems to be reasonably well maintained" @@ -17074,20 +16734,20 @@ msgid "" "ironically involves downloading lots of dependencies from the internet[2](../" "cargo.md))" msgstr "" -"`cd third-party/rust/chromium_crates_io; cargo audit` を使用して既知の脆弱性" -"をチェックします(最初に `cargo install cargo-audit` を実行する必要があります" -"が、皮肉なことに、これによってインターネットから多くの依存関係をダウンロード" -"することになります [2](../cargo.md))。" +"`cd third-party/rust/chromium_crates_io; cargo audit` を使用して既知の脆弱性を" +"チェックします(最初に `cargo install cargo-audit` を実行する必要がありますが、" +"皮肉なことに、これによってインターネットから多くの依存関係をダウンロードすること" +"になります [2](../cargo.md))。" #: src/chromium/adding-third-party-crates/reviews-and-audits.md msgid "" -"Ensure any `unsafe` code is good enough for the [Rule of Two](https://" -"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2." -"md#unsafe-code-in-safe-languages)" +"Ensure any `unsafe` code is good enough for the [Rule of Two](https://chromium." +"googlesource.com/chromium/src/+/main/docs/security/rule-of-2.md#unsafe-code-in-" +"safe-languages)" msgstr "" "`unsafe` なコードが [Rule of Two](https://chromium.googlesource.com/chromium/" -"src/+/main/docs/security/rule-of-2.md#unsafe-code-in-safe-languages) を満たし" -"ていることを確認します。" +"src/+/main/docs/security/rule-of-2.md#unsafe-code-in-safe-languages) を満たして" +"いることを確認します。" #: src/chromium/adding-third-party-crates/reviews-and-audits.md msgid "Check for any use of `fs` or `net` APIs" @@ -17095,21 +16755,20 @@ msgstr "`fs`および`net`のAPI が使用されているかどうかを確認 #: src/chromium/adding-third-party-crates/reviews-and-audits.md msgid "" -"Read all the code at a sufficient level to look for anything out of place " -"that might have been maliciously inserted. (You can't realistically aim for " -"100% perfection here: there's often just too much code.)" +"Read all the code at a sufficient level to look for anything out of place that " +"might have been maliciously inserted. (You can't realistically aim for 100% " +"perfection here: there's often just too much code.)" msgstr "" -"悪意を持って不正に挿入された可能性のある部分がないか探すのに十分なレベルで" -"コードを読みます(多くの場合、コードが多すぎて完璧にチェックすることはできま" -"せん)。" +"悪意を持って不正に挿入された可能性のある部分がないか探すのに十分なレベルでコード" +"を読みます(多くの場合、コードが多すぎて完璧にチェックすることはできません)。" #: src/chromium/adding-third-party-crates/reviews-and-audits.md msgid "" -"These are just guidelines --- work with reviewers from `security@chromium." -"org` to work out the right way to become confident of the crate." +"These are just guidelines --- work with reviewers from `security@chromium.org` " +"to work out the right way to become confident of the crate." msgstr "" -"これらはガイドラインにすぎません。`security@chromium.org` の審査担当者と協力" -"して、自信を持ってクレートを使用するための適切な方法を見つけてください。" +"これらはガイドラインにすぎません。`security@chromium.org` の審査担当者と協力し" +"て、自信を持ってクレートを使用するための適切な方法を見つけてください。" #: src/chromium/adding-third-party-crates/checking-in.md msgid "Checking Crates into Chromium Source Code" @@ -17128,8 +16787,8 @@ msgid "" "Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust//" "`" msgstr "" -"`//third_party/rust//` にあるメタデータ(`BUILD.gn` と " -"`README.chromium`)" +"`//third_party/rust//` にあるメタデータ(`BUILD.gn` と `README." +"chromium`)" #: src/chromium/adding-third-party-crates/checking-in.md msgid "Please also add an `OWNERS` file in the latter location." @@ -17137,69 +16796,69 @@ msgstr "後者の場所に `OWNERS` ファイルも追加してください。" #: src/chromium/adding-third-party-crates/checking-in.md msgid "" -"You should land all this, along with your `Cargo.toml` and `gnrt_config." -"toml` changes, into the Chromium repo." +"You should land all this, along with your `Cargo.toml` and `gnrt_config.toml` " +"changes, into the Chromium repo." msgstr "" -"これらすべてを、`Cargo.toml` および `gnrt_config.toml` の変更とともに " -"Chromium リポジトリに追加する必要があります。" +"これらすべてを、`Cargo.toml` および `gnrt_config.toml` の変更とともに Chromium " +"リポジトリに追加する必要があります。" #: src/chromium/adding-third-party-crates/checking-in.md msgid "" "**Important**: you need to use `git add -f` because otherwise `.gitignore` " "files may result in some files being skipped." msgstr "" -"**重要**: `git add -f` を使用する必要があります。そうしないと、`.gitignore` " -"ファイルによって一部のファイルがスキップされる可能性があるためです。" +"**重要**: `git add -f` を使用する必要があります。そうしないと、`.gitignore` ファ" +"イルによって一部のファイルがスキップされる可能性があるためです。" #: src/chromium/adding-third-party-crates/checking-in.md msgid "" "As you do so, you might find presubmit checks fail because of non-inclusive " "language. This is because Rust crate data tends to include names of git " -"branches, and many projects still use non-inclusive terminology there. So " -"you may need to run:" +"branches, and many projects still use non-inclusive terminology there. So you " +"may need to run:" msgstr "" -"その際、インクルーシブでない表現が原因で presubmit チェックが失敗することがあ" -"ります。これは、Rust のクレートデータには Git ブランチの名前が含まれている傾" -"向があり、多くのプロジェクトで依然としてインクルーシブでない表現が使用されて" -"いるためです。そのため、以下を実行する必要があります。" +"その際、インクルーシブでない表現が原因で presubmit チェックが失敗することがあり" +"ます。これは、Rust のクレートデータには Git ブランチの名前が含まれている傾向があ" +"り、多くのプロジェクトで依然としてインクルーシブでない表現が使用されているためで" +"す。そのため、以下を実行する必要があります。" #: src/chromium/adding-third-party-crates/keeping-up-to-date.md msgid "" -"As the OWNER of any third party Chromium dependency, you are [expected to " -"keep it up to date with any security fixes](https://chromium.googlesource." -"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is " -"hoped that we will soon automate this for Rust crates, but for now, it's " -"still your responsibility just as it is for any other third party dependency." +"As the OWNER of any third party Chromium dependency, you are [expected to keep " +"it up to date with any security fixes](https://chromium.googlesource.com/" +"chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is hoped that " +"we will soon automate this for Rust crates, but for now, it's still your " +"responsibility just as it is for any other third party dependency." msgstr "" -"サードパーティの Chromium 依存関係の所有者は、[セキュリティに関する修正を行っ" -"て依存関係を最新の状態に保つことが求められます](https://chromium." -"googlesource.com/chromium/src/+/main/docs/adding_to_third_party.md#add-" -"owners)。これはまもなく自動化されることが期待されていますが、現状は他のサード" -"パーティの依存関係の場合と同様に、デベロッパーがその責任を負います。" +"サードパーティの Chromium 依存関係の所有者は、[セキュリティに関する修正を行って" +"依存関係を最新の状態に保つことが求められます](https://chromium.googlesource.com/" +"chromium/src/+/main/docs/adding_to_third_party.md#add-owners)。これはまもなく自" +"動化されることが期待されていますが、現状は他のサードパーティの依存関係の場合と同" +"様に、デベロッパーがその責任を負います。" #: src/exercises/chromium/third-party.md msgid "" "Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the " -"crate's [default features](https://doc.rust-lang.org/cargo/reference/" -"features.html#the-default-feature). Assume that the crate will be used in " -"shipping Chromium, but won't be used to handle untrustworthy input." +"crate's [default features](https://doc.rust-lang.org/cargo/reference/features." +"html#the-default-feature). Assume that the crate will be used in shipping " +"Chromium, but won't be used to handle untrustworthy input." msgstr "" -"Chromium に [uwuify](https://crates.io/crates/uwuify) を追加し、クレートの " -"[デフォルトの機能](https://doc.rust-lang.org/cargo/reference/features." -"html#the-default-feature) を無効にします。クレートは Chromium の公開板で使用" -"されますが、信頼できない入力の処理には使用されないと仮定してください。" +"Chromium に [uwuify](https://crates.io/crates/uwuify) を追加し、クレートの [デ" +"フォルトの機能](https://doc.rust-lang.org/cargo/reference/features.html#the-" +"default-feature) を無効にします。クレートは Chromium の公開板で使用されますが、" +"信頼できない入力の処理には使用されないと仮定してください。" #: src/exercises/chromium/third-party.md msgid "" "(In the next exercise we'll use uwuify from Chromium, but feel free to skip " "ahead and do that now if you like. Or, you could create a new " -"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/" -"+/main:build/rust/rust_executable.gni) which uses `uwuify`)." +"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/+/" +"main:build/rust/rust_executable.gni) which uses `uwuify`)." msgstr "" -"(次の演習で Chromium の uwuify を使用しますが、ここで行っても構いません。ま" -"たは、`uwuify` を使用する新しい [`rust_executable` ターゲット](https://" -"source.chromium.org/chromium/chromium/src/+/main:build/rust/rust_executable." -"gni) を作成することもできます)。" +"(次の演習で Chromium の uwuify を使用しますが、ここで行っても構いません。また" +"は、`uwuify` を使用する新しい [`rust_executable` ターゲット](https://source." +"chromium.org/chromium/chromium/src/+/main:build/rust/rust_executable.gni) を作成" +"することもできます)。" #: src/exercises/chromium/third-party.md msgid "Students will need to download lots of transitive dependencies." @@ -17243,11 +16902,11 @@ msgstr "`uwuify`" #: src/exercises/chromium/third-party.md msgid "" -"If students are downloading even more than that, they probably forgot to " -"turn off the default features." +"If students are downloading even more than that, they probably forgot to turn " +"off the default features." msgstr "" -"受講者が上記以外のクレートをダウンロードしている場合は、デフォルトの機能を無" -"効にするのを忘れている可能性があります。" +"受講者が上記以外のクレートをダウンロードしている場合は、デフォルトの機能を無効に" +"するのを忘れている可能性があります。" #: src/exercises/chromium/third-party.md msgid "" @@ -17265,8 +16924,8 @@ msgid "" "In this exercise, you're going to add a whole new Chromium feature, bringing " "together everything you already learned." msgstr "" -"この演習では、Chromium の新しい機能を追加しながら、これまで学んだことをまとめ" -"ます。" +"この演習では、Chromium の新しい機能を追加しながら、これまで学んだことをまとめま" +"す。" #: src/exercises/chromium/bringing-it-together.md msgid "The Brief from Product Management" @@ -17274,44 +16933,41 @@ msgstr "プロダクト マネジメント部門からのブリーフィング" #: src/exercises/chromium/bringing-it-together.md msgid "" -"A community of pixies has been discovered living in a remote rainforest. " -"It's important that we get Chromium for Pixies delivered to them as soon as " -"possible." +"A community of pixies has been discovered living in a remote rainforest. It's " +"important that we get Chromium for Pixies delivered to them as soon as possible." msgstr "" -"人里離れた熱帯雨林に生息するピクシー(妖精の一種)の村が発見されました。ピク" -"シー向けの Chromium をできるだけ早く提供することが重要です。" +"人里離れた熱帯雨林に生息するピクシー(妖精の一種)の村が発見されました。ピクシー" +"向けの Chromium をできるだけ早く提供することが重要です。" #: src/exercises/chromium/bringing-it-together.md msgid "" -"The requirement is to translate all Chromium's UI strings into Pixie " -"language." -msgstr "" -"要件は、Chromium のすべての UI 文字列をピクシーの言語に翻訳することです。" +"The requirement is to translate all Chromium's UI strings into Pixie language." +msgstr "要件は、Chromium のすべての UI 文字列をピクシーの言語に翻訳することです。" #: src/exercises/chromium/bringing-it-together.md msgid "" "There's not time to wait for proper translations, but fortunately pixie " -"language is very close to English, and it turns out there's a Rust crate " -"which does the translation." +"language is very close to English, and it turns out there's a Rust crate which " +"does the translation." msgstr "" -"正式な翻訳を行っている時間はありませんが、幸いにもピクシーの言語は英語に非常" -"に近く、その翻訳を行う Rust クレートがあることがわかりました。" +"正式な翻訳を行っている時間はありませんが、幸いにもピクシーの言語は英語に非常に近" +"く、その翻訳を行う Rust クレートがあることがわかりました。" #: src/exercises/chromium/bringing-it-together.md msgid "" "In fact, you already [imported that crate in the previous exercise](https://" "crates.io/crates/uwuify)." msgstr "" -"実は、[前の演習でそのクレートをインポートしています](https://crates.io/" -"crates/uwuify)。" +"実は、[前の演習でそのクレートをインポートしています](https://crates.io/crates/" +"uwuify)。" #: src/exercises/chromium/bringing-it-together.md msgid "" -"(Obviously, real translations of Chrome require incredible care and " -"diligence. Don't ship this!)" +"(Obviously, real translations of Chrome require incredible care and diligence. " +"Don't ship this!)" msgstr "" -"(言うまでもなく、Chrome を実際に翻訳するには細心の注意と努力が必要ですので、" -"これは公開しないでください)。" +"(言うまでもなく、Chrome を実際に翻訳するには細心の注意と努力が必要ですので、こ" +"れは公開しないでください)。" #: src/exercises/chromium/bringing-it-together.md msgid "Steps" @@ -17320,8 +16976,8 @@ msgstr "手順" #: src/exercises/chromium/bringing-it-together.md msgid "" "Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all " -"strings before display. In this special build of Chromium, it should always " -"do this irrespective of the setting of `mangle_localized_strings_`." +"strings before display. In this special build of Chromium, it should always do " +"this irrespective of the setting of `mangle_localized_strings_`." msgstr "" "表示前にすべての文字列を翻訳するように `ResourceBundle::" "MaybeMangleLocalizedString` を変更します。Chromium のこの特別なビルドでは、" @@ -17332,75 +16988,75 @@ msgid "" "If you've done everything right across all these exercises, congratulations, " "you should have created Chrome for pixies!" msgstr "" -"ここまでの演習をすべて正しく終わらせれていれば、これでピクシー向けの Chrome " -"が完成しているはずです。" +"ここまでの演習をすべて正しく終わらせれていれば、これでピクシー向けの Chrome が完" +"成しているはずです。" #: src/exercises/chromium/bringing-it-together.md msgid "" -"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, " -"and will probably decide that it's better to do the conversion on the C++ " -"side using `base::UTF16ToUTF8` and back again." +"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, and " +"will probably decide that it's better to do the conversion on the C++ side " +"using `base::UTF16ToUTF8` and back again." msgstr "" -"UTF16 と UTF8 について、受講者は Rust 文字列が常に UTF8 であることに注意する" -"必要があります。おそらく、C++ 側で `base::UTF16ToUTF8` を使用して変換、逆変換" -"する方がよいと判断するでしょう。" +"UTF16 と UTF8 について、受講者は Rust 文字列が常に UTF8 であることに注意する必要" +"があります。おそらく、C++ 側で `base::UTF16ToUTF8` を使用して変換、逆変換する方" +"がよいと判断するでしょう。" #: src/exercises/chromium/bringing-it-together.md msgid "" "If students decide to do the conversion on the Rust side, they'll need to " "consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct." "String.html#method.from_utf16), consider error handling, and consider which " -"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/" -"slice.html)." +"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/slice." +"html)." msgstr "" -"Rust 側で変換を行う場合は、[`String::from_utf16`](https://doc.rust-lang.org/" -"std/string/struct.String.html#method.from_utf16)の利用、エラー処理、[多くの " -"u16s を転送可能な CXX でサポートされている型](https://cxx.rs/binding/slice." -"html) はどれかを検討する必要があります。" +"Rust 側で変換を行う場合は、[`String::from_utf16`](https://doc.rust-lang.org/std/" +"string/struct.String.html#method.from_utf16)の利用、エラー処理、[多くの u16s を" +"転送可能な CXX でサポートされている型](https://cxx.rs/binding/slice.html) はどれ" +"かを検討する必要があります。" #: src/exercises/chromium/bringing-it-together.md msgid "" "Students may design the C++/Rust boundary in several different ways, e.g. " "taking and returning strings by value, or taking a mutable reference to a " -"string. If a mutable reference is used, CXX will likely tell the student " -"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may " -"need to explain what `Pin` does, and then explain why CXX needs it for " -"mutable references to C++ data: the answer is that C++ data can't be moved " -"around like Rust data, because it may contain self-referential pointers." -msgstr "" -"受講者はいくつかの異なる方法で C++ と Rust の境界を設計できます。たとえば、文" -"字列を値で取得して返す、または文字列への可変参照を取得するなどです。可変参照" -"が使用されている場合は、おそらく CXX は [`Pin`](https://doc.rust-lang.org/" -"std/pin/) を使用する必要がある旨のメッセージを表示します。`Pin` の機能を説明" -"し、C++ データへの可変参照のために CXX で `Pin` が必要になる理由を説明する必" -"要があるかもしれません。答えは、C++ データには自己参照ポインタが含まれている" -"可能性があるため、Rust データのように移動できないためです。" +"string. If a mutable reference is used, CXX will likely tell the student that " +"they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may need to " +"explain what `Pin` does, and then explain why CXX needs it for mutable " +"references to C++ data: the answer is that C++ data can't be moved around like " +"Rust data, because it may contain self-referential pointers." +msgstr "" +"受講者はいくつかの異なる方法で C++ と Rust の境界を設計できます。たとえば、文字" +"列を値で取得して返す、または文字列への可変参照を取得するなどです。可変参照が使用" +"されている場合は、おそらく CXX は [`Pin`](https://doc.rust-lang.org/std/pin/) を" +"使用する必要がある旨のメッセージを表示します。`Pin` の機能を説明し、C++ データへ" +"の可変参照のために CXX で `Pin` が必要になる理由を説明する必要があるかもしれませ" +"ん。答えは、C++ データには自己参照ポインタが含まれている可能性があるため、Rust " +"データのように移動できないためです。" #: src/exercises/chromium/bringing-it-together.md msgid "" "The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will " -"need to depend on a `rust_static_library` target. The student probably " -"already did this." +"need to depend on a `rust_static_library` target. The student probably already " +"did this." msgstr "" "`ResourceBundle::MaybeMangleLocalizedString` を含む C++ ターゲットは、" -"`rust_static_library` ターゲットに依存する必要があります。受講者はすでにこれ" -"を行っているはずです。" +"`rust_static_library` ターゲットに依存する必要があります。受講者はすでにこれを" +"行っているはずです。" #: src/exercises/chromium/bringing-it-together.md msgid "" "The `rust_static_library` target will need to depend on `//third_party/rust/" "uwuify/v0_2:lib`." msgstr "" -"`rust_static_library` ターゲットは `//third_party/rust/uwuify/v0_2:lib` に依" -"存する必要があります。" +"`rust_static_library` ターゲットは `//third_party/rust/uwuify/v0_2:lib` に依存す" +"る必要があります。" #: src/exercises/chromium/solutions.md msgid "" "Solutions to the Chromium exercises can be found in [this series of CLs]" "(https://chromium-review.googlesource.com/c/chromium/src/+/5096560)." msgstr "" -"Chromium の演習の解答については、[こちらの CL シリーズ](https://chromium-" -"review.googlesource.com/c/chromium/src/+/5096560) をご覧ください。" +"Chromium の演習の解答については、[こちらの CL シリーズ](https://chromium-review." +"googlesource.com/c/chromium/src/+/5096560) をご覧ください。" #: src/bare-metal.md msgid "Welcome to Bare Metal Rust" @@ -17408,22 +17064,22 @@ msgstr "ベアメタルRustへようこそ" #: src/bare-metal.md msgid "" -"This is a standalone one-day course about bare-metal Rust, aimed at people " -"who are familiar with the basics of Rust (perhaps from completing the " -"Comprehensive Rust course), and ideally also have some experience with bare-" -"metal programming in some other language such as C." +"This is a standalone one-day course about bare-metal Rust, aimed at people who " +"are familiar with the basics of Rust (perhaps from completing the Comprehensive " +"Rust course), and ideally also have some experience with bare-metal programming " +"in some other language such as C." msgstr "" -"こちらはベアメタルRustに関する独立した1日コースです。対象としているのは、" -"Rustの基本的な部分に関しては習得済みな人で(例えば、本講座で)、Cなどの他の言" -"語でベアメタル開発の経験があると理想的です。" +"こちらはベアメタルRustに関する独立した1日コースです。対象としているのは、Rustの" +"基本的な部分に関しては習得済みな人で(例えば、本講座で)、Cなどの他の言語でベア" +"メタル開発の経験があると理想的です。" #: src/bare-metal.md msgid "" "Today we will talk about 'bare-metal' Rust: running Rust code without an OS " "underneath us. This will be divided into several parts:" msgstr "" -"今日、取り扱うのは、ベアメタルRustです。すなわち、OSなしでRustのコードを実行" -"します。この章は以下のような構成になります:" +"今日、取り扱うのは、ベアメタルRustです。すなわち、OSなしでRustのコードを実行しま" +"す。この章は以下のような構成になります:" #: src/bare-metal.md msgid "What is `no_std` Rust?" @@ -17446,28 +17102,26 @@ msgstr "ベアメタルRust開発に役立つクレートの紹介。" msgid "" "For the microcontroller part of the course we will use the [BBC micro:bit]" "(https://microbit.org/) v2 as an example. It's a [development board](https://" -"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller " -"with some LEDs and buttons, an I2C-connected accelerometer and compass, and " -"an on-board SWD debugger." +"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller with " +"some LEDs and buttons, an I2C-connected accelerometer and compass, and an on-" +"board SWD debugger." msgstr "" -"マイクロコントローラ向けの学習では[BBC micro:bit](https://microbit.org/) v2を" -"題材として使います。これは、Nordic nRF51822マイコンベースの[開発ボード]" -"(https://tech.microbit.org/hardware/) で、いくつかのLEDやボタンスイッチ、I2C" -"接続の加速度センサやコンパス、そしてオンボードSWDデバッガを搭載しています。" +"マイクロコントローラ向けの学習では[BBC micro:bit](https://microbit.org/) v2を題" +"材として使います。これは、Nordic nRF51822マイコンベースの[開発ボード](https://" +"tech.microbit.org/hardware/) で、いくつかのLEDやボタンスイッチ、I2C接続の加速度" +"センサやコンパス、そしてオンボードSWDデバッガを搭載しています。" #: src/bare-metal.md -msgid "" -"To get started, install some tools we'll need later. On gLinux or Debian:" +msgid "To get started, install some tools we'll need later. On gLinux or Debian:" msgstr "" -"まずはじめに、後ほど必要となるいくつかのツールをインストールします。gLinuxま" -"たはDebianの場合は以下のようになります:" +"まずはじめに、後ほど必要となるいくつかのツールをインストールします。gLinuxまたは" +"Debianの場合は以下のようになります:" #: src/bare-metal.md -msgid "" -"And give users in the `plugdev` group access to the micro:bit programmer:" +msgid "And give users in the `plugdev` group access to the micro:bit programmer:" msgstr "" -"さらに、`plugdev`グループにmicro:bitプログラム用デバイスへのアクセスを付与し" -"ます:" +"さらに、`plugdev`グループにmicro:bitプログラム用デバイスへのアクセスを付与しま" +"す:" #: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md msgid "On MacOS:" @@ -17584,14 +17238,14 @@ msgstr "このコードは空のバイナリにコンパイルされます。" #: src/bare-metal/minimal.md msgid "`std` provides a panic handler; without it we must provide our own." msgstr "" -"パニックハンドラは`std`が提供するので、それを使わない場合は自分で提供する必要" -"があります。" +"パニックハンドラは`std`が提供するので、それを使わない場合は自分で提供する必要が" +"あります。" #: src/bare-metal/minimal.md msgid "It can also be provided by another crate, such as `panic-halt`." msgstr "" -"あるいは、`panic-halt`のような別のクレートが提供するパニックハンドラを利用す" -"ることもできます。" +"あるいは、`panic-halt`のような別のクレートが提供するパニックハンドラを利用するこ" +"ともできます。" #: src/bare-metal/minimal.md msgid "" @@ -17603,28 +17257,27 @@ msgstr "" #: src/bare-metal/minimal.md msgid "" -"Note that there is no `main` or any other entry point; it's up to you to " -"define your own entry point. This will typically involve a linker script and " -"some assembly code to set things up ready for Rust code to run." +"Note that there is no `main` or any other entry point; it's up to you to define " +"your own entry point. This will typically involve a linker script and some " +"assembly code to set things up ready for Rust code to run." msgstr "" -"なお、`main`のようなプログラムの規定エントリポイントはないので、自分でエント" -"リポイントを定義する必要があります。通常、Rustコードを実行できるようにするた" -"めには、リンカスクリプトとある程度のアセンブリコードを必要とします。" +"なお、`main`のようなプログラムの規定エントリポイントはないので、自分でエントリポ" +"イントを定義する必要があります。通常、Rustコードを実行できるようにするためには、" +"リンカスクリプトとある程度のアセンブリコードを必要とします。" #: src/bare-metal/alloc.md msgid "" -"To use `alloc` you must implement a [global (heap) allocator](https://doc." -"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html)." +"To use `alloc` you must implement a [global (heap) allocator](https://doc.rust-" +"lang.org/stable/std/alloc/trait.GlobalAlloc.html)." msgstr "" -"`alloc`を使うためには、[グローバル(ヒープ)アロケータ](https://doc.rust-" -"lang.org/stable/std/alloc/trait.GlobalAlloc.html)を実装しなければなりません。" +"`alloc`を使うためには、[グローバル(ヒープ)アロケータ](https://doc.rust-lang." +"org/stable/std/alloc/trait.GlobalAlloc.html)を実装しなければなりません。" #: src/bare-metal/alloc.md #, fuzzy msgid "// SAFETY: `HEAP` is only used here and `entry` is only called once.\n" msgstr "" -"// `HEAP` はここでのみ使用され、`entry` は一度だけ呼び出されるため、安全で" -"す。\n" +"// `HEAP` はここでのみ使用され、`entry` は一度だけ呼び出されるため、安全です。\n" #: src/bare-metal/alloc.md msgid "// Give the allocator some memory to allocate.\n" @@ -17632,8 +17285,7 @@ msgstr "// アロケーターにメモリを割り当てます。\n" #: src/bare-metal/alloc.md msgid "// Now we can do things that require heap allocation.\n" -msgstr "" -"// これで、ヒープ割り当てを必要とする処理を実行できるようになりました。\n" +msgstr "// これで、ヒープ割り当てを必要とする処理を実行できるようになりました。\n" #: src/bare-metal/alloc.md msgid "\"A string\"" @@ -17642,17 +17294,17 @@ msgstr "\"A string\"" #: src/bare-metal/alloc.md msgid "" "`buddy_system_allocator` is a third-party crate implementing a basic buddy " -"system allocator. Other crates are available, or you can write your own or " -"hook into your existing allocator." +"system allocator. Other crates are available, or you can write your own or hook " +"into your existing allocator." msgstr "" -"`buddy_system_allocator`はサードパーティのクレートで、単純なバディシステムア" -"ロケータです。その他にも利用できるクレートはありますし、自前で実装したり、別" -"のアロケータに自分のコードをフックすることも可能です。" +"`buddy_system_allocator`はサードパーティのクレートで、単純なバディシステムアロ" +"ケータです。その他にも利用できるクレートはありますし、自前で実装したり、別のアロ" +"ケータに自分のコードをフックすることも可能です。" #: src/bare-metal/alloc.md msgid "" -"The const parameter of `LockedHeap` is the max order of the allocator; i.e. " -"in this case it can allocate regions of up to 2\\*\\*32 bytes." +"The const parameter of `LockedHeap` is the max order of the allocator; i.e. in " +"this case it can allocate regions of up to 2\\*\\*32 bytes." msgstr "" "パラメータ定数`LockedHeap`はアロケータの最大オーダを示します。この場合、" "2\\*\\*32バイトの領域を確保することが可能です。" @@ -17663,44 +17315,43 @@ msgid "" "exactly one global allocator defined in your binary. Usually this is done in " "the top-level binary crate." msgstr "" -"もし依存関係にあるクレートが`alloc`に依存する場合、必ずバイナリファイルあたり" -"一つだけのグローバルなアロケータが存在するようにしなければなりません。通常、" -"これはトップレベルのバイナリを生成するクレートにより制御されます。" +"もし依存関係にあるクレートが`alloc`に依存する場合、必ずバイナリファイルあたり一" +"つだけのグローバルなアロケータが存在するようにしなければなりません。通常、これは" +"トップレベルのバイナリを生成するクレートにより制御されます。" #: src/bare-metal/alloc.md msgid "" "`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` " "crate is linked in so we get its panic handler." msgstr "" -"`extern crate panic_halt as _` という部分は、`panic_halt`クレートを確実にリン" -"クし、パニックハンドラを利用可能にするために必要です。" +"`extern crate panic_halt as _` という部分は、`panic_halt`クレートを確実にリンク" +"し、パニックハンドラを利用可能にするために必要です。" #: src/bare-metal/alloc.md msgid "This example will build but not run, as it doesn't have an entry point." msgstr "" -"この例で示したコードはビルドできますが、エントリポイントがないので実行するこ" -"とはできません。" +"この例で示したコードはビルドできますが、エントリポイントがないので実行することは" +"できません。" #: src/bare-metal/microcontrollers.md msgid "" "The `cortex_m_rt` crate provides (among other things) a reset handler for " "Cortex M microcontrollers." msgstr "" -"`cortex_m_rt`クレートはCortex Mマイクロコントローラ向けのリセットハンドラ(と" -"その他もろもろ)を提供します。" +"`cortex_m_rt`クレートはCortex Mマイクロコントローラ向けのリセットハンドラ(とそ" +"の他もろもろ)を提供します。" #: src/bare-metal/microcontrollers.md msgid "" "Next we'll look at how to access peripherals, with increasing levels of " "abstraction." msgstr "" -"次は、抽象度の低いレベルから順に周辺I/Oにアクセスする方法について見ていきま" -"す。" +"次は、抽象度の低いレベルから順に周辺I/Oにアクセスする方法について見ていきます。" #: src/bare-metal/microcontrollers.md msgid "" -"The `cortex_m_rt::entry` macro requires that the function have type `fn() -" -"> !`, because returning to the reset handler doesn't make sense." +"The `cortex_m_rt::entry` macro requires that the function have type `fn() -> !" +"`, because returning to the reset handler doesn't make sense." msgstr "" "リセットハンドラはリターンしないので、`cortex_m_rt::entry`マクロは対象関数が" "`fn() -> !`という型であることを要求します。" @@ -17714,8 +17365,8 @@ msgid "" "Most microcontrollers access peripherals via memory-mapped IO. Let's try " "turning on an LED on our micro:bit:" msgstr "" -"大半のマイクロコントローラはメモリマップドRIO空間を通して周辺I/Oにアクセスし" -"ます。micro:bitのLEDを光らせてみましょう:" +"大半のマイクロコントローラはメモリマップドRIO空間を通して周辺I/Oにアクセスしま" +"す。micro:bitのLEDを光らせてみましょう:" #: src/bare-metal/microcontrollers/mmio.md msgid "/// GPIO port 0 peripheral address\n" @@ -17729,12 +17380,10 @@ msgstr "// GPIO 周辺機器オフセット\n" msgid "// PIN_CNF fields\n" msgstr "// PIN_CNF フィールド\n" -#: src/bare-metal/microcontrollers/mmio.md -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/mmio.md src/bare-metal/microcontrollers/pacs.md #: src/bare-metal/microcontrollers/hals.md msgid "// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\n" -msgstr "" -"// GPIO 0 の 21 番ピンと 28 番ピンをプッシュプル出力として設定します。\n" +msgstr "// GPIO 0 の 21 番ピンと 28 番ピンをプッシュプル出力として設定します。\n" #: src/bare-metal/microcontrollers/mmio.md #, fuzzy @@ -17745,22 +17394,20 @@ msgstr "" "// ポインタは有効な周辺機器制御レジスタを指しており、\n" " // エイリアスが存在しないため、安全です。\n" -#: src/bare-metal/microcontrollers/mmio.md -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/mmio.md src/bare-metal/microcontrollers/pacs.md #: src/bare-metal/microcontrollers/hals.md msgid "// Set pin 28 low and pin 21 high to turn the LED on.\n" msgstr "// 28 番ピンをロー、21 番ピンをハイに設定して LED をオンにします。\n" #: src/bare-metal/microcontrollers/mmio.md msgid "" -"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 " -"to the first row." +"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 to " +"the first row." msgstr "" "GPIO 0のピン21はマトリクスLEDの一番目の列に、ピン28は最初の行に接続されていま" "す。" -#: src/bare-metal/microcontrollers/mmio.md -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/mmio.md src/bare-metal/microcontrollers/pacs.md #: src/bare-metal/microcontrollers/hals.md #: src/bare-metal/microcontrollers/board-support.md msgid "Run the example with:" @@ -17776,34 +17423,33 @@ msgid "" "wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/" "pack/doc/CMSIS/SVD/html/index.html) files." msgstr "" -"[`svd2rust`](https://crates.io/crates/svd2rust) は[CMSIS-SVD](https://www." -"keil.com/pack/doc/CMSIS/SVD/html/index.html) ファイルから、メモリマップされた" -"周辺I/Oに対するほぼ安全(mostly-safe)なRustラッパーを生成します。" +"[`svd2rust`](https://crates.io/crates/svd2rust) は[CMSIS-SVD](https://www.keil." +"com/pack/doc/CMSIS/SVD/html/index.html) ファイルから、メモリマップされた周辺I/O" +"に対するほぼ安全(mostly-safe)なRustラッパーを生成します。" #: src/bare-metal/microcontrollers/pacs.md msgid "" -"SVD (System View Description) files are XML files typically provided by " -"silicon vendors which describe the memory map of the device." +"SVD (System View Description) files are XML files typically provided by silicon " +"vendors which describe the memory map of the device." msgstr "" -"SVD (System View Description)ファイルはXMLファイルでデバイスのメモリマップを" -"記述したものであり、通常シリコンベンダにより提供されます。" +"SVD (System View Description)ファイルはXMLファイルでデバイスのメモリマップを記述" +"したものであり、通常シリコンベンダにより提供されます。" #: src/bare-metal/microcontrollers/pacs.md msgid "" "They are organised by peripheral, register, field and value, with names, " "descriptions, addresses and so on." msgstr "" -"周辺I/Oごとに、レジスタ、フィールドと値、名前、説明、アドレスなどにより構成さ" -"れています。" +"周辺I/Oごとに、レジスタ、フィールドと値、名前、説明、アドレスなどにより構成され" +"ています。" #: src/bare-metal/microcontrollers/pacs.md msgid "" -"SVD files are often buggy and incomplete, so there are various projects " -"which patch the mistakes, add missing details, and publish the generated " -"crates." +"SVD files are often buggy and incomplete, so there are various projects which " +"patch the mistakes, add missing details, and publish the generated crates." msgstr "" -"SVDファイルにはよく誤りがあり、また情報が不足していることも多いので、様々なプ" -"ロジェクトがそれを修正・追加し、クレートとして公開しています。" +"SVDファイルにはよく誤りがあり、また情報が不足していることも多いので、様々なプロ" +"ジェクトがそれを修正・追加し、クレートとして公開しています。" #: src/bare-metal/microcontrollers/pacs.md msgid "`cortex-m-rt` provides the vector table, among other things." @@ -17811,12 +17457,12 @@ msgstr "`cortex-m-rt`はベクタテーブルも提供します。" #: src/bare-metal/microcontrollers/pacs.md msgid "" -"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin " -"pac -- -d --no-show-raw-insn` to see the resulting binary." +"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin pac " +"-- -d --no-show-raw-insn` to see the resulting binary." msgstr "" -"もし`cargo install cargo-binutils`を実行していれば、`cargo objdump --bin pac " -"-- -d --no-show-raw-insn`を実行することにより生成されたバイナリの中身を見るこ" -"とができます。" +"もし`cargo install cargo-binutils`を実行していれば、`cargo objdump --bin pac -- " +"-d --no-show-raw-insn`を実行することにより生成されたバイナリの中身を見ることがで" +"きます。" #: src/bare-metal/microcontrollers/hals.md msgid "HAL crates" @@ -17830,9 +17476,9 @@ msgid "" "(https://crates.io/crates/embedded-hal)." msgstr "" "多くのマイクロコントローラに対する[HALクレート](https://github.com/rust-" -"embedded/awesome-embedded-rust#hal-implementation-crates)が様々な周辺I/Oに対" -"するラッパーを提供しています。これらのクレートの多くは[`embedded-hal`]" -"(https://crates.io/crates/embedded-hal)が定義するトレイトを実装しています。" +"embedded/awesome-embedded-rust#hal-implementation-crates)が様々な周辺I/Oに対する" +"ラッパーを提供しています。これらのクレートの多くは[`embedded-hal`](https://" +"crates.io/crates/embedded-hal)が定義するトレイトを実装しています。" #: src/bare-metal/microcontrollers/hals.md msgid "// Create HAL wrapper for GPIO port 0.\n" @@ -17842,16 +17488,16 @@ msgstr "// GPIO 0 番ポートの HAL ラッパーを作成します。\n" msgid "" "`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait." msgstr "" -"`set_low`と`set_high`は`embedded_hal`の`OutputPin`トレイトの定義するメソッド" -"です。" +"`set_low`と`set_high`は`embedded_hal`の`OutputPin`トレイトの定義するメソッドで" +"す。" #: src/bare-metal/microcontrollers/hals.md msgid "" -"HAL crates exist for many Cortex-M and RISC-V devices, including various " -"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers." +"HAL crates exist for many Cortex-M and RISC-V devices, including various STM32, " +"GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers." msgstr "" -"Cortex-MやRISC-Vの多くのデバイスに対してHALクレートが存在し、これらには" -"STM32、GD32、nRF、NXP、MSP430、AVR、PICマイクロコントローラなどが含まれます。" +"Cortex-MやRISC-Vの多くのデバイスに対してHALクレートが存在し、これらにはSTM32、" +"GD32、nRF、NXP、MSP430、AVR、PICマイクロコントローラなどが含まれます。" #: src/bare-metal/microcontrollers/board-support.md msgid "Board support crates" @@ -17859,27 +17505,27 @@ msgstr "ボードサポートクレート" #: src/bare-metal/microcontrollers/board-support.md msgid "" -"Board support crates provide a further level of wrapping for a specific " -"board for convenience." +"Board support crates provide a further level of wrapping for a specific board " +"for convenience." msgstr "" -"ボードサポートクレードは特定のボードに対して更に利便性を向上させるラッパーを" -"提供します。" +"ボードサポートクレードは特定のボードに対して更に利便性を向上させるラッパーを提供" +"します。" #: src/bare-metal/microcontrollers/board-support.md msgid "" -"In this case the board support crate is just providing more useful names, " -"and a bit of initialisation." +"In this case the board support crate is just providing more useful names, and a " +"bit of initialisation." msgstr "" -"この例では、ボードサポートクレートは単に分かりやすい名前を提供し、少しの初期" -"化を実施しているだけです。" +"この例では、ボードサポートクレートは単に分かりやすい名前を提供し、少しの初期化を" +"実施しているだけです。" #: src/bare-metal/microcontrollers/board-support.md msgid "" "The crate may also include drivers for some on-board devices outside of the " "microcontroller itself." msgstr "" -"マイクロコントローラの外に実装されたオンボードデバイスに対するドライバも提供" -"されていることがあります。" +"マイクロコントローラの外に実装されたオンボードデバイスに対するドライバも提供され" +"ていることがあります。" #: src/bare-metal/microcontrollers/board-support.md msgid "`microbit-v2` includes a simple driver for the LED matrix." @@ -17899,42 +17545,41 @@ msgstr "// pin_input.is_high(); // エラー、移動済み。\n" #: src/bare-metal/microcontrollers/type-state.md msgid "" -"Pins don't implement `Copy` or `Clone`, so only one instance of each can " -"exist. Once a pin is moved out of the port struct nobody else can take it." +"Pins don't implement `Copy` or `Clone`, so only one instance of each can exist. " +"Once a pin is moved out of the port struct nobody else can take it." msgstr "" -"この例では、ピンを表すタイプは`Copy`も`Clone`も実装していません。そのため、た" -"だ一つのインスタンスだけが存在可能です。ピンがポート構造体からムーブされる" -"と、他の誰もそのピンにアクセスすることはできなくなります。" +"この例では、ピンを表すタイプは`Copy`も`Clone`も実装していません。そのため、ただ" +"一つのインスタンスだけが存在可能です。ピンがポート構造体からムーブされると、他の" +"誰もそのピンにアクセスすることはできなくなります。" #: src/bare-metal/microcontrollers/type-state.md msgid "" -"Changing the configuration of a pin consumes the old pin instance, so you " -"can’t keep use the old instance afterwards." +"Changing the configuration of a pin consumes the old pin instance, so you can’t " +"keep use the old instance afterwards." msgstr "" -"ピンの設定を変更することは古いピンのインスタンスを消費することになります。そ" -"のため、それ以降は古いインスタンスを使い続けることはできなくなります。" +"ピンの設定を変更することは古いピンのインスタンスを消費することになります。そのた" +"め、それ以降は古いインスタンスを使い続けることはできなくなります。" #: src/bare-metal/microcontrollers/type-state.md msgid "" -"The type of a value indicates the state that it is in: e.g. in this case, " -"the configuration state of a GPIO pin. This encodes the state machine into " -"the type system, and ensures that you don't try to use a pin in a certain " -"way without properly configuring it first. Illegal state transitions are " -"caught at compile time." +"The type of a value indicates the state that it is in: e.g. in this case, the " +"configuration state of a GPIO pin. This encodes the state machine into the type " +"system, and ensures that you don't try to use a pin in a certain way without " +"properly configuring it first. Illegal state transitions are caught at compile " +"time." msgstr "" -"変数の型はその状態を表すようになっています。例えば、この例では型がGPIOピンの" -"状態を表しています。このようにステートマシンをタイプシステムに織り込むこと" -"で、正しい設定をせずにピンを使ってしまうことがなくなります。不正な状態遷移に" -"関してはコンパイル時に発見されるようになります。" +"変数の型はその状態を表すようになっています。例えば、この例では型がGPIOピンの状態" +"を表しています。このようにステートマシンをタイプシステムに織り込むことで、正しい" +"設定をせずにピンを使ってしまうことがなくなります。不正な状態遷移に関してはコンパ" +"イル時に発見されるようになります。" #: src/bare-metal/microcontrollers/type-state.md msgid "" -"You can call `is_high` on an input pin and `set_high` on an output pin, but " -"not vice-versa." +"You can call `is_high` on an input pin and `set_high` on an output pin, but not " +"vice-versa." msgstr "" -"インプットピンに対して`is_high`を呼び出すことは可能で、アウトプットピンに対し" -"て`set_high`を呼び出すことも可能です。しかし、その逆の組み合わせは不可能で" -"す。" +"インプットピンに対して`is_high`を呼び出すことは可能で、アウトプットピンに対して" +"`set_high`を呼び出すことも可能です。しかし、その逆の組み合わせは不可能です。" #: src/bare-metal/microcontrollers/type-state.md msgid "Many HAL crates follow this pattern." @@ -17946,8 +17591,8 @@ msgid "" "The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a " "number of traits covering common microcontroller peripherals:" msgstr "" -"[`embedded-hal`](https://crates.io/crates/embedded-hal)クレートはマイクロコン" -"トローラの周辺I/Oに関して共通に必要とされる多くのトレイトを提供します。" +"[`embedded-hal`](https://crates.io/crates/embedded-hal)クレートはマイクロコント" +"ローラの周辺I/Oに関して共通に必要とされる多くのトレイトを提供します。" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "GPIO" @@ -17967,37 +17612,36 @@ msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" -"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken " -"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-" -"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://" -"crates.io/crates/rand_core) respectively." +"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken out " +"into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-can`]" +"(https://crates.io/crates/embedded-can) and [`rand_core`](https://crates.io/" +"crates/rand_core) respectively." msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md #, fuzzy msgid "" -"Other crates then implement [drivers](https://github.com/rust-embedded/" -"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an " -"accelerometer driver might need an I2C or SPI device instance." +"Other crates then implement [drivers](https://github.com/rust-embedded/awesome-" +"embedded-rust#driver-crates) in terms of these traits, e.g. an accelerometer " +"driver might need an I2C or SPI device instance." msgstr "" -"多くのクレートはこれらのトレイトに対応することで[ドライバ](https://github." -"com/rust-embedded/awesome-embedded-rust#driver-crates)を実装します。例えば、" -"加速度センサのドライバにはI2CやSPIバスの実装が必要かもしれません。" +"多くのクレートはこれらのトレイトに対応することで[ドライバ](https://github.com/" +"rust-embedded/awesome-embedded-rust#driver-crates)を実装します。例えば、加速度セ" +"ンサのドライバにはI2CやSPIバスの実装が必要かもしれません。" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" "The traits cover using the peripherals but not initialising or configuring " -"them, as initialisation and configuration is usually highly platform-" -"specific." +"them, as initialisation and configuration is usually highly platform-specific." msgstr "" #: src/bare-metal/microcontrollers/embedded-hal.md msgid "" -"There are implementations for many microcontrollers, as well as other " -"platforms such as Linux on Raspberry Pi." +"There are implementations for many microcontrollers, as well as other platforms " +"such as Linux on Raspberry Pi." msgstr "" -"多くのマイクロコントローラに対する実装に加えて、Raspberry Pi上のLinux向けの実" -"装も存在します。" +"多くのマイクロコントローラに対する実装に加えて、Raspberry Pi上のLinux向けの実装" +"も存在します。" #: src/bare-metal/microcontrollers/embedded-hal.md #, fuzzy @@ -18005,32 +17649,30 @@ msgid "" "[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides " "async versions of the traits." msgstr "" -"[`embedded-hal`](https://crates.io/crates/embedded-hal)クレートはマイクロコン" -"トローラの周辺I/Oに関して共通に必要とされる多くのトレイトを提供します。" +"[`embedded-hal`](https://crates.io/crates/embedded-hal)クレートはマイクロコント" +"ローラの周辺I/Oに関して共通に必要とされる多くのトレイトを提供します。" #: src/bare-metal/microcontrollers/embedded-hal.md #, fuzzy msgid "" -"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides " -"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/" -"crates/nb) crate." +"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides another " +"approach to non-blocking I/O, based on the [`nb`](https://crates.io/crates/nb) " +"crate." msgstr "" -"[`embedded-hal`](https://crates.io/crates/embedded-hal)クレートはマイクロコン" -"トローラの周辺I/Oに関して共通に必要とされる多くのトレイトを提供します。" +"[`embedded-hal`](https://crates.io/crates/embedded-hal)クレートはマイクロコント" +"ローラの周辺I/Oに関して共通に必要とされる多くのトレイトを提供します。" #: src/bare-metal/microcontrollers/probe-rs.md msgid "" -"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, " -"like OpenOCD but better integrated." +"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, like " +"OpenOCD but better integrated." msgstr "" -"[probe-rs](https://probe.rs/)は組み込み向けデバッグに有用なツールセットです。" -"これはOpenOCDのようなものですが、より高度に統合されています。" +"[probe-rs](https://probe.rs/)は組み込み向けデバッグに有用なツールセットです。こ" +"れはOpenOCDのようなものですが、より高度に統合されています。" #: src/bare-metal/microcontrollers/probe-rs.md -msgid "" -"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes" -msgstr "" -"SWD (Serial Wire Debug) やCMSIS-DAP経由のJTAG、 ST-LinkやJ-Linkプローブ" +msgid "SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes" +msgstr "SWD (Serial Wire Debug) やCMSIS-DAP経由のJTAG、 ST-LinkやJ-Linkプローブ" #: src/bare-metal/microcontrollers/probe-rs.md msgid "GDB stub and Microsoft DAP (Debug Adapter Protocol) server" @@ -18042,49 +17684,48 @@ msgstr "Cargoとのインテグレーション" #: src/bare-metal/microcontrollers/probe-rs.md msgid "" -"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT " -"(Real Time Transfers) output and connect GDB. It's configured by an `Embed." -"toml` file in your project directory." +"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT (Real " +"Time Transfers) output and connect GDB. It's configured by an `Embed.toml` file " +"in your project directory." msgstr "" -"`cargo-embed`はcargoのサブコマンドであり、バイナリをビルドしたり、フラッシュ" -"したり、RTT(Real Time Transfers)の出力ログを取得したり、GDBに接続するための" -"ものです。設定は対象とするプロジェクトディレクトリにおける`Embed.toml`ファイ" -"ルにより行います。" +"`cargo-embed`はcargoのサブコマンドであり、バイナリをビルドしたり、フラッシュした" +"り、RTT(Real Time Transfers)の出力ログを取得したり、GDBに接続するためのもので" +"す。設定は対象とするプロジェクトディレクトリにおける`Embed.toml`ファイルにより行" +"います。" #: src/bare-metal/microcontrollers/probe-rs.md msgid "" -"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is " -"an Arm standard protocol over USB for an in-circuit debugger to access the " -"CoreSight Debug Access Port of various Arm Cortex processors. It's what the " -"on-board debugger on the BBC micro:bit uses." +"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is an " +"Arm standard protocol over USB for an in-circuit debugger to access the " +"CoreSight Debug Access Port of various Arm Cortex processors. It's what the on-" +"board debugger on the BBC micro:bit uses." msgstr "" -"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) はUSB" -"上のARM標準プロトコルで、インサーキット・デバッガが様々なArm Cortexプロセッサ" -"のコアサイト・デバッグ・アクセスポートにアクセスするためのものです。BBC " -"micro:bit のオンボード・デバッガもこれを利用しています。" +"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) はUSB上" +"のARM標準プロトコルで、インサーキット・デバッガが様々なArm Cortexプロセッサのコ" +"アサイト・デバッグ・アクセスポートにアクセスするためのものです。BBC micro:bit の" +"オンボード・デバッガもこれを利用しています。" #: src/bare-metal/microcontrollers/probe-rs.md msgid "" -"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link " -"is a range from SEGGER." +"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link is " +"a range from SEGGER." msgstr "" -"ST-Link はST Microelectronicsによるインサーキット・デバッガの総称で、 J-Link" -"はSEGGERによるインサーキット・デバッガの総称です。" +"ST-Link はST Microelectronicsによるインサーキット・デバッガの総称で、 J-Linkは" +"SEGGERによるインサーキット・デバッガの総称です。" #: src/bare-metal/microcontrollers/probe-rs.md msgid "" -"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin " -"Serial Wire Debug." +"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin Serial " +"Wire Debug." msgstr "" -"デバッグ・アクセスポートは通常5ピンのJTAGインタフェースか、2ピンのシリアルワ" -"イヤデバッグです。" +"デバッグ・アクセスポートは通常5ピンのJTAGインタフェースか、2ピンのシリアルワイ" +"ヤデバッグです。" #: src/bare-metal/microcontrollers/probe-rs.md msgid "" -"probe-rs is a library which you can integrate into your own tools if you " -"want to." -msgstr "" -"probe-rsは自分で独自のツールを統合したい場合に利用できるライブラリです。" +"probe-rs is a library which you can integrate into your own tools if you want " +"to." +msgstr "probe-rsは自分で独自のツールを統合したい場合に利用できるライブラリです。" #: src/bare-metal/microcontrollers/probe-rs.md msgid "" @@ -18093,8 +17734,8 @@ msgid "" "supported microcontroller." msgstr "" "[Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-" -"protocol/) はVSCodeや他のIDEから、サポートされたマイクロコントローラ上で実行" -"されているコードをデバッグすることを可能にします。" +"protocol/) はVSCodeや他のIDEから、サポートされたマイクロコントローラ上で実行され" +"ているコードをデバッグすることを可能にします。" #: src/bare-metal/microcontrollers/probe-rs.md msgid "cargo-embed is a binary built using the probe-rs library." @@ -18115,8 +17756,8 @@ msgstr "_Embed.toml_:" #: src/bare-metal/microcontrollers/debugging.md msgid "In one terminal under `src/bare-metal/microcontrollers/examples/`:" msgstr "" -"ひとつのターミナルで、`src/bare-metal/microcontrollers/examples/`において下記" -"を実行:" +"ひとつのターミナルで、`src/bare-metal/microcontrollers/examples/`において下記を" +"実行:" #: src/bare-metal/microcontrollers/debugging.md msgid "In another terminal in the same directory:" @@ -18146,11 +17787,10 @@ msgstr "\"Real-Time Interrupt-driven Concurrency\"の略" #: src/bare-metal/microcontrollers/other-projects.md #, fuzzy -msgid "" -"Shared resource management, message passing, task scheduling, timer queue." +msgid "Shared resource management, message passing, task scheduling, timer queue." msgstr "" -"共有リソース管理、メッセージパッシング、タスクスケジューリング、タイマキュー" -"を提供" +"共有リソース管理、メッセージパッシング、タスクスケジューリング、タイマキューを提" +"供" #: src/bare-metal/microcontrollers/other-projects.md msgid "[Embassy](https://embassy.dev/)" @@ -18184,8 +17824,8 @@ msgid "" "Microkernel RTOS from Oxide Computer Company with memory protection, " "unprivileged drivers, IPC." msgstr "" -"Oxide Computer CompanyによるマイクロカーネルのRTOSでメモリ保護、非特権ドライ" -"バ、IPCを提供" +"Oxide Computer CompanyによるマイクロカーネルのRTOSでメモリ保護、非特権ドライバ、" +"IPCを提供" #: src/bare-metal/microcontrollers/other-projects.md #, fuzzy @@ -18195,17 +17835,17 @@ msgstr "" #: src/bare-metal/microcontrollers/other-projects.md msgid "" -"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs." -"github.io/book/overview/using-the-standard-library.html)." +"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.github." +"io/book/overview/using-the-standard-library.html)." msgstr "" -"いくつかのプラットフォームでは `std`の実装あり、例えば [esp-idf](https://esp-" -"rs.github.io/book/overview/using-the-standard-library.html)。" +"いくつかのプラットフォームでは `std`の実装あり、例えば [esp-idf](https://esp-rs." +"github.io/book/overview/using-the-standard-library.html)。" #: src/bare-metal/microcontrollers/other-projects.md msgid "RTIC can be considered either an RTOS or a concurrency framework." msgstr "" -"RTICはRTOSとして捉えることもできますし、並行実行のフレームワークとして捉える" -"こともできます。" +"RTICはRTOSとして捉えることもできますし、並行実行のフレームワークとして捉えること" +"もできます。" #: src/bare-metal/microcontrollers/other-projects.md msgid "It doesn't include any HALs." @@ -18213,8 +17853,8 @@ msgstr "他のHALを全く含んでいません。" #: src/bare-metal/microcontrollers/other-projects.md msgid "" -"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for " -"scheduling rather than a proper kernel." +"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for scheduling " +"rather than a proper kernel." msgstr "" "スケジューリングはカーネルではなく、Cortex-M NVIC (Nested Virtual Interrupt " "Controller)を利用して行います。" @@ -18224,19 +17864,18 @@ msgid "Cortex-M only." msgstr "Cortex-Mのみの対応です。" #: src/bare-metal/microcontrollers/other-projects.md -msgid "" -"Google uses TockOS on the Haven microcontroller for Titan security keys." +msgid "Google uses TockOS on the Haven microcontroller for Titan security keys." msgstr "" -"GoogleはTockOSをTitanセキュリティキーのHavenマイクロコントローラで利用してい" -"ます。" +"GoogleはTockOSをTitanセキュリティキーのHavenマイクロコントローラで利用していま" +"す。" #: src/bare-metal/microcontrollers/other-projects.md msgid "" "FreeRTOS is mostly written in C, but there are Rust bindings for writing " "applications." msgstr "" -"FreeRTOS はほとんどCで書かれていますが、アプリケーションを開発するためのRust" -"バインディングが存在します。" +"FreeRTOS はほとんどCで書かれていますが、アプリケーションを開発するためのRustバイ" +"ンディングが存在します。" #: src/exercises/bare-metal/morning.md msgid "" @@ -18258,8 +17897,8 @@ msgid "" "serial port. If you have time, try displaying it on the LEDs somehow too, or " "use the buttons somehow." msgstr "" -"I2C接続のコンパスから方位を読み取り、その結果をシリアルポートに出力します。も" -"し時間があれば、LEDやボタンをなんとか利用して方位を出力してみてください。" +"I2C接続のコンパスから方位を読み取り、その結果をシリアルポートに出力します。もし" +"時間があれば、LEDやボタンをなんとか利用して方位を出力してみてください。" #: src/exercises/bare-metal/compass.md msgid "Hints:" @@ -18267,15 +17906,15 @@ msgstr "ヒント:" #: src/exercises/bare-metal/compass.md msgid "" -"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/" -"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/" -"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit." -"org/hardware/)." +"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/latest/" +"lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/) " +"crates, as well as the [micro:bit hardware](https://tech.microbit.org/" +"hardware/)." msgstr "" "[`lsm303agr`](https://docs.rs/lsm303agr/latest/lsm303agr/) クレートと " -"[`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/)クレートのドキュ" -"メント、ならびに[micro:bitハードウェア仕様](https://tech.microbit.org/" -"hardware/)を確認してみてください。" +"[`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/)クレートのドキュメ" +"ント、ならびに[micro:bitハードウェア仕様](https://tech.microbit.org/hardware/)を" +"確認してみてください。" #: src/exercises/bare-metal/compass.md msgid "" @@ -18283,20 +17922,19 @@ msgid "" msgstr "LSM303AGR慣性計測器は内部のI2Cバスに接続されています。" #: src/exercises/bare-metal/compass.md -msgid "" -"TWI is another name for I2C, so the I2C master peripheral is called TWIM." +msgid "TWI is another name for I2C, so the I2C master peripheral is called TWIM." msgstr "TWIはI2Cの別名なので、I2CマスタはTWIMという名前になっています。" #: src/exercises/bare-metal/compass.md #, fuzzy msgid "" -"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::" -"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/" -"microbit/hal/struct.Twim.html) struct implements this." +"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::I2c` " +"trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/microbit/" +"hal/struct.Twim.html) struct implements this." msgstr "" -"LSM303AGRドライバは`embedded_hal::blocking::i2c::WriteRead`を実装するものを必" -"要とします。 [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/" -"microbit/hal/struct.Twim.html)構造体がこれを実装しています。" +"LSM303AGRドライバは`embedded_hal::blocking::i2c::WriteRead`を実装するものを必要" +"とします。 [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/microbit/" +"hal/struct.Twim.html)構造体がこれを実装しています。" #: src/exercises/bare-metal/compass.md msgid "" @@ -18308,21 +17946,20 @@ msgstr "" #: src/exercises/bare-metal/compass.md msgid "" -"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi." -"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for " -"this exercise." +"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.com/" +"pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for this " +"exercise." msgstr "" -"[nRF52833データシート](https://infocenter.nordicsemi.com/pdf/" -"nRF52833_PS_v1.5.pdf)を見ることもできますが、この練習問題のためには必要ないは" -"ずです。" +"[nRF52833データシート](https://infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.5." +"pdf)を見ることもできますが、この練習問題のためには必要ないはずです。" #: src/exercises/bare-metal/compass.md msgid "" "Download the [exercise template](../../comprehensive-rust-exercises.zip) and " "look in the `compass` directory for the following files." msgstr "" -"[練習問題のテンプレート](../../comprehensive-rust-exercises.zip) をダウンロー" -"ドして、`compass`というディレクトリの中にある下記のファイルを見てください。" +"[練習問題のテンプレート](../../comprehensive-rust-exercises.zip) をダウンロード" +"して、`compass`というディレクトリの中にある下記のファイルを見てください。" #: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md msgid "_src/main.rs_:" @@ -18345,8 +17982,7 @@ msgid "See the serial output on Linux with:" msgstr "Linuxではシリアルポート出力を下記のコマンドで確認します:" #: src/exercises/bare-metal/compass.md -msgid "" -"Or on Mac OS something like (the device name may be slightly different):" +msgid "Or on Mac OS something like (the device name may be slightly different):" msgstr "Mac OSではこんな感じになります(デバイス名が少し違うかもしれません):" #: src/exercises/bare-metal/compass.md @@ -18395,8 +18031,7 @@ msgstr "\"{},{},{}\\t{},{},{}\"" #: src/exercises/bare-metal/solutions-morning.md msgid "" -"// If button A is pressed, switch to the next mode and briefly blink all " -"LEDs\n" +"// If button A is pressed, switch to the next mode and briefly blink all LEDs\n" " // on.\n" msgstr "" "// ボタン A が押された場合、次のモードに切り替えてすべての LED を短時間点滅\n" @@ -18413,10 +18048,10 @@ msgid "" "with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/" "virt.html) board." msgstr "" -"ここまではArm Cortex-Mシリーズのようなマイクロコントローラについて見てきまし" -"た。今度はCortex-Aを対象として何かを書いてみましょう。簡単化のために、ここで" -"は(本物のハードウェアではなく)QEMUのaarch64 ['virt'](https://qemu-project." -"gitlab.io/qemu/system/arm/virt.html)ボードを利用します。" +"ここまではArm Cortex-Mシリーズのようなマイクロコントローラについて見てきました。" +"今度はCortex-Aを対象として何かを書いてみましょう。簡単化のために、ここでは(本物" +"のハードウェアではなく)QEMUのaarch64 ['virt'](https://qemu-project.gitlab.io/" +"qemu/system/arm/virt.html)ボードを利用します。" #: src/bare-metal/aps.md msgid "" @@ -18424,9 +18059,9 @@ msgid "" "privilege (exception levels on Arm CPUs, rings on x86), while application " "processors do." msgstr "" -"大まかに言って、マイクロコントローラがMMUや複数の特権レベル(Arm CPUにおける" -"例外レベル、x86におけるリング)を持たないのに対し、アプリケーションプロセッサ" -"はこれらを持っています。" +"大まかに言って、マイクロコントローラがMMUや複数の特権レベル(Arm CPUにおける例外" +"レベル、x86におけるリング)を持たないのに対し、アプリケーションプロセッサはこれ" +"らを持っています。" #: src/bare-metal/aps.md msgid "" @@ -18434,13 +18069,12 @@ msgid "" "architecture. The 'virt' board doesn't correspond to any particular real " "hardware, but is designed purely for virtual machines." msgstr "" -"QEMU は個々のアーキテクチャに対して様々な異なるマシンやボードモデルをサポート" -"しています。今回使う 'virt' ボードは特定の本物のハードウェアに対応したもので" -"はなく、純粋に仮想マシンとして設計されたものです。" +"QEMU は個々のアーキテクチャに対して様々な異なるマシンやボードモデルをサポートし" +"ています。今回使う 'virt' ボードは特定の本物のハードウェアに対応したものではな" +"く、純粋に仮想マシンとして設計されたものです。" #: src/bare-metal/aps/entry-point.md -msgid "" -"Before we can start running Rust code, we need to do some initialisation." +msgid "Before we can start running Rust code, we need to do some initialisation." msgstr "Rustのコードを実行できるようになる前にいくつかの初期化が必要です。" #: src/bare-metal/aps/entry-point.md @@ -18450,8 +18084,8 @@ msgid "" ".global entry\n" "entry:\n" " /*\n" -" * Load and apply the memory management configuration, ready to enable " -"MMU and\n" +" * Load and apply the memory management configuration, ready to enable MMU " +"and\n" " * caches.\n" " */\n" " adrp x30, idmap\n" @@ -18470,8 +18104,7 @@ msgid "" " mov_i x30, .Lsctlrval\n" "\n" " /*\n" -" * Ensure everything before this point has completed, then invalidate " -"any\n" +" * Ensure everything before this point has completed, then invalidate any\n" " * potentially stale local TLB entries before they start being used.\n" " */\n" " isb\n" @@ -18523,8 +18156,8 @@ msgstr "" ".global entry\n" "entry:\n" " /*\n" -" * メモリ管理に関するコンフィギュレーションを読み込んで適用し、MMU と" -"キャッシュを有効にする準備を\n" +" * メモリ管理に関するコンフィギュレーションを読み込んで適用し、MMU とキャッ" +"シュを有効にする準備を\n" " * します。\n" " */\n" " adrp x30, idmap\n" @@ -18544,8 +18177,7 @@ msgstr "" "\n" " /*\n" " * ここより前のすべての処理が完了していることを確認してから、\n" -" * 古くなった可能性のあるローカル TLB エントリを使用開始前に無効にしま" -"す。\n" +" * 古くなった可能性のあるローカル TLB エントリを使用開始前に無効にします。\n" " */\n" " isb\n" " tlbi vmalle1\n" @@ -18595,49 +18227,48 @@ msgid "" "This is the same as it would be for C: initialising the processor state, " "zeroing the BSS, and setting up the stack pointer." msgstr "" -"この初期化内容はCの場合と同じになります。プロセッサ状態を初期化して、BSSをゼ" -"ロ埋めして、スタックポインタを設定します。" +"この初期化内容はCの場合と同じになります。プロセッサ状態を初期化して、BSSをゼロ埋" +"めして、スタックポインタを設定します。" #: src/bare-metal/aps/entry-point.md msgid "" "The BSS (block starting symbol, for historical reasons) is the part of the " "object file which containing statically allocated variables which are " -"initialised to zero. They are omitted from the image, to avoid wasting space " -"on zeroes. The compiler assumes that the loader will take care of zeroing " -"them." +"initialised to zero. They are omitted from the image, to avoid wasting space on " +"zeroes. The compiler assumes that the loader will take care of zeroing them." msgstr "" -"BSS(歴史的な理由によりblock starting symbolと呼ばれているもの)はオブジェク" -"トファイルにおいてゼロ初期化される静的な変数を含む部分です。この部分はゼロに" -"よる領域の浪費を避けるためにイメージからは除外されています。コンパイラはロー" -"ダがこの領域をゼロ初期化することを想定しているのです。" +"BSS(歴史的な理由によりblock starting symbolと呼ばれているもの)はオブジェクト" +"ファイルにおいてゼロ初期化される静的な変数を含む部分です。この部分はゼロによる領" +"域の浪費を避けるためにイメージからは除外されています。コンパイラはローダがこの領" +"域をゼロ初期化することを想定しているのです。" #: src/bare-metal/aps/entry-point.md msgid "" -"The BSS may already be zeroed, depending on how memory is initialised and " -"the image is loaded, but we zero it to be sure." +"The BSS may already be zeroed, depending on how memory is initialised and the " +"image is loaded, but we zero it to be sure." msgstr "" -"メモリの初期化方法やイメージのロード方法によってはBSSはすでにゼロ埋めされてい" -"ることがありますが、ここでは念の為にゼロ埋めしています。" +"メモリの初期化方法やイメージのロード方法によってはBSSはすでにゼロ埋めされている" +"ことがありますが、ここでは念の為にゼロ埋めしています。" #: src/bare-metal/aps/entry-point.md msgid "" -"We need to enable the MMU and cache before reading or writing any memory. If " -"we don't:" +"We need to enable the MMU and cache before reading or writing any memory. If we " +"don't:" msgstr "" -"いかなるメモリのreadやwriteよりも前にMMUとキャッシュを有効化する必要がありま" -"す。それをしないと:" +"いかなるメモリのreadやwriteよりも前にMMUとキャッシュを有効化する必要があります。" +"それをしないと:" #: src/bare-metal/aps/entry-point.md msgid "" -"Unaligned accesses will fault. We build the Rust code for the `aarch64-" -"unknown-none` target which sets `+strict-align` to prevent the compiler " -"generating unaligned accesses, so it should be fine in this case, but this " -"is not necessarily the case in general." +"Unaligned accesses will fault. We build the Rust code for the `aarch64-unknown-" +"none` target which sets `+strict-align` to prevent the compiler generating " +"unaligned accesses, so it should be fine in this case, but this is not " +"necessarily the case in general." msgstr "" -"アラインされていないアクセスがフォールトになります。我々はコンパイラがアライ" -"ンされていないアクセスを生成しないように`+strict-align`オプション を設定する" -"`aarch64-unknown-none` ターゲット向けにRustコードをビルドします。そのためここ" -"では問題にはなりませんが、一般的にはそうとは言えません。" +"アラインされていないアクセスがフォールトになります。我々はコンパイラがアラインさ" +"れていないアクセスを生成しないように`+strict-align`オプション を設定する" +"`aarch64-unknown-none` ターゲット向けにRustコードをビルドします。そのためここで" +"は問題にはなりませんが、一般的にはそうとは言えません。" #: src/bare-metal/aps/entry-point.md msgid "" @@ -18645,47 +18276,45 @@ msgid "" "problem is that the VM is accessing memory directly with the cache disabled, " "while the host has cacheable aliases to the same memory. Even if the host " "doesn't explicitly access the memory, speculative accesses can lead to cache " -"fills, and then changes from one or the other will get lost when the cache " -"is cleaned or the VM enables the cache. (Cache is keyed by physical address, " -"not VA or IPA.)" -msgstr "" -"もしVM上で実行していたとすると、キャッシュコヒーレンシーの問題を起こすことが" -"あります。問題なのはVMがキャッシュを無効化したまま直接メモリにアクセスしてい" -"るのに対し、ホストは同じメモリに対してキャッシュ可能なエイリアスを持ってしま" -"うということです。ホストが仮に明示的にメモリにアクセスしないとしても、投機的" -"なアクセスによりキャッシュフィルが起きることがあります。そうなると、ホストが" -"キャッシュをフラッシュするかVMがキャッシュを有効化したときに、VMかホストのど" -"ちらかによる変更が失われてしまいます。(キャッシュは仮想アドレスやIPAではなく" -"物理アドレスをキーとしてアクセスされます)" +"fills, and then changes from one or the other will get lost when the cache is " +"cleaned or the VM enables the cache. (Cache is keyed by physical address, not " +"VA or IPA.)" +msgstr "" +"もしVM上で実行していたとすると、キャッシュコヒーレンシーの問題を起こすことがあり" +"ます。問題なのはVMがキャッシュを無効化したまま直接メモリにアクセスしているのに対" +"し、ホストは同じメモリに対してキャッシュ可能なエイリアスを持ってしまうということ" +"です。ホストが仮に明示的にメモリにアクセスしないとしても、投機的なアクセスにより" +"キャッシュフィルが起きることがあります。そうなると、ホストがキャッシュをフラッ" +"シュするかVMがキャッシュを有効化したときに、VMかホストのどちらかによる変更が失わ" +"れてしまいます。(キャッシュは仮想アドレスやIPAではなく物理アドレスをキーとして" +"アクセスされます)" #: src/bare-metal/aps/entry-point.md msgid "" "For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which " -"identity maps the first 1 GiB of address space for devices, the next 1 GiB " -"for DRAM, and another 1 GiB higher up for more devices. This matches the " -"memory layout that QEMU uses." +"identity maps the first 1 GiB of address space for devices, the next 1 GiB for " +"DRAM, and another 1 GiB higher up for more devices. This matches the memory " +"layout that QEMU uses." msgstr "" -"単純化のために、ハードコードしたページテーブル(`idmap.S`参照)を利用します。" -"このページテーブルは最初の1GiBをデバイス用に、次の1GiBをDRAM用に、次の1GiBを" -"さらなるデバイス用に透過的にマップします。これはQEMUのメモリレイアウトに合致" -"します。" +"単純化のために、ハードコードしたページテーブル(`idmap.S`参照)を利用します。こ" +"のページテーブルは最初の1GiBをデバイス用に、次の1GiBをDRAM用に、次の1GiBをさらな" +"るデバイス用に透過的にマップします。これはQEMUのメモリレイアウトに合致します。" #: src/bare-metal/aps/entry-point.md msgid "" "We also set up the exception vector (`vbar_el1`), which we'll see more about " "later." -msgstr "" -"例外ベクタ(`vbar_el1`)も設定します。これに関しては後ほど詳しく見ます。" +msgstr "例外ベクタ(`vbar_el1`)も設定します。これに関しては後ほど詳しく見ます。" #: src/bare-metal/aps/entry-point.md msgid "" "All examples this afternoon assume we will be running at exception level 1 " -"(EL1). If you need to run at a different exception level you'll need to " -"modify `entry.S` accordingly." +"(EL1). If you need to run at a different exception level you'll need to modify " +"`entry.S` accordingly." msgstr "" "今日の午後に扱うすべての例は例外レベル1(EL1)で実行されることを想定していま" -"す。もし、別の例外レベルで実行する必要がある場合には、`entry.S`をそれに合わせ" -"て変更する必要があります。" +"す。もし、別の例外レベルで実行する必要がある場合には、`entry.S`をそれに合わせて" +"変更する必要があります。" #: src/bare-metal/aps/inline-assembly.md msgid "Inline assembly" @@ -18693,13 +18322,13 @@ msgstr "インラインアセンブリ" #: src/bare-metal/aps/inline-assembly.md msgid "" -"Sometimes we need to use assembly to do things that aren't possible with " -"Rust code. For example, to make an HVC (hypervisor call) to tell the " -"firmware to power off the system:" +"Sometimes we need to use assembly to do things that aren't possible with Rust " +"code. For example, to make an HVC (hypervisor call) to tell the firmware to " +"power off the system:" msgstr "" -"時折Rustコードでは書けないことを行うためにアセンブリ言語を使う必要がありま" -"す。例えば、電源を落とすためにファームウェアに対してHVC(ハイパーバイザコー" -"ル)を発行する場合です:" +"時折Rustコードでは書けないことを行うためにアセンブリ言語を使う必要があります。例" +"えば、電源を落とすためにファームウェアに対してHVC(ハイパーバイザコール)を発行" +"する場合です:" #: src/bare-metal/aps/inline-assembly.md #, fuzzy @@ -18751,19 +18380,19 @@ msgid "" "(If you actually want to do this, use the [`smccc`](https://crates.io/crates/" "smccc) crate which has wrappers for all these functions.)" msgstr "" -"(もし実際に電源を落とすプログラムを書きたい場合は、これらのすべての機能に対" -"するラッパーを提供している[`smccc`](https://crates.io/crates/smccc)を使うと良" -"いでしょう。)" +"(もし実際に電源を落とすプログラムを書きたい場合は、これらのすべての機能に対する" +"ラッパーを提供している[`smccc`](https://crates.io/crates/smccc)を使うと良いで" +"しょう。)" #: src/bare-metal/aps/inline-assembly.md msgid "" -"PSCI is the Arm Power State Coordination Interface, a standard set of " -"functions to manage system and CPU power states, among other things. It is " -"implemented by EL3 firmware and hypervisors on many systems." +"PSCI is the Arm Power State Coordination Interface, a standard set of functions " +"to manage system and CPU power states, among other things. It is implemented by " +"EL3 firmware and hypervisors on many systems." msgstr "" -"PSCI はArmのPower State Coordination Interfaceのことであり、これはシステムや" -"CPU電力状態管理の機能を含む標準的なセットです。これは多くのシステムでEL3" -"ファームウェアとハイパーバイザにより実装されています。" +"PSCI はArmのPower State Coordination Interfaceのことであり、これはシステムやCPU" +"電力状態管理の機能を含む標準的なセットです。これは多くのシステムでEL3ファーム" +"ウェアとハイパーバイザにより実装されています。" #: src/bare-metal/aps/inline-assembly.md msgid "" @@ -18772,10 +18401,10 @@ msgid "" "`inout` rather than `in` because the call could potentially clobber the " "contents of the registers." msgstr "" -"`0 => _` というシンタックスは、インラインアセンブリを実行する前にレジスタをゼ" -"ロで初期化し、実行後はその値は気にしないということを示しています。`in`ではな" -"く`inout`を使う必要があるのは、この実行でレジスタの値を上書きしてしまう可能性" -"があるからです。" +"`0 => _` というシンタックスは、インラインアセンブリを実行する前にレジスタをゼロ" +"で初期化し、実行後はその値は気にしないということを示しています。`in`ではなく" +"`inout`を使う必要があるのは、この実行でレジスタの値を上書きしてしまう可能性があ" +"るからです。" #: src/bare-metal/aps/inline-assembly.md #, fuzzy @@ -18795,19 +18424,19 @@ msgid "" "arguments passed to a function, so `entry.S` doesn't need to do anything " "special except make sure it doesn't change these registers." msgstr "" -"`_x0`–`_x3`はレジスタ`x0`–`x3`の値であり、慣習的にブートロードがデバイスツ" -"リーなどへのポインタを渡すのに利用されています。(`extern \"C\"`により指定さ" -"れた)aarch64 の関数コール規約ではレジスタ`x0`–`x7`は最初の8個の引数を関数に" -"渡すのに利用されることになっているため、`entry.S` はこれらの値を変更しないよ" -"うにする以外の特別なことをする必要はありません。" +"`_x0`–`_x3`はレジスタ`x0`–`x3`の値であり、慣習的にブートロードがデバイスツリーな" +"どへのポインタを渡すのに利用されています。(`extern \"C\"`により指定された)" +"aarch64 の関数コール規約ではレジスタ`x0`–`x7`は最初の8個の引数を関数に渡すのに" +"利用されることになっているため、`entry.S` はこれらの値を変更しないようにする以外" +"の特別なことをする必要はありません。" #: src/bare-metal/aps/inline-assembly.md msgid "" "Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/" "examples`." msgstr "" -"この例を`src/bare-metal/aps/examples`において`make qemu_psci`とすることでQEMU" -"により実行してみましょう。" +"この例を`src/bare-metal/aps/examples`において`make qemu_psci`とすることでQEMUに" +"より実行してみましょう。" #: src/bare-metal/aps/mmio.md msgid "Volatile memory access for MMIO" @@ -18816,13 +18445,12 @@ msgstr "MMIOに対するvolatileアクセス" #: src/bare-metal/aps/mmio.md #, fuzzy msgid "" -"Use [`pointer::read_volatile`](https://doc.rust-lang.org/stable/core/" -"primitive.pointer.html#method.read_volatile) and [`pointer::write_volatile`]" -"(https://doc.rust-lang.org/stable/core/primitive.pointer.html#method." -"write_volatile)." +"Use [`pointer::read_volatile`](https://doc.rust-lang.org/stable/core/primitive." +"pointer.html#method.read_volatile) and [`pointer::write_volatile`](https://doc." +"rust-lang.org/stable/core/primitive.pointer.html#method.write_volatile)." msgstr "" -"[`str`](https://doc.rust-lang.org/std/primitive.str.html) と [`String`]" -"(https://doc.rust-lang.org/std/string/struct.String.html)" +"[`str`](https://doc.rust-lang.org/std/primitive.str.html) と [`String`](https://" +"doc.rust-lang.org/std/string/struct.String.html)" #: src/bare-metal/aps/mmio.md msgid "Never hold a reference." @@ -18831,30 +18459,29 @@ msgstr "絶対に参照を保持してはいけません。" #: src/bare-metal/aps/mmio.md #, fuzzy msgid "" -"Use `&raw` to get fields of structs without creating an intermediate " -"reference." +"Use `&raw` to get fields of structs without creating an intermediate reference." msgstr "" -"`addr_of!`を用いると、中間的な参照を作らずに構造体のフィールドにアクセスする" -"ことができます。" +"`addr_of!`を用いると、中間的な参照を作らずに構造体のフィールドにアクセスすること" +"ができます。" #: src/bare-metal/aps/mmio.md msgid "" -"Volatile access: read or write operations may have side-effects, so prevent " -"the compiler or hardware from reordering, duplicating or eliding them." +"Volatile access: read or write operations may have side-effects, so prevent the " +"compiler or hardware from reordering, duplicating or eliding them." msgstr "" -"Volatileアクセス:MMIO領域に対するreadやwriteは副作用があることがあるので、コ" -"ンパイラやハードウェアが実行順序を変更したり、複製したり、省略したりできない" -"ようにするためのものです。" +"Volatileアクセス:MMIO領域に対するreadやwriteは副作用があることがあるので、コン" +"パイラやハードウェアが実行順序を変更したり、複製したり、省略したりできないように" +"するためのものです。" #: src/bare-metal/aps/mmio.md msgid "" -"Usually if you write and then read, e.g. via a mutable reference, the " -"compiler may assume that the value read is the same as the value just " -"written, and not bother actually reading memory." +"Usually if you write and then read, e.g. via a mutable reference, the compiler " +"may assume that the value read is the same as the value just written, and not " +"bother actually reading memory." msgstr "" -"通常は、例えばある可変参照に対してライトしリードすると、コンパイラはライトし" -"たのと同じ値がリードで読み出されると想定し、実際にメモリをリードする必要はな" -"いと判断します。" +"通常は、例えばある可変参照に対してライトしリードすると、コンパイラはライトしたの" +"と同じ値がリードで読み出されると想定し、実際にメモリをリードする必要はないと判断" +"します。" #: src/bare-metal/aps/mmio.md msgid "" @@ -18862,16 +18489,16 @@ msgid "" "this is unsound. Whenever a reference exist, the compiler may choose to " "dereference it." msgstr "" -"ハードウェアへのvolatileアクセスを行うための既存のクレートには参照を保持する" -"ものがありますが、これは健全ではありません。参照が存在する間はいつでもコンパ" -"イラがその参照を外して(MMIO領域にアクセスして)しまう可能性があります。" +"ハードウェアへのvolatileアクセスを行うための既存のクレートには参照を保持するもの" +"がありますが、これは健全ではありません。参照が存在する間はいつでもコンパイラがそ" +"の参照を外して(MMIO領域にアクセスして)しまう可能性があります。" #: src/bare-metal/aps/mmio.md #, fuzzy msgid "Use `&raw` to get struct field pointers from a pointer to the struct." msgstr "" -"構造体のポインタからそのフィールドへのポインタを得るには`addr_of!` マクロを" -"使ってください。" +"構造体のポインタからそのフィールドへのポインタを得るには`addr_of!` マクロを使っ" +"てください。" #: src/bare-metal/aps/mmio.md msgid "" @@ -18885,11 +18512,11 @@ msgstr "UARTドライバを書いてみましょう" #: src/bare-metal/aps/uart.md msgid "" -"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/" -"documentation/ddi0183/g) UART, so let's write a driver for that." +"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/documentation/" +"ddi0183/g) UART, so let's write a driver for that." msgstr "" -"QEMUの'virt' マシンには[PL011](https://developer.arm.com/documentation/" -"ddi0183/g)というUARTがあるので、それに対するドライバを書いてみましょう。" +"QEMUの'virt' マシンには[PL011](https://developer.arm.com/documentation/ddi0183/" +"g)というUARTがあるので、それに対するドライバを書いてみましょう。" #: src/bare-metal/aps/uart.md msgid "/// Minimal driver for a PL011 UART.\n" @@ -18902,8 +18529,7 @@ msgid "" " ///\n" " /// # Safety\n" " ///\n" -" /// The given base address must point to the 8 MMIO control registers of " -"a\n" +" /// The given base address must point to the 8 MMIO control registers of a\n" " /// PL011 device, which must be mapped into the address space of the " "process\n" " /// as device memory and not have any other aliases.\n" @@ -18913,8 +18539,8 @@ msgstr "" " ///\n" " /// # 安全性\n" " ///\n" -" /// 指定されたベースアドレスは PL011 デバイスの 8 つの MMIO 制御レジスタ" -"を指していなければなりません。\n" +" /// 指定されたベースアドレスは PL011 デバイスの 8 つの MMIO 制御レジスタを指" +"していなければなりません。\n" " /// これらはデバイスメモリとしてプロセスのアドレス空間に\n" " /// マッピングされ、他のエイリアスはありません。\n" @@ -18932,8 +18558,8 @@ msgid "" "// SAFETY: We know that the base address points to the control\n" " // registers of a PL011 device which is appropriately mapped.\n" msgstr "" -"// ベースアドレスが、適切にマッピングされた PL011 デバイスのコントロール レジ" -"スタを\n" +"// ベースアドレスが、適切にマッピングされた PL011 デバイスのコントロール レジス" +"タを\n" " // 指していることがわかっているため、安全です。\n" #: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md @@ -18948,36 +18574,36 @@ msgstr "// UART がビジーでなくなるまで待機します。\n" msgid "" "Note that `Uart::new` is unsafe while the other methods are safe. This is " "because as long as the caller of `Uart::new` guarantees that its safety " -"requirements are met (i.e. that there is only ever one instance of the " -"driver for a given UART, and nothing else aliasing its address space), then " -"it is always safe to call `write_byte` later because we can assume the " -"necessary preconditions." -msgstr "" -"`Uart::new`がアンセーフでその他のメソッドがセーフであるということに注目してく" -"ださい。これは、`Uart::new`の安全性要求が満たされている(すなわち特定のUARTに" -"対して一つしかドライバのインスタンスが存在せず、そのアドレス空間に対してエイ" -"リアスが全く存在しない)ことをその呼び出し元が保証する限り、それ以降は必要な" -"事前条件が満たされていると想定することができ`write_byte`を常に安全に呼び出す" -"ことができるようになることが理由です。" +"requirements are met (i.e. that there is only ever one instance of the driver " +"for a given UART, and nothing else aliasing its address space), then it is " +"always safe to call `write_byte` later because we can assume the necessary " +"preconditions." +msgstr "" +"`Uart::new`がアンセーフでその他のメソッドがセーフであるということに注目してくだ" +"さい。これは、`Uart::new`の安全性要求が満たされている(すなわち特定のUARTに対し" +"て一つしかドライバのインスタンスが存在せず、そのアドレス空間に対してエイリアスが" +"全く存在しない)ことをその呼び出し元が保証する限り、それ以降は必要な事前条件が満" +"たされていると想定することができ`write_byte`を常に安全に呼び出すことができるよう" +"になることが理由です。" #: src/bare-metal/aps/uart.md msgid "" -"We could have done it the other way around (making `new` safe but " -"`write_byte` unsafe), but that would be much less convenient to use as every " -"place that calls `write_byte` would need to reason about the safety" +"We could have done it the other way around (making `new` safe but `write_byte` " +"unsafe), but that would be much less convenient to use as every place that " +"calls `write_byte` would need to reason about the safety" msgstr "" -"逆に(`new`をセーフにして、`write_byte` をアンセーフに)することもできました" -"が、そうすると`write_byte`の全呼び出し箇所において安全性を考慮しなければなら" -"なくなり、利便性が低下します" +"逆に(`new`をセーフにして、`write_byte` をアンセーフに)することもできましたが、" +"そうすると`write_byte`の全呼び出し箇所において安全性を考慮しなければならなくな" +"り、利便性が低下します" #: src/bare-metal/aps/uart.md msgid "" -"This is a common pattern for writing safe wrappers of unsafe code: moving " -"the burden of proof for soundness from a large number of places to a smaller " -"number of places." +"This is a common pattern for writing safe wrappers of unsafe code: moving the " +"burden of proof for soundness from a large number of places to a smaller number " +"of places." msgstr "" -"これはアンセーフなコードに対してセーフなラッパーを構築する場合の共通パターン" -"です:健全性に関する証明に関する労力を多数の場所から少数の場所に集約します。" +"これはアンセーフなコードに対してセーフなラッパーを構築する場合の共通パターンで" +"す:健全性に関する証明に関する労力を多数の場所から少数の場所に集約します。" #: src/bare-metal/aps/uart/traits.md msgid "More traits" @@ -18985,11 +18611,11 @@ msgstr "他のトレイト" #: src/bare-metal/aps/uart/traits.md msgid "" -"We derived the `Debug` trait. It would be useful to implement a few more " -"traits too." +"We derived the `Debug` trait. It would be useful to implement a few more traits " +"too." msgstr "" -"ここでは`Debug`トレイトを導出しました。この他にもいくつかのトレイトを実装する" -"と良いでしょう。" +"ここでは`Debug`トレイトを導出しました。この他にもいくつかのトレイトを実装すると" +"良いでしょう。" #: src/bare-metal/aps/uart/traits.md #, fuzzy @@ -19005,16 +18631,16 @@ msgid "" "Implementing `Write` lets us use the `write!` and `writeln!` macros with our " "`Uart` type." msgstr "" -"`Write`を実装すると、`Uart` タイプに対して `write!`と`writeln!`マクロが利用で" -"きるようになります。" +"`Write`を実装すると、`Uart` タイプに対して `write!`と`writeln!`マクロが利用でき" +"るようになります。" #: src/bare-metal/aps/uart/traits.md msgid "" "Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/" "examples`." msgstr "" -"この例を`src/bare-metal/aps/examples`において`make qemu_minimal`とすること" -"で、QEMUにより実行してみましょう。" +"この例を`src/bare-metal/aps/examples`において`make qemu_minimal`とすることで、" +"QEMUにより実行してみましょう。" #: src/bare-metal/aps/better-uart.md msgid "A better UART driver" @@ -19024,15 +18650,15 @@ msgstr "UARTドライバの改善" msgid "" "The PL011 actually has [a bunch more registers](https://developer.arm.com/" "documentation/ddi0183/g/programmers-model/summary-of-registers), and adding " -"offsets to construct pointers to access them is error-prone and hard to " -"read. Plus, some of them are bit fields which would be nice to access in a " -"structured way." +"offsets to construct pointers to access them is error-prone and hard to read. " +"Plus, some of them are bit fields which would be nice to access in a structured " +"way." msgstr "" "実際のところPL011には[もっと多くのレジスタ](https://developer.arm.com/" -"documentation/ddi0183/g/programmers-model/summary-of-registers)があり、それら" -"にアクセスするためにオフセットを足してポインタを得ることは間違えになりやす" -"く、可読性を低下させます。さらに、いくつかはビットフィールドなので、構造化さ" -"れた方法でアクセスできたほうが良いでしょう。" +"documentation/ddi0183/g/programmers-model/summary-of-registers)があり、それらに" +"アクセスするためにオフセットを足してポインタを得ることは間違えになりやすく、可読" +"性を低下させます。さらに、いくつかはビットフィールドなので、構造化された方法でア" +"クセスできたほうが良いでしょう。" #: src/bare-metal/aps/better-uart.md msgid "Offset" @@ -19196,11 +18822,11 @@ msgstr "いくつかのIDレジスタは簡単化のための省略していま #: src/bare-metal/aps/better-uart/bitflags.md msgid "" -"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for " -"working with bitflags." +"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for working " +"with bitflags." msgstr "" -"[`bitflags`](https://crates.io/crates/bitflags) クレートはビットフラグを扱う" -"のに便利です。" +"[`bitflags`](https://crates.io/crates/bitflags) クレートはビットフラグを扱うのに" +"便利です。" #: src/bare-metal/aps/better-uart/bitflags.md msgid "/// Flags from the UART flag register.\n" @@ -19244,11 +18870,11 @@ msgstr "/// 着呼表示。\n" #: src/bare-metal/aps/better-uart/bitflags.md msgid "" -"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along " -"with a bunch of method implementations to get and set flags." +"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along with " +"a bunch of method implementations to get and set flags." msgstr "" -"`bitflags!`マクロは`Flags(u16)`のような新しいタイプを生成し、フラグを読み書き" -"するための多くのメソッド実装を一緒に提供します。" +"`bitflags!`マクロは`Flags(u16)`のような新しいタイプを生成し、フラグを読み書きす" +"るための多くのメソッド実装を一緒に提供します。" #: src/bare-metal/aps/better-uart/registers.md msgid "Multiple registers" @@ -19257,8 +18883,7 @@ msgstr "複数のレジスタ" #: src/bare-metal/aps/better-uart/registers.md msgid "" "We can use a struct to represent the memory layout of the UART's registers." -msgstr "" -"構造体を使ってUARTのレジスタのメモリレイアウトを表現することができます。" +msgstr "構造体を使ってUARTのレジスタのメモリレイアウトを表現することができます。" #: src/bare-metal/aps/better-uart/registers.md msgid "" @@ -19269,10 +18894,10 @@ msgid "" "(among other things) reorder fields however it sees fit." msgstr "" "[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-" -"representation) はコンパイラに対して、Cと同じ規則に従って構造体のフィールドを" -"定義されている順番で配置することを指示します。これは構造体のレイアウトを予測" -"可能にするために必要です。なぜならば、Rust標準の表現はコンパイラがフィールド" -"を好きなように並び替えること(他にも色々とありますが)を許しているからです。" +"representation) はコンパイラに対して、Cと同じ規則に従って構造体のフィールドを定" +"義されている順番で配置することを指示します。これは構造体のレイアウトを予測可能に" +"するために必要です。なぜならば、Rust標準の表現はコンパイラがフィールドを好きなよ" +"うに並び替えること(他にも色々とありますが)を許しているからです。" #: src/bare-metal/aps/better-uart/driver.md msgid "Now let's use the new `Registers` struct in our driver." @@ -19288,8 +18913,8 @@ msgid "" "// SAFETY: We know that self.registers points to the control registers\n" " // of a PL011 device which is appropriately mapped.\n" msgstr "" -"// self.registers が、適切にマッピングされた PL011 デバイスのコントロール レ" -"ジスタを\n" +"// self.registers が、適切にマッピングされた PL011 デバイスのコントロール レジス" +"タを\n" " // 指していることがわかっているため、安全です。\n" #: src/bare-metal/aps/better-uart/driver.md @@ -19306,8 +18931,8 @@ msgid "" "// SAFETY: We know that self.registers points to the control\n" " // registers of a PL011 device which is appropriately mapped.\n" msgstr "" -"// self.registers が、適切にマッピングされた PL011 デバイスのコントロール レ" -"ジスタを\n" +"// self.registers が、適切にマッピングされた PL011 デバイスのコントロール レジス" +"タを\n" " // 指していることがわかっているため、安全です。\n" #: src/bare-metal/aps/better-uart/driver.md @@ -19317,12 +18942,12 @@ msgstr "// TODO: ビット 8~11 でエラー状態をチェックします。\ #: src/bare-metal/aps/better-uart/driver.md #, fuzzy msgid "" -"Note the use of `&raw const` / `&raw mut` to get pointers to individual " -"fields without creating an intermediate reference, which would be unsound." +"Note the use of `&raw const` / `&raw mut` to get pointers to individual fields " +"without creating an intermediate reference, which would be unsound." msgstr "" -"`addr_of!`と`addr_of_mut!` を使用して個々のフィールドに対するポインタを取得す" -"ることで、不健全となってしまう中間的な参照を作らずに済んでいることに注目して" -"ください。" +"`addr_of!`と`addr_of_mut!` を使用して個々のフィールドに対するポインタを取得する" +"ことで、不健全となってしまう中間的な参照を作らずに済んでいることに注目してくださ" +"い。" #: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md msgid "Using it" @@ -19333,8 +18958,8 @@ msgid "" "Let's write a small program using our driver to write to the serial console, " "and echo incoming bytes." msgstr "" -"我々のドライバを使って、シリアルコンソールにライトし、そして入力されたバイト" -"をエコーする小さなプログラムを書いてみましょう。" +"我々のドライバを使って、シリアルコンソールにライトし、そして入力されたバイトをエ" +"コーする小さなプログラムを書いてみましょう。" #: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md #: src/exercises/bare-metal/solutions-afternoon.md @@ -19379,25 +19004,24 @@ msgid "" "function is called from our entry point code in `entry.S`. See the speaker " "notes there for details." msgstr "" -"[インラインアセンブリ](../inline-assembly.md) の例と同じように、この`main`関" -"数は`entry.S`におけるエントリポイントから呼び出されます。詳細はそちらの" -"speaker notesを参照してください。" +"[インラインアセンブリ](../inline-assembly.md) の例と同じように、この`main`関数は" +"`entry.S`におけるエントリポイントから呼び出されます。詳細はそちらのspeaker notes" +"を参照してください。" #: src/bare-metal/aps/better-uart/using.md msgid "" "Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`." msgstr "" -"この例を`src/bare-metal/aps/examples`において`make qemu`とすることでQEMUによ" -"り実行してみましょう。" +"この例を`src/bare-metal/aps/examples`において`make qemu`とすることでQEMUにより実" +"行してみましょう。" #: src/bare-metal/aps/logging.md msgid "" -"It would be nice to be able to use the logging macros from the [`log`]" -"(https://crates.io/crates/log) crate. We can do this by implementing the " -"`Log` trait." +"It would be nice to be able to use the logging macros from the [`log`](https://" +"crates.io/crates/log) crate. We can do this by implementing the `Log` trait." msgstr "" -"[`log`](https://crates.io/crates/log) クレートが提供するログ用マクロを使える" -"と良いでしょう。これは`Log`トレイトを実装することで可能になります。" +"[`log`](https://crates.io/crates/log) クレートが提供するログ用マクロを使えると良" +"いでしょう。これは`Log`トレイトを実装することで可能になります。" #: src/bare-metal/aps/logging.md msgid "\"[{}] {}\"" @@ -19412,8 +19036,8 @@ msgid "" "The unwrap in `log` is safe because we initialise `LOGGER` before calling " "`set_logger`." msgstr "" -"`LOGGER` を`set_logger`を呼び出す前に初期化しているので、log` におけるunwrap" -"はセーフです。" +"`LOGGER` を`set_logger`を呼び出す前に初期化しているので、log` におけるunwrapは" +"セーフです。" #: src/bare-metal/aps/logging/using.md msgid "We need to initialise the logger before we use it." @@ -19427,67 +19051,66 @@ msgstr "\"{info}\"" #: src/bare-metal/aps/logging/using.md msgid "Note that our panic handler can now log details of panics." msgstr "" -"我々のパニックハンドラがパニックの詳細についてログ出力できるようになったこと" -"に注目してください。" +"我々のパニックハンドラがパニックの詳細についてログ出力できるようになったことに注" +"目してください。" #: src/bare-metal/aps/logging/using.md msgid "" "Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/" "examples`." msgstr "" -"この例を`src/bare-metal/aps/examples`において`make qemu_logger`とすることで" -"QEMUにより実行してみましょう。" +"この例を`src/bare-metal/aps/examples`において`make qemu_logger`とすることでQEMU" +"により実行してみましょう。" #: src/bare-metal/aps/exceptions.md msgid "" "AArch64 defines an exception vector table with 16 entries, for 4 types of " -"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with " -"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). " -"We implement this in assembly to save volatile registers to the stack before " +"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with SP0, " +"current EL with SPx, lower EL using AArch64, lower EL using AArch32). We " +"implement this in assembly to save volatile registers to the stack before " "calling into Rust code:" msgstr "" "AArch64は16エントリを持つ例外ベクターテーブルを定義しており、これらは4つのス" "テート(現在のELでSP0利用、現在のELでSPx利用、低位のELでAArch64、低位のELで" -"AArch32)における4つのタイプの例外(同期、IRQ、FIQ、SError)に対応します。こ" -"こではRustコードの呼び出し前に揮発レジスタの値をスタックに退避するためにベク" -"ターテーブルをアセンブリ言語で実装しています:" +"AArch32)における4つのタイプの例外(同期、IRQ、FIQ、SError)に対応します。ここ" +"ではRustコードの呼び出し前に揮発レジスタの値をスタックに退避するためにベクター" +"テーブルをアセンブリ言語で実装しています:" #: src/bare-metal/aps/exceptions.md msgid "EL is exception level; all our examples this afternoon run in EL1." -msgstr "" -"ELは例外レベルです。本日の午後に扱ったすべての例はEL1で実行されています。" +msgstr "ELは例外レベルです。本日の午後に扱ったすべての例はEL1で実行されています。" #: src/bare-metal/aps/exceptions.md msgid "" -"For simplicity we aren't distinguishing between SP0 and SPx for the current " -"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions." +"For simplicity we aren't distinguishing between SP0 and SPx for the current EL " +"exceptions, or between AArch32 and AArch64 for the lower EL exceptions." msgstr "" -"簡単化のために、ここでは現在のEL例外におけるSP0とSPxの違い、低位のELレベルに" -"おけるAArch32とAArch64の違いを区別していません。" +"簡単化のために、ここでは現在のEL例外におけるSP0とSPxの違い、低位のELレベルにお" +"けるAArch32とAArch64の違いを区別していません。" #: src/bare-metal/aps/exceptions.md msgid "" -"For this example we just log the exception and power down, as we don't " -"expect any of them to actually happen." +"For this example we just log the exception and power down, as we don't expect " +"any of them to actually happen." msgstr "" -"ここではこれらの例外が発生しないはずなので、ただ例外に関するログを出力し、電" -"源を落としています。" +"ここではこれらの例外が発生しないはずなので、ただ例外に関するログを出力し、電源を" +"落としています。" #: src/bare-metal/aps/exceptions.md msgid "" -"We can think of exception handlers and our main execution context more or " -"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync." -"md) will control what we can share between them, just like with threads. For " -"example, if we want to share some value between exception handlers and the " -"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap " -"it in something like a `Mutex` and put it in a static." +"We can think of exception handlers and our main execution context more or less " +"like different threads. [`Send` and `Sync`](../../concurrency/send-sync.md) " +"will control what we can share between them, just like with threads. For " +"example, if we want to share some value between exception handlers and the rest " +"of the program, and it's `Send` but not `Sync`, then we'll need to wrap it in " +"something like a `Mutex` and put it in a static." msgstr "" -"例外ハンドラとメインの実行コンテキストは異なるスレッドのようなものだと考える" -"ことができます。ちょうどスレッド間の共有と同じように、[`Send`と`Sync`](../../" -"concurrency/send-sync.md)により何を共有するかを制御することができます。例え" -"ば、例外ハンドラとプログラムの他のコンテキストでとある値を共有したい場合に、" -"もしそれが `Send`であり`Sync`でなければ、`Mutex` のようなものでラップして、" -"staticに定義しなければなりません。" +"例外ハンドラとメインの実行コンテキストは異なるスレッドのようなものだと考えること" +"ができます。ちょうどスレッド間の共有と同じように、[`Send`と`Sync`](../../" +"concurrency/send-sync.md)により何を共有するかを制御することができます。例えば、" +"例外ハンドラとプログラムの他のコンテキストでとある値を共有したい場合に、もしそれ" +"が `Send`であり`Sync`でなければ、`Mutex` のようなものでラップして、staticに定義" +"しなければなりません。" #: src/bare-metal/aps/other-projects.md msgid "[oreboot](https://github.com/oreboot/oreboot)" @@ -19520,16 +19143,16 @@ msgid "" "Initialisation, UART driver, simple bootloader, JTAG, exception levels, " "exception handling, page tables." msgstr "" -"初期化、UARTドライバ、単純なブートローダ、JTAG、例外レベル、例外ハンドラ、" -"ページテーブル" +"初期化、UARTドライバ、単純なブートローダ、JTAG、例外レベル、例外ハンドラ、ページ" +"テーブル" #: src/bare-metal/aps/other-projects.md msgid "" "Some dodginess around cache maintenance and initialisation in Rust, not " "necessarily a good example to copy for production code." msgstr "" -"キャッシュメンテナンスとRustの初期化に関してちょっと疑わしいところがあるの" -"で、製品コードで真似するには必ずしも良い例ではありません。" +"キャッシュメンテナンスとRustの初期化に関してちょっと疑わしいところがあるので、製" +"品コードで真似するには必ずしも良い例ではありません。" #: src/bare-metal/aps/other-projects.md msgid "[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)" @@ -19544,9 +19167,9 @@ msgid "" "The RaspberryPi OS tutorial runs Rust code before the MMU and caches are " "enabled. This will read and write memory (e.g. the stack). However:" msgstr "" -"RaspberryPi OS チュートリアルはMMUやキャッシュを有効化する前にRustコードを実" -"行しています。これにより、例えばスタックメモリをreadしたりwriteしたりすること" -"になります。しかし:" +"RaspberryPi OS チュートリアルはMMUやキャッシュを有効化する前にRustコードを実行し" +"ています。これにより、例えばスタックメモリをreadしたりwriteしたりすることになり" +"ます。しかし:" #: src/bare-metal/aps/other-projects.md msgid "" @@ -19555,11 +19178,11 @@ msgid "" "generating unaligned accesses so it should be alright, but this is not " "necessarily the case in general." msgstr "" -"MMUとキャッシュを有効化していないと、アラインされていないアクセスはフォールト" -"を引き起こします。そのチュートリアルでは、コンパイラがアラインされていないア" -"クセスを生成しない`+strict-align`オプションをセットする`aarch64-unknown-none`" -"をターゲットとしてビルドしているので大丈夫なはずですが、一般的には大丈夫とは" -"限りません。" +"MMUとキャッシュを有効化していないと、アラインされていないアクセスはフォールトを" +"引き起こします。そのチュートリアルでは、コンパイラがアラインされていないアクセス" +"を生成しない`+strict-align`オプションをセットする`aarch64-unknown-none`をター" +"ゲットとしてビルドしているので大丈夫なはずですが、一般的には大丈夫とは限りませ" +"ん。" #: src/bare-metal/aps/other-projects.md msgid "" @@ -19571,14 +19194,13 @@ msgid "" "alright in this particular case (running directly on the hardware with no " "hypervisor), but isn't a good pattern in general." msgstr "" -"もしVM上で実行していたとすると、キャッシュコヒーレンシーの問題を起こすことが" -"あります。問題なのはVMがキャッシュを無効化したまま直接メモリにアクセスしてい" -"るのに対し、ホストは同じメモリに対してキャッシュ可能なエイリアスを持ってしま" -"うということです。ホストが仮に明示的にメモリにアクセスしないとしても、投機的" -"なアクセスによりキャッシュフィルが起きることがあり、そうなるとVMかホストのど" -"ちらかによる変更が失われてしまいます。この(ハイパーバイザなしで直接ハード" -"ウェアで実行する)場合には問題にはなりませんが、一般的には良くないパターンで" -"す。" +"もしVM上で実行していたとすると、キャッシュコヒーレンシーの問題を起こすことがあり" +"ます。問題なのはVMがキャッシュを無効化したまま直接メモリにアクセスしているのに対" +"し、ホストは同じメモリに対してキャッシュ可能なエイリアスを持ってしまうということ" +"です。ホストが仮に明示的にメモリにアクセスしないとしても、投機的なアクセスにより" +"キャッシュフィルが起きることがあり、そうなるとVMかホストのどちらかによる変更が失" +"われてしまいます。この(ハイパーバイザなしで直接ハードウェアで実行する)場合には" +"問題にはなりませんが、一般的には良くないパターンです。" #: src/bare-metal/useful-crates.md msgid "Useful crates" @@ -19589,32 +19211,31 @@ msgid "" "We'll go over a few crates which solve some common problems in bare-metal " "programming." msgstr "" -"ベアメタルプログラミングにおいて共通に発生する問題に対する解を与えるクレート" -"についていくつか紹介します。" +"ベアメタルプログラミングにおいて共通に発生する問題に対する解を与えるクレートにつ" +"いていくつか紹介します。" #: src/bare-metal/useful-crates/zerocopy.md msgid "" "The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides " -"traits and macros for safely converting between byte sequences and other " -"types." +"traits and macros for safely converting between byte sequences and other types." msgstr "" -"(Fuchsiaの)[`zerocopy`](https://docs.rs/zerocopy/)クレートはバイトシーケン" -"スとその他の型の変換を安全に行うためのトレイトやマクロを提供します。" +"(Fuchsiaの)[`zerocopy`](https://docs.rs/zerocopy/)クレートはバイトシーケンスと" +"その他の型の変換を安全に行うためのトレイトやマクロを提供します。" #: src/bare-metal/useful-crates/zerocopy.md msgid "" "This is not suitable for MMIO (as it doesn't use volatile reads and writes), " -"but can be useful for working with structures shared with hardware e.g. by " -"DMA, or sent over some external interface." +"but can be useful for working with structures shared with hardware e.g. by DMA, " +"or sent over some external interface." msgstr "" -"これは(volatile read、writeを使用していないため)MMIOには適してませんが、例" -"えばDMAのようなハードウェアと共有するデータ構造あるいは外部インタフェースを通" -"して送信するデータ構造を扱うに場合には有用です。" +"これは(volatile read、writeを使用していないため)MMIOには適してませんが、例えば" +"DMAのようなハードウェアと共有するデータ構造あるいは外部インタフェースを通して送" +"信するデータ構造を扱うに場合には有用です。" #: src/bare-metal/useful-crates/zerocopy.md msgid "" -"`FromBytes` can be implemented for types for which any byte pattern is " -"valid, and so can safely be converted from an untrusted sequence of bytes." +"`FromBytes` can be implemented for types for which any byte pattern is valid, " +"and so can safely be converted from an untrusted sequence of bytes." msgstr "" "`FromBytes`はいかなるバイトパターンも有効な値となる型に対して実装することがで" "き、信用できないバイトシーケンスからの安全な変換を可能にします。" @@ -19622,38 +19243,35 @@ msgstr "" #: src/bare-metal/useful-crates/zerocopy.md msgid "" "Attempting to derive `FromBytes` for these types would fail, because " -"`RequestType` doesn't use all possible u32 values as discriminants, so not " -"all byte patterns are valid." +"`RequestType` doesn't use all possible u32 values as discriminants, so not all " +"byte patterns are valid." msgstr "" -"`RequestType`はu32型のすべての値を有効なenum値として定義していないので、すべ" -"てのバイトパターンが有効とはならず、これらに対する`FromBytes`の導出はフェール" -"するでしょう。" +"`RequestType`はu32型のすべての値を有効なenum値として定義していないので、すべての" +"バイトパターンが有効とはならず、これらに対する`FromBytes`の導出はフェールするで" +"しょう。" #: src/bare-metal/useful-crates/zerocopy.md -msgid "" -"`zerocopy::byteorder` has types for byte-order aware numeric primitives." +msgid "`zerocopy::byteorder` has types for byte-order aware numeric primitives." msgstr "" -"`zerocopy::byteorder`はバイトオーダを気にする数値プリミティブに関する型を提供" -"します。" +"`zerocopy::byteorder`はバイトオーダを気にする数値プリミティブに関する型を提供し" +"ます。" #: src/bare-metal/useful-crates/zerocopy.md msgid "" -"Run the example with `cargo run` under `src/bare-metal/useful-crates/" -"zerocopy-example/`. (It won't run in the Playground because of the crate " -"dependency.)" +"Run the example with `cargo run` under `src/bare-metal/useful-crates/zerocopy-" +"example/`. (It won't run in the Playground because of the crate dependency.)" msgstr "" -"この例を`src/bare-metal/useful-crates/zerocopy-example/`において`cargo run`と" -"とすることで実行してみましょう。(Playgroundではこの例が依存するクレートを利" -"用できないため実行できません)" +"この例を`src/bare-metal/useful-crates/zerocopy-example/`において`cargo run`とと" +"することで実行してみましょう。(Playgroundではこの例が依存するクレートを利用でき" +"ないため実行できません)" #: src/bare-metal/useful-crates/aarch64-paging.md msgid "" -"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets " -"you create page tables according to the AArch64 Virtual Memory System " -"Architecture." +"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets you " +"create page tables according to the AArch64 Virtual Memory System Architecture." msgstr "" -"[`aarch64-paging`](https://crates.io/crates/aarch64-paging)クレートはAArch64" -"仮想メモリシステムアーキテクチャに則ったページテーブルの生成を可能にします。" +"[`aarch64-paging`](https://crates.io/crates/aarch64-paging)クレートはAArch64仮想" +"メモリシステムアーキテクチャに則ったページテーブルの生成を可能にします。" #: src/bare-metal/useful-crates/aarch64-paging.md msgid "// Create a new page table with identity mapping.\n" @@ -19669,48 +19287,47 @@ msgstr "// `TTBR0_EL1` を設定してページテーブルを有効にします #: src/bare-metal/useful-crates/aarch64-paging.md msgid "" -"For now it only supports EL1, but support for other exception levels should " -"be straightforward to add." +"For now it only supports EL1, but support for other exception levels should be " +"straightforward to add." msgstr "" -"現時点ではEL1しかサポートされていませんが、他の例外レベルのサポートも簡単に追" -"加できるはずです。" +"現時点ではEL1しかサポートされていませんが、他の例外レベルのサポートも簡単に追加" +"できるはずです。" #: src/bare-metal/useful-crates/aarch64-paging.md msgid "" -"This is used in Android for the [Protected VM Firmware](https://cs.android." -"com/android/platform/superproject/+/master:packages/modules/Virtualization/" -"pvmfw/)." +"This is used in Android for the [Protected VM Firmware](https://cs.android.com/" +"android/platform/superproject/+/master:packages/modules/Virtualization/pvmfw/)." msgstr "" -"これはAndroidで[Protected VM Firmware](https://cs.android.com/android/" -"platform/superproject/+/master:packages/modules/Virtualization/pvmfw/)のため" -"に利用されています。" +"これはAndroidで[Protected VM Firmware](https://cs.android.com/android/platform/" +"superproject/+/master:packages/modules/Virtualization/pvmfw/)のために利用されて" +"います。" #: src/bare-metal/useful-crates/aarch64-paging.md msgid "" -"There's no easy way to run this example, as it needs to run on real hardware " -"or under QEMU." +"There's no easy way to run this example, as it needs to run on real hardware or " +"under QEMU." msgstr "" "この例は本物のハードウェアかQEMUを必要とするので、簡単には実行できません。" #: src/bare-metal/useful-crates/buddy_system_allocator.md msgid "" -"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) " -"is a third-party crate implementing a basic buddy system allocator. It can " -"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/" +"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) is " +"a third-party crate implementing a basic buddy system allocator. It can be used " +"both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/" "buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]" "(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use " -"the standard `alloc` crate (as we saw [before](../alloc.md)), or for " -"allocating other address space. For example, we might want to allocate MMIO " -"space for PCI BARs:" -msgstr "" -"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) " -"はサードパーティのクレートで、基本的なバディシステムアローケータを実装してい" -"ます。このクレートは[`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/" -"trait.GlobalAlloc.html) を実装する [`LockedHeap`](https://docs.rs/" -"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html) " -"により( [以前](../alloc.md)見たように)標準の`alloc` クレートを利用可能にす" -"るために使えますし、別のアドレス空間をアロケートするためにも使えます。例え" -"ば、PCI BARに対するMMIO領域をアロケートしたい場合には以下のようにできます:" +"the standard `alloc` crate (as we saw [before](../alloc.md)), or for allocating " +"other address space. For example, we might want to allocate MMIO space for PCI " +"BARs:" +msgstr "" +"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) は" +"サードパーティのクレートで、基本的なバディシステムアローケータを実装しています。" +"このクレートは[`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/trait." +"GlobalAlloc.html) を実装する [`LockedHeap`](https://docs.rs/" +"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html) によ" +"り( [以前](../alloc.md)見たように)標準の`alloc` クレートを利用可能にするために" +"使えますし、別のアドレス空間をアロケートするためにも使えます。例えば、PCI BARに" +"対するMMIO領域をアロケートしたい場合には以下のようにできます:" #: src/bare-metal/useful-crates/buddy_system_allocator.md msgid "PCI BARs always have alignment equal to their size." @@ -19718,42 +19335,40 @@ msgstr "PCI BARは常にサイズと同じアラインになります。" #: src/bare-metal/useful-crates/buddy_system_allocator.md msgid "" -"Run the example with `cargo run` under `src/bare-metal/useful-crates/" -"allocator-example/`. (It won't run in the Playground because of the crate " -"dependency.)" +"Run the example with `cargo run` under `src/bare-metal/useful-crates/allocator-" +"example/`. (It won't run in the Playground because of the crate dependency.)" msgstr "" -"この例を`src/bare-metal/useful-crates/allocator-example/`において `cargo run`" -"とすることで実行してみましょう。(Playgroundではこの例が依存するクレートを利" -"用できないため実行できません)" +"この例を`src/bare-metal/useful-crates/allocator-example/`において `cargo run`と" +"することで実行してみましょう。(Playgroundではこの例が依存するクレートを利用でき" +"ないため実行できません)" #: src/bare-metal/useful-crates/tinyvec.md msgid "" "Sometimes you want something which can be resized like a `Vec`, but without " -"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides " -"this: a vector backed by an array or slice, which could be statically " -"allocated or on the stack, which keeps track of how many elements are used " -"and panics if you try to use more than are allocated." +"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides this: a " +"vector backed by an array or slice, which could be statically allocated or on " +"the stack, which keeps track of how many elements are used and panics if you " +"try to use more than are allocated." msgstr "" -"時には`Vec`のようにリサイズできる領域をヒープを使わずに確保したいと思うことが" -"あります。[`tinyvec`](https://crates.io/crates/tinyvec)は静的に確保、またはス" -"タック上に確保した配列またはスライスを割当領域とするベクタを提供します。この" -"実装では、いくつの要素が使われているかが管理され、確保された以上に使おうとす" -"るとパニックします。" +"時には`Vec`のようにリサイズできる領域をヒープを使わずに確保したいと思うことがあ" +"ります。[`tinyvec`](https://crates.io/crates/tinyvec)は静的に確保、またはスタッ" +"ク上に確保した配列またはスライスを割当領域とするベクタを提供します。この実装で" +"は、いくつの要素が使われているかが管理され、確保された以上に使おうとするとパニッ" +"クします。" #: src/bare-metal/useful-crates/tinyvec.md msgid "" -"`tinyvec` requires that the element type implement `Default` for " -"initialisation." +"`tinyvec` requires that the element type implement `Default` for initialisation." msgstr "" -"`tinyvec` は初期化のために要素となるタイプが`Default`を実装することを必要とし" -"ます。" +"`tinyvec` は初期化のために要素となるタイプが`Default`を実装することを必要としま" +"す。" #: src/bare-metal/useful-crates/tinyvec.md msgid "" "The Rust Playground includes `tinyvec`, so this example will run fine inline." msgstr "" -"Rust Playgroundは`tinyvec`を内包しているので、オンラインでこの例を実行するこ" -"とができます。" +"Rust Playgroundは`tinyvec`を内包しているので、オンラインでこの例を実行することが" +"できます。" #: src/bare-metal/useful-crates/spin.md msgid "" @@ -19761,23 +19376,23 @@ msgid "" "are not available in `core` or `alloc`. How can we manage synchronisation or " "interior mutability, such as for sharing state between different CPUs?" msgstr "" -"`std::sync`が提供する`std::sync::Mutex` とその他の同期プリミティブは`core`ま" -"たは`alloc`では利用できません。となると、例えば異なるCPU間での状態共有のため" -"の、同期や内部可変性はどのように実現したら良いのでしょうか?" +"`std::sync`が提供する`std::sync::Mutex` とその他の同期プリミティブは`core`または" +"`alloc`では利用できません。となると、例えば異なるCPU間での状態共有のための、同期" +"や内部可変性はどのように実現したら良いのでしょうか?" #: src/bare-metal/useful-crates/spin.md msgid "" "The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based " "equivalents of many of these primitives." msgstr "" -"[`spin`](https://crates.io/crates/spin) クレートはこれらの多くのプリミティブ" -"と等価なスピンロックベースのものを提供します。" +"[`spin`](https://crates.io/crates/spin) クレートはこれらの多くのプリミティブと等" +"価なスピンロックベースのものを提供します。" #: src/bare-metal/useful-crates/spin.md msgid "Be careful to avoid deadlock if you take locks in interrupt handlers." msgstr "" -"割り込みハンドラでロックを取得する場合にはデッドロックを引き起こさないように" -"気をつけてください。" +"割り込みハンドラでロックを取得する場合にはデッドロックを引き起こさないように気を" +"つけてください。" #: src/bare-metal/useful-crates/spin.md #, fuzzy @@ -19785,9 +19400,9 @@ msgid "" "`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, " "`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation." msgstr "" -"`spin` はチケットロックのミューテックス実装も持っています。これは`std::sync`" -"における`RwLock`, `Barrier`、`Once` と等価であり、またレイジー初期化の観点で" -"は`Lazy`と等価なものです。" +"`spin` はチケットロックのミューテックス実装も持っています。これは`std::sync`にお" +"ける`RwLock`, `Barrier`、`Once` と等価であり、またレイジー初期化の観点では`Lazy`" +"と等価なものです。" #: src/bare-metal/useful-crates/spin.md msgid "" @@ -19795,27 +19410,25 @@ msgid "" "useful types for late initialisation with a slightly different approach to " "`spin::once::Once`." msgstr "" -"[`once_cell`](https://crates.io/crates/once_cell) クレートも`spin::once::" -"Once`とは少し異なるアプローチの遅延初期化のための有用な型をいくつか持っていま" -"す。" +"[`once_cell`](https://crates.io/crates/once_cell) クレートも`spin::once::Once`と" +"は少し異なるアプローチの遅延初期化のための有用な型をいくつか持っています。" #: src/bare-metal/useful-crates/spin.md -msgid "" -"The Rust Playground includes `spin`, so this example will run fine inline." +msgid "The Rust Playground includes `spin`, so this example will run fine inline." msgstr "" "Rust Playgroundは`spin`を内包しているので、この例はオンラインで実行できます。" #: src/bare-metal/android.md msgid "" -"To build a bare-metal Rust binary in AOSP, you need to use a " -"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` " -"with a linker script to produce the binary itself, and then a `raw_binary` " -"to convert the ELF to a raw binary ready to be run." +"To build a bare-metal Rust binary in AOSP, you need to use a `rust_ffi_static` " +"Soong rule to build your Rust code, then a `cc_binary` with a linker script to " +"produce the binary itself, and then a `raw_binary` to convert the ELF to a raw " +"binary ready to be run." msgstr "" -"AOSPにおいてベアメタルRustバイナリをビルドするためには、Rustコードをビルドす" -"るための`rust_ffi_static`というSoongルール、リンカスクリプトとそれを使ってバ" -"イナリを生成するための`cc_binary`というルール、さらにELFを実行可能な形式の生" -"バイナリに変換する`raw_binary`というルールが必要です。" +"AOSPにおいてベアメタルRustバイナリをビルドするためには、Rustコードをビルドするた" +"めの`rust_ffi_static`というSoongルール、リンカスクリプトとそれを使ってバイナリを" +"生成するための`cc_binary`というルール、さらにELFを実行可能な形式の生バイナリに変" +"換する`raw_binary`というルールが必要です。" #: src/bare-metal/android/vmbase.md msgid "vmbase" @@ -19826,29 +19439,29 @@ msgstr "vmbase" msgid "" "For VMs running under crosvm on aarch64, the [vmbase](https://android." "googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/" -"libs/libvmbase/) library provides a linker script and useful defaults for " -"the build rules, along with an entry point, UART console logging and more." +"libs/libvmbase/) library provides a linker script and useful defaults for the " +"build rules, along with an entry point, UART console logging and more." msgstr "" "[vmbase](https://android.googlesource.com/platform/packages/modules/" -"Virtualization/+/refs/heads/master/vmbase/)というライブラリは、aarch64上の" -"crosvm下で実行されるVMに対して、エントリポイント、UARTコンソールロギングなど" -"に加えて、リンカスクリプトと有用なデフォルトビルドルールを提供してくれます。" +"Virtualization/+/refs/heads/master/vmbase/)というライブラリは、aarch64上のcrosvm" +"下で実行されるVMに対して、エントリポイント、UARTコンソールロギングなどに加えて、" +"リンカスクリプトと有用なデフォルトビルドルールを提供してくれます。" #: src/bare-metal/android/vmbase.md msgid "" "The `main!` macro marks your main function, to be called from the `vmbase` " "entry point." msgstr "" -"`main!`というマクロはメイン関数を指定するもので、指定された関数は`vmbase`のエ" -"ントリポイントから呼び出されることになります。" +"`main!`というマクロはメイン関数を指定するもので、指定された関数は`vmbase`のエン" +"トリポイントから呼び出されることになります。" #: src/bare-metal/android/vmbase.md msgid "" "The `vmbase` entry point handles console initialisation, and issues a " "PSCI_SYSTEM_OFF to shutdown the VM if your main function returns." msgstr "" -"`vmbase`のエントリポイントはコンソールの初期化を行い、メイン関数がリターンし" -"た場合にはPSCI_SYSTEM_OFF を発行しVMをシャットダウンします。" +"`vmbase`のエントリポイントはコンソールの初期化を行い、メイン関数がリターンした場" +"合にはPSCI_SYSTEM_OFF を発行しVMをシャットダウンします。" #: src/exercises/bare-metal/afternoon.md msgid "We will write a driver for the PL031 real-time clock device." @@ -19859,23 +19472,22 @@ msgid "" "After looking at the exercises, you can look at the [solutions](solutions-" "afternoon.md) provided." msgstr "" -"演習の終了後は、提供されている [ソリューション](solutions-afternoon.md) を確" -"認してください。" +"演習の終了後は、提供されている [ソリューション](solutions-afternoon.md) を確認し" +"てください。" -#: src/exercises/bare-metal/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/rtc.md src/exercises/bare-metal/solutions-afternoon.md msgid "RTC driver" msgstr "RTC ドライバ" #: src/exercises/bare-metal/rtc.md msgid "" "The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/" -"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, " -"you should write a driver for it." +"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, you " +"should write a driver for it." msgstr "" "QEMU aarch64 virt マシンの 0x9010000 には、[PL031](https://developer.arm.com/" -"documentation/ddi0224/c) リアルタイム クロックが搭載されています。この演習で" -"は、そのドライバを作成する必要があります。" +"documentation/ddi0224/c) リアルタイム クロックが搭載されています。この演習では、" +"そのドライバを作成する必要があります。" #: src/exercises/bare-metal/rtc.md msgid "" @@ -19888,36 +19500,36 @@ msgstr "" #: src/exercises/bare-metal/rtc.md msgid "" "Use the match register and raw interrupt status to busy-wait until a given " -"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://" -"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)" +"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://doc." +"rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)" msgstr "" -"一致レジスタと未加工の割り込みステータスを使用して、指定時刻(たとえば 3 秒" -"後)までビジーウェイトします(ループ内で [`core::hint::spin_loop`](https://" -"doc.rust-lang.org/core/hint/fn.spin_loop.html) を呼び出します)。" +"一致レジスタと未加工の割り込みステータスを使用して、指定時刻(たとえば 3 秒後)" +"までビジーウェイトします(ループ内で [`core::hint::spin_loop`](https://doc.rust-" +"lang.org/core/hint/fn.spin_loop.html) を呼び出します)。" #: src/exercises/bare-metal/rtc.md msgid "" -"_Extension if you have time:_ Enable and handle the interrupt generated by " -"the RTC match. You can use the driver provided in the [`arm-gic`](https://" -"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller." +"_Extension if you have time:_ Enable and handle the interrupt generated by the " +"RTC match. You can use the driver provided in the [`arm-gic`](https://docs.rs/" +"arm-gic/) crate to configure the Arm Generic Interrupt Controller." msgstr "" -"時間がある場合は、RTC の一致によって生成された割り込みを有効にして処理しま" -"す。[`arm-gic`](https://docs.rs/arm-gic/) クレートで提供されているドライバを" -"使用して、Arm 汎用割り込みコントローラを設定して構いません。" +"時間がある場合は、RTC の一致によって生成された割り込みを有効にして処理します。" +"[`arm-gic`](https://docs.rs/arm-gic/) クレートで提供されているドライバを使用し" +"て、Arm 汎用割り込みコントローラを設定して構いません。" #: src/exercises/bare-metal/rtc.md msgid "Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`." msgstr "" -"RTC 割り込みを使用します。この割り込みは GIC に `IntId::spi(2)` として接続さ" -"れています。" +"RTC 割り込みを使用します。この割り込みは GIC に `IntId::spi(2)` として接続されて" +"います。" #: src/exercises/bare-metal/rtc.md msgid "" "Once the interrupt is enabled, you can put the core to sleep via `arm_gic::" "wfi()`, which will cause the core to sleep until it receives an interrupt." msgstr "" -"割り込みを有効にすると、`arm_gic::wfi()` を使用してコアをスリープさせることが" -"できます。これにより、コアは割り込みを受けるまでスリープ状態になります。" +"割り込みを有効にすると、`arm_gic::wfi()` を使用してコアをスリープさせることがで" +"きます。これにより、コアは割り込みを受けるまでスリープ状態になります。" #: src/exercises/bare-metal/rtc.md msgid "" @@ -20090,8 +19702,7 @@ msgid "" " ///\n" " /// # Safety\n" " ///\n" -" /// The given base address must point to the MMIO control registers of " -"a\n" +" /// The given base address must point to the MMIO control registers of a\n" " /// PL031 device, which must be mapped into the address space of the " "process\n" " /// as device memory and not have any other aliases.\n" @@ -20101,8 +19712,8 @@ msgstr "" " ///\n" " /// # 安全性\n" " ///\n" -" /// 指定されたベースアドレスは PL031 デバイスの MMIO 制御レジスタを指して" -"いる必要があります。\n" +" /// 指定されたベースアドレスは PL031 デバイスの MMIO 制御レジスタを指してい" +"る必要があります。\n" " /// これらはデバイスメモリとしてプロセスのアドレス空間に\n" " /// マッピングされ、他のエイリアスはありません。\n" @@ -20116,8 +19727,8 @@ msgid "" "// SAFETY: We know that self.registers points to the control registers\n" " // of a PL031 device which is appropriately mapped.\n" msgstr "" -"// self.registers が、適切にマッピングされた PL031 デバイスのコントロール レ" -"ジスタを\n" +"// self.registers が、適切にマッピングされた PL031 デバイスのコントロール レジス" +"タを\n" " // 指していることがわかっているため、安全です。\n" #: src/exercises/bare-metal/solutions-afternoon.md @@ -20130,8 +19741,7 @@ msgstr "" #: src/exercises/bare-metal/solutions-afternoon.md msgid "" -"/// Returns whether the match register matches the RTC value, whether or " -"not\n" +"/// Returns whether the match register matches the RTC value, whether or not\n" " /// the interrupt is enabled.\n" msgstr "" "/// 割り込みが有効になっているかどうかに関係なく、一致レジスタが RTC 値と\n" @@ -20146,16 +19756,14 @@ msgid "" msgstr "" "/// 現在保留中の割り込みがあるかどうかを返します。\n" " ///\n" -" /// これは `matched` が true を返し、割り込みがマスクされている場合にの" -"み\n" +" /// これは `matched` が true を返し、割り込みがマスクされている場合にのみ\n" " /// true になります。\n" #: src/exercises/bare-metal/solutions-afternoon.md msgid "" "/// Sets or clears the interrupt mask.\n" " ///\n" -" /// When the mask is true the interrupt is enabled; when it is false " -"the\n" +" /// When the mask is true the interrupt is enabled; when it is false the\n" " /// interrupt is disabled.\n" msgstr "" "/// 割り込みマスクを設定またはクリアします。\n" @@ -20185,8 +19793,8 @@ msgid "" "Rust has full support for concurrency using OS threads with mutexes and " "channels." msgstr "" -"Rustはミューテックスとチャネルを用いてOSスレッドを扱う並行性を十分にサポート" -"しています。" +"Rustはミューテックスとチャネルを用いてOSスレッドを扱う並行性を十分にサポートして" +"います。" #: src/concurrency/welcome.md msgid "" @@ -20194,10 +19802,10 @@ msgid "" "compile time bugs. This is often referred to as _fearless concurrency_ since " "you can rely on the compiler to ensure correctness at runtime." msgstr "" -"Rustの型システムは多くの並行性にまつわるバグをコンパイル時のバグにとどめると" -"いう点で、重要な役割を果たします。これは時に _fearless concurrency_ (「怖く" -"ない並行性」) と呼ばれます。なぜなら、コンパイラに実行時での正しさを保証する" -"ことをまかせてよいためです。" +"Rustの型システムは多くの並行性にまつわるバグをコンパイル時のバグにとどめるという" +"点で、重要な役割を果たします。これは時に _fearless concurrency_ (「怖くない並行" +"性」) と呼ばれます。なぜなら、コンパイラに実行時での正しさを保証することをまか" +"せてよいためです。" #: src/concurrency/welcome.md src/concurrency/welcome-async.md #, fuzzy @@ -20218,9 +19826,9 @@ msgstr "" #: src/concurrency/welcome.md msgid "" -"The same tools that help with \"concurrent\" access in a single thread (e." -"g., a called function that might mutate an argument or save references to it " -"to read later) save us from multi-threading issues." +"The same tools that help with \"concurrent\" access in a single thread (e.g., a " +"called function that might mutate an argument or save references to it to read " +"later) save us from multi-threading issues." msgstr "" #: src/concurrency/threads.md src/concurrency/shared-state.md @@ -20257,8 +19865,8 @@ msgid "" "Panics can carry a payload, which can be unpacked with [`Any::downcast_ref`]" "(https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref)." msgstr "" -"パニックはペイロードを保持していることがあり、それは`downcast_ref`で展開可能" -"です。" +"パニックはペイロードを保持していることがあり、それは`downcast_ref`で展開可能で" +"す。" #: src/concurrency/threads/plain.md #, fuzzy @@ -20292,11 +19900,11 @@ msgstr "" #: src/concurrency/threads/plain.md #, fuzzy msgid "" -"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) " -"returns a `JoinHandle`. Look at the docs." +"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) returns a " +"`JoinHandle`. Look at the docs." msgstr "" -"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) は、ヒープ上の" -"データへの所有ポインタです。" +"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) は、ヒープ上のデー" +"タへの所有ポインタです。" #: src/concurrency/threads/plain.md msgid "" @@ -20307,11 +19915,11 @@ msgstr "" #: src/concurrency/threads/plain.md #, fuzzy msgid "" -"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for " -"the thread to finish and have the program count all the way to 10." +"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for the " +"thread to finish and have the program count all the way to 10." msgstr "" -"`let handle = thread::spawn(…)`と後に`handle.join()`を使って、スレッドが完了" -"するのを待ってみてください。" +"`let handle = thread::spawn(…)`と後に`handle.join()`を使って、スレッドが完了する" +"のを待ってみてください。" #: src/concurrency/threads/plain.md msgid "Now what if we want to return a value?" @@ -20324,16 +19932,16 @@ msgstr "" #: src/concurrency/threads/plain.md #, fuzzy msgid "" -"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s " -"closure returns `T`" +"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s closure " +"returns `T`" msgstr "" -"しかし、そのために[スコープ付きスレッド](https://doc.rust-lang.org/std/" -"thread/fn.scope.html)を使うことができます:" +"しかし、そのために[スコープ付きスレッド](https://doc.rust-lang.org/std/thread/" +"fn.scope.html)を使うことができます:" #: src/concurrency/threads/plain.md msgid "" -"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct." -"JoinHandle.html#method.join) returns `thread::Result`" +"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.JoinHandle." +"html#method.join) returns `thread::Result`" msgstr "" #: src/concurrency/threads/plain.md @@ -20342,9 +19950,9 @@ msgid "" "Use the `Result` return value from `handle.join()` to get access to the " "returned value." msgstr "" -"`handle.join()`の返り値の`Result`を使って、パニックペイロードへのアクセスを得" -"てみてください。 これは[`Any`](https://doc.rust-lang.org/std/any/index.html)" -"について話すのに良いタイミングです。" +"`handle.join()`の返り値の`Result`を使って、パニックペイロードへのアクセスを得て" +"みてください。 これは[`Any`](https://doc.rust-lang.org/std/any/index.html)につい" +"て話すのに良いタイミングです。" #: src/concurrency/threads/plain.md msgid "Ok, what about the other case?" @@ -20354,18 +19962,18 @@ msgstr "" #, fuzzy msgid "Trigger a panic in the thread. Note that this doesn't panic `main`." msgstr "" -"スレッド内でパニックを引き起こしてみて、それがどのように`main`に影響しないか" -"を観察してみてください。" +"スレッド内でパニックを引き起こしてみて、それがどのように`main`に影響しないかを観" +"察してみてください。" #: src/concurrency/threads/plain.md #, fuzzy msgid "" -"Access the panic payload. This is a good time to talk about [`Any`](https://" -"doc.rust-lang.org/std/any/index.html)." +"Access the panic payload. This is a good time to talk about [`Any`](https://doc." +"rust-lang.org/std/any/index.html)." msgstr "" -"`handle.join()`の返り値の`Result`を使って、パニックペイロードへのアクセスを得" -"てみてください。 これは[`Any`](https://doc.rust-lang.org/std/any/index.html)" -"について話すのに良いタイミングです。" +"`handle.join()`の返り値の`Result`を使って、パニックペイロードへのアクセスを得て" +"みてください。 これは[`Any`](https://doc.rust-lang.org/std/any/index.html)につい" +"て話すのに良いタイミングです。" #: src/concurrency/threads/plain.md msgid "Now we can return values from threads! What about taking inputs?" @@ -20407,27 +20015,27 @@ msgstr "通常のスレッドはそれらの環境から借用することはで #: src/concurrency/threads/scoped.md msgid "" -"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/" -"fn.scope.html) for this:" +"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/fn." +"scope.html) for this:" msgstr "" -"しかし、そのために[スコープ付きスレッド](https://doc.rust-lang.org/std/" -"thread/fn.scope.html)を使うことができます:" +"しかし、そのために[スコープ付きスレッド](https://doc.rust-lang.org/std/thread/" +"fn.scope.html)を使うことができます:" #: src/concurrency/threads/scoped.md msgid "" "The reason for that is that when the `thread::scope` function completes, all " "the threads are guaranteed to be joined, so they can return borrowed data." msgstr "" -"この理由は、関数`thread::scope`が完了するとき、全てのスレッドはjoinされること" -"が保証されているので、スレッドが借用したデータを返すことができるためです。" +"この理由は、関数`thread::scope`が完了するとき、全てのスレッドはjoinされることが" +"保証されているので、スレッドが借用したデータを返すことができるためです。" #: src/concurrency/threads/scoped.md msgid "" -"Normal Rust borrowing rules apply: you can either borrow mutably by one " -"thread, or immutably by any number of threads." +"Normal Rust borrowing rules apply: you can either borrow mutably by one thread, " +"or immutably by any number of threads." msgstr "" -"通常のRustの借用のルールが適用されます: 一つのスレッドがミュータブルで借用す" -"ること、または任意の数のスレッドからイミュータブルで借用すること。" +"通常のRustの借用のルールが適用されます: 一つのスレッドがミュータブルで借用する" +"こと、または任意の数のスレッドからイミュータブルで借用すること。" #: src/concurrency/channels.md src/concurrency/async-control-flow.md #, fuzzy @@ -20438,13 +20046,13 @@ msgstr "このセグメントの所要時間は約 20 分です" #, fuzzy msgid "" "Rust channels have two parts: a [`Sender`](https://doc.rust-lang.org/std/" -"sync/mpsc/struct.Sender.html) and a [`Receiver`](https://doc.rust-lang." -"org/std/sync/mpsc/struct.Receiver.html). The two parts are connected via the " +"sync/mpsc/struct.Sender.html) and a [`Receiver`](https://doc.rust-lang.org/" +"std/sync/mpsc/struct.Receiver.html). The two parts are connected via the " "channel, but you only see the end-points." msgstr "" -"Rustのチャネルには二つの部品があります: `Sender` と`Receiver`です。こ" -"の2つの部品はチャネルによって繋がっていますが、見ることができるのはエンドポ" -"イントだけです。" +"Rustのチャネルには二つの部品があります: `Sender` と`Receiver`です。この2" +"つの部品はチャネルによって繋がっていますが、見ることができるのはエンドポイントだ" +"けです。" #: src/concurrency/channels/senders-receivers.md msgid "\"Received: {:?}\"" @@ -20453,13 +20061,13 @@ msgstr "\"Received: {:?}\"" #: src/concurrency/channels/senders-receivers.md #, fuzzy msgid "" -"[`mpsc`](https://doc.rust-lang.org/std/sync/mpsc/index.html) stands for " -"Multi-Producer, Single-Consumer. `Sender` and `SyncSender` implement `Clone` " -"(so you can make multiple producers) but `Receiver` does not." +"[`mpsc`](https://doc.rust-lang.org/std/sync/mpsc/index.html) stands for Multi-" +"Producer, Single-Consumer. `Sender` and `SyncSender` implement `Clone` (so you " +"can make multiple producers) but `Receiver` does not." msgstr "" -"`mpsc` は Multi-Producer, Single-Consumerの略称です。 `Sender`と`SyncSender`" -"は`Clone`を実装している(よって複数のproducerが作成可能)のですが、`Receiver`" -"についてはそうではありません。" +"`mpsc` は Multi-Producer, Single-Consumerの略称です。 `Sender`と`SyncSender`は" +"`Clone`を実装している(よって複数のproducerが作成可能)のですが、`Receiver`につ" +"いてはそうではありません。" #: src/concurrency/channels/senders-receivers.md #, fuzzy @@ -20469,15 +20077,15 @@ msgid "" "html#method.recv) return `Result`. If they return `Err`, it means the " "counterpart `Sender` or `Receiver` is dropped and the channel is closed." msgstr "" -"`send()`と`recv()`は`Result`を返します。もし`Err`が返された場合、これは、対応" -"する`Sender`か`Receiver`のいずれかがドロップされ、チャンネルが閉じられたこと" -"を意味します。" +"`send()`と`recv()`は`Result`を返します。もし`Err`が返された場合、これは、対応す" +"る`Sender`か`Receiver`のいずれかがドロップされ、チャンネルが閉じられたことを意味" +"します。" #: src/concurrency/channels/unbounded.md #, fuzzy msgid "" -"You get an unbounded and asynchronous channel with [`mpsc::channel()`]" -"(https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html):" +"You get an unbounded and asynchronous channel with [`mpsc::channel()`](https://" +"doc.rust-lang.org/std/sync/mpsc/fn.channel.html):" msgstr "Unboundedで非同期的なチャネルは`mpsc::channel()`によって得られます:" #: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md @@ -20499,45 +20107,42 @@ msgstr "\"Main: got {msg}\"" #: src/concurrency/channels/bounded.md #, fuzzy msgid "" -"With bounded (synchronous) channels, [`send()`](https://doc.rust-lang.org/" -"std/sync/mpsc/struct.SyncSender.html#method.send) can block the current " -"thread:" +"With bounded (synchronous) channels, [`send()`](https://doc.rust-lang.org/std/" +"sync/mpsc/struct.SyncSender.html#method.send) can block the current thread:" msgstr "" -"Bounded(かつ同期的)なチャネルを用いたとき、`send`は現在のスレッドをブロック" -"することがあります:" +"Bounded(かつ同期的)なチャネルを用いたとき、`send`は現在のスレッドをブロックす" +"ることがあります:" #: src/concurrency/channels/bounded.md #, fuzzy msgid "" "Calling `send()` will block the current thread until there is space in the " -"channel for the new message. The thread can be blocked indefinitely if there " -"is nobody who reads from the channel." +"channel for the new message. The thread can be blocked indefinitely if there is " +"nobody who reads from the channel." msgstr "" -"`send`を呼んだときにチャネルに空きがなければ、現在のスレッドはブロックされま" -"す。もし誰もチャネルから値を読み取らない場合は、このスレッドは無期限にブロッ" -"クされることがあります。" +"`send`を呼んだときにチャネルに空きがなければ、現在のスレッドはブロックされます。" +"もし誰もチャネルから値を読み取らない場合は、このスレッドは無期限にブロックされる" +"ことがあります。" #: src/concurrency/channels/bounded.md #, fuzzy msgid "" -"A call to `send()` will abort with an error (that is why it returns " -"`Result`) if the channel is closed. A channel is closed when the receiver is " -"dropped." +"A call to `send()` will abort with an error (that is why it returns `Result`) " +"if the channel is closed. A channel is closed when the receiver is dropped." msgstr "" "もしもチャネルが閉じられた場合、`send`の呼び出しはエラーとともに中断します。" -"(`send`が`Result`を返すのはこのためです。)受け取り側がドロップされたとき" -"に、チャネルは閉じられます。" +"(`send`が`Result`を返すのはこのためです。)受け取り側がドロップされたときに、" +"チャネルは閉じられます。" #: src/concurrency/channels/bounded.md #, fuzzy msgid "" -"A bounded channel with a size of zero is called a \"rendezvous channel\". " -"Every send will block the current thread until another thread calls " -"[`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver." -"html#method.recv)." +"A bounded channel with a size of zero is called a \"rendezvous channel\". Every " +"send will block the current thread until another thread calls [`recv()`]" +"(https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.recv)." msgstr "" -"サイズが0のBoundedチャネルは「ランデブーチャネル」と呼ばれます。別のスレッド" -"が`read`を呼ぶまでは、それぞれのsendは現在のスレッドをブロックします。" +"サイズが0のBoundedチャネルは「ランデブーチャネル」と呼ばれます。別のスレッドが" +"`read`を呼ぶまでは、それぞれのsendは現在のスレッドをブロックします。" #: src/concurrency/send-sync.md msgid "Send" @@ -20550,85 +20155,85 @@ msgstr "Sync" #: src/concurrency/send-sync/marker-traits.md #, fuzzy msgid "" -"How does Rust know to forbid shared access across threads? The answer is in " -"two traits:" +"How does Rust know to forbid shared access across threads? The answer is in two " +"traits:" msgstr "" -"Rustはどのようにスレッド間での値の共有アクセスを禁止するのでしょうか?その答" -"えとなるのが、以下の2つのトレイトです:" +"Rustはどのようにスレッド間での値の共有アクセスを禁止するのでしょうか?その答えと" +"なるのが、以下の2つのトレイトです:" #: src/concurrency/send-sync/marker-traits.md msgid "" -"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` " -"is `Send` if it is safe to move a `T` across a thread boundary." +"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` is " +"`Send` if it is safe to move a `T` across a thread boundary." msgstr "" -"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): スレッド境界" -"をまたいでの型`T`のムーブが安全に行える場合、型`T`は`Send`である。" +"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): スレッド境界をま" +"たいでの型`T`のムーブが安全に行える場合、型`T`は`Send`である。" #: src/concurrency/send-sync/marker-traits.md msgid "" -"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` " -"is `Sync` if it is safe to move a `&T` across a thread boundary." +"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` is " +"`Sync` if it is safe to move a `&T` across a thread boundary." msgstr "" -"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): スレッド境界" -"をまたいで`&T`のムーブが安全に行える場合、型`T`は`Sync`である。" +"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): スレッド境界をま" +"たいで`&T`のムーブが安全に行える場合、型`T`は`Sync`である。" #: src/concurrency/send-sync/marker-traits.md #, fuzzy msgid "" -"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). " -"The compiler will automatically derive them for your types as long as they " -"only contain `Send` and `Sync` types. You can also implement them manually " -"when you know it is valid." +"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). The " +"compiler will automatically derive them for your types as long as they only " +"contain `Send` and `Sync` types. You can also implement them manually when you " +"know it is valid." msgstr "" -"`Send`と`Sync`は[unsafeなトレイト](../unsafe/unsafe-traits.md)です。 あなたが" -"新たに定義する型が`Send`と`Sync`の型のみを含む場合、コンパイラはその新しい型" -"に対して`Send`と`Sync`を自動的に導出します。そうでなくても妥当であるならば" -"`Send`と`Sync`を自分自身で実装することもできます。" +"`Send`と`Sync`は[unsafeなトレイト](../unsafe/unsafe-traits.md)です。 あなたが新" +"たに定義する型が`Send`と`Sync`の型のみを含む場合、コンパイラはその新しい型に対し" +"て`Send`と`Sync`を自動的に導出します。そうでなくても妥当であるならば`Send`と" +"`Sync`を自分自身で実装することもできます。" #: src/concurrency/send-sync/marker-traits.md msgid "" "One can think of these traits as markers that the type has certain thread-" "safety properties." msgstr "" -"これらのトレイトは、ある型が特定のスレッドセーフの特性を持っていることを示す" -"マーカーと考えることもできます。" +"これらのトレイトは、ある型が特定のスレッドセーフの特性を持っていることを示すマー" +"カーと考えることもできます。" #: src/concurrency/send-sync/marker-traits.md msgid "They can be used in the generic constraints as normal traits." msgstr "" -"これらは通常のトレイトと同じように、ジェネリック境界の中で利用することができ" -"ます。" +"これらは通常のトレイトと同じように、ジェネリック境界の中で利用することができま" +"す。" #: src/concurrency/send-sync/send.md msgid "" -"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) " -"if it is safe to move a `T` value to another thread." +"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) if " +"it is safe to move a `T` value to another thread." msgstr "" "型`T`の値を安全に別のスレッドにムーブできる場合、型`T`は[`Send`](https://doc." "rust-lang.org/std/marker/trait.Send.html)である。" #: src/concurrency/send-sync/send.md msgid "" -"The effect of moving ownership to another thread is that _destructors_ will " -"run in that thread. So the question is when you can allocate a value in one " -"thread and deallocate it in another." +"The effect of moving ownership to another thread is that _destructors_ will run " +"in that thread. So the question is when you can allocate a value in one thread " +"and deallocate it in another." msgstr "" -"所有権を別のスレットにムーブするということは、_デストラクタ_ がそのスレッドで" -"実行されるということです。つまり、あるスレッドでアロケートされた値を別のス" -"レッドで解放しても良いかというのが判断基準になります。" +"所有権を別のスレットにムーブするということは、_デストラクタ_ がそのスレッドで実" +"行されるということです。つまり、あるスレッドでアロケートされた値を別のスレッドで" +"解放しても良いかというのが判断基準になります。" #: src/concurrency/send-sync/send.md msgid "" -"As an example, a connection to the SQLite library must only be accessed from " -"a single thread." +"As an example, a connection to the SQLite library must only be accessed from a " +"single thread." msgstr "" -"例を挙げると、SQLiteライブラリへのコネクションは、一つのスレッドからのみアク" -"セスされる必要があります。" +"例を挙げると、SQLiteライブラリへのコネクションは、一つのスレッドからのみアクセス" +"される必要があります。" #: src/concurrency/send-sync/sync.md msgid "" -"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) " -"if it is safe to access a `T` value from multiple threads at the same time." +"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) if " +"it is safe to access a `T` value from multiple threads at the same time." msgstr "" "型`T`の値を複数のスレッドから同時にアクセスしても安全な場合、型`T`は [`Sync`]" "(https://doc.rust-lang.org/std/marker/trait.Sync.html) である。" @@ -20647,22 +20252,21 @@ msgid "" "thread-safe for shared use, it is also thread-safe to pass references of it " "across threads." msgstr "" -"これはつまり、「ある型の共有がスレッドセーフであれば、その参照をスレッド間で" -"受け渡すこともスレッドセーフである」ということを手短に表したものです。" +"これはつまり、「ある型の共有がスレッドセーフであれば、その参照をスレッド間で受け" +"渡すこともスレッドセーフである」ということを手短に表したものです。" #: src/concurrency/send-sync/sync.md msgid "" "This is because if a type is Sync it means that it can be shared across " "multiple threads without the risk of data races or other synchronization " -"issues, so it is safe to move it to another thread. A reference to the type " -"is also safe to move to another thread, because the data it references can " -"be accessed from any thread safely." -msgstr "" -"なぜなら、ある型がSyncである場合、データ競合や他の同期の問題などのリスクなし" -"にその型を複数のスレッド間で共有でき、その型を別のスレッドにムーブしても安全" -"だからです。また、型への参照は別のスレッドにムーブしても安全です。それは、そ" -"れが参照するデータは任意のスレッドから安全にアクセスすることができるからで" -"す。" +"issues, so it is safe to move it to another thread. A reference to the type is " +"also safe to move to another thread, because the data it references can be " +"accessed from any thread safely." +msgstr "" +"なぜなら、ある型がSyncである場合、データ競合や他の同期の問題などのリスクなしにそ" +"の型を複数のスレッド間で共有でき、その型を別のスレッドにムーブしても安全だからで" +"す。また、型への参照は別のスレッドにムーブしても安全です。それは、それが参照する" +"データは任意のスレッドから安全にアクセスすることができるからです。" #: src/concurrency/send-sync/examples.md msgid "`Send + Sync`" @@ -20706,8 +20310,7 @@ msgid "" "The generic types are typically `Send + Sync` when the type parameters are " "`Send + Sync`." msgstr "" -"ジェネリクスは、型パラメタが`Send + Sync`であるとき、通常は`Send + Sync`で" -"す。" +"ジェネリクスは、型パラメタが`Send + Sync`であるとき、通常は`Send + Sync`です。" #: src/concurrency/send-sync/examples.md msgid "`Send + !Sync`" @@ -20718,8 +20321,8 @@ msgid "" "These types can be moved to other threads, but they're not thread-safe. " "Typically because of interior mutability:" msgstr "" -"これらの型は別のスレッドにムーブすることができますが、このようなムーブはス" -"レッドセーフではありません。通常は内部可変性がその原因です:" +"これらの型は別のスレッドにムーブすることができますが、このようなムーブはスレッド" +"セーフではありません。通常は内部可変性がその原因です:" #: src/concurrency/send-sync/examples.md msgid "`mpsc::Receiver`" @@ -20740,11 +20343,10 @@ msgstr "`!Send + Sync`" #: src/concurrency/send-sync/examples.md #, fuzzy msgid "" -"These types are safe to access (via shared references) from multiple " -"threads, but they cannot be moved to another thread:" +"These types are safe to access (via shared references) from multiple threads, " +"but they cannot be moved to another thread:" msgstr "" -"このような型はスレッドセーフですが、別のスレッドにムーブすることはできませ" -"ん:" +"このような型はスレッドセーフですが、別のスレッドにムーブすることはできません:" #: src/concurrency/send-sync/examples.md #, fuzzy @@ -20753,8 +20355,8 @@ msgid "" "the thread which created them. However, an already-locked mutex can have its " "guarded variable read by any thread with which the guard is shared." msgstr "" -"`MutexGuard`: プリミティブを作成したスレッド自身により、割り当てを解除され" -"るべきであるようなOSレベルのプリミティブを利用。" +"`MutexGuard`: プリミティブを作成したスレッド自身により、割り当てを解除される" +"べきであるようなOSレベルのプリミティブを利用。" #: src/concurrency/send-sync/examples.md msgid "`!Send + !Sync`" @@ -20763,24 +20365,24 @@ msgstr "`!Send + !Sync`" #: src/concurrency/send-sync/examples.md msgid "These types are not thread-safe and cannot be moved to other threads:" msgstr "" -"このような型はスレッドセーフではないため、別のスレッドにムーブすることはでき" -"ません:" +"このような型はスレッドセーフではないため、別のスレッドにムーブすることはできませ" +"ん:" #: src/concurrency/send-sync/examples.md msgid "" "`Rc`: each `Rc` has a reference to an `RcBox`, which contains a non-" "atomic reference count." msgstr "" -"`Rc`: それぞれの `Rc` は`RcBox`への参照を持っています。これは、アト" -"ミックでない参照カウントを持っています。" +"`Rc`: それぞれの `Rc` は`RcBox`への参照を持っています。これは、アトミッ" +"クでない参照カウントを持っています。" #: src/concurrency/send-sync/examples.md msgid "" "`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency " "considerations." msgstr "" -"`*const T`, `*mut T`: Rust は、生ポインターは同時実行性に関する特別な考慮事項" -"がある可能性があることを仮定しています。" +"`*const T`, `*mut T`: Rust は、生ポインターは同時実行性に関する特別な考慮事項が" +"ある可能性があることを仮定しています。" #: src/concurrency/shared-state.md msgid "Arc" @@ -20795,8 +20397,8 @@ msgid "" "[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared " "read-only access via `Arc::clone`:" msgstr "" -"[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html) は読み取り専用" -"の共有アクセスを`Arc::clone`により可能にします:" +"[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html) は読み取り専用の" +"共有アクセスを`Arc::clone`により可能にします:" #: src/concurrency/shared-state/arc.md msgid "\"{thread_id:?}: {v:?}\"" @@ -20811,33 +20413,33 @@ msgid "" "`Arc` stands for \"Atomic Reference Counted\", a thread safe version of `Rc` " "that uses atomic operations." msgstr "" -"`Arc` は\"Atomic Reference Counted\"の略で、アトミック操作を利用するという点" -"で、`Rc`がスレッド安全になったバージョンのようなものです。" +"`Arc` は\"Atomic Reference Counted\"の略で、アトミック操作を利用するという点で、" +"`Rc`がスレッド安全になったバージョンのようなものです。" #: src/concurrency/shared-state/arc.md msgid "" -"`Arc` implements `Clone` whether or not `T` does. It implements `Send` " -"and `Sync` if and only if `T` implements them both." +"`Arc` implements `Clone` whether or not `T` does. It implements `Send` and " +"`Sync` if and only if `T` implements them both." msgstr "" -"`Arc` は `Clone` を実装します。このことは`T`が`Clone`を実装するしないに関" -"係ありません。`T`が`Send`と`Sync`の両方を実装している場合で、かつその場合に限" -"り、`Arc` は両者を実装します。" +"`Arc` は `Clone` を実装します。このことは`T`が`Clone`を実装するしないに関係あ" +"りません。`T`が`Send`と`Sync`の両方を実装している場合で、かつその場合に限り、" +"`Arc` は両者を実装します。" #: src/concurrency/shared-state/arc.md msgid "" -"`Arc::clone()` has the cost of atomic operations that get executed, but " -"after that the use of the `T` is free." +"`Arc::clone()` has the cost of atomic operations that get executed, but after " +"that the use of the `T` is free." msgstr "" -"`Arc::clone()`にはアトミック操作のコストがかかります。ただ、その後は、`T`の利" -"用に関するコストはかかりません。" +"`Arc::clone()`にはアトミック操作のコストがかかります。ただ、その後は、`T`の利用" +"に関するコストはかかりません。" #: src/concurrency/shared-state/arc.md msgid "" "Beware of reference cycles, `Arc` does not use a garbage collector to detect " "them." msgstr "" -"参照サイクルに気をつけてください。`Arc` には参照サイクルを検知するためのガ" -"ベージコレクタはありません。" +"参照サイクルに気をつけてください。`Arc` には参照サイクルを検知するためのガベージ" +"コレクタはありません。" #: src/concurrency/shared-state/arc.md msgid "`std::sync::Weak` can help." @@ -20851,9 +20453,9 @@ msgid "" "interface (another form of [interior mutability](../../borrowing/interior-" "mutability.md)):" msgstr "" -"[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) は相互排他" -"を保証し、 _かつ_ 読み取り専用のインターフェースの裏側で `T` へのミュータブル" -"なアクセスを可能にします:" +"[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) は相互排他を" +"保証し、 _かつ_ 読み取り専用のインターフェースの裏側で `T` へのミュータブルなア" +"クセスを可能にします:" #: src/concurrency/shared-state/mutex.md msgid "\"v: {:?}\"" @@ -20861,29 +20463,29 @@ msgstr "\"v: {:?}\"" #: src/concurrency/shared-state/mutex.md msgid "" -"Notice how we have a [`impl Sync for Mutex`](https://doc.rust-" -"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket " +"Notice how we have a [`impl Sync for Mutex`](https://doc.rust-lang." +"org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket " "implementation." msgstr "" -"[`impl Sync for Mutex`](https://doc.rust-lang.org/std/sync/" -"struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) のブランケット実装があることに" -"注目してください。" +"[`impl Sync for Mutex`](https://doc.rust-lang.org/std/sync/struct." +"Mutex.html#impl-Sync-for-Mutex%3CT%3E) のブランケット実装があることに注目してく" +"ださい。" #: src/concurrency/shared-state/mutex.md msgid "" -"`Mutex` in Rust looks like a collection with just one element --- the " -"protected data." +"`Mutex` in Rust looks like a collection with just one element --- the protected " +"data." msgstr "" -"Rustにおける`Mutex`とは、保護されるデータである、たった一つの要素から構成され" -"たコレクションのようなものです。" +"Rustにおける`Mutex`とは、保護されるデータである、たった一つの要素から構成された" +"コレクションのようなものです。" #: src/concurrency/shared-state/mutex.md msgid "" "It is not possible to forget to acquire the mutex before accessing the " "protected data." msgstr "" -"保護されたデータにアクセスする前に、ミューテックスを確保し忘れることはありま" -"せん。" +"保護されたデータにアクセスする前に、ミューテックスを確保し忘れることはありませ" +"ん。" #: src/concurrency/shared-state/mutex.md msgid "" @@ -20891,8 +20493,8 @@ msgid "" "`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held." msgstr "" "`&Mutex` からロックを取得することで、`&mut T`を得ることができます。この" -"`MutexGuard`は`&mut T`が保持されているロックよりも長く存続しないことを保証し" -"ます。" +"`MutexGuard`は`&mut T`が保持されているロックよりも長く存続しないことを保証しま" +"す。" #: src/concurrency/shared-state/mutex.md #, fuzzy @@ -20900,8 +20502,8 @@ msgid "" "`Mutex` implements both `Send` and `Sync` if and only if `T` implements " "`Send`." msgstr "" -"`T`が`Send`を実装している場合で、かつその場合に限り、`Mutex` は`Send`と" -"`Sync`の両方を実装します。" +"`T`が`Send`を実装している場合で、かつその場合に限り、`Mutex` は`Send`と`Sync`" +"の両方を実装します。" #: src/concurrency/shared-state/mutex.md msgid "A read-write lock counterpart: `RwLock`." @@ -20913,18 +20515,18 @@ msgstr "なぜ`lock()`は`Result`を返すのでしょう?" #: src/concurrency/shared-state/mutex.md msgid "" -"If the thread that held the `Mutex` panicked, the `Mutex` becomes " -"\"poisoned\" to signal that the data it protected might be in an " -"inconsistent state. Calling `lock()` on a poisoned mutex fails with a " -"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). " -"You can call `into_inner()` on the error to recover the data regardless." +"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"poisoned\" " +"to signal that the data it protected might be in an inconsistent state. Calling " +"`lock()` on a poisoned mutex fails with a [`PoisonError`](https://doc.rust-lang." +"org/std/sync/struct.PoisonError.html). You can call `into_inner()` on the error " +"to recover the data regardless." msgstr "" -"Mutex`を保持したスレッドがパニックを起こした場合、保護すべきデータが整合性の" -"欠けた状態にある可能性を伝えるため、`Mutex`は「ポイゾンされた」" -"(\"poisoned\")状態になります。ポイゾンされたMutexに対して `lock()` をコール" -"すると、[`PoisonError`](https://doc.rust-lang.org/std/sync/struct." -"PoisonError.html)とともに失敗します。`into_inner()` を用いることで、そのエ" -"ラーにおいて、とりあえずデータを回復することはできます。" +"Mutex`を保持したスレッドがパニックを起こした場合、保護すべきデータが整合性の欠け" +"た状態にある可能性を伝えるため、`Mutex`は「ポイゾンされた」(\"poisoned\")状態" +"になります。ポイゾンされたMutexに対して `lock()` をコールすると、[`PoisonError`]" +"(https://doc.rust-lang.org/std/sync/struct.PoisonError.html)とともに失敗します。" +"`into_inner()` を用いることで、そのエラーにおいて、とりあえずデータを回復するこ" +"とはできます。" #: src/concurrency/shared-state/example.md msgid "Let us see `Arc` and `Mutex` in action:" @@ -20944,34 +20546,32 @@ msgstr "注目するとよい箇所:" #: src/concurrency/shared-state/example.md msgid "" -"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are " -"orthogonal." +"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are orthogonal." msgstr "" -"`v`は `Arc` と `Mutex`の両方でラップされています。なぜなら、それらの関心は互" -"いに独立なものであるからです。" +"`v`は `Arc` と `Mutex`の両方でラップされています。なぜなら、それらの関心は互いに" +"独立なものであるからです。" #: src/concurrency/shared-state/example.md msgid "" "Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state " "between threads." msgstr "" -"`Mutex`を`Arc`でラップすることは、スレッド間でミュータブルな状態を共有するた" -"めによく見られるパターンです。" +"`Mutex`を`Arc`でラップすることは、スレッド間でミュータブルな状態を共有するために" +"よく見られるパターンです。" #: src/concurrency/shared-state/example.md msgid "" "`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another " "thread. Note `move` was added to the lambda signature." msgstr "" -"`v: Arc<_>`は別のスレッドにムーブされる前に、`v2`としてクローンされる必要があ" -"ります。`move` がラムダ式に追加されたことに注意してください。" +"`v: Arc<_>`は別のスレッドにムーブされる前に、`v2`としてクローンされる必要があり" +"ます。`move` がラムダ式に追加されたことに注意してください。" #: src/concurrency/shared-state/example.md msgid "" "Blocks are introduced to narrow the scope of the `LockGuard` as much as " "possible." -msgstr "" -"ブロックは`LockGuard`のスコープを可能な限り狭めるために導入されています。" +msgstr "ブロックは`LockGuard`のスコープを可能な限り狭めるために導入されています。" #: src/concurrency/sync-exercises/dining-philosophers.md msgid "The dining philosophers problem is a classic problem in concurrency:" @@ -20979,32 +20579,31 @@ msgstr "食事する哲学者の問題は、並行性に関する古典的な問 #: src/concurrency/sync-exercises/dining-philosophers.md msgid "" -"Five philosophers dine together at the same table. Each philosopher has " -"their own place at the table. There is a fork between each plate. The dish " -"served is a kind of spaghetti which has to be eaten with two forks. Each " -"philosopher can only alternately think and eat. Moreover, a philosopher can " -"only eat their spaghetti when they have both a left and right fork. Thus two " -"forks will only be available when their two nearest neighbors are thinking, " -"not eating. After an individual philosopher finishes eating, they will put " -"down both forks." -msgstr "" -"5 人の哲学者が同じテーブルで食事をしています。それぞれの哲学者がテーブルの定" -"位置に座り、皿の間にはフォークが 1 本置かれています。提供される料理はスパゲッ" -"ティで、2 本のフォークで食べる必要があります。哲学者は思索と食事を交互に繰り" -"返すことしかできません。さらに、哲学者は左右両方のフォークを持っている場合に" -"のみ、スパゲッティを食べることができます。したがって、2 つのフォークは、両隣" -"の哲学者が食べるのではなく考えている場合にのみ使用できます。それぞれの哲学者" -"は、食べ終わった後、両方のフォークを置きます。" +"Five philosophers dine together at the same table. Each philosopher has their " +"own place at the table. There is a fork between each plate. The dish served is " +"a kind of spaghetti which has to be eaten with two forks. Each philosopher can " +"only alternately think and eat. Moreover, a philosopher can only eat their " +"spaghetti when they have both a left and right fork. Thus two forks will only " +"be available when their two nearest neighbors are thinking, not eating. After " +"an individual philosopher finishes eating, they will put down both forks." +msgstr "" +"5 人の哲学者が同じテーブルで食事をしています。それぞれの哲学者がテーブルの定位置" +"に座り、皿の間にはフォークが 1 本置かれています。提供される料理はスパゲッティ" +"で、2 本のフォークで食べる必要があります。哲学者は思索と食事を交互に繰り返すこと" +"しかできません。さらに、哲学者は左右両方のフォークを持っている場合にのみ、スパ" +"ゲッティを食べることができます。したがって、2 つのフォークは、両隣の哲学者が食べ" +"るのではなく考えている場合にのみ使用できます。それぞれの哲学者は、食べ終わった" +"後、両方のフォークを置きます。" #: src/concurrency/sync-exercises/dining-philosophers.md msgid "" -"You will need a local [Cargo installation](../../cargo/running-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:" +"You will need a local [Cargo installation](../../cargo/running-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` がデッドロックしないことを確認します。" +"この演習では、ローカルの [Cargo インストール](../../cargo/running-locally.md)が" +"必要です。以下のコードを `src/main.rs` というファイルにコピーし、空欄を埋めて、" +"`cargo run` がデッドロックしないことを確認します。" #: src/concurrency/sync-exercises/dining-philosophers.md #: src/concurrency/async-exercises/dining-philosophers.md @@ -21114,22 +20713,22 @@ msgstr "" #: src/concurrency/sync-exercises/link-checker.md msgid "" -"Let us use our new knowledge to create a multi-threaded link checker. It " -"should start at a webpage and check that links on the page are valid. It " -"should recursively check other pages on the same domain and keep doing this " -"until all pages have been validated." +"Let us use our new knowledge to create a multi-threaded link checker. It should " +"start at a webpage and check that links on the page are valid. It should " +"recursively check other pages on the same domain and keep doing this until all " +"pages have been validated." msgstr "" -"新たに身に付けた知識を活かして、マルチスレッド リンク チェッカーを作成しま" -"しょう。まず、ウェブページ上のリンクが有効かどうかを確認する必要があります。" -"同じドメインの他のページを再帰的にチェックし、すべてのページの検証が完了する" -"までこの処理を繰り返します。" +"新たに身に付けた知識を活かして、マルチスレッド リンク チェッカーを作成しましょ" +"う。まず、ウェブページ上のリンクが有効かどうかを確認する必要があります。同じドメ" +"インの他のページを再帰的にチェックし、すべてのページの検証が完了するまでこの処理" +"を繰り返します。" #: src/concurrency/sync-exercises/link-checker.md msgid "" "For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/" "reqwest/). You will also need a way to find links, we can use [`scraper`]" -"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, " -"we will use [`thiserror`](https://docs.rs/thiserror/)." +"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, we " +"will use [`thiserror`](https://docs.rs/thiserror/)." msgstr "" #: src/concurrency/sync-exercises/link-checker.md @@ -21142,12 +20741,11 @@ 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` " -"ファイルを手動で編集してください。下記の依存関係を追加します。" +"`cargo add` が `error: no such subcommand` で失敗する場合は、`Cargo.toml` ファイ" +"ルを手動で編集してください。下記の依存関係を追加します。" #: src/concurrency/sync-exercises/link-checker.md -msgid "" -"The `cargo add` calls will update the `Cargo.toml` file to look like this:" +msgid "The `cargo add` calls will update the `Cargo.toml` file to look like this:" msgstr "" "`cargo add` の呼び出しにより、`Cargo.toml` ファイルは次のように更新されます。" @@ -21161,8 +20759,7 @@ msgid "" "publish = false\n" "\n" "[dependencies]\n" -"reqwest = { version = \"0.11.12\", features = [\"blocking\", \"rustls-" -"tls\"] }\n" +"reqwest = { version = \"0.11.12\", features = [\"blocking\", \"rustls-tls\"] }\n" "scraper = \"0.13.0\"\n" "thiserror = \"1.0.37\"\n" "```" @@ -21175,19 +20772,18 @@ msgstr "" "publish = false\n" "\n" "[dependencies]\n" -"reqwest = { version = \"0.11.12\", features = [\"blocking\", \"rustls-" -"tls\"] }\n" +"reqwest = { version = \"0.11.12\", features = [\"blocking\", \"rustls-tls\"] }\n" "scraper = \"0.13.0\"\n" "thiserror = \"1.0.37\"\n" "```" #: src/concurrency/sync-exercises/link-checker.md msgid "" -"You can now download the start page. Try with a small site such as `https://" -"www.google.org/`." +"You can now download the start page. Try with a small site such as `https://www." +"google.org/`." msgstr "" -"これで、スタートページをダウンロードできるようになりました。`https://www." -"google.org/` のような小規模なサイトで試してみましょう。" +"これで、スタートページをダウンロードできるようになりました。`https://www.google." +"org/` のような小規模なサイトで試してみましょう。" #: src/concurrency/sync-exercises/link-checker.md msgid "Your `src/main.rs` file should look something like this:" @@ -21240,18 +20836,18 @@ 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 を確認します。" +"スレッドを使用してリンクを同時にチェックします。つまり、チェックする URL をチャ" +"ンネルに送信し、いくつかのスレッドで同時に URL を確認します。" #: src/concurrency/sync-exercises/link-checker.md msgid "" -"Extend this to recursively extract links from all pages on the `www.google." -"org` domain. Put an upper limit of 100 pages or so so that you don't end up " -"being blocked by the site." +"Extend this to recursively extract links from all pages on the `www.google.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 程度に設定し" -"ます。" +"これを拡張して、`www.google.org` ドメインのすべてのページからリンクを再帰的に抽" +"出します。サイトがブロックされないように、ページ数の上限を 100 程度に設定しま" +"す。" #: src/concurrency/sync-exercises/solutions.md msgid "\"{} is trying to eat\"" @@ -21277,8 +20873,7 @@ msgid "Link Checker" msgstr "マルチスレッド・リンクチェッカー" #: src/concurrency/sync-exercises/solutions.md -msgid "" -"/// Determine whether links within the given page should be extracted.\n" +msgid "/// Determine whether links within the given page should be extracted.\n" msgstr "/// 指定されたページ内のリンクを抽出するかどうかを決定します。\n" #: src/concurrency/sync-exercises/solutions.md @@ -21303,37 +20898,37 @@ msgstr "\"Bad URLs: {:#?}\"" #: src/concurrency/welcome-async.md msgid "" -"\"Async\" is a concurrency model where multiple tasks are executed " -"concurrently by executing each task until it would block, then switching to " -"another task that is ready to make progress. The model allows running a " -"larger number of tasks on a limited number of threads. This is because the " -"per-task overhead is typically very low and operating systems provide " -"primitives for efficiently identifying I/O that is able to proceed." +"\"Async\" is a concurrency model where multiple tasks are executed concurrently " +"by executing each task until it would block, then switching to another task " +"that is ready to make progress. The model allows running a larger number of " +"tasks on a limited number of threads. This is because the per-task overhead is " +"typically very low and operating systems provide primitives for efficiently " +"identifying I/O that is able to proceed." msgstr "" "「Async」は複数のタスクが並行処理される並行性モデルです。それぞれのタスクはブ" -"ロックされるまで実行され、そして次に進むことのできる他のタスクに切り替えるこ" -"とにより実現されます。このモデルは限られた数のスレッド上でより多くのタスクを" -"実行することを可能にします。なぜなら、タスクごとのオーバーヘッドは通常はとて" -"も低く、効率的に実行可能なI/Oを特定するために必要なプリミティブをOSが提供して" -"くれるからです。" +"ロックされるまで実行され、そして次に進むことのできる他のタスクに切り替えることに" +"より実現されます。このモデルは限られた数のスレッド上でより多くのタスクを実行する" +"ことを可能にします。なぜなら、タスクごとのオーバーヘッドは通常はとても低く、効率" +"的に実行可能なI/Oを特定するために必要なプリミティブをOSが提供してくれるからで" +"す。" #: src/concurrency/welcome-async.md msgid "" "Rust's asynchronous operation is based on \"futures\", which represent work " -"that may be completed in the future. Futures are \"polled\" until they " -"signal that they are complete." +"that may be completed in the future. Futures are \"polled\" until they signal " +"that they are complete." msgstr "" -"Rustの非同期的な操作は「future」に基づいていて、これは将来に完了するかもしれ" -"ない作業を表しています。Futureは、タスクが完了したことを知らせるシグナルが得" -"られるまでポーリングされます。" +"Rustの非同期的な操作は「future」に基づいていて、これは将来に完了するかもしれない" +"作業を表しています。Futureは、タスクが完了したことを知らせるシグナルが得られるま" +"でポーリングされます。" #: src/concurrency/welcome-async.md msgid "" "Futures are polled by an async runtime, and several different runtimes are " "available." msgstr "" -"Futureは非同期的なランタイムによりポーリングされます。ランタイムにはいくつか" -"の選択肢があります。" +"Futureは非同期的なランタイムによりポーリングされます。ランタイムにはいくつかの選" +"択肢があります。" #: src/concurrency/welcome-async.md msgid "" @@ -21342,19 +20937,19 @@ msgid "" "similar to a runtime in Rust." msgstr "" "Pythonには似たようなモデルが`asyncio`として搭載されています。しかし、ここでの" -"`Future`型はコールバックに基づくものであって、ポーリングによるものではありま" -"せん。Pythonの非同期プログラムは「ループ」を必要とし、Rustのランタイムに似て" -"います。" +"`Future`型はコールバックに基づくものであって、ポーリングによるものではありませ" +"ん。Pythonの非同期プログラムは「ループ」を必要とし、Rustのランタイムに似ていま" +"す。" #: src/concurrency/welcome-async.md msgid "" "JavaScript's `Promise` is similar, but again callback-based. The language " -"runtime implements the event loop, so many of the details of Promise " -"resolution are hidden." +"runtime implements the event loop, so many of the details of Promise resolution " +"are hidden." msgstr "" -"JavaScriptの`Promise`は似ているものの、これもまたもやコールバックに基づきま" -"す。 この言語のランタイムはイベントループにより実装されているため、多くの" -"Promise解決の詳細は隠されています。" +"JavaScriptの`Promise`は似ているものの、これもまたもやコールバックに基づきます。 " +"この言語のランタイムはイベントループにより実装されているため、多くのPromise解決" +"の詳細は隠されています。" #: src/concurrency/async.md msgid "async/await" @@ -21365,8 +20960,8 @@ msgid "" "At a high level, async Rust code looks very much like \"normal\" sequential " "code:" msgstr "" -"おおまかには、Rustの非同期コードはほとんど「通常の」逐次的なコードのように見" -"えます:" +"おおまかには、Rustの非同期コードはほとんど「通常の」逐次的なコードのように見えま" +"す:" #: src/concurrency/async/async-await.md msgid "\"Count is: {i}!\"" @@ -21377,24 +20972,24 @@ msgid "" "Note that this is a simplified example to show the syntax. There is no long " "running operation or any real concurrency in it!" msgstr "" -"これは構文を示すための単純化された例であることに注意してください。長く実行さ" -"れうる操作や本物の並行処理はここには含まれません。" +"これは構文を示すための単純化された例であることに注意してください。長く実行されう" +"る操作や本物の並行処理はここには含まれません。" #: src/concurrency/async/async-await.md #, fuzzy msgid "" -"The \"async\" keyword is syntactic sugar. The compiler replaces the return " -"type with a future." +"The \"async\" keyword is syntactic sugar. The compiler replaces the return type " +"with a future." msgstr "" "「async」キーワードは糖衣構文です。コンパイラは返り値をfutureに置き換えます。" #: src/concurrency/async/async-await.md msgid "" -"You cannot make `main` async, without additional instructions to the " -"compiler on how to use the returned future." +"You cannot make `main` async, without additional instructions to the compiler " +"on how to use the returned future." msgstr "" -"コンパイラに対して、返されたfutureの値をその後どう扱うべきかという、追加の指" -"示を含めない限り、`main`をasyncにすることはできません。" +"コンパイラに対して、返されたfutureの値をその後どう扱うべきかという、追加の指示を" +"含めない限り、`main`をasyncにすることはできません。" #: src/concurrency/async/async-await.md #, fuzzy @@ -21402,16 +20997,16 @@ msgid "" "You need an executor to run async code. `block_on` blocks the current thread " "until the provided future has run to completion." msgstr "" -"非同期のコードを実行するためには、エグゼキュータが必要です。`block_on`は、与" -"えられたfutureが最後まで実行されるまで、現在のスレッドをブロックします。" +"非同期のコードを実行するためには、エグゼキュータが必要です。`block_on`は、与えら" +"れたfutureが最後まで実行されるまで、現在のスレッドをブロックします。" #: src/concurrency/async/async-await.md msgid "" -"`.await` asynchronously waits for the completion of another operation. " -"Unlike `block_on`, `.await` doesn't block the current thread." +"`.await` asynchronously waits for the completion of another operation. Unlike " +"`block_on`, `.await` doesn't block the current thread." msgstr "" -"`.await`は非同期的に他の操作の完了を待ちます。`block_on`とは異なり、`.await`" -"は現在のスレッドをブロックしません。" +"`.await`は非同期的に他の操作の完了を待ちます。`block_on`とは異なり、`.await`は現" +"在のスレッドをブロックしません。" #: src/concurrency/async/async-await.md #, fuzzy @@ -21419,85 +21014,83 @@ msgid "" "`.await` can only be used inside an `async` function (or block; these are " "introduced later)." msgstr "" -"`.await`はasync関数(またはasync ブロック)の中でのみ利用できます。(async関数・" -"ブロックについては後ほど紹介します。)" +"`.await`はasync関数(またはasync ブロック)の中でのみ利用できます。(async関数・ブ" +"ロックについては後ほど紹介します。)" #: src/concurrency/async/futures.md msgid "" -"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a " -"trait, implemented by objects that represent an operation that may not be " -"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://" -"doc.rust-lang.org/std/task/enum.Poll.html)." +"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a trait, " +"implemented by objects that represent an operation that may not be complete " +"yet. A future can be polled, and `poll` returns a [`Poll`](https://doc.rust-" +"lang.org/std/task/enum.Poll.html)." msgstr "" -"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html)はトレイト" -"であり、まだ完了してないかもしれない操作を表現するオブジェクトにより実装され" -"ます。Futureはポーリングされることがあり、`poll`は[`Poll`](https://doc.rust-" -"lang.org/std/task/enum.Poll.html)を返します。" +"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html)はトレイトであ" +"り、まだ完了してないかもしれない操作を表現するオブジェクトにより実装されます。" +"Futureはポーリングされることがあり、`poll`は[`Poll`](https://doc.rust-lang.org/" +"std/task/enum.Poll.html)を返します。" #: src/concurrency/async/futures.md msgid "" -"An async function returns an `impl Future`. It's also possible (but " -"uncommon) to implement `Future` for your own types. For example, the " -"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow " -"joining to it." +"An async function returns an `impl Future`. It's also possible (but uncommon) " +"to implement `Future` for your own types. For example, the `JoinHandle` " +"returned from `tokio::spawn` implements `Future` to allow joining to it." msgstr "" -"非同期の関数は`impl Future`を返します。自分で定義した型に対して`Future`を実装" -"することも(あまりないことですが)可能です。例えば、`tokio::spawn`から返され" -"る`JoinHandle`は`Future`を実装することにより、joinすることを可能にしていま" -"す。" +"非同期の関数は`impl Future`を返します。自分で定義した型に対して`Future`を実装す" +"ることも(あまりないことですが)可能です。例えば、`tokio::spawn`から返される" +"`JoinHandle`は`Future`を実装することにより、joinすることを可能にしています。" #: src/concurrency/async/futures.md msgid "" -"The `.await` keyword, applied to a Future, causes the current async function " -"to pause until that Future is ready, and then evaluates to its output." +"The `.await` keyword, applied to a Future, causes the current async function to " +"pause until that Future is ready, and then evaluates to its output." msgstr "" -"Futureに適用される`.await`キーワードは、そのFutureの準備ができるまで、現在の" -"非同期の関数の一時停止を起こし、そしてその出力を評価します。" +"Futureに適用される`.await`キーワードは、そのFutureの準備ができるまで、現在の非同" +"期の関数の一時停止を起こし、そしてその出力を評価します。" #: src/concurrency/async/futures.md msgid "" -"The `Future` and `Poll` types are implemented exactly as shown; click the " -"links to show the implementations in the docs." +"The `Future` and `Poll` types are implemented exactly as shown; click the links " +"to show the implementations in the docs." msgstr "" -"`Future`と`Poll`の型はまさに示されたように実装されます; ドキュメントの具体的" -"な実装を見るにはリンクをクリックしてください。" +"`Future`と`Poll`の型はまさに示されたように実装されます; ドキュメントの具体的な実" +"装を見るにはリンクをクリックしてください。" #: src/concurrency/async/futures.md msgid "" -"We will not get to `Pin` and `Context`, as we will focus on writing async " -"code, rather than building new async primitives. Briefly:" +"We will not get to `Pin` and `Context`, as we will focus on writing async code, " +"rather than building new async primitives. Briefly:" msgstr "" -"`Pin`と`Context`については詳しくは扱いません。なぜなら、新しく非同期のプリミ" -"ティブを作るよりも、非同期のコードを書くことに我々は重点を置くつもりだからで" -"す。簡潔には以下で説明されます:" +"`Pin`と`Context`については詳しくは扱いません。なぜなら、新しく非同期のプリミティ" +"ブを作るよりも、非同期のコードを書くことに我々は重点を置くつもりだからです。簡潔" +"には以下で説明されます:" #: src/concurrency/async/futures.md msgid "" -"`Context` allows a Future to schedule itself to be polled again when an " -"event occurs." +"`Context` allows a Future to schedule itself to be polled again when an event " +"occurs." msgstr "" -"`Context`は、特定のイベントが発生した時に、Futureが自分自身を再びポーリングさ" -"れるようにスケジュールすることを可能にします。" +"`Context`は、特定のイベントが発生した時に、Futureが自分自身を再びポーリングされ" +"るようにスケジュールすることを可能にします。" #: src/concurrency/async/futures.md msgid "" -"`Pin` ensures that the Future isn't moved in memory, so that pointers into " -"that future remain valid. This is required to allow references to remain " -"valid after an `.await`." +"`Pin` ensures that the Future isn't moved in memory, so that pointers into that " +"future remain valid. This is required to allow references to remain valid after " +"an `.await`." msgstr "" -"`Pin`はfutureへのポインタが有効であり続けるために、Futureがメモリの中で移動さ" -"れないことを確実にします。これは、参照が`.await`の後に有効であり続けるために" -"必要です。" +"`Pin`はfutureへのポインタが有効であり続けるために、Futureがメモリの中で移動され" +"ないことを確実にします。これは、参照が`.await`の後に有効であり続けるために必要で" +"す。" #: src/concurrency/async/runtimes.md msgid "" "A _runtime_ provides support for performing operations asynchronously (a " -"_reactor_) and is responsible for executing futures (an _executor_). Rust " -"does not have a \"built-in\" runtime, but several options are available:" +"_reactor_) and is responsible for executing futures (an _executor_). Rust does " +"not have a \"built-in\" runtime, but several options are available:" msgstr "" -"\\_runtime_は非同期な演算(_reactor_)のサポートを提供し、また、futureを実行" -"すること(_executor_)を担当しています。Rustには「ビルトイン」のランタイムは" -"ありませんが、いくつかのランタイムの選択肢があります: " +"\\_runtime_は非同期な演算(_reactor_)のサポートを提供し、また、futureを実行する" +"こと(_executor_)を担当しています。Rustには「ビルトイン」のランタイムはありませ" +"んが、いくつかのランタイムの選択肢があります: " #: src/concurrency/async/runtimes.md #, fuzzy @@ -21507,17 +21100,17 @@ msgid "" "github.com/hyperium/tonic) for gRPC." msgstr "" "[Tokio](https://tokio.rs/) - パフォーマンスが高い。HTTP向けの[Hyper](https://" -"hyper.rs/)やgRPC向けの[Tonic](https://github.com/hyperium/tonic)のような発達" -"したエコシステムも持っている" +"hyper.rs/)やgRPC向けの[Tonic](https://github.com/hyperium/tonic)のような発達した" +"エコシステムも持っている" #: src/concurrency/async/runtimes.md #, fuzzy msgid "" -"[async-std](https://async.rs/): aims to be a \"std for async\", and includes " -"a basic runtime in `async::task`." +"[async-std](https://async.rs/): aims to be a \"std for async\", and includes a " +"basic runtime in `async::task`." msgstr "" -"[async-std](https://async.rs/) - 「async」のための「std」であることを目指した" -"もの。また、`async::task`に基本的なランタイムを含む。" +"[async-std](https://async.rs/) - 「async」のための「std」であることを目指したも" +"の。また、`async::task`に基本的なランタイムを含む。" #: src/concurrency/async/runtimes.md #, fuzzy @@ -21530,9 +21123,9 @@ msgid "" "(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-" "async/src/lib.rs) already has one." msgstr "" -"いくつかのより巨大なアプリケーションは、独自のランタイムを備えています。例え" -"ば[Fuchsia](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/" -"lib/fuchsia-async/src/lib.rs)はそのようなものをすでに備えています。" +"いくつかのより巨大なアプリケーションは、独自のランタイムを備えています。例えば" +"[Fuchsia](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/" +"fuchsia-async/src/lib.rs)はそのようなものをすでに備えています。" #: src/concurrency/async/runtimes.md msgid "" @@ -21540,21 +21133,19 @@ msgid "" "playground. The playground also does not permit any I/O, so most interesting " "async things can't run in the playground." msgstr "" -"上で挙げられたランタイムのうち、TokioのみがRustプレイグラウンドでサポートされ" -"ています。このプレイグラウンドではいかなる入出力操作も許可されていないため、" -"大抵の興味深い非同期のあれこれは、プレイグラウンドで実行することはできませ" -"ん。" +"上で挙げられたランタイムのうち、TokioのみがRustプレイグラウンドでサポートされて" +"います。このプレイグラウンドではいかなる入出力操作も許可されていないため、大抵の" +"興味深い非同期のあれこれは、プレイグラウンドで実行することはできません。" #: src/concurrency/async/runtimes.md msgid "" "Futures are \"inert\" in that they do not do anything (not even start an I/O " "operation) unless there is an executor polling them. This differs from JS " -"Promises, for example, which will run to completion even if they are never " -"used." +"Promises, for example, which will run to completion even if they are never used." msgstr "" -"Futureは、ポーリングを行うエグゼキュータの存在なしには何も行わない(入出力操" -"作さえ始めない)という点で「怠惰」です。例えば、これは、エグゼキュータがなく" -"とも最後まで実行されるJavaScriptのPromiseとは異なります。" +"Futureは、ポーリングを行うエグゼキュータの存在なしには何も行わない(入出力操作さ" +"え始めない)という点で「怠惰」です。例えば、これは、エグゼキュータがなくとも最後" +"まで実行されるJavaScriptのPromiseとは異なります。" #: src/concurrency/async/runtimes/tokio.md #, fuzzy @@ -21592,8 +21183,8 @@ msgstr "`spawn`関数は新しい並行の「タスク」を作成します。" #: src/concurrency/async/runtimes/tokio.md msgid "Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`." msgstr "" -"注意:`spawn`は`Future`を引数に取るため、`count_to`に対して`.await`を呼ぶこと" -"はありません。" +"注意:`spawn`は`Future`を引数に取るため、`count_to`に対して`.await`を呼ぶことは" +"ありません。" #: src/concurrency/async/runtimes/tokio.md msgid "**Further exploration:**" @@ -21605,14 +21196,12 @@ msgid "" "cancellation. `tokio::spawn` returns a handle which can be awaited to wait " "until it finishes." msgstr "" -"どうして`count_to`は(通常は)10に辿り着かないのでしょうか?これは非同期処理" -"のキャンセルの例です。 `tokio::spawn`は完了まで待機するためのハンドラを返しま" -"す。" +"どうして`count_to`は(通常は)10に辿り着かないのでしょうか?これは非同期処理の" +"キャンセルの例です。 `tokio::spawn`は完了まで待機するためのハンドラを返します。" #: src/concurrency/async/runtimes/tokio.md msgid "Try `count_to(10).await` instead of spawning." -msgstr "" -"プロセスを新しく作る代わりに、`count_to(10).await`を試してみてください。" +msgstr "プロセスを新しく作る代わりに、`count_to(10).await`を試してみてください。" #: src/concurrency/async/runtimes/tokio.md msgid "Try awaiting the task returned from `tokio::spawn`." @@ -21624,18 +21213,17 @@ msgstr "Rust には、軽量のスレッド形式の一種であるタスクシ #: src/concurrency/async/tasks.md msgid "" -"A task has a single top-level future which the executor polls to make " -"progress. That future may have one or more nested futures that its `poll` " -"method polls, corresponding loosely to a call stack. Concurrency within a " -"task is possible by polling multiple child futures, such as racing a timer " -"and an I/O operation." +"A task has a single top-level future which the executor polls to make progress. " +"That future may have one or more nested futures that its `poll` method polls, " +"corresponding loosely to a call stack. Concurrency within a task is possible by " +"polling multiple child futures, such as racing a timer and an I/O operation." msgstr "" -"タスクには、単一のトップレベルのfutureがあり、これはエグゼキュータが先に進む" -"ためにポーリングする対象となります。そのfutureには一つまたは複数のfutureがネ" -"ストされていることもあり、トップレベルのfutureの`poll`メソッドがポーリングす" -"ることになり、大まかにはコールスタックに対応すると言えます。タスクにおける並" -"行処理は、例えば競合タイマーや入出力操作など、複数の子のfutureをポーリングす" -"ることにより可能になります。" +"タスクには、単一のトップレベルのfutureがあり、これはエグゼキュータが先に進むため" +"にポーリングする対象となります。そのfutureには一つまたは複数のfutureがネストされ" +"ていることもあり、トップレベルのfutureの`poll`メソッドがポーリングすることにな" +"り、大まかにはコールスタックに対応すると言えます。タスクにおける並行処理は、例え" +"ば競合タイマーや入出力操作など、複数の子のfutureをポーリングすることにより可能に" +"なります。" #: src/concurrency/async/tasks.md msgid "\"127.0.0.1:0\"" @@ -21662,56 +21250,53 @@ msgid "\"Thanks for dialing in, {name}!\\n\"" msgstr "\"Thanks for dialing in, {name}!\\n\"" #: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md -msgid "" -"Copy this example into your prepared `src/main.rs` and run it from there." -msgstr "" -"この例を準備した`src/main.rs`にコピーして、そこから実行してみましょう。" +msgid "Copy this example into your prepared `src/main.rs` and run it from there." +msgstr "この例を準備した`src/main.rs`にコピーして、そこから実行してみましょう。" #: src/concurrency/async/tasks.md msgid "" -"Try connecting to it with a TCP connection tool like [nc](https://www.unix." -"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/" +"Try connecting to it with a TCP connection tool like [nc](https://www.unix.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 接続ツールを使用して接続してみてくだ" -"さい。" +"com/man-page/linux/1/telnet/) などの TCP 接続ツールを使用して接続してみてくださ" +"い。" #: src/concurrency/async/tasks.md msgid "" -"Ask students to visualize what the state of the example server would be with " -"a few connected clients. What tasks exist? What are their Futures?" +"Ask students to visualize what the state of the example server would be with a " +"few connected clients. What tasks exist? What are their Futures?" msgstr "" -"例のサーバーがどのような状態の時に、いくつかのクライアントと接続された状態に" -"あるのかを、可視化するように受講者に指示してください。どんなタスクが存在して" -"いますか?それらのfutureは何ですか?" +"例のサーバーがどのような状態の時に、いくつかのクライアントと接続された状態にある" +"のかを、可視化するように受講者に指示してください。どんなタスクが存在しています" +"か?それらのfutureは何ですか?" #: src/concurrency/async/tasks.md #, fuzzy msgid "" "This is the first time we've seen an `async` block. This is similar to a " -"closure, but does not take any arguments. Its return value is a Future, " -"similar to an `async fn`." +"closure, but does not take any arguments. Its return value is a Future, similar " +"to an `async fn`." msgstr "" -"私たちが`async`ブロックを見かけるのは初めてですね。これはクロージャと似ていま" -"すが、何も引数は取りません。この返り値はFutureであり、`async fn`と似ていま" -"す。" +"私たちが`async`ブロックを見かけるのは初めてですね。これはクロージャと似ています" +"が、何も引数は取りません。この返り値はFutureであり、`async fn`と似ています。" #: src/concurrency/async/tasks.md msgid "" -"Refactor the async block into a function, and improve the error handling " -"using `?`." +"Refactor the async block into a function, and improve the error handling using " +"`?`." msgstr "" -"mainのasyncブロックを関数にリファクタして、`?`を使ったエラーハンドリングを改" -"善してみましょう。" +"mainのasyncブロックを関数にリファクタして、`?`を使ったエラーハンドリングを改善し" +"てみましょう。" #: src/concurrency/async-control-flow/channels.md #, fuzzy msgid "" "Several crates have support for asynchronous channels. For instance `tokio`:" msgstr "" -"いくつかのクレートは`async`/`await`をサポートしています。例えば、`tokio`チャ" -"ネルは:" +"いくつかのクレートは`async`/`await`をサポートしています。例えば、`tokio`チャネル" +"は:" #: src/concurrency/async-control-flow/channels.md msgid "\"Received {count} pings so far.\"" @@ -21736,8 +21321,8 @@ msgstr "\"Something went wrong in ping handler task.\"" #: src/concurrency/async-control-flow/channels.md msgid "Change the channel size to `3` and see how it affects the execution." msgstr "" -"チャネルサイズを `3`に変えてみて、これがどのように処理に影響するか確認してみ" -"ましょう。" +"チャネルサイズを `3`に変えてみて、これがどのように処理に影響するか確認してみま" +"しょう。" #: src/concurrency/async-control-flow/channels.md #, fuzzy @@ -21745,43 +21330,42 @@ msgid "" "Overall, the interface is similar to the `sync` channels as seen in the " "[morning class](../channels.md)." msgstr "" -"一般的に、このインターフェースは、[朝の講座](concurrency/channels.md)で見られ" -"たような`sync`チャネルに似ています。" +"一般的に、このインターフェースは、[朝の講座](concurrency/channels.md)で見られた" +"ような`sync`チャネルに似ています。" #: src/concurrency/async-control-flow/channels.md msgid "Try removing the `std::mem::drop` call. What happens? Why?" msgstr "" -"`std::mem::drop`の呼び出しを除いてみましょう。何か起こるでしょうか?それはな" -"ぜでしょうか?" +"`std::mem::drop`の呼び出しを除いてみましょう。何か起こるでしょうか?それはなぜで" +"しょうか?" #: src/concurrency/async-control-flow/channels.md msgid "" "The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that " -"implement both `sync` and `async` `send` and `recv`. This can be convenient " -"for complex applications with both IO and heavy CPU processing tasks." +"implement both `sync` and `async` `send` and `recv`. This can be convenient for " +"complex applications with both IO and heavy CPU processing tasks." msgstr "" -"[Flume](https://docs.rs/flume/latest/flume/)クレートには`sync`と`async`や" -"`send`と`recv`の両方を実装するチャネルがあります。 これは入出力と重いCPUの処" -"理のタスクの両方を含む、複雑なアプリケーションで便利です。" +"[Flume](https://docs.rs/flume/latest/flume/)クレートには`sync`と`async`や`send`" +"と`recv`の両方を実装するチャネルがあります。 これは入出力と重いCPUの処理のタスク" +"の両方を含む、複雑なアプリケーションで便利です。" #: src/concurrency/async-control-flow/channels.md msgid "" -"What makes working with `async` channels preferable is the ability to " -"combine them with other `future`s to combine them and create complex control " -"flow." +"What makes working with `async` channels preferable is the ability to combine " +"them with other `future`s to combine them and create complex control flow." msgstr "" -"`async`チャネルを扱うことを好ましくするのは、チャネルと繋げるためにや、複雑な" -"コントロールフローを作るために、チャネルを他の`future`と繋げられることです。" +"`async`チャネルを扱うことを好ましくするのは、チャネルと繋げるためにや、複雑なコ" +"ントロールフローを作るために、チャネルを他の`future`と繋げられることです。" #: src/concurrency/async-control-flow/join.md msgid "" -"A join operation waits until all of a set of futures are ready, and returns " -"a collection of their results. This is similar to `Promise.all` in " -"JavaScript or `asyncio.gather` in Python." +"A join operation waits until all of a set of futures are ready, and returns a " +"collection of their results. This is similar to `Promise.all` in JavaScript or " +"`asyncio.gather` in Python." msgstr "" -"Joinという操作では、futureの集合の準備が整うまで待機し、その後に結果をまとめ" -"て返します。これはJavaScriptにおける `Promise.all` やPythonにおける`asyncio." -"gather`に似ています。" +"Joinという操作では、futureの集合の準備が整うまで待機し、その後に結果をまとめて返" +"します。これはJavaScriptにおける `Promise.all` やPythonにおける`asyncio.gather`" +"に似ています。" #: src/concurrency/async-control-flow/join.md msgid "\"https://google.com\"" @@ -21807,13 +21391,13 @@ msgstr "\"{page_counts:#?}\"" #: src/concurrency/async-control-flow/join.md msgid "" "For multiple futures of disjoint types, you can use `std::future::join!` but " -"you must know how many futures you will have at compile time. This is " -"currently in the `futures` crate, soon to be stabilised in `std::future`." +"you must know how many futures you will have at compile time. This is currently " +"in the `futures` crate, soon to be stabilised in `std::future`." msgstr "" -"複数の互いに素な型のfutureに対しては、`std::future::join!`を利用できます。し" -"かし、いくつのfutureがコンパイル時に存在しているのかを把握しておく必要があり" -"ます。これは現在`futures`クレートにありますが、近いうちに`std::future`に統合" -"される予定です。" +"複数の互いに素な型のfutureに対しては、`std::future::join!`を利用できます。しか" +"し、いくつのfutureがコンパイル時に存在しているのかを把握しておく必要があります。" +"これは現在`futures`クレートにありますが、近いうちに`std::future`に統合される予定" +"です。" #: src/concurrency/async-control-flow/join.md #, fuzzy @@ -21821,48 +21405,46 @@ msgid "" "The risk of `join` is that one of the futures may never resolve, this would " "cause your program to stall." msgstr "" -"`join`のリスクは、複数のfutureのうちの1つでも解決されないとプログラムがス" -"トールしてしまうということです。 " +"`join`のリスクは、複数のfutureのうちの1つでも解決されないとプログラムがストール" +"してしまうということです。 " #: src/concurrency/async-control-flow/join.md msgid "" -"You can also combine `join_all` with `join!` for instance to join all " -"requests to an http service as well as a database query. Try adding a " -"`tokio::time::sleep` to the future, using `futures::join!`. This is not a " -"timeout (that requires `select!`, explained in the next chapter), but " -"demonstrates `join!`." +"You can also combine `join_all` with `join!` for instance to join all requests " +"to an http service as well as a database query. Try adding a `tokio::time::" +"sleep` to the future, using `futures::join!`. This is not a timeout (that " +"requires `select!`, explained in the next chapter), but demonstrates `join!`." msgstr "" -"また、`join_all`と`join!`を組み合わせることもできます。それは、例えばデータ" -"ベースのクエリと一緒にhttpサービスへの全てのリクエストをjoinする場合です。" -"futureに`futures::join!`を用いて、`tokio::time::sleep`を追加してみてくださ" -"い。これは(次のチャプターで説明する、`select!`を必要とする)タイムアウトでは" -"ありませんが、`join!`の良い実演となっています。" +"また、`join_all`と`join!`を組み合わせることもできます。それは、例えばデータベー" +"スのクエリと一緒にhttpサービスへの全てのリクエストをjoinする場合です。futureに" +"`futures::join!`を用いて、`tokio::time::sleep`を追加してみてください。これは(次" +"のチャプターで説明する、`select!`を必要とする)タイムアウトではありませんが、" +"`join!`の良い実演となっています。" #: src/concurrency/async-control-flow/select.md msgid "" -"A select operation waits until any of a set of futures is ready, and " -"responds to that future's result. In JavaScript, this is similar to `Promise." -"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio." +"A select operation waits until any of a set of futures is ready, and responds " +"to that future's result. In JavaScript, this is similar to `Promise.race`. In " +"Python, it compares to `asyncio.wait(task_set, return_when=asyncio." "FIRST_COMPLETED)`." msgstr "" -"Selectという操作では、futureの集合のうち、いずれか1つの準備が整うまで待機" -"し、そのfutureが提供する結果に対して応答します。これはJavaScriptにおける" -"`Promise.race`に似ています。また、Pythonにおける `asyncio.wait(task_set, " -"return_when=asyncio.FIRST_COMPLETED)`と比べることができます。" +"Selectという操作では、futureの集合のうち、いずれか1つの準備が整うまで待機し、そ" +"のfutureが提供する結果に対して応答します。これはJavaScriptにおける`Promise.race`" +"に似ています。また、Pythonにおける `asyncio.wait(task_set, return_when=asyncio." +"FIRST_COMPLETED)`と比べることができます。" #: src/concurrency/async-control-flow/select.md #, fuzzy msgid "" -"Similar to a match statement, the body of `select!` has a number of arms, " -"each of the form `pattern = future => statement`. When a `future` is ready, " -"its return value is destructured by the `pattern`. The `statement` is then " -"run with the resulting variables. The `statement` result becomes the result " -"of the `select!` macro." +"Similar to a match statement, the body of `select!` has a number of arms, each " +"of the form `pattern = future => statement`. When a `future` is ready, its " +"return value is destructured by the `pattern`. The `statement` is then run with " +"the resulting variables. The `statement` result becomes the result of the " +"`select!` macro." msgstr "" -"Matchステートメントのように、`select!`の本体にはいくつかの 「腕」があり、それ" -"ぞれは`pattern = future => statement`の形をとっています。 `future`の準備が" -"整った時、その`statement`は`future`の結果に紐づく`pattern`の変数を用いて実行" -"されます。" +"Matchステートメントのように、`select!`の本体にはいくつかの 「腕」があり、それぞ" +"れは`pattern = future => statement`の形をとっています。 `future`の準備が整った" +"時、その`statement`は`future`の結果に紐づく`pattern`の変数を用いて実行されます。" #: src/concurrency/async-control-flow/select.md #, fuzzy @@ -21884,16 +21466,16 @@ msgstr "" #: src/concurrency/async-control-flow/select.md msgid "" -"The `listener` async block here is a common form: wait for some async event, " -"or for a timeout. Change the `sleep` to sleep longer to see it fail. Why " -"does the `send` also fail in this situation?" +"The `listener` async block here is a common form: wait for some async event, or " +"for a timeout. Change the `sleep` to sleep longer to see it fail. Why does the " +"`send` also fail in this situation?" msgstr "" #: src/concurrency/async-control-flow/select.md msgid "" -"`select!` is also often used in a loop in \"actor\" architectures, where a " -"task reacts to events in a loop. That has some pitfalls, which will be " -"discussed in the next segment." +"`select!` is also often used in a loop in \"actor\" architectures, where a task " +"reacts to events in a loop. That has some pitfalls, which will be discussed in " +"the next segment." msgstr "" #: src/concurrency/async-pitfalls.md @@ -21904,9 +21486,9 @@ msgid "" "with its share of pitfalls and footguns. We illustrate some of them in this " "chapter." msgstr "" -"async / await は、同時実行非同期プログラミングのための便利で効率的な抽象化を" -"提供します。しかし、Rust の async / await モデルには、注意点や誤用されやすい" -"機能もいくつかあるため、この章ではその点について説明します。" +"async / await は、同時実行非同期プログラミングのための便利で効率的な抽象化を提供" +"します。しかし、Rust の async / await モデルには、注意点や誤用されやすい機能もい" +"くつかあるため、この章ではその点について説明します。" #: src/concurrency/async-pitfalls.md msgid "Pin" @@ -21919,13 +21501,12 @@ msgstr "エグゼキュータのブロック" #: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "Most async runtimes only allow IO tasks to run concurrently. This means that " -"CPU blocking tasks will block the executor and prevent other tasks from " -"being executed. An easy workaround is to use async equivalent methods where " -"possible." +"CPU blocking tasks will block the executor and prevent other tasks from being " +"executed. An easy workaround is to use async equivalent methods where possible." msgstr "" -"ほとんどの非同期ランタイムは、IO タスクの同時実行のみを許可します。つまり、" -"CPU ブロックタスクはエグゼキュータをブロックし、他のタスクの実行を妨げます。" -"簡単な回避策は、可能であれば非同期の同等のメソッドを使用することです。" +"ほとんどの非同期ランタイムは、IO タスクの同時実行のみを許可します。つまり、CPU " +"ブロックタスクはエグゼキュータをブロックし、他のタスクの実行を妨げます。簡単な回" +"避策は、可能であれば非同期の同等のメソッドを使用することです。" #: src/concurrency/async-pitfalls/blocking-executor.md msgid "\"future {id} slept for {duration_ms}ms, finished after {}ms\"" @@ -21939,60 +21520,56 @@ msgstr "\"current_thread\"" msgid "" "Run the code and see that the sleeps happen consecutively rather than " "concurrently." -msgstr "" -"コードを続けて、スリープが同時ではなく連続して発生することを確認します。" +msgstr "コードを続けて、スリープが同時ではなく連続して発生することを確認します。" #: src/concurrency/async-pitfalls/blocking-executor.md msgid "" -"The `\"current_thread\"` flavor puts all tasks on a single thread. This " -"makes the effect more obvious, but the bug is still present in the multi-" -"threaded flavor." +"The `\"current_thread\"` flavor puts all tasks on a single thread. This makes " +"the effect more obvious, but the bug is still present in the multi-threaded " +"flavor." msgstr "" -"`\"current_thread\"` フレーバーは、すべてのタスクを 1 つのスレッドに配置しま" -"す。これにより、影響はより明確になりますが、バグはまだマルチスレッド フレー" -"バーに存在します。" +"`\"current_thread\"` フレーバーは、すべてのタスクを 1 つのスレッドに配置します。" +"これにより、影響はより明確になりますが、バグはまだマルチスレッド フレーバーに存" +"在します。" #: src/concurrency/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` に切り替えて、その結果を待ちま" -"す。" +"`std::thread::sleep` を `tokio::time::sleep` に切り替えて、その結果を待ちます。" #: src/concurrency/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 に変換します。" +"もう 1 つの修正策は、`tokio::task::spawn_blocking` を使用することです。これは、" +"実際のスレッドを生成し、エグゼキュータをブロックせずにそのハンドルを Future に変" +"換します。" #: src/concurrency/async-pitfalls/blocking-executor.md msgid "" "You should not think of tasks as OS threads. They do not map 1 to 1 and most " "executors will allow many tasks to run on a single OS thread. This is " -"particularly problematic when interacting with other libraries via FFI, " -"where that library might depend on thread-local storage or map to specific " -"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` を使用することをお" -"すすめします。" +"particularly problematic when interacting with other libraries via FFI, where " +"that library might depend on thread-local storage or map to specific 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/concurrency/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." +"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` でミューテックスを保持す" -"ると、別のタスクがブロックされ、そのタスクが同じスレッドで実行される可能性が" -"あります。" +"同期ミューテックスは慎重に使用してください。`.await` でミューテックスを保持する" +"と、別のタスクがブロックされ、そのタスクが同じスレッドで実行される可能性がありま" +"す。" #: src/concurrency/async-pitfalls/pin.md msgid "" @@ -22000,18 +21577,18 @@ msgid "" "type returned is the result of a compiler transformation which turns local " "variables into data stored inside the future." msgstr "" -"非同期ブロックと関数は、`Future` トレイトを実装する型を返します。返される型" -"は、ローカル変数を Future の内部に格納されるデータに変換するコンパイラ変換の" -"結果です。" +"非同期ブロックと関数は、`Future` トレイトを実装する型を返します。返される型は、" +"ローカル変数を Future の内部に格納されるデータに変換するコンパイラ変換の結果で" +"す。" #: src/concurrency/async-pitfalls/pin.md msgid "" -"Some of those variables can hold pointers to other local variables. Because " -"of that, the future should never be moved to a different memory location, as " -"it would invalidate those pointers." +"Some of those variables can hold pointers to other local variables. Because of " +"that, the future should never be moved to a different memory location, as it " +"would invalidate those pointers." msgstr "" -"これらの変数の一部は、他のローカル変数へのポインタを保持できます。これらのポ" -"インタが無効になるため、Futureを別のメモリ位置に移動しないでください。" +"これらの変数の一部は、他のローカル変数へのポインタを保持できます。これらのポイン" +"タが無効になるため、Futureを別のメモリ位置に移動しないでください。" #: src/concurrency/async-pitfalls/pin.md msgid "" @@ -22020,9 +21597,9 @@ msgid "" "operations that would move the instance it points to into a different memory " "location." msgstr "" -"メモリ内の Future 型が移動するのを防ぐには、固定されたポインタのみを介して" -"ポーリングするようにします。`Pin` は参照のラッパーで、参照先のインスタンスを" -"別のメモリ位置に移動するオペレーションをすべて禁止します。" +"メモリ内の Future 型が移動するのを防ぐには、固定されたポインタのみを介してポーリ" +"ングするようにします。`Pin` は参照のラッパーで、参照先のインスタンスを別のメモリ" +"位置に移動するオペレーションをすべて禁止します。" #: src/concurrency/async-pitfalls/pin.md msgid "" @@ -22069,108 +21646,105 @@ msgid "" "You may recognize this as an example of the actor pattern. Actors typically " "call `select!` in a loop." msgstr "" -"これはアクターのパターンの一例です。アクターは通常、ループ内で `select!` を呼" -"び出します。" +"これはアクターのパターンの一例です。アクターは通常、ループ内で `select!` を呼び" +"出します。" #: src/concurrency/async-pitfalls/pin.md msgid "" -"This serves as a summation of a few of the previous lessons, so take your " -"time with it." +"This serves as a summation of a few of the previous lessons, so take your time " +"with it." msgstr "" -"これはこれまでのレッスンの一部をまとめたものですので、時間をかけて復習してく" -"ださい。" +"これはこれまでのレッスンの一部をまとめたものですので、時間をかけて復習してくださ" +"い。" #: src/concurrency/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!` に追" -"加しただけでは、実行されません。なぜでしょうか?" +"`_ = sleep(Duration::from_millis(100)) => { println!(..) }` を `select!` に追加" +"しただけでは、実行されません。なぜでしょうか?" #: src/concurrency/async-pitfalls/pin.md -msgid "" -"Instead, add a `timeout_fut` containing that future outside of the `loop`:" +msgid "Instead, add a `timeout_fut` containing that future outside of the `loop`:" msgstr "" "代わりに、`loop` の外側で、その Future を含む `timeout_fut` を追加します。" #: src/concurrency/async-pitfalls/pin.md msgid "" "This still doesn't work. Follow the compiler errors, adding `&mut` to the " -"`timeout_fut` in the `select!` to work around the move, then using `Box::" -"pin`:" +"`timeout_fut` in the `select!` to work around the move, then using `Box::pin`:" msgstr "" "これでもうまくいきません。コンパイルエラーにあるように、`select!` 内の " -"`timeout_fut` に `&mut` を追加して移動を回避してから、`Box::pin` を使用しま" -"す。" +"`timeout_fut` に `&mut` を追加して移動を回避してから、`Box::pin` を使用します。" #: src/concurrency/async-pitfalls/pin.md #, fuzzy msgid "" "This compiles, but once the timeout expires it is `Poll::Ready` on every " -"iteration (a fused future would help with this). Update to reset " -"`timeout_fut` every time it expires:" +"iteration (a fused future would help with this). Update to reset `timeout_fut` " +"every time it expires:" msgstr "" "これはコンパイルされますが、タイムアウトになると、すべての反復処理で `Poll::" -"Ready` になります(融合された Future がこれに役立ちます)。期限が切れるたび" -"に `timeout_fut` をリセットするように更新します。" +"Ready` になります(融合された Future がこれに役立ちます)。期限が切れるたびに " +"`timeout_fut` をリセットするように更新します。" #: src/concurrency/async-pitfalls/pin.md msgid "" "Box allocates on the heap. In some cases, `std::pin::pin!` (only recently " -"stabilized, with older code often using `tokio::pin!`) is also an option, " -"but that is difficult to use for a future that is reassigned." +"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 に使用することは困難です。" +"Box でヒープに割り当てます。場合によっては `std::pin::pin!`(最近安定化されたば" +"かりで、古いコードでは多くの場合に `tokio::pin!` を使用します)も使用できます" +"が、再割り当てされる Future に使用することは困難です。" #: src/concurrency/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." +"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` チャ" -"ネルに送信する別のタスクを生成するという方法もあります。" +"別の方法としては、`pin` をまったく使用せずに、100 ミリ秒ごとに `oneshot` チャネ" +"ルに送信する別のタスクを生成するという方法もあります。" #: src/concurrency/async-pitfalls/pin.md msgid "" -"Data that contains pointers to itself is called self-referential. Normally, " -"the Rust borrow checker would prevent self-referential data from being " -"moved, as the references cannot outlive the data they point to. However, the " -"code transformation for async blocks and functions is not verified by the " -"borrow checker." +"Data that contains pointers to itself is called self-referential. Normally, the " +"Rust borrow checker would prevent self-referential data from being moved, as " +"the references cannot outlive the data they point to. However, the code " +"transformation for async blocks and functions is not verified by the borrow " +"checker." msgstr "" -"それ自体へのポインタを含むデータは、自己参照と呼ばれます。通常、Rust 借用" -"チェッカーは、参照が参照先のデータより長く存続できないため、自己参照データの" -"移動を防ぎます。ただし、非同期ブロックと関数のコード変換は、借用チェッカーに" -"よって検証されません。" +"それ自体へのポインタを含むデータは、自己参照と呼ばれます。通常、Rust 借用チェッ" +"カーは、参照が参照先のデータより長く存続できないため、自己参照データの移動を防ぎ" +"ます。ただし、非同期ブロックと関数のコード変換は、借用チェッカーによって検証され" +"ません。" #: src/concurrency/async-pitfalls/pin.md msgid "" -"`Pin` is a wrapper around a reference. An object cannot be moved from its " -"place using a pinned pointer. However, it can still be moved through an " -"unpinned pointer." +"`Pin` is a wrapper around a reference. An object cannot be moved from its place " +"using a pinned pointer. However, it can still be moved through an unpinned " +"pointer." msgstr "" -"`Pin` は参照のラッパーです。固定されたポインタを使用して、オブジェクトをその" -"場所から移動することはできません。ただし、固定されていないポインタを介して移" -"動することは可能です。" +"`Pin` は参照のラッパーです。固定されたポインタを使用して、オブジェクトをその場所" +"から移動することはできません。ただし、固定されていないポインタを介して移動するこ" +"とは可能です。" #: src/concurrency/async-pitfalls/pin.md msgid "" -"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of " -"`&mut Self` to refer to the instance. That's why it can only be called on a " -"pinned pointer." +"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of `&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>` " -"を使用してインスタンスを参照します。固定されたポインタでのみ呼び出すことがで" -"きるのはこのためです。" +"`Future` トレイトの `poll` メソッドは、`&mut Self` ではなく `Pin<&mut Self>` を" +"使用してインスタンスを参照します。固定されたポインタでのみ呼び出すことができるの" +"はこのためです。" #: src/concurrency/async-pitfalls/async-traits.md msgid "" -"Async methods in traits are were stabilized in the 1.75 release. This " -"required support for using return-position `impl Trait` in traits, as the " -"desugaring for `async fn` includes `-> impl Future`." +"Async methods in traits are were stabilized in the 1.75 release. This required " +"support for using return-position `impl Trait` in traits, as the desugaring for " +"`async fn` includes `-> impl Future`." msgstr "" #: src/concurrency/async-pitfalls/async-traits.md @@ -22181,8 +21755,8 @@ msgstr "" #: src/concurrency/async-pitfalls/async-traits.md msgid "" -"Return-position `impl Trait` captures all in-scope lifetimes (so some " -"patterns of borrowing cannot be expressed)." +"Return-position `impl Trait` captures all in-scope lifetimes (so some patterns " +"of borrowing cannot be expressed)." msgstr "" #: src/concurrency/async-pitfalls/async-traits.md @@ -22194,11 +21768,11 @@ msgstr "" #: src/concurrency/async-pitfalls/async-traits.md #, fuzzy msgid "" -"The [async_trait](https://docs.rs/async-trait/) crate provides a workaround " -"for `dyn` support through a macro, with some caveats:" +"The [async_trait](https://docs.rs/async-trait/) crate provides a workaround for " +"`dyn` support through a macro, with some caveats:" msgstr "" -"クレート [async_trait](https://docs.rs/async-trait/latest/async_trait/) は、" -"マクロによる回避策を提供します。" +"クレート [async_trait](https://docs.rs/async-trait/latest/async_trait/) は、マク" +"ロによる回避策を提供します。" #: src/concurrency/async-pitfalls/async-traits.md #, fuzzy @@ -22215,20 +21789,19 @@ 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` は簡単に使用できますが、ヒープ割り当てを使用してこれを実現して" -"います。このヒープ割り当てには、パフォーマンス オーバーヘッドが伴います。" +"`async_trait` は簡単に使用できますが、ヒープ割り当てを使用してこれを実現していま" +"す。このヒープ割り当てには、パフォーマンス オーバーヘッドが伴います。" #: src/concurrency/async-pitfalls/async-traits.md #, fuzzy msgid "" -"The challenges in language support for `async trait` are too deep to " -"describe in-depth in this class. See [this blog post](https://" -"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-" -"hard/) by Niko Matsakis if you are interested in digging deeper. See also " -"these keywords:" +"The challenges in language support for `async trait` are too deep to describe " +"in-depth in this class. See [this blog post](https://smallcultfollowing.com/" +"babysteps/blog/2019/10/26/async-fn-in-traits-are-hard/) by Niko Matsakis if you " +"are interested in digging deeper. See also these keywords:" msgstr "" -"`async trait` の言語サポートにおける課題は、Rust の中でも難解な部類に入るた" -"め、ここでは詳しく説明する必要はないでしょう。Niko Matsakis が [こちらの投稿]" +"`async trait` の言語サポートにおける課題は、Rust の中でも難解な部類に入るため、" +"ここでは詳しく説明する必要はないでしょう。Niko Matsakis が [こちらの投稿]" "(https://smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-" "are-hard/) で詳しく説明していますので、深く掘り下げたい方はご覧ください。" @@ -22241,31 +21814,30 @@ msgstr "" #: src/concurrency/async-pitfalls/async-traits.md msgid "" -"[RPITIT](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits." -"html): short for return-position `impl Trait` in trait (RPIT in trait)." +"[RPITIT](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html): " +"short for return-position `impl Trait` in trait (RPIT in trait)." msgstr "" #: src/concurrency/async-pitfalls/async-traits.md #, fuzzy msgid "" -"Try creating a new sleeper struct that will sleep for a random amount of " -"time and adding it to the `Vec`." +"Try creating a new sleeper struct that will sleep for a random amount of time " +"and adding it to the `Vec`." msgstr "" -"ランダムな時間スリープする新しいスリーパー構造体を作成し、Vec に追加してみま" -"しょう。" +"ランダムな時間スリープする新しいスリーパー構造体を作成し、Vec に追加してみましょ" +"う。" #: src/concurrency/async-pitfalls/cancellation.md msgid "" "Dropping a future implies it can never be polled again. This is called " -"_cancellation_ and it can occur at any `await` point. Care is needed to " -"ensure the system works correctly even when futures are cancelled. For " -"example, it shouldn't deadlock or lose data." -msgstr "" -"Future をドロップすると、その Future を再度ポーリングすることはできません。こ" -"れはキャンセルと呼ばれ、どの `await` ポイントでも発生する可能性があります。そ" -"のため、Future がキャンセルされた場合でも、システムが正常に動作するようにして" -"おく必要があります。たとえば、デッドロックやデータの消失があってはなりませ" -"ん。" +"_cancellation_ and it can occur at any `await` point. Care is needed to 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/concurrency/async-pitfalls/cancellation.md msgid "\"not UTF-8\"" @@ -22284,16 +21856,16 @@ 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` が保持する状態を考慮する必要があります。" +"コンパイラではキャンセル安全性を確保できません。API ドキュメントを読み、`async " +"fn` が保持する状態を考慮する必要があります。" #: src/concurrency/async-pitfalls/cancellation.md msgid "" -"Unlike `panic` and `?`, cancellation is part of normal control flow (vs " -"error-handling)." +"Unlike `panic` and `?`, cancellation is part of normal control flow (vs error-" +"handling)." msgstr "" -"`panic` や `?`とは異なり、キャンセルは(エラー処理ではなく)通常の制御フロー" -"の一部です。" +"`panic` や `?`とは異なり、キャンセルは(エラー処理ではなく)通常の制御フローの一" +"部です。" #: src/concurrency/async-pitfalls/cancellation.md msgid "The example loses parts of the string." @@ -22301,18 +21873,16 @@ msgstr "この例では、文字列の一部が失われています。" #: src/concurrency/async-pitfalls/cancellation.md msgid "" -"Whenever the `tick()` branch finishes first, `next()` and its `buf` are " -"dropped." +"Whenever the `tick()` branch finishes first, `next()` and its `buf` are dropped." msgstr "" "`tick()` 分岐が先に終了するたびに、`next()` とその `buf` がドロップされます。" #: src/concurrency/async-pitfalls/cancellation.md msgid "" -"`LinesReader` can be made cancellation-safe by making `buf` part of the " -"struct:" +"`LinesReader` can be made cancellation-safe by making `buf` part of the struct:" msgstr "" -"`buf` を構造体の一部にすることで、`LinesReader` にキャンセル安全性を持たせる" -"ことができます。" +"`buf` を構造体の一部にすることで、`LinesReader` にキャンセル安全性を持たせること" +"ができます。" #: src/concurrency/async-pitfalls/cancellation.md msgid "// prefix buf and bytes with self.\n" @@ -22321,22 +21891,22 @@ msgstr "// buf と bytes の先頭に self を付加します。\n" #: src/concurrency/async-pitfalls/cancellation.md msgid "" "[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval." -"html#method.tick) is cancellation-safe because it keeps track of whether a " -"tick has been 'delivered'." +"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) は、ティックが「配信済み」かどうかを追跡しているため、安全" -"にキャンセルできます。" +"html#method.tick) は、ティックが「配信済み」かどうかを追跡しているため、安全に" +"キャンセルできます。" #: src/concurrency/async-pitfalls/cancellation.md msgid "" -"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait." -"AsyncReadExt.html#method.read) is cancellation-safe because it either " -"returns or doesn't read data." +"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.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) は、データを返すか、データを読み取らないかのい" -"ずれかであるため、安全にキャンセルできます。" +"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.AsyncReadExt." +"html#method.read) は、データを返すか、データを読み取らないかのいずれかであるた" +"め、安全にキャンセルできます。" #: src/concurrency/async-pitfalls/cancellation.md msgid "" @@ -22345,8 +21915,8 @@ msgid "" "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) はこの例と類似しており、安全にキャンセ" -"ルできません。詳細と代替方法については、ドキュメントをご覧ください。" +"AsyncBufReadExt.html#method.read_line) はこの例と類似しており、安全にキャンセル" +"できません。詳細と代替方法については、ドキュメントをご覧ください。" #: src/concurrency/async-exercises/dining-philosophers.md #: src/concurrency/async-exercises/solutions.md @@ -22360,18 +21930,18 @@ msgid "" "See [dining philosophers](../sync-exercises/dining-philosophers.md) for a " "description of the problem." msgstr "" -"この問題の詳細については、[食事する哲学者](dining-philosophers.md) をご覧くだ" -"さい。" +"この問題の詳細については、[食事する哲学者](dining-philosophers.md) をご覧くださ" +"い。" #: src/concurrency/async-exercises/dining-philosophers.md msgid "" "As before, you will need a local [Cargo installation](../../cargo/running-" -"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:" +"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` がデッドロックしないことを確認します。" +"locally.md) が必要です。以下のコードを `src/main.rs` というファイルにコピーし、" +"空欄を埋めて、`cargo run` がデッドロックしないことを確認します。" #: src/concurrency/async-exercises/dining-philosophers.md msgid "// Keep trying until we have both forks\n" @@ -22384,11 +21954,11 @@ msgstr "// 哲学者が思索と食事を行うようにする\n" #: src/concurrency/async-exercises/dining-philosophers.md msgid "" -"Since this time you are using Async Rust, you'll need a `tokio` dependency. " -"You can use the following `Cargo.toml`:" +"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` を使用できます。" +"今回は非同期 Rust を使用するため、`tokio` 依存関係が必要になります。次の `Cargo." +"toml` を使用できます。" #: src/concurrency/async-exercises/dining-philosophers.md msgid "" @@ -22416,11 +21986,11 @@ msgstr "" #: src/concurrency/async-exercises/dining-philosophers.md msgid "" -"Also note that this time you have to use the `Mutex` and the `mpsc` module " -"from the `tokio` crate." +"Also note that this time you have to use the `Mutex` and the `mpsc` module from " +"the `tokio` crate." msgstr "" -"また、今度は `tokio` クレートの `Mutex` モジュールと `mpsc` モジュールを使用" -"する必要があることにも注意してください。" +"また、今度は `tokio` クレートの `Mutex` モジュールと `mpsc` モジュールを使用する" +"必要があることにも注意してください。" #: src/concurrency/async-exercises/dining-philosophers.md msgid "Can you make your implementation single-threaded?" @@ -22429,28 +21999,27 @@ msgstr "実装をシングルスレッドにできますか?" #: src/concurrency/async-exercises/chat-app.md msgid "" "In this exercise, we want to use our new knowledge to implement a broadcast " -"chat application. We have a chat server that the clients connect to and " -"publish their messages. The client reads user messages from the standard " -"input, and sends them to the server. The chat server broadcasts each message " -"that it receives to all the clients." +"chat application. We have a chat server that the clients connect to and publish " +"their messages. The client reads user messages from the standard input, and " +"sends them to the server. The chat server broadcasts each message that it " +"receives to all the clients." msgstr "" -"この演習では、新たに身に付けた知識を活かしてブロードキャスト チャット アプリ" -"を実装します。クライアントが接続してメッセージを公開するチャット サーバーがあ" -"ります。クライアントは標準入力からユーザー メッセージを読み取り、サーバーに送" -"信します。チャット サーバーは受信した各メッセージをすべてのクライアントにブ" -"ロードキャストします。" +"この演習では、新たに身に付けた知識を活かしてブロードキャスト チャット アプリを実" +"装します。クライアントが接続してメッセージを公開するチャット サーバーがありま" +"す。クライアントは標準入力からユーザー メッセージを読み取り、サーバーに送信しま" +"す。チャット サーバーは受信した各メッセージをすべてのクライアントにブロードキャ" +"ストします。" #: src/concurrency/async-exercises/chat-app.md msgid "" -"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/" -"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]" -"(https://docs.rs/tokio-websockets/) for the communication between the client " -"and the server." +"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/sync/" +"broadcast/fn.channel.html) on the server, and [`tokio_websockets`](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/) を使用し" -"ます。" +"latest/tokio/sync/broadcast/fn.channel.html) を使用し、クライアントとサーバー間" +"の通信には [`tokio_websockets`](https://docs.rs/tokio-websockets/) を使用しま" +"す。" #: src/concurrency/async-exercises/chat-app.md msgid "Create a new Cargo project and add the following dependencies:" @@ -22487,8 +22056,8 @@ msgstr "" "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" +"tokio-websockets = { version = \"0.5.1\", features = [\"client\", \"fastrand\", " +"\"server\", \"sha1_smol\"] }\n" "```" #: src/concurrency/async-exercises/chat-app.md @@ -22498,11 +22067,11 @@ msgstr "必要な API" #: src/concurrency/async-exercises/chat-app.md msgid "" "You are going to need the following functions from `tokio` and " -"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes " -"to familiarize yourself with the API." +"[`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 に対する理解を深めてください。" +"`tokio` と [`tokio_websockets`](https://docs.rs/tokio-websockets/) の以下の関数" +"が必要になります。少し時間をかけて API に対する理解を深めてください。" #: src/concurrency/async-exercises/chat-app.md msgid "" @@ -22516,13 +22085,13 @@ msgstr "" #: src/concurrency/async-exercises/chat-app.md msgid "" -"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/" -"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for " -"asynchronously sending messages on a Websocket Stream." +"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/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 上でメッセージを非同期で送信します。" +"`WebSocketStream` によって実装された [SinkExt::send()](https://docs.rs/futures-" +"util/0.3.28/futures_util/sink/trait.SinkExt.html#method.send): Websocket Stream " +"上でメッセージを非同期で送信します。" #: src/concurrency/async-exercises/chat-app.md msgid "" @@ -22536,12 +22105,12 @@ msgstr "" #: src/concurrency/async-exercises/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." +"[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): ブロードキャスト チャンネルをサブスクラ" -"イブします。" +"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/struct." +"Sender.html#method.subscribe): ブロードキャスト チャンネルをサブスクライブしま" +"す。" #: src/concurrency/async-exercises/chat-app.md msgid "Two binaries" @@ -22552,28 +22121,28 @@ msgid "" "Normally in a Cargo project, you can have only one binary, and one `src/main." "rs` file. In this project, we need two binaries. One for the client, and one " "for the server. You could potentially make them two separate Cargo projects, " -"but we are going to put them in a single Cargo project with two binaries. " -"For this to work, the client and the server code should go under `src/bin` " -"(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) をご覧ください)。" +"but we are going to put them in a single Cargo project with two binaries. For " +"this to work, the client and the server code should go under `src/bin` (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/concurrency/async-exercises/chat-app.md msgid "" -"Copy the following server and client code into `src/bin/server.rs` and `src/" -"bin/client.rs`, respectively. Your task is to complete these files as " -"described below." +"Copy the following server and client code into `src/bin/server.rs` and `src/bin/" +"client.rs`, respectively. Your task is to complete these files as described " +"below." msgstr "" -"次のサーバーとクライアントのコードを、それぞれ`src/bin/server.rs` と `src/" -"bin/client.rs` にコピーします。ここでのタスクは、以下で説明するように、これら" -"のファイルを完成させることです。" +"次のサーバーとクライアントのコードを、それぞれ`src/bin/server.rs` と `src/bin/" +"client.rs` にコピーします。ここでのタスクは、以下で説明するように、これらのファ" +"イルを完成させることです。" #: src/concurrency/async-exercises/chat-app.md #: src/concurrency/async-exercises/solutions.md @@ -22636,10 +22205,10 @@ 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 つのタスクは、サーバーで受信したメッセージをクライアントに送信" -"します。" +"ヒント: 2 つのタスクを連続ループで同時に実行するには、`tokio::select!` を使用し" +"ます。1 つのタスクは、クライアントからメッセージを受信してブロードキャストしま" +"す。もう 1 つのタスクは、サーバーで受信したメッセージをクライアントに送信しま" +"す。" #: src/concurrency/async-exercises/chat-app.md msgid "Complete the main function in `src/bin/client.rs`." @@ -22648,21 +22217,21 @@ msgstr "`src/bin/client.rs` のメイン関数を完成させます。" #: src/concurrency/async-exercises/chat-app.md msgid "" "Hint: As before, use `tokio::select!` in a continuous loop for concurrently " -"performing two tasks: (1) reading user messages from standard input and " -"sending them to the server, and (2) receiving messages from the server, and " -"displaying them for the user." +"performing two tasks: (1) reading user messages from standard input and sending " +"them to the server, and (2) receiving messages from the server, and displaying " +"them for the user." msgstr "" -"ヒント: 前の例と同様に、`tokio::select!` を連続ループで使用し、(1)標準入力" -"からユーザー メッセージを読み取ってサーバーに送信するタスクと、(2)サーバー" -"からメッセージを受信してユーザーに表示するタスクを同時に実行します。" +"ヒント: 前の例と同様に、`tokio::select!` を連続ループで使用し、(1)標準入力から" +"ユーザー メッセージを読み取ってサーバーに送信するタスクと、(2)サーバーからメッ" +"セージを受信してユーザーに表示するタスクを同時に実行します。" #: src/concurrency/async-exercises/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/concurrency/async-exercises/solutions.md msgid "" @@ -22694,8 +22263,7 @@ msgid "" " // messages on `bcast_rx` and sending them to the client.\n" msgstr "" "// (1) `ws_stream` からメッセージを受信してブロードキャストするタスクと、\n" -" // (2)`bcast_rx` でメッセージを受信してクライアントに送信しするタスク" -"を\n" +" // (2)`bcast_rx` でメッセージを受信してクライアントに送信しするタスクを\n" " // 同時に実行するための連続ループ。\n" #: src/concurrency/async-exercises/solutions.md @@ -22712,30 +22280,30 @@ msgstr "\"From server: {}\"" #: src/thanks.md msgid "" -"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and " -"that it was useful." +"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and that " +"it was useful." msgstr "Comprehensive Rust 🦀! を受講いただきありがとうございました。" #: src/thanks.md msgid "" -"We've had a lot of fun putting the course together. The course is not " -"perfect, so if you spotted any mistakes or have ideas for improvements, " -"please get in [contact with us on GitHub](https://github.com/google/" -"comprehensive-rust/discussions). We would love to hear from you." +"We've had a lot of fun putting the course together. The course is not perfect, " +"so if you spotted any mistakes or have ideas for improvements, 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)。皆さんからのフィードバック" -"をお待ちしています。" +"ここまで多くのことを学んできましたが、このコースは完璧ではないため、間違いを見つ" +"けた場合や改善のアイデアがある場合は [GitHub でお知らせください](https://github." +"com/google/comprehensive-rust/discussions)。皆さんからのフィードバックをお待ちし" +"ています。" #: src/glossary.md msgid "" -"The following is a glossary which aims to give a short definition of many " -"Rust terms. For translations, this also serves to connect the term back to " -"the English original." +"The following is a glossary which aims to give a short definition of many Rust " +"terms. For translations, this also serves to connect the term back to the " +"English original." msgstr "" -"以下は、Rust の多くの用語を簡単に定義することを目的とした用語集です。翻訳時に" -"用語を英語の原文に関連付けるのにも役立ちます。" +"以下は、Rust の多くの用語を簡単に定義することを目的とした用語集です。翻訳時に用" +"語を英語の原文に関連付けるのにも役立ちます。" #. Please add the English term in italic after your translated term. Also, please keep the hard line breaks to ensure a nice formatting. #: src/glossary.md @@ -22758,8 +22326,8 @@ msgstr "" #: src/glossary.md msgid "" "associated type: \n" -"A type associated with a specific trait. Useful for defining the " -"relationship between types." +"A type associated with a specific trait. Useful for defining the relationship " +"between types." msgstr "" #: src/glossary.md @@ -22769,8 +22337,8 @@ msgid "" "system. See [Bare-metal Rust](bare-metal.md)." msgstr "" "ベアメタル Rust(Bare-metal Rust): \n" -"低レベルの Rust 開発。多くの場合、オペレーティング システムのないシステムにデ" -"プロイされます。[ベアメタル Rust](bare-metal.md) をご覧ください。" +"低レベルの Rust 開発。多くの場合、オペレーティング システムのないシステムにデプ" +"ロイされます。[ベアメタル Rust](bare-metal.md) をご覧ください。" #: src/glossary.md #, fuzzy @@ -22809,8 +22377,7 @@ msgstr "" #: src/glossary.md msgid "" "build: \n" -"The process of converting source code into executable code or a usable " -"program." +"The process of converting source code into executable code or a usable program." msgstr "" "ビルド(build): \n" "ソースコードを実行可能なコードまたは使用可能なプログラムに変換するプロセス。" @@ -22829,8 +22396,8 @@ msgid "" "Used to safely pass messages [between threads](concurrency/channels.md)." msgstr "" "チャンネル(channel): \n" -"[スレッド間](concurrency/channels.md) でメッセージを安全に渡すために使用され" -"ます。" +"[スレッド間](concurrency/channels.md) でメッセージを安全に渡すために使用されま" +"す。" #: src/glossary.md msgid "" @@ -22868,8 +22435,8 @@ msgstr "" #: src/glossary.md msgid "" "control flow: \n" -"The order in which the individual statements or instructions are executed in " -"a program." +"The order in which the individual statements or instructions are executed in a " +"program." msgstr "" "制御フロー(control flow): \n" "個々のステートメントまたは命令がプログラム内で実行される順序。" @@ -22889,8 +22456,8 @@ msgid "" "associated tuple or struct." msgstr "" "列挙型(enumeration): \n" -"複数の名前付き定数のうちの 1 つを保持するデータ型。関連するタプルまたは構造体" -"を伴う場合があります。" +"複数の名前付き定数のうちの 1 つを保持するデータ型。関連するタプルまたは構造体を" +"伴う場合があります。" #: src/glossary.md msgid "" @@ -22928,22 +22495,21 @@ msgstr "" #: src/glossary.md msgid "" "garbage collector: \n" -"A mechanism that automatically frees up memory occupied by objects that are " -"no longer in use." +"A mechanism that automatically frees up memory occupied by objects that are no " +"longer in use." msgstr "" "ガベージ コレクタ(garbage collector): \n" -"使用されなくなったオブジェクトが占有していたメモリを自動的に解放するメカニズ" -"ム。" +"使用されなくなったオブジェクトが占有していたメモリを自動的に解放するメカニズム。" #: src/glossary.md msgid "" "generics: \n" -"A feature that allows writing code with placeholders for types, enabling " -"code reuse with different data types." +"A feature that allows writing code with placeholders for types, enabling code " +"reuse with different data types." msgstr "" "ジェネリクス(generics): \n" -"型のプレースホルダを使用してコードを記述し、さまざまなデータ型でコードを再利" -"用できるようにする機能。" +"型のプレースホルダを使用してコードを記述し、さまざまなデータ型でコードを再利用で" +"きるようにする機能。" #: src/glossary.md msgid "" @@ -22977,20 +22543,19 @@ msgid "" "A collection of precompiled routines or code that can be used by programs." msgstr "" "ライブラリ(library): \n" -"プログラムで使用できるプリコンパイル済みのルーチンまたはコードのコレクショ" -"ン。" +"プログラムで使用できるプリコンパイル済みのルーチンまたはコードのコレクション。" #: src/glossary.md msgid "" "macro: \n" -"Rust macros can be recognized by a `!` in the name. Macros are used when " -"normal functions are not enough. A typical example is `format!`, which takes " -"a variable number of arguments, which isn't supported by Rust functions." +"Rust macros can be recognized by a `!` in the name. Macros are used when 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 関数ではサポートされていません。" +"Rust マクロは名前に `!` を含めることで認識できます。マクロは、通常の関数では不十" +"分な場合に使用されます。典型的な例が `format!` です。これは可変長引数を取ります" +"が、Rust 関数ではサポートされていません。" #: src/glossary.md msgid "" @@ -23003,8 +22568,8 @@ msgstr "" #: src/glossary.md msgid "" "match: \n" -"A control flow construct in Rust that allows for pattern matching on the " -"value of an expression." +"A control flow construct in Rust that allows for pattern matching on the value " +"of an expression." msgstr "" "一致(match): \n" "式の値に対するパターン マッチングを可能にする、Rust の制御フロー構造。" @@ -23012,12 +22577,11 @@ msgstr "" #: src/glossary.md msgid "" "memory leak: \n" -"A situation where a program fails to release memory that is no longer " -"needed, leading to a gradual increase in memory usage." +"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 "" @@ -23030,12 +22594,12 @@ msgstr "" #: src/glossary.md msgid "" "module: \n" -"A namespace that contains definitions, such as functions, types, or traits, " -"to organize code in Rust." +"A namespace that contains definitions, such as functions, types, or traits, to " +"organize code in Rust." msgstr "" "モジュール(module): \n" -"関数、型、トレイトなどの定義を含む名前空間。Rust でコードを整理するために使用" -"されます。" +"関数、型、トレイトなどの定義を含む名前空間。Rust でコードを整理するために使用さ" +"れます。" #: src/glossary.md msgid "" @@ -23061,14 +22625,13 @@ msgid "" "managing the memory associated with a value." msgstr "" "所有権(ownership): \n" -"値に関連付けられたメモリの管理をコードのどの部分が担うかを定義する Rust の概" -"念。" +"値に関連付けられたメモリの管理をコードのどの部分が担うかを定義する Rust の概念。" #: src/glossary.md msgid "" "panic: \n" -"An unrecoverable error condition in Rust that results in the termination of " -"the program." +"An unrecoverable error condition in Rust that results in the termination of the " +"program." msgstr "" "パニック(panic): \n" "プログラムの終了を引き起こす、Rust の回復不能なエラー状態。" @@ -23084,8 +22647,8 @@ msgstr "" #: src/glossary.md msgid "" "pattern: \n" -"A combination of values, literals, or structures that can be matched against " -"an expression in Rust." +"A combination of values, literals, or structures that can be matched against an " +"expression in Rust." msgstr "" "パターン(pattern): \n" "Rust の式と照合できる値、リテラル、構造体の組み合わせ。" @@ -23101,12 +22664,12 @@ msgstr "" #: src/glossary.md msgid "" "program: \n" -"A set of instructions that a computer can execute to perform a specific task " -"or solve a particular problem." +"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 "" @@ -23119,8 +22682,8 @@ msgstr "" #: src/glossary.md msgid "" "receiver: \n" -"The first parameter in a Rust method that represents the instance on which " -"the method is called." +"The first parameter in a Rust method that represents the instance on which the " +"method is called." msgstr "" "レシーバ(receiver): \n" "メソッドが呼び出されたインスタンスを表す Rust メソッドの最初のパラメータ。" @@ -23128,12 +22691,12 @@ msgstr "" #: src/glossary.md msgid "" "reference counting: \n" -"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." +"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 "" @@ -23180,12 +22743,12 @@ msgstr "" #: src/glossary.md msgid "" "safe: \n" -"Refers to code that adheres to Rust's ownership and borrowing rules, " -"preventing memory-related errors." +"Refers to code that adheres to Rust's ownership and borrowing rules, preventing " +"memory-related errors." msgstr "" "安全(safe): \n" -"Rust の所有権と借用に関するルールに従って、メモリ関連のエラーを防止するコード" -"を指します。" +"Rust の所有権と借用に関するルールに従って、メモリ関連のエラーを防止するコードを" +"指します。" #: src/glossary.md msgid "" @@ -23227,8 +22790,8 @@ msgstr "" #: src/glossary.md msgid "" "struct: \n" -"A composite data type in Rust that groups together variables of different " -"types under a single name." +"A composite data type in Rust that groups together variables of different types " +"under a single name." msgstr "" "構造体(struct): \n" "異なる型の変数を 1 つの名前でグループ化する Rust の複合データ型。" @@ -23236,8 +22799,7 @@ msgstr "" #: src/glossary.md msgid "" "test: \n" -"A Rust module containing functions that test the correctness of other " -"functions." +"A Rust module containing functions that test the correctness of other functions." msgstr "" "テスト(test): \n" "他の関数の正しさをテストする関数を含む Rust モジュール。" @@ -23262,12 +22824,12 @@ msgstr "" #: src/glossary.md msgid "" "trait: \n" -"A collection of methods defined for an unknown type, providing a way to " -"achieve polymorphism in Rust." +"A collection of methods defined for an unknown type, providing a way to achieve " +"polymorphism in Rust." msgstr "" "トレイト(trait): \n" -"未知の型に対して定義されたメソッドのコレクション。Rust でポリモーフィズムを実" -"現する方法を提供します。" +"未知の型に対して定義されたメソッドのコレクション。Rust でポリモーフィズムを実現" +"する方法を提供します。" #: src/glossary.md msgid "" @@ -23281,18 +22843,18 @@ msgstr "" #: src/glossary.md msgid "" "tuple: \n" -"A composite data type that contains variables of different types. Tuple " -"fields have no names, and are accessed by their ordinal numbers." +"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 "" "type: \n" -"A classification that specifies which operations can be performed on values " -"of a particular kind in Rust." +"A classification that specifies which operations can be performed on values of " +"a particular kind in Rust." msgstr "" "型(type): \n" "Rust の特定の種類の値に対してどのオペレーションを実行できるかを指定する分類。" @@ -23300,8 +22862,7 @@ msgstr "" #: src/glossary.md msgid "" "type inference: \n" -"The ability of the Rust compiler to deduce the type of a variable or " -"expression." +"The ability of the Rust compiler to deduce the type of a variable or expression." msgstr "" "型推論(type inference): \n" "変数または式の型を推測する Rust コンパイラの機能。" @@ -23309,12 +22870,12 @@ msgstr "" #: src/glossary.md msgid "" "undefined behavior: \n" -"Actions or conditions in Rust that have no specified result, often leading " -"to unpredictable program behavior." +"Actions or conditions in Rust that have no specified result, often leading to " +"unpredictable program behavior." msgstr "" "未定義の動作(undefined behavior): \n" -"結果が指定されていない Rust のアクションまたは条件。多くの場合、プログラムの" -"予測不能な動作を引き起こします。" +"結果が指定されていない Rust のアクションまたは条件。多くの場合、プログラムの予測" +"不能な動作を引き起こします。" #: src/glossary.md msgid "" @@ -23331,9 +22892,8 @@ msgid "" "integration tests. See [Unit Tests](testing/unit-tests.html)." msgstr "" "単体テスト(unit test): \n" -"Rust には、小規模な単体テストと大規模な統合テストを実行するための組み込みサ" -"ポートが付属しています。[単体テスト](testing/unit-tests.html) をご覧くださ" -"い。" +"Rust には、小規模な単体テストと大規模な統合テストを実行するための組み込みサポー" +"トが付属しています。[単体テスト](testing/unit-tests.html) をご覧ください。" #: src/glossary.md msgid "" @@ -23351,8 +22911,8 @@ msgid "" "[Unsafe Rust](unsafe-rust/unsafe.md)." msgstr "" "安全でない(unsafe): \n" -"未定義の動作をトリガーできる Rust のサブセット。[安全でない Rust](unsafe." -"html) をご覧ください。" +"未定義の動作をトリガーできる Rust のサブセット。[安全でない Rust](unsafe.html) " +"をご覧ください。" #: src/glossary.md msgid "" @@ -23380,45 +22940,45 @@ msgstr "正式なドキュメント" #: src/other-resources.md msgid "The Rust project hosts many resources. These cover Rust in general:" msgstr "" -"Rust プロジェクトは多くのリソースをホストしており、これらは Rust 全般に対応し" -"ています。" +"Rust プロジェクトは多くのリソースをホストしており、これらは Rust 全般に対応して" +"います。" #: src/other-resources.md msgid "" -"[The Rust Programming Language](https://doc.rust-lang.org/book/): the " -"canonical free book about Rust. Covers the language in detail and includes a " -"few projects for people to build." +"[The Rust Programming Language](https://doc.rust-lang.org/book/): the 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 について詳しく説明されているほか、ビルド" -"できるプロジェクトがいくつか含まれています。" +"[The Rust Programming Language](https://doc.rust-lang.org/book/): Rust の標準的" +"な書籍で、無料で利用できます。Rust について詳しく説明されているほか、ビルドでき" +"るプロジェクトがいくつか含まれています。" #: src/other-resources.md msgid "" -"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the " -"Rust syntax via a series of examples which showcase different constructs. " -"Sometimes includes small exercises where you are asked to expand on the code " -"in the examples." +"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the Rust " +"syntax via a series of examples which showcase different constructs. 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 の構文を解説しています。小規模な演習がい" -"くつか用意されており、そこでサンプルのコードを拡張するよう求められます。" +"[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." +"[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 の標準ライブラ" -"リの完全なドキュメントです。" +"[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." +"[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 の文法とメモ" -"リモデルについて説明している未完成の書籍です。" +"[The Rust Reference](https://doc.rust-lang.org/reference/): Rust の文法とメモリ" +"モデルについて説明している未完成の書籍です。" #: src/other-resources.md msgid "More specialized guides hosted on the official Rust site:" @@ -23427,12 +22987,10 @@ msgstr "Rust の公式サイトでホストされている、より専門的な #: src/other-resources.md msgid "" "[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, " -"including working with raw pointers and interfacing with other languages " -"(FFI)." +"including working with raw pointers and interfacing with other languages (FFI)." msgstr "" -"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): 未加工のポインタの操" -"作や、他の言語(FFI)とのやり取りなど、安全でない Rust について説明していま" -"す。" +"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): 未加工のポインタの操作" +"や、他の言語(FFI)とのやり取りなど、安全でない Rust について説明しています。" #: src/other-resources.md msgid "" @@ -23441,18 +22999,17 @@ msgid "" "Rust Book was written." msgstr "" "[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): " -"Rust Book の執筆後に導入された新しい非同期プログラミング モデルについて説明し" -"ています。" +"Rust Book の執筆後に導入された新しい非同期プログラミング モデルについて説明して" +"います。" #: src/other-resources.md msgid "" -"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): " -"an introduction to using Rust on embedded devices without an operating " -"system." +"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): 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 を使用する方法を紹介して" -"います。" +"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): オペ" +"レーティング システムのない組み込みデバイスで Rust を使用する方法を紹介していま" +"す。" #: src/other-resources.md msgid "Unofficial Learning Material" @@ -23467,99 +23024,99 @@ 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 を解説しています。" +"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): 高度な知識を持" +"たない C プログラマーの視点で Rust を解説しています。" #: src/other-resources.md #, fuzzy msgid "" "[Rust for Embedded C Programmers](https://opentitan.org/book/doc/" -"rust_for_c_devs.html): covers Rust from the perspective of developers who " -"write firmware in C." +"rust_for_c_devs.html): 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 を解説" -"しています。" +"rust_for_c/): ファームウェアを C で記述するデベロッパーの観点から Rust を解説し" +"ています。" #: src/other-resources.md msgid "" -"[Rust for professionals](https://overexact.com/rust-for-professionals/): " -"covers the syntax of Rust using side-by-side comparisons with other " -"languages such as C, C++, Java, JavaScript, and Python." +"[Rust for professionals](https://overexact.com/rust-for-professionals/): 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 の構" -"文について説明しています。" +"[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 以上の演習が用意されています。" +"[Rust on Exercism](https://exercism.org/tracks/rust): Rust の学習に役立つ 100 以" +"上の演習が用意されています。" #: src/other-resources.md msgid "" -"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-" -"material/index.html): a series of small presentations covering both basic " -"and advanced part of the Rust language. Other topics such as WebAssembly, " -"and async/await are also covered." +"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-material/" +"index.html): a series of small presentations covering both basic 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 などの他" -"のトピックも扱っています。" +"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-material/" +"index.html): Rust 言語の基本的な部分と高度な部分の両方をカバーした、一連のコンパ" +"クトなプレゼンテーションです。WebAssembly、async / await などの他のトピックも" +"扱っています。" #: src/other-resources.md msgid "" "[Advanced testing for Rust applications](https://rust-exercises.com/advanced-" "testing/): a self-paced workshop that goes beyond Rust's built-in testing " -"framework. It covers `googletest`, snapshot testing, mocking as well as how " -"to write your own custom test harness." +"framework. It covers `googletest`, snapshot testing, mocking as well as how to " +"write your own custom test harness." msgstr "" #: src/other-resources.md msgid "" "[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-" -"series-to-rust/) and [Take your first steps with Rust](https://docs." -"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at " -"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." +"series-to-rust/) and [Take your first steps with Rust](https://docs.microsoft." +"com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at 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 のモジュールで構成されています。" +"microsoft. com/en-us/learn/paths/rust-first-steps/): 初心者のデベロッパーを対象" +"とした 2 つの Rust ガイドです。1 つ目は 35 個の動画で構成され、2 つ目は Rust の" +"構文と基本的な構造を説明する 11 のモジュールで構成されています。" #: src/other-resources.md msgid "" -"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial." -"github.io/too-many-lists/): in-depth exploration of Rust's memory management " -"rules, through implementing a few different types of list structures." +"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.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 のメモリ管理ルールを深く掘り下げています。" +"[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." +"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/) をご覧ください。" +"Rust に関するその他の書籍については、[Little Book of Rust Books](https://lborb." +"github.io/book/) をご覧ください。" #: src/credits.md msgid "" "The material here builds on top of the many great sources of Rust " -"documentation. See the page on [other resources](other-resources.md) for a " -"full list of useful resources." +"documentation. See the page on [other resources](other-resources.md) for a full " +"list of useful resources." msgstr "" -"ここで紹介する教材は、多くの優れた Rust ドキュメントのソースに基づいていま" -"す。役立つリソースの一覧については、[その他のリソース](other-resources.md) の" -"ページをご覧ください。" +"ここで紹介する教材は、多くの優れた Rust ドキュメントのソースに基づいています。役" +"立つリソースの一覧については、[その他のリソース](other-resources.md) のページを" +"ご覧ください。" #: src/credits.md msgid "" @@ -23567,9 +23124,9 @@ 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) をご覧ください。" +"Comprehensive Rust の教材は、Apache 2.0 ライセンスの規約により使用が許諾されてい" +"ます。詳細については、[`LICENSE`](https://github.com/google/comprehensive-rust/" +"blob/main/LICENSE) をご覧ください。" #: src/credits.md msgid "Rust by Example" @@ -23577,14 +23134,13 @@ msgstr "Rust by Example" #: src/credits.md msgid "" -"Some examples and exercises have been copied and adapted from [Rust by " -"Example](https://doc.rust-lang.org/rust-by-example/). Please see the " -"`third_party/rust-by-example/` directory for details, including the license " -"terms." +"Some examples and exercises have been copied and adapted from [Rust by Example]" +"(https://doc.rust-lang.org/rust-by-example/). Please see the `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/` ディレクトリを参照してください。" +"一部の例と演習は、[Rust by Example](https://doc.rust-lang.org/rust-by-example/) " +"からコピーして編集したものです。ライセンス規約などの詳細については、" +"`third_party/rust-by-example/` ディレクトリを参照してください。" #: src/credits.md msgid "Rust on Exercism" @@ -23596,8 +23152,8 @@ 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-" +"一部の演習は、[Rust on Exercism](https://exercism.org/tracks/rust) をコピーして" +"編集したものです。ライセンス規約などの詳細については、`third_party/rust-on-" "exercism/` ディレクトリを参照してください。" #: src/credits.md @@ -23606,13 +23162,13 @@ msgstr "CXX" #: src/credits.md msgid "" -"The [Interoperability with C++](android/interoperability/cpp.md) section " -"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` " +"The [Interoperability with C++](android/interoperability/cpp.md) section 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/` ディレクトリを参照してください。" +"(https://cxx.rs/) の画像を使用しています。ライセンス規約などの詳細については、" +"`third_party/cxx/` ディレクトリを参照してください。" #, fuzzy #~ msgid "Slices: `&[T]`" @@ -23625,72 +23181,68 @@ msgstr "" #~ msgid "Slices: &\\[T\\]" #~ msgstr "スライス型" -#~ msgid "" -#~ "Question: What happens if you modify `a[3]` right before printing `s`?" +#~ msgid "Question: What happens if you modify `a[3]` right before printing `s`?" #~ msgstr "質問: `s` を出力する直前に `a[3]` を変更するとどうなるでしょうか?" #~ msgid "" -#~ "The question about modifying `a[3]` can spark an interesting discussion, " -#~ "but the answer is that for memory safety reasons you cannot do it through " -#~ "`a` at this point in the execution, but you can read the data from both " -#~ "`a` and `s` safely. It works before you created the slice, and again " -#~ "after the `println`, when the slice is no longer used." +#~ "The question about modifying `a[3]` can spark an interesting discussion, but " +#~ "the answer is that for memory safety reasons you cannot do it through `a` at " +#~ "this point in the execution, but you can read the data from both `a` and `s` " +#~ "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` の後でスライス" -#~ "が使用されなくなったあとであれば、変更することが出来ます。" +#~ "`a[3]` の変更に関する質問は興味深い議論のきっかけになるかもしれませんが、メモ" +#~ "リ安全性上の理由から、この時点では `a` を使用して変更することはできない、とい" +#~ "う回答になります。ただし、`a` と `s` の両方のデータを安全に読み取ることはでき" +#~ "ます。これは、スライスを作成する前と、`println` の後でスライスが使用されなく" +#~ "なったあとであれば、変更することが出来ます。" #~ msgid "" -#~ "Save the result of `divide_in_two` in the `result` variable and `match` " -#~ "it in a loop. That won't compile because `msg` is consumed when matched. " -#~ "To fix it, match `&result` instead of `result`. That will make `msg` a " -#~ "reference so it won't be consumed. This [\"match ergonomics\"](https://" -#~ "rust-lang.github.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." +#~ "Save the result of `divide_in_two` in the `result` variable and `match` it " +#~ "in a loop. That won't compile because `msg` is consumed when matched. To fix " +#~ "it, match `&result` instead of `result`. That will make `msg` a reference so " +#~ "it won't be consumed. This [\"match ergonomics\"](https://rust-lang.github." +#~ "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` に置き換えてください。" +#~ "`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` に置き換えてください。" #~ 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?" +#~ "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` を使用して、パニックを発生させずにこれを処理する" -#~ "にはどうすればよいでしょうか。" +#~ "早めに終了した場合は、ゼロ除算や整数オーバーフローが発生するテストを記述して" +#~ "みてください。`Result` を使用して、パニックを発生させずにこれを処理するにはど" +#~ "うすればよいでしょうか。" #~ msgid "" #~ "The niche optimization means that `Option` often has the same size in " #~ "memory as `T`." #~ msgstr "" -#~ "ニッチな最適化とは、`Option` がメモリ内で `T` と同じサイズであることが" -#~ "多いということです。" +#~ "ニッチな最適化とは、`Option` がメモリ内で `T` と同じサイズであることが多い" +#~ "ということです。" #~ msgid "" -#~ "We are showing `HashMap`, and avoid using `&str` as key to " -#~ "make examples easier. Using references in collections can, of course, be " -#~ "done, but it can lead into complications with the borrow checker." +#~ "We are showing `HashMap`, and avoid using `&str` as key to make " +#~ "examples easier. Using references in collections can, of course, be done, " +#~ "but it can lead into complications with the borrow checker." #~ msgstr "" #~ "ここでは `HashMap` を示していますが、例を簡単にするために " -#~ "`&str` をキーとして使用しないようにしています。もちろん、コレクション内で" -#~ "参照を使用することもできますが、それによって借用チェッカーが複雑になる可能" -#~ "性があります。" +#~ "`&str` をキーとして使用しないようにしています。もちろん、コレクション内で参照" +#~ "を使用することもできますが、それによって借用チェッカーが複雑になる可能性があ" +#~ "ります。" #~ 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()` を削除して、まだコンパイルできるかどうかを確認" -#~ "します。どこで問題が発生するでしょうか。" +#~ "上記の例から `to_string()` を削除して、まだコンパイルできるかどうかを確認しま" +#~ "す。どこで問題が発生するでしょうか。" #~ msgid "" #~ "By default, closures will capture by reference if they can. The `move` " @@ -23717,91 +23269,86 @@ msgstr "" #~ msgid "" #~ "Including 10 minute breaks, this session should take about 2 hours and 15 " #~ "minutes. It contains:" -#~ msgstr "" -#~ "このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 15 分です。" +#~ msgstr "このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 15 分です。" #, fuzzy #~ msgid "thiserror and anyhow" #~ msgstr "`thiserror` と `anyhow`" #~ msgid "" -#~ "Make sure to implement the `std::error::Error` trait when defining a " -#~ "custom error type so it can be boxed. But if you need to support the " -#~ "`no_std` attribute, keep in mind that the `std::error::Error` trait is " -#~ "currently compatible with `no_std` in [nightly](https://github.com/rust-" -#~ "lang/rust/issues/103765) only." +#~ "Make sure to implement the `std::error::Error` trait when defining a custom " +#~ "error type so it can be boxed. But if you need to support the `no_std` " +#~ "attribute, keep in mind that the `std::error::Error` trait is currently " +#~ "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`と互" -#~ "換性があることに注意してください。" +#~ "カスタムのエラー型を定義する際は、必ず `std::error::Error` トレイトを実装し、" +#~ "ボックス化できるようにしてください。ただし `no_std` 属性をサポートする必要が" +#~ "ある場合は、`std::error::Error` トレイトは現在、[ナイトリー](https://github." +#~ "com/rust-lang/rust/issues/103765) においてのみ`no_std`と互換性があることに注" +#~ "意してください。" #~ msgid "" -#~ "The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs." -#~ "rs/anyhow/) crates are widely used to simplify error handling." +#~ "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/) クレートは、エラー処理を簡素化するために広く使用されてい" -#~ "ます。" +#~ "[`thiserror`](https://docs.rs/thiserror/) クレートと [`anyhow`](https://docs." +#~ "rs/anyhow/) クレートは、エラー処理を簡素化するために広く使用されています。" #~ msgid "" #~ "`thiserror` is often used in libraries to create custom error types that " #~ "implement `From`." #~ msgstr "" -#~ "`thiserror`は、`From` を実装するカスタムのエラー型を作成するためにライ" -#~ "ブラリで頻繁に使用されます。" +#~ "`thiserror`は、`From` を実装するカスタムのエラー型を作成するためにライブラ" +#~ "リで頻繁に使用されます。" #~ msgid "" #~ "`anyhow` is often used by applications to help with error handling in " #~ "functions, including adding contextual information to your errors." #~ msgstr "" -#~ "`anyhow` は、エラーにコンテキスト情報を追加するなど、関数内でのエラー処理" -#~ "のためにアプリでよく使用されます。" +#~ "`anyhow` は、エラーにコンテキスト情報を追加するなど、関数内でのエラー処理のた" +#~ "めにアプリでよく使用されます。" #~ msgid "The `std::error::Error` trait is derived automatically." #~ msgstr "`std::error::Error` トレイトは自動的に導出されます。" #~ msgid "" -#~ "Actual error type inside of it can be extracted for examination if " -#~ "necessary." +#~ "Actual error type inside of it can be extracted for examination if necessary." #~ msgstr "必要に応じて、内部の実際のエラー型を抽出して調べることができます。" #~ msgid "// SAFETY: self.dir is not NULL.\n" #~ msgstr "// 安全: self.dir は NULL ではありません。\n" #~ msgid "" -#~ "We will attempt to call Rust from one of your own projects today. So try " -#~ "to find a little corner of your code base where we can move some lines of " -#~ "code to Rust. The fewer dependencies and \"exotic\" types the better. " -#~ "Something that parses some raw bytes would be ideal." +#~ "We will attempt to call Rust from one of your own projects today. So try to " +#~ "find a little corner of your code base where we can move some lines of code " +#~ "to Rust. The fewer dependencies and \"exotic\" types the better. Something " +#~ "that parses some raw bytes would be ideal." #~ msgstr "" #~ "本日は、皆さんのプロジェクトの一つから Rust を呼び出してみたいと思います。" #~ "コードベースの小さな隅を見つけて、数行のコードを Rust に書き換えてみましょ" -#~ "う。依存関係が少なく、「珍しい」型がよいでしょう。未加工のバイトを解析する" -#~ "ものが理想的です。" +#~ "う。依存関係が少なく、「珍しい」型がよいでしょう。未加工のバイトを解析するも" +#~ "のが理想的です。" #~ msgid "" #~ "There is a plan to transition [Android](https://source.android.com/docs/" #~ "setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource." -#~ "com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/" -#~ "setup/build/bazel/introduction) to Bazel." +#~ "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 に移行する計画があります。" +#~ "[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 に" +#~ "移行する計画があります。" -#~ msgid "" -#~ "Learning Bazel-like build rules is useful for all Rust OS developers." +#~ msgid "Learning Bazel-like build rules is useful for all Rust OS developers." #~ msgstr "" -#~ "Bazel のようなビルドルールを学ぶことは、すべての Rust OS デベロッパーに役" -#~ "立ちます。" +#~ "Bazel のようなビルドルールを学ぶことは、すべての Rust OS デベロッパーに役立ち" +#~ "ます。" #, fuzzy #~ msgid "" -#~ "**birthday_service/aidl/com/example/birthdayservice/IBirthdayService." -#~ "aidl**:" +#~ "**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:" #~ msgstr "" #~ "_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" @@ -23817,23 +23364,21 @@ msgstr "" #~ msgstr "/// 数値を分析します。\n" #~ 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:" +#~ "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 を統合してみましょう。以下にヒントを示します。" +#~ "これはグループ演習です。皆さんが取り組んでいるプロジェクトの一つを題材に、そ" +#~ "こに Rust を統合してみましょう。以下にヒントを示します。" #~ msgid "Call your AIDL service with a client written in Rust." -#~ msgstr "" -#~ "Rust で記述されたクライアントを使用して AIDL サービスを呼び出します。" +#~ msgstr "Rust で記述されたクライアントを使用して AIDL サービスを呼び出します。" #~ msgid "Move a function from your project to Rust and call it." #~ msgstr "プロジェクトから Rust に関数を移動して呼び出します。" #~ 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." +#~ "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 に変換できることを前提としています。" @@ -23921,8 +23466,7 @@ msgstr "" #~ msgid "" #~ "[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)" -#~ msgstr "" -#~ "[スライスとライフタイム](../slices-and-lifetimes.md)(1 時間 10 分)" +#~ msgstr "[スライスとライフタイム](../slices-and-lifetimes.md)(1 時間 10 分)" #~ msgid "[Welcome](../welcome-day-4.md) (3 minutes)" #~ msgstr "[ようこそ](../welcome-day-4.md)(3 分)" @@ -24015,8 +23559,8 @@ msgstr "" #~ "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 でエンコードされた文字列を格納します。" +#~ "Rust には文字列を表す 2 つの型があります。どちらも後ほど詳しく説明します。両" +#~ "方とも、 _常に_ UTF-8 でエンコードされた文字列を格納します。" #~ msgid "`String` - a modifiable, owned string." #~ msgstr "`String` - 変更可能で、所有権をもつ文字列。" @@ -24037,41 +23581,39 @@ msgstr "" #~ msgstr "//println!(\"{:?}\", &sentence[12..13]);\n" #~ 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." +#~ "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 "" -#~ "このスライドでは文字列を紹介します。ここで取り上げた内容については後ほど詳" -#~ "しく説明しますが、以降のスライドや演習で文字列を使用するにはこれで十分で" -#~ "す。" +#~ "このスライドでは文字列を紹介します。ここで取り上げた内容については後ほど詳し" +#~ "く説明しますが、以降のスライドや演習で文字列を使用するにはこれで十分です。" #~ msgid "Invalid UTF-8 in a string is UB, and this not allowed in safe Rust." #~ msgstr "文字列内の無効な UTF-8 は UB であり、Safe Rust では許可されません。" #~ msgid "" -#~ "`String` is a user-defined type with a constructor (`::new()`) and " -#~ "methods like `s.push_str(..)`." +#~ "`String` is a user-defined type with a constructor (`::new()`) and methods " +#~ "like `s.push_str(..)`." #~ msgstr "" -#~ "`String` は、コンストラクタ(`::new()` と `s.push_str(..)` などのメソッ" -#~ "ド)を持つユーザー定義型です。" +#~ "`String` は、コンストラクタ(`::new()` と `s.push_str(..)` などのメソッド)を" +#~ "持つユーザー定義型です。" #~ msgid "" #~ "The `&` in `&str` indicates that this is a reference. We will cover " -#~ "references later, so for now just think of `&str` as a unit meaning \"a " -#~ "read-only string\"." +#~ "references later, so for now just think of `&str` as a unit meaning \"a read-" +#~ "only string\"." #~ msgstr "" -#~ "`&str` 内の `&` は、これが参照であることを示します。参照については後ほど説" -#~ "明しますので、ここでは `&str` を、「読み取り専用の文字列」を意味する単位と" -#~ "考えてください。" +#~ "`&str` 内の `&` は、これが参照であることを示します。参照については後ほど説明" +#~ "しますので、ここでは `&str` を、「読み取り専用の文字列」を意味する単位と考え" +#~ "てください。" #~ msgid "" #~ "The commented-out line is indexing into the string by byte position. " -#~ "`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." +#~ "`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` は文字境界で終わっていないため、プログラムはパニックします。エ" -#~ "ラー メッセージに基づいて、適切な範囲に調整してください。" +#~ "`12..13` は文字境界で終わっていないため、プログラムはパニックします。エラー " +#~ "メッセージに基づいて、適切な範囲に調整してください。" #~ msgid "[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)" #~ msgstr "[条件文](./control-flow-basics/conditionals.md)(5 分)" @@ -24081,12 +23623,10 @@ msgstr "" #~ msgid "" #~ "[break and continue](./control-flow-basics/break-continue.md) (5 minutes)" -#~ msgstr "" -#~ "[break と continue](./control-flow-basics/break-continue.md)(5 分)" +#~ msgstr "[break と continue](./control-flow-basics/break-continue.md)(5 分)" #~ msgid "" -#~ "[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 " -#~ "minutes)" +#~ "[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 minutes)" #~ msgstr "" #~ "[ブロックとスコープ](./control-flow-basics/blocks-and-scopes.md)(10 分)" @@ -24097,8 +23637,7 @@ msgstr "" #~ msgstr "[マクロ](./control-flow-basics/macros.md)(2 分)" #~ msgid "" -#~ "[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 " -#~ "minutes)" +#~ "[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 minutes)" #~ msgstr "[演習: コラッツ数列](./control-flow-basics/exercise.md)(30 分)" #~ msgid "Much of the Rust syntax will be familiar to you from C, C++ or Java:" @@ -24109,11 +23648,10 @@ msgstr "" #~ msgstr "CやC++と同様に、ブロックは波括弧で囲みます。" #~ msgid "" -#~ "Line comments are started with `//`, block comments are delimited by `/" -#~ "* ... */`." +#~ "Line comments are started with `//`, block comments are delimited by `/* ... " +#~ "*/`." #~ msgstr "" -#~ "行コメントは `//` で始まり、ブロック コメントは `/* ... */` で区切られま" -#~ "す。" +#~ "行コメントは `//` で始まり、ブロック コメントは `/* ... */` で区切られます。" #~ msgid "Keywords like `if` and `while` work the same." #~ msgstr "`if` や `while` などのキーワードの動作は同じです。" @@ -24124,8 +23662,7 @@ msgstr "" #~ msgid "" #~ "We will discuss iteration later; for now, just stick to range expressions." #~ msgstr "" -#~ "反復処理については後で説明しますので、ここでは範囲式だけに注目してくださ" -#~ "い。" +#~ "反復処理については後で説明しますので、ここでは範囲式だけに注目してください。" #~ msgid "\"{result}\"" #~ msgstr "\"{result}\"" @@ -24136,8 +23673,8 @@ msgstr "" #~ msgid "" #~ "In this case we break the outer loop after 3 iterations of the inner loop." #~ msgstr "" -#~ "上の例では、内側のループを 3 回イテレーションしたのちに外側のループを抜け" -#~ "ることになります。" +#~ "上の例では、内側のループを 3 回イテレーションしたのちに外側のループを抜けるこ" +#~ "とになります。" #~ msgid "1" #~ msgstr "1" @@ -24251,8 +23788,7 @@ msgstr "" #~ msgid "[Destructuring](./tuples-and-arrays/destructuring.md) (5 minutes)" #~ msgstr "[分解](./tuples-and-arrays/destructuring.md)(5 分)" -#~ msgid "" -#~ "[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)" +#~ msgid "[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)" #~ msgstr "[演習: ネストされた配列](./tuples-and-arrays/exercise.md)(30 分)" #~ msgid "" @@ -24260,9 +23796,9 @@ msgstr "" #~ "elements of an array have the same type, while tuples can accommodate " #~ "different types. Both types have a size fixed at compile time." #~ msgstr "" -#~ "タプルと配列は、このコースで初めて扱う「複合」型です。配列のすべての要素の" -#~ "型は同じですが、タプルは異なる型に対応できます。どちらの型もコンパイル時に" -#~ "サイズが固定されます。" +#~ "タプルと配列は、このコースで初めて扱う「複合」型です。配列のすべての要素の型" +#~ "は同じですが、タプルは異なる型に対応できます。どちらの型もコンパイル時にサイ" +#~ "ズが固定されます。" #~ msgid "`[T; N]`" #~ msgstr "`[T; N]`" @@ -24289,28 +23825,26 @@ msgstr "" #~ msgstr "タプル:" #~ msgid "" -#~ "The empty tuple `()` is also known as the \"unit type\". It is both a " -#~ "type, and the only valid value of that type --- that is to say both the " -#~ "type and 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." +#~ "The empty tuple `()` is also known as the \"unit type\". It is both a type, " +#~ "and the only valid value of that type --- that is to say both the type and " +#~ "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 "" -#~ "空のタプル `()` は、「ユニット型」とも呼ばれます。これは型であるとともに、" -#~ "その型で唯一の有効な値です。つまり、型とその値の両方が `()` として表現され" -#~ "ます。以降のスライドで説明するように、これは関数や式に戻り値がないことを示" -#~ "す場合などに使用されます。" +#~ "空のタプル `()` は、「ユニット型」とも呼ばれます。これは型であるとともに、そ" +#~ "の型で唯一の有効な値です。つまり、型とその値の両方が `()` として表現されま" +#~ "す。以降のスライドで説明するように、これは関数や式に戻り値がないことを示す場" +#~ "合などに使用されます。" #~ msgid "" #~ "You can think of it as `void` that can be familiar to you from other " #~ "programming languages." #~ msgstr "" -#~ "これは、他のプログラミング言語で馴染みのある `void` と考えることができま" -#~ "す。" +#~ "これは、他のプログラミング言語で馴染みのある `void` と考えることができます。" #~ msgid "" -#~ "Destructuring is a way of extracting data from a data structure by " -#~ "writing a pattern that is matched up to the data structure, binding " -#~ "variables to subcomponents of the data structure." +#~ "Destructuring is a way of extracting data from a data structure by writing a " +#~ "pattern that is matched up to the data structure, binding variables to " +#~ "subcomponents of the data structure." #~ msgstr "" #~ "分解とは、データ構造に一致するパターンを記述し、変数をデータ構造のサブコン" #~ "ポーネントにバインドすることで、データ構造からデータを抽出する方法です。" @@ -24356,8 +23890,7 @@ msgstr "" #~ "elements." #~ msgstr "要素数が異なる場合に `..` がどのように展開されるかを説明します。" -#~ msgid "" -#~ "Show matching against the tail with patterns `[.., b]` and `[a@..,b]`" +#~ msgid "Show matching against the tail with patterns `[.., b]` and `[a@..,b]`" #~ msgstr "パターン `[.., b]` と `[a@..,b]` で末尾を照合します。" #~ msgid "Hard-code both functions to operate on 3 × 3 matrices." @@ -24398,8 +23931,8 @@ msgstr "" #~ "scoped values that cannot be moved or reallocated during the execution of " #~ "the program." #~ msgstr "" -#~ "静的変数と定数変数は、プログラムの実行中に移動または再割り当てできないグ" -#~ "ローバル スコープの値を作成するための、2 つの異なる方法です。" +#~ "静的変数と定数変数は、プログラムの実行中に移動または再割り当てできないグロー" +#~ "バル スコープの値を作成するための、2 つの異なる方法です。" #~ msgid "Properties table:" #~ msgstr "プロパティの表:" @@ -24445,8 +23978,7 @@ msgstr "" #~ msgid "[Destructuring](./pattern-matching/destructuring.md) (10 minutes)" #~ msgstr "[デストラクト](./pattern-matching/destructuring.md)(10 分)" -#~ msgid "" -#~ "[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)" +#~ msgid "[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)" #~ msgstr "" #~ "[let による制御フロー](./pattern-matching/let-control-flow.md)(10 分)" @@ -24472,15 +24004,14 @@ msgstr "" #~ msgid "" #~ "[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)" -#~ msgstr "" -#~ "[演習: ジェネリックなロガー](./methods-and-train/exercise.md)(20 分)" +#~ msgstr "[演習: ジェネリックなロガー](./methods-and-train/exercise.md)(20 分)" #~ msgid "" #~ "Trait objects allow for values of different types, for instance in a " #~ "collection:" #~ msgstr "" -#~ "トレイトオブジェクトは異なる型の値をひとつのコレクションにまとめることを可" -#~ "能にします:" +#~ "トレイトオブジェクトは異なる型の値をひとつのコレクションにまとめることを可能" +#~ "にします:" #~ msgid "[Generic Functions](./generics/generic-functions.md) (5 minutes)" #~ msgstr "[ジェネリック関数](./generics/generic-functions.md)(5 分)" @@ -24578,8 +24109,7 @@ msgstr "" #~ msgid "[Smart Pointers](./smart-pointers.md) (45 minutes)" #~ msgstr "[スマート ポインタ](./smart-pointers.md)(45 分)" -#~ msgid "" -#~ "[Review of Program Memory](./memory-management/review.md) (5 minutes)" +#~ msgid "[Review of Program Memory](./memory-management/review.md) (5 minutes)" #~ msgstr "[プログラム メモリの復習](./memory-management/review.md)(5 分)" #~ msgid "" @@ -24602,8 +24132,7 @@ msgstr "" #~ msgid "[Drop](./memory-management/drop.md) (10 minutes)" #~ msgstr "[Drop](./memory-management/drop.md)(10 分)" -#~ msgid "" -#~ "[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)" +#~ msgid "[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)" #~ msgstr "[演習: ビルダー型](./memory-management/exercise.md)(20 分)" #~ msgid "\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\"" @@ -24622,11 +24151,11 @@ msgstr "" #~ msgstr "[演習: バイナリツリー](./smart-pointers/exercise.md)(30 分)" #~ msgid "" -#~ "A `Box` cannot be empty, so the pointer is always valid and non-`null`. " -#~ "This allows the compiler to optimize the memory layout:" +#~ "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` になり" -#~ "ます。これにより、コンパイラがメモリ レイアウトを最適化できます。" +#~ "`Box` を空にすることはできないため、ポインタは常に有効かつ非 `null` になりま" +#~ "す。これにより、コンパイラがメモリ レイアウトを最適化できます。" #~ msgid "" #~ "```bob\n" @@ -24668,8 +24197,7 @@ msgstr "" #~ msgid "[Borrow Checking](./borrowing/borrowck.md) (10 minutes)" #~ msgstr "[借用チェック](./borrowing/borrowck.md)(10 分)" -#~ msgid "" -#~ "[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)" +#~ msgid "[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)" #~ msgstr "[内部可変性](./borrowing/interior-mutability.md)(10 分)" #~ msgid "[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)" @@ -24679,15 +24207,15 @@ msgstr "" #~ msgstr "Rust コンパイラは戻り値の最適化(RVO)を行うことができます。" #~ msgid "" -#~ "In C++, copy elision has to be defined in the language specification " -#~ "because constructors can have side effects. In Rust, this is not an issue " -#~ "at all. If RVO did not happen, Rust will always perform a simple and " -#~ "efficient `memcpy` copy." +#~ "In C++, copy elision has to be defined in the language specification because " +#~ "constructors can have side effects. In Rust, this is not an issue at all. If " +#~ "RVO did not happen, Rust will always perform a simple and efficient `memcpy` " +#~ "copy." #~ msgstr "" -#~ "C++ では、コンストラクタが副作用をもたらす可能性があるため、言語仕様でコ" -#~ "ピー省略を定義する必要があります。Rust では、これはまったく問題になりませ" -#~ "ん。RVO が行われなかった場合でも、Rust は常にシンプルで効率的な `memcpy` " -#~ "コピーを実行します。" +#~ "C++ では、コンストラクタが副作用をもたらす可能性があるため、言語仕様でコピー" +#~ "省略を定義する必要があります。Rust では、これはまったく問題になりません。RVO " +#~ "が行われなかった場合でも、Rust は常にシンプルで効率的な `memcpy` コピーを実行" +#~ "します。" #~ msgid "\"graph: {root:#?}\"" #~ msgstr "\"graph: {root:#?}\"" @@ -24697,30 +24225,29 @@ msgstr "" #~ msgid "" #~ "`Rc` only allows shared (read-only) access to its contents, since its " -#~ "purpose is to allow (and count) many references. But we want to modify " -#~ "the value, so we need interior mutability." +#~ "purpose is to allow (and count) many references. But we want to modify the " +#~ "value, so we need interior mutability." #~ msgstr "" -#~ "`Rc` は多くの参照を許可(およびカウント)することを目的としているため、コ" -#~ "ンテンツへの共有(読み取り専用)アクセスのみを許可します。しかし、ここでは" -#~ "値を変更したいので、内部可変性が必要です。" +#~ "`Rc` は多くの参照を許可(およびカウント)することを目的としているため、コンテ" +#~ "ンツへの共有(読み取り専用)アクセスのみを許可します。しかし、ここでは値を変" +#~ "更したいので、内部可変性が必要です。" #~ msgid "" -#~ "Demonstrate that reference loops can be created by adding `root` to " -#~ "`subtree.children`." +#~ "Demonstrate that reference loops can be created by adding `root` to `subtree." +#~ "children`." #~ msgstr "" -#~ "`subtree.children` に `root` を追加して参照ループを作成できることを示しま" -#~ "す。" +#~ "`subtree.children` に `root` を追加して参照ループを作成できることを示します。" #~ msgid "" #~ "To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments " -#~ "`self.value` and calls the same method on its children. This will panic " -#~ "in the presence of the reference loop, with `thread 'main' panicked at " -#~ "'already borrowed: BorrowMutError'`." +#~ "`self.value` and calls the same method on its children. This will panic in " +#~ "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'` というエラーが出力されます。" +#~ "実行時のパニックを示すため、`self.value` をインクリメントしてその子に対して同" +#~ "じメソッドを呼び出す `fn inc(&mut self)` を追加します。これは、参照ループがあ" +#~ "るとパニックとなり、`thread 'main' panicked at 'already borrowed: " +#~ "BorrowMutError'` というエラーが出力されます。" #~ msgid "[Slices: &\\[T\\]](./slices-and-lifetimes/slices.md) (10 minutes)" #~ msgstr "[Slices: &\\[T\\]](./slices-and-lifetimes/slices.md)(10 分)" @@ -24729,11 +24256,11 @@ msgstr "" #~ msgstr "[文字列参照](./slices-and-lifetimes/str.md)(10 分)" #~ msgid "" -#~ "[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) " -#~ "(10 minutes)" +#~ "[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) (10 " +#~ "minutes)" #~ msgstr "" -#~ "[ライフタイム アノテーション](./slices-and-lifetimes/lifetime-annotations." -#~ "md)(10 分)" +#~ "[ライフタイム アノテーション](./slices-and-lifetimes/lifetime-annotations.md)" +#~ "(10 分)" #~ msgid "" #~ "[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)" @@ -24746,18 +24273,16 @@ msgstr "" #~ "[構造体のライフタイム](./slices-and-lifetimes/struct-lifetimes.md)(5 分)" #~ msgid "" -#~ "[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 " -#~ "minutes)" -#~ msgstr "" -#~ "[演習: Protobuf の解析](./slices-and-lifetimes/exercise.md)(30 分)" +#~ "[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 minutes)" +#~ msgstr "[演習: Protobuf の解析](./slices-and-lifetimes/exercise.md)(30 分)" #~ 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)で保存さ" -#~ "れます。" +#~ "`&[char]` とほぼ同じですが、そのデータは可変長エンコード(UTF-8)で保存されま" +#~ "す。" #~ msgid "Rust terminology:" #~ msgstr "Rust の用語:" @@ -24776,8 +24301,7 @@ msgstr "" #~ msgid "// Unwrap error because `value` is definitely 4 bytes long.\n" #~ msgstr "" -#~ "// `value` の長さは明らかに 4 バイトであるため、エラーをアンラップしま" -#~ "す。\n" +#~ "// `value` の長さは明らかに 4 バイトであるため、エラーをアンラップします。\n" #~ msgid "b\"hello\"" #~ msgstr "b\"hello\"" @@ -24845,34 +24369,31 @@ msgstr "" #~ msgid "Rust comes with only basic support for writing tests." #~ msgstr "Rust は、テストを作成するための基本的なサポートのみを提供します。" -#~ msgid "" -#~ "Here are some additional crates which we recommend for writing tests:" +#~ msgid "Here are some additional crates which we recommend for writing tests:" #~ msgstr "テストを作成する際に推奨されるその他のクレートを以下に示します。" #~ 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のよう" -#~ "な包括的なテスト アサーション ライブラリです。" +#~ "[googletest](https://docs.rs/googletest): 従来の C++ 向け GoogleTestのような" +#~ "包括的なテスト アサーション ライブラリです。" -#~ msgid "" -#~ "[proptest](https://docs.rs/proptest): Property-based testing for Rust." +#~ msgid "[proptest](https://docs.rs/proptest): Property-based testing for Rust." #~ msgstr "" -#~ "[proptest](https://docs.rs/proptest): Rust のプロパティ ベースのテストで" -#~ "す。" +#~ "[proptest](https://docs.rs/proptest): Rust のプロパティ ベースのテストです。" #~ msgid "" #~ "[rstest](https://docs.rs/rstest): Support for fixtures and parameterised " #~ "tests." #~ msgstr "" -#~ "[rstest](https://docs.rs/rstest): フィクスチャとパラメータ化されたテストを" -#~ "サポートします。" +#~ "[rstest](https://docs.rs/rstest): フィクスチャとパラメータ化されたテストをサ" +#~ "ポートします。" #~ msgid "This just scratches the surface, there are many builtin matchers." #~ msgstr "" -#~ "ここで扱っているものはごく一部であり、他にも多くの組み込みマッチャーがあり" -#~ "ます。" +#~ "ここで扱っているものはごく一部であり、他にも多くの組み込みマッチャーがありま" +#~ "す。" #~ msgid "GoogleTest is available for use in AOSP." #~ msgstr "GoogleTest は AOSP で使用できます。" @@ -24899,14 +24420,12 @@ msgstr "" #~ msgstr "[エラートレイト](./error-handling/error.md)(5 分)" #~ msgid "" -#~ "[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 " -#~ "minutes)" +#~ "[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)" #~ msgstr "" #~ "[thiserror と anyhow](./error-handling/thiserror-and-anyhow.md)(5 分)" #~ msgid "" -#~ "[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 " -#~ "minutes)" +#~ "[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 minutes)" #~ msgstr "" #~ "[演習: Result を使用した書き換え](./error-handling/exercise.md)(20 分)" @@ -24917,8 +24436,7 @@ msgstr "" #~ "[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)" #~ msgstr "[未加工ポインタの参照外し](./unsafe-rust/dereferencing.md)(10 分)" -#~ msgid "" -#~ "[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)" +#~ msgid "[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)" #~ msgstr "[可変の静的変数](./unsafe-rust/mutable-static.md)(5 分)" #~ msgid "[Unions](./unsafe-rust/unions.md) (5 minutes)" @@ -24949,8 +24467,7 @@ msgstr "" #~ msgid "/// Connect to the BirthdayService.\n" #~ msgstr "/// BirthdayService に接続します。\n" -#~ msgid "" -#~ "// SAFETY: `print_card` is safe to call with a valid `card` pointer.\n" +#~ msgid "// SAFETY: `print_card` is safe to call with a valid `card` pointer.\n" #~ msgstr "" #~ "// SAFETY: `print_card` は有効な `card` ポインタで安全に呼び出せます。\n" @@ -25007,15 +24524,14 @@ msgstr "" #~ "//\n" #~ "// Unless required by applicable law or agreed to in writing, software\n" #~ "// distributed under the License is distributed on an \"AS IS\" BASIS,\n" -#~ "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " -#~ "implied.\n" +#~ "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" #~ "// See the License for the specific language governing permissions and\n" #~ "// limitations under the License.\n" #~ msgstr "" #~ "// Copyright 2023 Google LLC\n" #~ "//\n" -#~ "// バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が" -#~ "許諾されています。\n" +#~ "// バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が許" +#~ "諾されています。\n" #~ "// このファイルを使用するには、本ライセンスに準拠する必要があります。\n" #~ " // 本ライセンスのコピーは下記のリンクから入手できます。\n" #~ "//\n" @@ -25023,8 +24539,8 @@ msgstr "" #~ "//\n" #~ "// 本ライセンスで配布されるソフトウェアは、\n" #~ "// 適用される法律によって要求される場合または書面で合意した場合を除き、\n" -#~ "// 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現" -#~ "状有姿」で提供されます。\n" +#~ "// 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現状有" +#~ "姿」で提供されます。\n" #~ "// 本ライセンスの下で適用される具体的な許可および制限については、\n" #~ "// ライセンス本文をご覧ください。\n" @@ -25098,26 +24614,24 @@ msgstr "" #~ "/// PL011 UART のドライバ。\n" #~ msgid "" -#~ "/// Constructs a new instance of the UART driver for a PL011 device at " -#~ "the\n" +#~ "/// Constructs a new instance of the UART driver for a PL011 device at the\n" #~ " /// given base address.\n" #~ " ///\n" #~ " /// # Safety\n" #~ " ///\n" -#~ " /// The given base address must point to the MMIO control registers " -#~ "of a\n" +#~ " /// The given base address must point to the MMIO control registers of " +#~ "a\n" #~ " /// PL011 device, which must be mapped into the address space of the " #~ "process\n" #~ " /// as device memory and not have any other aliases.\n" #~ msgstr "" #~ "/// 指定されたベースアドレスに存在する\n" -#~ " /// PL011 デバイス用の UART ドライバの新しいインスタンスを作成しま" -#~ "す。\n" +#~ " /// PL011 デバイス用の UART ドライバの新しいインスタンスを作成します。\n" #~ " ///\n" #~ " /// # 安全性\n" #~ " ///\n" -#~ " /// 指定されたベースアドレスは PL011 デバイスの MMIO 制御レジスタを指" -#~ "している必要があります。\n" +#~ " /// 指定されたベースアドレスは PL011 デバイスの MMIO 制御レジスタを指して" +#~ "いる必要があります。\n" #~ " /// これらはデバイスメモリとしてプロセスのアドレス空間に\n" #~ " /// マッピングされ、他のエイリアスはありません。\n" @@ -25161,8 +24675,7 @@ msgstr "" #~ " *\n" #~ " * Unless required by applicable law or agreed to in writing, software\n" #~ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" -#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " -#~ "implied.\n" +#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" #~ " * See the License for the specific language governing permissions and\n" #~ " * limitations under the License.\n" #~ " */\n" @@ -25193,14 +24706,14 @@ msgstr "" #~ "/* Translation table walks for TTBR0_EL1 are inner sharable. */\n" #~ ".set .L_TCR_SH_INNER, 0x3 << 12\n" #~ "/*\n" -#~ " * Translation table walks for TTBR0_EL1 are outer write-back read-" -#~ "allocate write-allocate\n" +#~ " * Translation table walks for TTBR0_EL1 are outer write-back read-allocate " +#~ "write-allocate\n" #~ " * cacheable.\n" #~ " */\n" #~ ".set .L_TCR_RGN_OWB, 0x1 << 10\n" #~ "/*\n" -#~ " * Translation table walks for TTBR0_EL1 are inner write-back read-" -#~ "allocate write-allocate\n" +#~ " * Translation table walks for TTBR0_EL1 are inner write-back read-allocate " +#~ "write-allocate\n" #~ " * cacheable.\n" #~ " */\n" #~ ".set .L_TCR_RGN_IWB, 0x1 << 8\n" @@ -25219,8 +24732,7 @@ msgstr "" #~ ".set .L_SCTLR_ELx_C, 0x1 << 2\n" #~ "/* EL0 and EL1 stage 1 MMU enabled. */\n" #~ ".set .L_SCTLR_ELx_M, 0x1 << 0\n" -#~ "/* Privileged Access Never is unchanged on taking an exception to EL1. " -#~ "*/\n" +#~ "/* Privileged Access Never is unchanged on taking an exception to EL1. */\n" #~ ".set .L_SCTLR_EL1_SPAN, 0x1 << 23\n" #~ "/* SETEND instruction disabled at EL0 in aarch32 mode. */\n" #~ ".set .L_SCTLR_EL1_SED, 0x1 << 8\n" @@ -25234,8 +24746,8 @@ msgstr "" #~ "L_SCTLR_EL1_RES1\n" #~ "\n" #~ "/**\n" -#~ " * This is a generic entry point for an image. It carries out the " -#~ "operations required to prepare the\n" +#~ " * This is a generic entry point for an image. It carries out the operations " +#~ "required to prepare the\n" #~ " * loaded image to be run. Specifically, it zeroes the bss section using " #~ "registers x25 and above,\n" #~ " * prepares the stack, enables floating point, and sets up the exception " @@ -25245,8 +24757,8 @@ msgstr "" #~ ".section .init.entry, \"ax\"\n" #~ ".global entry\n" #~ "entry:\n" -#~ "\t/* Load and apply the memory management configuration, ready to enable " -#~ "MMU and caches. */\n" +#~ "\t/* Load and apply the memory management configuration, ready to enable MMU " +#~ "and caches. */\n" #~ "\tadrp x30, idmap\n" #~ "\tmsr ttbr0_el1, x30\n" #~ "\n" @@ -25263,8 +24775,8 @@ msgstr "" #~ "\tmov_i x30, .Lsctlrval\n" #~ "\n" #~ "\t/*\n" -#~ "\t * Ensure everything before this point has completed, then invalidate " -#~ "any potentially stale\n" +#~ "\t * Ensure everything before this point has completed, then invalidate any " +#~ "potentially stale\n" #~ "\t * local TLB entries before they start being used.\n" #~ "\t */\n" #~ "\tisb\n" @@ -25314,8 +24826,8 @@ msgstr "" #~ "/*\n" #~ " * Copyright 2023 Google LLC\n" #~ " *\n" -#~ " * バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が" -#~ "許諾されています。\n" +#~ " * バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が許" +#~ "諾されています。\n" #~ " * このファイルを使用するには、本ライセンスに準拠する必要があります。\n" #~ " * 本ライセンスのコピーは下記のリンクから入手できます。\n" #~ " *\n" @@ -25323,8 +24835,8 @@ msgstr "" #~ " *\n" #~ " * 本ライセンスで配布されるソフトウェアは、\n" #~ " * 適用される法律によって要求される場合または書面で合意した場合を除き、\n" -#~ " * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現" -#~ "状有姿」で提供されます。\n" +#~ " * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現状有" +#~ "姿」で提供されます。\n" #~ " * 本ライセンスの下で適用される具体的な許可および制限については、\n" #~ " * ライセンス本文をご覧ください。\n" #~ " */\n" @@ -25349,20 +24861,20 @@ msgstr "" #~ ".set .L_TCR_TG0_4KB, 0x0 << 14\n" #~ "/* TTBR1_EL1におけるページサイズを4KiB単位に設定。*/\n" #~ ".set .L_TCR_TG1_4KB, 0x2 << 30\n" -#~ "/* TTBR1_EL1 の変換テーブル ウォークを無効にして、代わりに変換エラーを生成" -#~ "します。*/\n" +#~ "/* TTBR1_EL1 の変換テーブル ウォークを無効にして、代わりに変換エラーを生成し" +#~ "ます。*/\n" #~ ".set .L_TCR_EPD1, 0x1 << 23\n" #~ "/* TTBR0_EL1 の変換テーブル ウォークは内部共有可能です。*/\n" #~ ".set .L_TCR_SH_INNER, 0x3 << 12\n" #~ "/*\n" -#~ " * TTBR0_EL1 の変換テーブル ウォークは、外部書き戻し、読み取り割り当て、書" -#~ "き込み割り当ての\n" +#~ " * TTBR0_EL1 の変換テーブル ウォークは、外部書き戻し、読み取り割り当て、書き" +#~ "込み割り当ての\n" #~ " * キャッシュが可能です。\n" #~ " */\n" #~ ".set . L_TCR_RGN_OWB, 0x1 << 10\n" #~ "/*\n" -#~ " * TTBR0_EL1 の変換テーブル ウォークは、内部書き戻し、読み取り割り当て、書" -#~ "き込み割り当ての\n" +#~ " * TTBR0_EL1 の変換テーブル ウォークは、内部書き戻し、読み取り割り当て、書き" +#~ "込み割り当ての\n" #~ " * キャッシュが可能です。\n" #~ " */\n" #~ ".set .L_TCR_RGN_IWB, 0x1 << 8\n" @@ -25375,11 +24887,10 @@ msgstr "" #~ "\n" #~ "/* ステージ 1 の命令アクセスのキャッシュ可能設定は影響を受けません。*/\n" #~ ".set .L_SCTLR_ELx_I, 0x1 << 12\n" -#~ "/* SP が 16 バイト境界にアライメントされていない場合の SP アライメント " -#~ "フォールト。*/\n" +#~ "/* SP が 16 バイト境界にアライメントされていない場合の SP アライメント フォー" +#~ "ルト。*/\n" #~ ".set .L_SCTLR_ELx_SA, 0x1 << 3\n" -#~ "/* ステージ 1 のデータアクセスのキャッシュ可能性設定は影響を受けません。" -#~ "*/\n" +#~ "/* ステージ 1 のデータアクセスのキャッシュ可能性設定は影響を受けません。*/\n" #~ ".set .L_SCTLR_ELx_C, 0x1 << 2\n" #~ "/* EL0 および EL1 ステージ 1 MMU が有効になっています。*/\n" #~ ".set .L_SCTLR_ELx_M, 0x1 << 0\n" @@ -25397,20 +24908,19 @@ msgstr "" #~ "L_SCTLR_EL1_RES1\n" #~ "\n" #~ "/**\n" -#~ " * これはイメージの一般的なエントリ ポイントです。読み込まれたイメージの実" -#~ "行を\n" -#~ " * 準備するために必要なオペレーションを実行します。具体的には、x25 以上の" -#~ "レジスタを使用して bss セクションをゼロにし、\n" +#~ " * これはイメージの一般的なエントリ ポイントです。読み込まれたイメージの実行" +#~ "を\n" +#~ " * 準備するために必要なオペレーションを実行します。具体的には、x25 以上のレジ" +#~ "スタを使用して bss セクションをゼロにし、\n" #~ " * スタックを準備し、浮動小数点数を有効にして、例外ベクターを設定します。" #~ "Rust エントリ ポイントのために x0-x3\n" -#~ " * には下の値を保持します。これは起動パラメータを含む可能性があるためで" -#~ "す。\n" +#~ " * には下の値を保持します。これは起動パラメータを含む可能性があるためです。\n" #~ " */\n" #~ ".section .init.entry, \"ax\"\n" #~ ".global entry\n" #~ "entry:\n" -#~ "\t/* メモリ管理に関する設定を読み込んで適用し、MMU とキャッシュを有効にす" -#~ "る準備をします。*/\n" +#~ "\t/* メモリ管理に関する設定を読み込んで適用し、MMU とキャッシュを有効にする準" +#~ "備をします。*/\n" #~ "\tadrp x30, idmap\n" #~ "\tmsr ttbr0_el1, x30\n" #~ "\n" @@ -25438,8 +24948,8 @@ msgstr "" #~ "\tisb\n" #~ "\n" #~ "\t/*\n" -#~ "\t * MMU とキャッシュを有効にするように sctlr_el1 を構成し、これが完了する" -#~ "までは先に進みません。\n" +#~ "\t * MMU とキャッシュを有効にするように sctlr_el1 を構成し、これが完了するま" +#~ "では先に進みません。\n" #~ "\t */\n" #~ "\tmsr sctlr_el1, x30\n" #~ "\tisb\n" @@ -25487,8 +24997,7 @@ msgstr "" #~ " *\n" #~ " * Unless required by applicable law or agreed to in writing, software\n" #~ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" -#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " -#~ "implied.\n" +#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" #~ " * See the License for the specific language governing permissions and\n" #~ " * limitations under the License.\n" #~ " */\n" @@ -25519,8 +25028,7 @@ msgstr "" #~ "\tstp x29, x30, [sp, #8 * 20]\n" #~ "\n" #~ "\t/*\n" -#~ "\t * Save elr_el1 & spsr_el1. This such that we can take nested " -#~ "exception\n" +#~ "\t * Save elr_el1 & spsr_el1. This such that we can take nested exception\n" #~ "\t * and still be able to unwind.\n" #~ "\t */\n" #~ "\tmrs x0, elr_el1\n" @@ -25529,10 +25037,9 @@ msgstr "" #~ ".endm\n" #~ "\n" #~ "/**\n" -#~ " * Restores the volatile registers from the stack. This currently takes " -#~ "14\n" -#~ " * instructions, so it can be used in exception handlers while still " -#~ "leaving 18\n" +#~ " * Restores the volatile registers from the stack. This currently takes 14\n" +#~ " * instructions, so it can be used in exception handlers while still leaving " +#~ "18\n" #~ " * instructions left; if paired with save_volatile_to_stack, there are 4\n" #~ " * instructions to spare.\n" #~ " */\n" @@ -25565,8 +25072,7 @@ msgstr "" #~ "doing\n" #~ " * the work, then switching back to SP0 before returning.\n" #~ " *\n" -#~ " * Switching to SPx and calling the Rust handler takes 16 instructions. " -#~ "To\n" +#~ " * Switching to SPx and calling the Rust handler takes 16 instructions. To\n" #~ " * restore and return we need an additional 16 instructions, so we can " #~ "implement\n" #~ " * the whole handler within the allotted 32 instructions.\n" @@ -25590,8 +25096,7 @@ msgstr "" #~ " * This also works for exceptions taken from EL0, if we don't care about\n" #~ " * non-volatile registers.\n" #~ " *\n" -#~ " * Saving state and jumping to the Rust handler takes 15 instructions, " -#~ "and\n" +#~ " * Saving state and jumping to the Rust handler takes 15 instructions, and\n" #~ " * restoring and returning also takes 15 instructions, so we can fit the " #~ "whole\n" #~ " * handler in 30 instructions, under the limit of 32.\n" @@ -25675,8 +25180,8 @@ msgstr "" #~ "/*\n" #~ " * Copyright 2023 Google LLC\n" #~ " *\n" -#~ " * バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が" -#~ "許諾されています。\n" +#~ " * バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が許" +#~ "諾されています。\n" #~ " * このファイルを使用するには、本ライセンスに準拠する必要があります。\n" #~ " * 本ライセンスのコピーは下記のリンクから入手できます。\n" #~ " *\n" @@ -25684,8 +25189,8 @@ msgstr "" #~ " *\n" #~ " * 本ライセンスで配布されるソフトウェアは、\n" #~ " * 適用される法律によって要求される場合または書面で合意した場合を除き、\n" -#~ " * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現" -#~ "状有姿」で提供されます。\n" +#~ " * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現状有" +#~ "姿」で提供されます。\n" #~ " * 本ライセンスの下で適用される具体的な許可および制限については、\n" #~ " * ライセンス本文をご覧ください。\n" #~ " */\n" @@ -25713,8 +25218,8 @@ msgstr "" #~ "\tstp x29, x30, [sp, #8 * 20]\n" #~ "\n" #~ "\t/*\n" -#~ "\t * elr_el1 と spsr_el1 を保存します。これにより、ネストされた例外を受付" -#~ "可能になり、\n" +#~ "\t * elr_el1 と spsr_el1 を保存します。これにより、ネストされた例外を受付可能" +#~ "になり、\n" #~ "\t * また、アンワインドできるようになります。\n" #~ "\t */\n" #~ "\tmrs x0, elr_el1\n" @@ -25742,8 +25247,8 @@ msgstr "" #~ "\tldr x18, [sp, #8 * 18]\n" #~ "\tldp x29, x30, [sp, #8 * 20]\n" #~ "\n" -#~ "\t/* x0 と x1 をスクラッチとして使用して、レジスタ elr_el1 および " -#~ "spsr_el1 を復元します。*/\n" +#~ "\t/* x0 と x1 をスクラッチとして使用して、レジスタ elr_el1 および spsr_el1 を" +#~ "復元します。*/\n" #~ "\tldp x0, x1, [sp, #8 * 22]\n" #~ "\tmsr elr_el1, x0\n" #~ "\tmsr spsr_el1, x1\n" @@ -25758,8 +25263,8 @@ msgstr "" #~ "し、\n" #~ " * 戻る前に再度 SP0 に切り替えます。\n" #~ " *\n" -#~ " * SPx に切り替えて Rust ハンドラを呼び出すには、16 個の命令が必要です。復" -#~ "元して戻るには、\n" +#~ " * SPx に切り替えて Rust ハンドラを呼び出すには、16 個の命令が必要です。復元" +#~ "して戻るには、\n" #~ " * さらに 16 個の命令が必要であるため、割り当てられた 32 個の命令の中で\n" #~ " * ハンドラ全体を実装できます。\n" #~ " */\n" @@ -25774,8 +25279,8 @@ msgstr "" #~ "\n" #~ "/**\n" #~ " * これは、\n" -#~ " * SPx の使用中に現在の EL で受け付けた例外の汎用ハンドラです。揮発性レジ" -#~ "スタを保存し、Rust ハンドラを呼び出し、揮発性レジスタを\n" +#~ " * SPx の使用中に現在の EL で受け付けた例外の汎用ハンドラです。揮発性レジスタ" +#~ "を保存し、Rust ハンドラを呼び出し、揮発性レジスタを\n" #~ " * してから戻ります。\n" #~ " *\n" #~ " * 不揮発性レジスタを考慮しなければ、EL0 から取得した例外に対しても\n" @@ -25783,8 +25288,7 @@ msgstr "" #~ " *\n" #~ " * 状態の保存と Rust ハンドラへのジャンプには 15 個の命令が必要で、\n" #~ " * 復元して戻るのにも 15 個の命令が必要であるため、\n" -#~ " * ハンドラ全体を 32 個の制限内である 30 個の命令に収めることができま" -#~ "す。\n" +#~ " * ハンドラ全体を 32 個の制限内である 30 個の命令に収めることができます。\n" #~ " */\n" #~ ".macro current_exception_spx handler:req\n" #~ "\tsave_volatile_to_stack\n" @@ -25874,8 +25378,7 @@ msgstr "" #~ " *\n" #~ " * Unless required by applicable law or agreed to in writing, software\n" #~ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" -#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " -#~ "implied.\n" +#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" #~ " * See the License for the specific language governing permissions and\n" #~ " * limitations under the License.\n" #~ " */\n" @@ -25913,8 +25416,8 @@ msgstr "" #~ "/*\n" #~ " * Copyright 2023 Google LLC\n" #~ " *\n" -#~ " * バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が" -#~ "許諾されています。\n" +#~ " * バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が許" +#~ "諾されています。\n" #~ " * このファイルを使用するには、本ライセンスに準拠する必要があります。\n" #~ " * 本ライセンスのコピーは下記のリンクから入手できます。\n" #~ " *\n" @@ -25922,8 +25425,8 @@ msgstr "" #~ " *\n" #~ " * 本ライセンスで配布されるソフトウェアは、\n" #~ " * 適用される法律によって要求される場合または書面で合意した場合を除き、\n" -#~ " * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現" -#~ "状有姿」で提供されます。\n" +#~ " * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現状有" +#~ "姿」で提供されます。\n" #~ " * 本ライセンスの下で適用される具体的な許可および制限については、\n" #~ " * ライセンス本文をご覧ください。\n" #~ " */\n" @@ -25939,8 +25442,8 @@ msgstr "" #~ ".set .L_TT_XN, 0x3 << 53\n" #~ "\n" #~ ".set .L_TT_MT_DEV, 0x0 << 2\t\t\t// MAIR #0 (DEV_nGnRE)\n" -#~ ".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\t// MAIR #1 (MEM_WBWA)、内部共" -#~ "有可能\n" +#~ ".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\t// MAIR #1 (MEM_WBWA)、内部共有可" +#~ "能\n" #~ "\n" #~ ".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\n" #~ ".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\n" @@ -25970,8 +25473,7 @@ msgstr "" #~ " *\n" #~ " * Unless required by applicable law or agreed to in writing, software\n" #~ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" -#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " -#~ "implied.\n" +#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" #~ " * See the License for the specific language governing permissions and\n" #~ " * limitations under the License.\n" #~ " */\n" @@ -26016,8 +25518,7 @@ msgstr "" #~ "\trodata_end = .;\n" #~ "\n" #~ "\t/*\n" -#~ "\t * Collect together the read-write data including .bss at the end " -#~ "which\n" +#~ "\t * Collect together the read-write data including .bss at the end which\n" #~ "\t * will be zero'd by the entry code.\n" #~ "\t */\n" #~ "\t.data : ALIGN(4096) {\n" @@ -26072,8 +25573,8 @@ msgstr "" #~ "/*\n" #~ " * Copyright 2023 Google LLC\n" #~ " *\n" -#~ " * バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が" -#~ "許諾されています。\n" +#~ " * バージョン 2.0 の Apache ライセンス(以下「本ライセンス」)により使用が許" +#~ "諾されています。\n" #~ " * このファイルを使用するには、本ライセンスに準拠する必要があります。\n" #~ " * 本ライセンスのコピーは下記のリンクから入手できます。\n" #~ " *\n" @@ -26081,8 +25582,8 @@ msgstr "" #~ " *\n" #~ " * 本ライセンスで配布されるソフトウェアは、\n" #~ " * 適用される法律によって要求される場合または書面で合意した場合を除き、\n" -#~ " * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現" -#~ "状有姿」で提供されます。\n" +#~ " * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現状有" +#~ "姿」で提供されます。\n" #~ " * 本ライセンスの下で適用される具体的な許可および制限については、\n" #~ " * ライセンス本文をご覧ください。\n" #~ " */\n" @@ -26126,15 +25627,15 @@ msgstr "" #~ "\trodata_end = .;\n" #~ "\n" #~ "\t/*\n" -#~ "\t * エントリコードによってゼロ初期化される.bssを末尾に含む、書き込み可能" -#~ "データを集約します。\n" +#~ "\t * エントリコードによってゼロ初期化される.bssを末尾に含む、書き込み可能デー" +#~ "タを集約します。\n" #~ "\t */\n" #~ "\t.data : ALIGN(4096) {\n" #~ "\t\tdata_begin = .;\n" #~ "\t\t*(.data.*)\n" #~ "\t\t/*\n" -#~ "\t\t * このエントリポイントは.dataの大きさが32バイトの倍数になっていること" -#~ "を前提としています。\n" +#~ "\t\t * このエントリポイントは.dataの大きさが32バイトの倍数になっていることを" +#~ "前提としています。\n" #~ "\t\t */\n" #~ "\t\t. = ALIGN(32);\n" #~ "\t\tdata_end = .;\n" @@ -26143,8 +25644,8 @@ msgstr "" #~ "\t/* これ以降はすべてバイナリに含まれません。*/\n" #~ "\tbin_end = .;\n" #~ "\n" -#~ "\t/* このエントリ ポイント コードは、.bss が 16 バイトでアラインされている" -#~ "ことを前提としています。*/\n" +#~ "\t/* このエントリ ポイント コードは、.bss が 16 バイトでアラインされているこ" +#~ "とを前提としています。*/\n" #~ "\t.bss : ALIGN(16) {\n" #~ "\t\tbss_begin = .;\n" #~ "\t\t*(.bss.*)\n" @@ -26167,8 +25668,8 @@ msgstr "" #~ "\t * 使用されていないセクションをイメージから削除します。\n" #~ "\t */\n" #~ "\t/DISCARD/ : {\n" -#~ "\t\t/* イメージは自分自身によりロードされるのでこれらのセクションは不要で" -#~ "す。*/\n" +#~ "\t\t/* イメージは自分自身によりロードされるのでこれらのセクションは不要です。" +#~ "*/\n" #~ "\t\t*(.gnu.hash)\n" #~ "\t\t*(.hash)\n" #~ "\t\t*(.interp)\n" @@ -26194,25 +25695,24 @@ msgstr "" #~ msgid "cargo clean" #~ msgstr "cargo clean" -#~ msgid "" -#~ "Threads are all daemon threads, the main thread does not wait for them." +#~ msgid "Threads are all daemon threads, the main thread does not wait for them." #~ msgstr "" #~ "スレッドはすべてデーモンスレッドで、メインスレッドはそれらを待ちません。" #, fuzzy #~ msgid "" -#~ "Notice that the thread is stopped before it reaches 10 --- the main " -#~ "thread is not waiting." +#~ "Notice that the thread is stopped before it reaches 10 --- the main thread " +#~ "is not waiting." #~ msgstr "" -#~ "スレッドはカウントが10に到達するまでに止められます。メインのスレッドは待機" -#~ "しません。" +#~ "スレッドはカウントが10に到達するまでに止められます。メインのスレッドは待機し" +#~ "ません。" #~ msgid "" -#~ "Rust uses the type system to enforce synchronization of shared data. This " -#~ "is primarily done via two types:" +#~ "Rust uses the type system to enforce synchronization of shared data. This is " +#~ "primarily done via two types:" #~ msgstr "" -#~ "Rustは共有データを確実に同期するために型システムを利用します。これは主に2" -#~ "つの型により行われます:" +#~ "Rustは共有データを確実に同期するために型システムを利用します。これは主に2つの" +#~ "型により行われます:" #~ msgid "" #~ "[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic " @@ -26220,15 +25720,15 @@ msgstr "" #~ "deallocate `T` when the last reference is dropped," #~ msgstr "" #~ "[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic " -#~ "reference counted `T` : スレッド間の共有を扱い、最後の参照がドロップされた" -#~ "とき `T` をデアロケートすることを担当する、" +#~ "reference counted `T` : スレッド間の共有を扱い、最後の参照がドロップされたと" +#~ "き `T` をデアロケートすることを担当する、" #~ msgid "" -#~ "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): " -#~ "ensures mutually exclusive access to the `T` value." +#~ "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures " +#~ "mutually exclusive access to the `T` value." #~ msgstr "" -#~ "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): `T`型" -#~ "の値への相互排他的なアクセスを保証する。" +#~ "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): `T`型の値" +#~ "への相互排他的なアクセスを保証する。" #~ msgid "Let us practice our new concurrency skills with" #~ msgstr "次の演習を行い、並行性に関する新しいスキルを獲得しましょう。" @@ -26240,31 +25740,30 @@ msgstr "" #~ "Multi-threaded link checker: a larger project where you'll use Cargo to " #~ "download dependencies and then check links in parallel." #~ msgstr "" -#~ "マルチスレッド リンク チェッカー: Cargo を使用して依存関係をダウンロード" -#~ "し、リンクを同時にチェックする大規模なプロジェクト。" +#~ "マルチスレッド リンク チェッカー: Cargo を使用して依存関係をダウンロードし、" +#~ "リンクを同時にチェックする大規模なプロジェクト。" #~ 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:" +#~ "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` を追加します。" +#~ "そのためには、[`reqwest`](https://docs.rs/reqwest/) などの HTTP クライアント" +#~ "が必要です。次のコマンドで新しい Cargo プロジェクトを作成し、依存関係として " +#~ "`reqwest` を追加します。" #~ msgid "" -#~ "You will also need a way to find links. We can use [`scraper`](https://" -#~ "docs.rs/scraper/) for that:" +#~ "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/) を使用します。" +#~ "また、リンクを見つける方法も必要です。これには [`scraper`](https://docs.rs/" +#~ "scraper/) を使用します。" #~ 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/) を使用します。" +#~ "最後に、エラーを処理する方法が必要になります。これには [`thiserror`](https://" +#~ "docs.rs/thiserror/) を使用します。" #~ msgid "Concurrency Morning Exercise" #~ msgstr "並行性に関する午前のエクササイズ" @@ -26282,12 +25781,12 @@ msgstr "" #~ msgstr "Futureの制御フロー" #~ msgid "" -#~ "Futures can be combined together to produce concurrent compute flow " -#~ "graphs. We have already seen tasks, that function as independent threads " -#~ "of execution." +#~ "Futures can be combined together to produce concurrent compute flow graphs. " +#~ "We have already seen tasks, that function as independent threads of " +#~ "execution." #~ msgstr "" -#~ "並行計算フローグラフを生成するために、futureを組み合わせることができます。" -#~ "すでに独立したスレッドとして機能するタスクを見てきました。" +#~ "並行計算フローグラフを生成するために、futureを組み合わせることができます。す" +#~ "でに独立したスレッドとして機能するタスクを見てきました。" #~ msgid "[Join](control-flow/join.md)" #~ msgstr "[結合](control-flow/join.md)" @@ -26314,44 +25813,43 @@ msgstr "" #~ msgid "" #~ "In this example, we have a race between a cat and a dog. " #~ "`first_animal_to_finish_race` listens to both channels and will pick " -#~ "whichever arrives first. Since the dog takes 50ms, it wins against the " -#~ "cat that take 500ms." +#~ "whichever arrives first. Since the dog takes 50ms, it wins against the cat " +#~ "that take 500ms." #~ msgstr "" -#~ "この例では、猫と犬のレースを扱っています。`first_animal_to_finish_race`は" -#~ "両方のチャネルをリッスンし、先に到着した方を選びます。犬は到着まで50msかか" -#~ "るので、500msかかる猫に勝ちます。" +#~ "この例では、猫と犬のレースを扱っています。`first_animal_to_finish_race`は両方" +#~ "のチャネルをリッスンし、先に到着した方を選びます。犬は到着まで50msかかるの" +#~ "で、500msかかる猫に勝ちます。" #~ msgid "" -#~ "You can use `oneshot` channels in this example as the channels are " -#~ "supposed to receive only one `send`." +#~ "You can use `oneshot` channels in this example as the channels are supposed " +#~ "to receive only one `send`." #~ msgstr "" -#~ "この例では`oneshot`チャネルを使うこともできます。なぜなら、チャネルは一回" -#~ "きりの`send`を受け取ることになっているからです。" +#~ "この例では`oneshot`チャネルを使うこともできます。なぜなら、チャネルは一回きり" +#~ "の`send`を受け取ることになっているからです。" #~ msgid "" -#~ "Try adding a deadline to the race, demonstrating selecting different " -#~ "sorts of futures." +#~ "Try adding a deadline to the race, demonstrating selecting different sorts " +#~ "of futures." #~ msgstr "" -#~ "レースに制限時間を追加することによって、違う種類のfutureをselectすることを" -#~ "実演してみてください。" +#~ "レースに制限時間を追加することによって、違う種類のfutureをselectすることを実" +#~ "演してみてください。" #~ msgid "" -#~ "Note that `select!` drops unmatched branches, which cancels their " -#~ "futures. It is easiest to use when every execution of `select!` creates " -#~ "new futures." +#~ "Note that `select!` drops unmatched branches, which cancels their futures. " +#~ "It is easiest to use when every execution of `select!` creates new futures." #~ msgstr "" -#~ "`select!`はマッチしなかったブランチをドロップすることに注意してください。" -#~ "これは、そうしたブランチのfutureがキャンセルされることにつながります。" -#~ "`select!`を毎回実行する際に新たなfutureが作成されるときに、`select!`を使う" -#~ "のが最も簡単です。" +#~ "`select!`はマッチしなかったブランチをドロップすることに注意してください。これ" +#~ "は、そうしたブランチのfutureがキャンセルされることにつながります。`select!`を" +#~ "毎回実行する際に新たなfutureが作成されるときに、`select!`を使うのが最も簡単で" +#~ "す。" #~ msgid "" #~ "An alternative is to pass `&mut future` instead of the future itself, but " #~ "this can lead to issues, further discussed in the pinning slide." #~ msgstr "" -#~ "Futureそのものでなく、`&mut future`を渡すという代替案もあります。しかし、" -#~ "これは問題につながることもあります。このことはPinに関するスライドで詳細に" -#~ "議論します。" +#~ "Futureそのものでなく、`&mut future`を渡すという代替案もあります。しかし、これ" +#~ "は問題につながることもあります。このことはPinに関するスライドで詳細に議論しま" +#~ "す。" #~ msgid "Pitfalls of async/await" #~ msgstr "async / await の注意点" @@ -26370,22 +25868,22 @@ msgstr "" #~ msgid "" #~ "Async methods in traits are not yet supported in the stable channel ([An " -#~ "experimental feature exists in nightly and should be stabilized in the " -#~ "mid term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-" -#~ "trait-nightly.html))" +#~ "experimental feature exists in nightly and should be stabilized in the mid " +#~ "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))" +#~ "トレイトの非同期メソッドは、Stable チャンネルではまだサポートされていません" +#~ "([試験運用版の機能はナイトリーに存在するため、中期的には安定するはずです。]" +#~ "(https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-nightly." +#~ "html))" #~ msgid "" #~ "To practice your Async Rust skills, we have again two exercises for you:" #~ msgstr "非同期 Rust のスキルを磨くため、ここでも 2 つの演習を行います。" #~ msgid "" -#~ "Dining philosophers: we already saw this problem in the morning. This " -#~ "time you are going to implement it with Async Rust." +#~ "Dining philosophers: we already saw this problem in the morning. This time " +#~ "you are going to implement it with Async Rust." #~ msgstr "" #~ "食事する哲学者: この問題は午前の部ですでに取り上げましたが、今回は非同期 " #~ "Rust を使用してこれを実装します。" @@ -26394,8 +25892,8 @@ msgstr "" #~ "A Broadcast Chat Application: this is a larger project that allows you " #~ "experiment with more advanced Async Rust features." #~ msgstr "" -#~ "ブロードキャスト チャット アプリ: より高度な非同期 Rust 機能をテストできる" -#~ "大規模なプロジェクトです。" +#~ "ブロードキャスト チャット アプリ: より高度な非同期 Rust 機能をテストできる大" +#~ "規模なプロジェクトです。" #~ msgid "Concurrency Afternoon Exercise" #~ msgstr "午後の同時実行のエクササイズ" @@ -26412,13 +25910,12 @@ msgstr "" #~ msgid "" #~ "// To avoid a deadlock, we have to break the symmetry\n" -#~ " // somewhere. This will swap the forks without " -#~ "deinitializing\n" +#~ " // somewhere. This will swap the forks without deinitializing\n" #~ " // either of them.\n" #~ msgstr "" #~ "// デッドロックを避けるために、どこかで対称性を\n" -#~ " // 崩す必要があります。これにより、いずれのフォークも初期化解" -#~ "除することなく、フォークが\n" +#~ " // 崩す必要があります。これにより、いずれのフォークも初期化解除す" +#~ "ることなく、フォークが\n" #~ " // スワップされます。\n" #~ msgid "([back to exercise](chat-app.md))" @@ -26633,8 +26130,8 @@ msgstr "" #, fuzzy #~ msgid "" -#~ "Day 2: Memory management, ownership, compound data types, and the " -#~ "standard library." +#~ "Day 2: Memory management, ownership, compound data types, and the standard " +#~ "library." #~ msgstr "Day 2: 複合データ型、パターンマッチング、標準ライブラリ" #, fuzzy @@ -26646,17 +26143,16 @@ msgstr "" #~ "speak about the famous borrow checker. The way Rust handles memory is a " #~ "major feature and we should show students this right away." #~ msgstr "" -#~ "本日の目的は、Rust特有の借用チェッカーについて話ができるように、Rustについ" -#~ "て最低限の情報提供を行う事です。Rustがメモリをどのように扱うかは重要な機能" -#~ "であり、なるべく早く受講生に説明すべき内容です。" +#~ "本日の目的は、Rust特有の借用チェッカーについて話ができるように、Rustについて" +#~ "最低限の情報提供を行う事です。Rustがメモリをどのように扱うかは重要な機能であ" +#~ "り、なるべく早く受講生に説明すべき内容です。" #~ msgid "" -#~ "If you're teaching this in a classroom, this is a good place to go over " -#~ "the schedule. We suggest splitting the day into two parts (following the " -#~ "slides):" +#~ "If you're teaching this in a classroom, this is a good place to go over the " +#~ "schedule. We suggest splitting the day into two parts (following the slides):" #~ msgstr "" -#~ "この時点でスケジュール確認を行なってください。以下のように1日を2パートに" -#~ "分けて実施する事を推奨しています:" +#~ "この時点でスケジュール確認を行なってください。以下のように1日を2パートに分け" +#~ "て実施する事を推奨しています:" #~ msgid "Morning: 9:00 to 12:00," #~ msgstr "AM: 9:00 ~ 12:00" @@ -26668,8 +26164,7 @@ msgstr "" #~ "You can of course adjust this as necessary. Please make sure to include " #~ "breaks, we recommend a break every hour!" #~ msgstr "" -#~ "必要に応じて調整してください。また、1時間ごとに休憩を取る事をおすすめしま" -#~ "す!" +#~ "必要に応じて調整してください。また、1時間ごとに休憩を取る事をおすすめします!" #~ msgid "Here is a small example program in Rust:" #~ msgstr "ここでは、Rustによる小さなサンプルプログラムを紹介します:" @@ -26688,36 +26183,36 @@ msgstr "" #~ "will always end, but this is not yet proved. Edit the code and play with " #~ "different inputs." #~ msgstr "" -#~ "この例はCollatz予想を実装したものです: このループは必ず終了すると言われて" -#~ "いますが、まだ証明はされていません。コードを編集して、異なる入力値で試して" -#~ "みてください。" +#~ "この例はCollatz予想を実装したものです: このループは必ず終了すると言われてい" +#~ "ますが、まだ証明はされていません。コードを編集して、異なる入力値で試してみて" +#~ "ください。" #~ msgid "" #~ "Explain that all variables are statically typed. Try removing `i32` to " -#~ "trigger type inference. Try with `i8` instead and trigger a runtime " -#~ "integer overflow." +#~ "trigger type inference. Try with `i8` instead and trigger a runtime integer " +#~ "overflow." #~ msgstr "" -#~ "すべての変数が静的型付けされている事を説明してください。`i32`を削除して型" -#~ "推論を試してください。代わりに`i8`を使用して、実行時に整数オーバーフローを" -#~ "引き起こしてみてください。" +#~ "すべての変数が静的型付けされている事を説明してください。`i32`を削除して型推論" +#~ "を試してください。代わりに`i8`を使用して、実行時に整数オーバーフローを引き起" +#~ "こしてみてください。" #~ msgid "Change `let mut x` to `let x`, discuss the compiler error." #~ msgstr "" #~ "`let mut x`を`let x`に変更し、コンパイルエラーについて説明してください。" #~ msgid "" -#~ "Show how `print!` gives a compilation error if the arguments don't match " -#~ "the format string." +#~ "Show how `print!` gives a compilation error if the arguments don't match the " +#~ "format string." #~ msgstr "" -#~ "`print!`の引数がフォーマット文字列と一致しない場合、コンパイルエラーが発生" -#~ "する事を実演してください。" +#~ "`print!`の引数がフォーマット文字列と一致しない場合、コンパイルエラーが発生す" +#~ "る事を実演してください。" #~ msgid "" #~ "Show how you need to use `{}` as a placeholder if you want to print an " #~ "expression which is more complex than just a single variable." #~ msgstr "" -#~ "単一の変数よりも複雑な式を表示したい場合は、`{}`をプレースホルダとして使用" -#~ "する必要がある事を実演してください。" +#~ "単一の変数よりも複雑な式を表示したい場合は、`{}`をプレースホルダとして使用す" +#~ "る必要がある事を実演してください。" #~ msgid "" #~ "Show the students the standard library, show them how to search for `std::" @@ -26725,8 +26220,8 @@ msgstr "" #~ "that the students become familiar with searching in the standard library." #~ msgstr "" #~ "受講生に標準ライブラリを紹介し、`std::fmt`の検索方法を説明してください。" -#~ "`std::fmt`には、フォーマット機能のルールや構文が説明されています。受講者が" -#~ "標準ライブラリの検索に慣れておく事は重要です。" +#~ "`std::fmt`には、フォーマット機能のルールや構文が説明されています。受講者が標" +#~ "準ライブラリの検索に慣れておく事は重要です。" #~ msgid "Compile time memory safety." #~ msgstr "コンパイル時のメモリ安全性。" @@ -26746,51 +26241,51 @@ msgstr "" #~ msgid "" #~ "It is possible to produce memory leaks in (safe) Rust. Some examples are:" #~ msgstr "" -#~ "SafeなRustの範囲内でメモリリークを引き起こすことは可能です。例として以下の" -#~ "ような手段があります:" +#~ "SafeなRustの範囲内でメモリリークを引き起こすことは可能です。例として以下のよ" +#~ "うな手段があります:" #, fuzzy #~ msgid "" #~ "You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box." -#~ "html#method.leak) to leak a pointer. A use of this could be to get " -#~ "runtime-initialized and runtime-sized static variables" +#~ "html#method.leak) to leak a pointer. A use of this could be to get runtime-" +#~ "initialized and runtime-sized static variables" #~ msgstr "" #~ "[`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.html#method." -#~ "leak)を使ってポインタをリークさせることができます。この関数は実行時に初期" -#~ "化され、実行時にサイズが決まるstatic変数の取得などに使われます。" +#~ "leak)を使ってポインタをリークさせることができます。この関数は実行時に初期化さ" +#~ "れ、実行時にサイズが決まるstatic変数の取得などに使われます。" #, fuzzy #~ msgid "" -#~ "You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn." -#~ "forget.html) to make the compiler \"forget\" about a value (meaning the " -#~ "destructor is never run)." +#~ "You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget." +#~ "html) to make the compiler \"forget\" about a value (meaning the destructor " +#~ "is never run)." #~ msgstr "" -#~ "[`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget.html)を" -#~ "使って、コンパイラに値を忘れさせることができます (つまり、デストラクタが実" -#~ "行されない)。" +#~ "[`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget.html)を使っ" +#~ "て、コンパイラに値を忘れさせることができます (つまり、デストラクタが実行され" +#~ "ない)。" #, fuzzy #~ msgid "" -#~ "You can also accidentally create a [reference cycle](https://doc.rust-" -#~ "lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`." +#~ "You can also accidentally create a [reference cycle](https://doc.rust-lang." +#~ "org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`." #~ msgstr "" -#~ "`Rc`や`Arc`を使って\\[循環参照(reference cycle)\\]を誤って作成することが" -#~ "あります。" +#~ "`Rc`や`Arc`を使って\\[循環参照(reference cycle)\\]を誤って作成することがあ" +#~ "ります。" #, fuzzy #~ msgid "" -#~ "In fact, some will consider infinitely populating a collection a memory " -#~ "leak and Rust does not protect from those." +#~ "In fact, some will consider infinitely populating a collection a memory leak " +#~ "and Rust does not protect from those." #~ msgstr "" -#~ "コレクションを無限に拡張し続けることをメモリリークと見なす場合があり、Rust" -#~ "にはこれを防ぐ機能はありません。" +#~ "コレクションを無限に拡張し続けることをメモリリークと見なす場合があり、Rustに" +#~ "はこれを防ぐ機能はありません。" #~ msgid "" -#~ "For the purpose of this course, \"No memory leaks\" should be understood " -#~ "as \"Pretty much no _accidental_ memory leaks\"." +#~ "For the purpose of this course, \"No memory leaks\" should be understood as " +#~ "\"Pretty much no _accidental_ memory leaks\"." #~ msgstr "" -#~ "本講座での「メモリリークが起きない」は「\\_意図しない_メモリリークはほとん" -#~ "ど起きない」と解釈すべきです。" +#~ "本講座での「メモリリークが起きない」は「\\_意図しない_メモリリークはほとんど" +#~ "起きない」と解釈すべきです。" #~ msgid "No undefined behavior at runtime:" #~ msgstr "実行時に未定義の動作はありません:" @@ -26801,25 +26296,25 @@ msgstr "" #~ "lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time " #~ "flag. If enabled, the program will panic (a controlled crash of the " #~ "program), otherwise you get wrap-around semantics. By default, you get " -#~ "panics in debug mode (`cargo build`) and wrap-around in release mode " -#~ "(`cargo build --release`)." +#~ "panics in debug mode (`cargo build`) and wrap-around in release mode (`cargo " +#~ "build --release`)." #~ msgstr "" #~ "整数オーバーフローは、コンパイル時のフラグで定義されます。選択肢として、パ" -#~ "ニック(プログラムの制御されたクラッシュ)またはラップアラウンドのセマン" -#~ "ティクスがあります。デフォルトとして、デバッグモード(`cargo build`)では" -#~ "パニックが発生し、リリースモード(`cargo build —release`)ではラップアラウ" -#~ "ンドが行われます。" +#~ "ニック(プログラムの制御されたクラッシュ)またはラップアラウンドのセマンティ" +#~ "クスがあります。デフォルトとして、デバッグモード(`cargo build`)ではパニック" +#~ "が発生し、リリースモード(`cargo build —release`)ではラップアラウンドが行わ" +#~ "れます。" #~ msgid "" -#~ "Bounds checking cannot be disabled with a compiler flag. It can also not " -#~ "be disabled directly with the `unsafe` keyword. However, `unsafe` allows " -#~ "you to call functions such as `slice::get_unchecked` which does not do " -#~ "bounds checking." +#~ "Bounds checking cannot be disabled with a compiler flag. It can also not be " +#~ "disabled directly with the `unsafe` keyword. However, `unsafe` allows you to " +#~ "call functions such as `slice::get_unchecked` which does not do bounds " +#~ "checking." #~ msgstr "" #~ "境界チェックは、コンパイル時のフラグで無効にすることはできません。また、" -#~ "`unsafe`のキーワードを使って直接無効にすることもできません。しかし、" -#~ "`unsafe`を使って境界チェックを行わない`slice::get_unchecked`のような関数を" -#~ "呼び出すことができます。" +#~ "`unsafe`のキーワードを使って直接無効にすることもできません。しかし、`unsafe`" +#~ "を使って境界チェックを行わない`slice::get_unchecked`のような関数を呼び出すこ" +#~ "とができます。" #, fuzzy #~ msgid "Rust is built with all the experience gained in the last decades." @@ -26829,42 +26324,42 @@ msgstr "" #~ msgstr "言語の特徴" #~ msgid "" -#~ "Zero-cost abstractions, similar to C++, means that you don't have to " -#~ "'pay' for higher-level programming constructs with memory or CPU. For " -#~ "example, writing a loop using `for` should result in roughly the same low " -#~ "level instructions as using the `.iter().fold()` construct." +#~ "Zero-cost abstractions, similar to C++, means that you don't have to 'pay' " +#~ "for higher-level programming constructs with memory or CPU. For example, " +#~ "writing a loop using `for` should result in roughly the same low level " +#~ "instructions as using the `.iter().fold()` construct." #~ msgstr "" -#~ "C++と同様に、ゼロコスト抽象化とは、より高水準なプログラミング構造の利用に" -#~ "メモリやCPUのコストを支払う必要がないことを意味します。例えば、`for`を使っ" -#~ "たループの場合、`iter().fold()`構文を使った場合とおおよそ同じ低水準の処理" -#~ "になります。" +#~ "C++と同様に、ゼロコスト抽象化とは、より高水準なプログラミング構造の利用にメモ" +#~ "リやCPUのコストを支払う必要がないことを意味します。例えば、`for`を使ったルー" +#~ "プの場合、`iter().fold()`構文を使った場合とおおよそ同じ低水準の処理になりま" +#~ "す。" #~ msgid "" -#~ "It may be worth mentioning that Rust enums are 'Algebraic Data Types', " -#~ "also known as 'sum types', which allow the type system to express things " -#~ "like `Option` and `Result`." +#~ "It may be worth mentioning that Rust enums are 'Algebraic Data Types', also " +#~ "known as 'sum types', which allow the type system to express things like " +#~ "`Option` and `Result`." #~ msgstr "" -#~ "Rustの列挙型は「代数的データ型」であり、「直和型」と呼ばれます。" -#~ "`Option`や`Result`のような要素を表現することができます。" +#~ "Rustの列挙型は「代数的データ型」であり、「直和型」と呼ばれます。`Option`や" +#~ "`Result`のような要素を表現することができます。" #~ msgid "" #~ "Remind people to read the errors --- many developers have gotten used to " #~ "ignore lengthy compiler output. The Rust compiler is significantly more " -#~ "talkative than other compilers. It will often provide you with " -#~ "_actionable_ feedback, ready to copy-paste into your code." +#~ "talkative than other compilers. It will often provide you with _actionable_ " +#~ "feedback, ready to copy-paste into your code." #~ msgstr "" -#~ "エラーをちゃんと確認するよう注意してください。多くの開発者は、長いコンパイ" -#~ "ラ出力を無視することに慣れてしまっています。Rustのコンパイラは他のコンパイ" -#~ "ラよりもわかりやすく実用的なフィードバックを提供してくれます。そして多くの" -#~ "場合、コードにそのままコピペできるようなフィードバックが提供されます。" +#~ "エラーをちゃんと確認するよう注意してください。多くの開発者は、長いコンパイラ" +#~ "出力を無視することに慣れてしまっています。Rustのコンパイラは他のコンパイラよ" +#~ "りもわかりやすく実用的なフィードバックを提供してくれます。そして多くの場合、" +#~ "コードにそのままコピペできるようなフィードバックが提供されます。" #~ msgid "" -#~ "The Rust standard library is small compared to languages like Java, " -#~ "Python, and Go. Rust does not come with several things you might consider " -#~ "standard and essential:" +#~ "The Rust standard library is small compared to languages like Java, Python, " +#~ "and Go. Rust does not come with several things you might consider standard " +#~ "and essential:" #~ msgstr "" -#~ "Rustの標準ライブラリは、Java、Python、Goなどのそれと比べると小規模です。" -#~ "Rustには標準的かつ必須と思われるいくつかの機能が含まれていません:" +#~ "Rustの標準ライブラリは、Java、Python、Goなどのそれと比べると小規模です。Rust" +#~ "には標準的かつ必須と思われるいくつかの機能が含まれていません:" #~ msgid "a random number generator, but see [rand](https://docs.rs/rand/)." #~ msgstr "乱数生成器。[rand](https://docs.rs/rand/)を確認してください。" @@ -26881,100 +26376,96 @@ msgstr "" #~ msgid "" #~ "The reasoning behind this is that functionality in the standard library " #~ "cannot go away, so it has to be very stable. For the examples above, the " -#~ "Rust community is still working on finding the best solution --- and " -#~ "perhaps there isn't a single \"best solution\" for some of these things." +#~ "Rust community is still working on finding the best solution --- and perhaps " +#~ "there isn't a single \"best solution\" for some of these things." #~ msgstr "" -#~ "この理由は、標準ライブラリの機能は消えることがなく、非常に安定したものでな" -#~ "ければならないからです。上記の例については、Rustコミュニティが未だに最適な" -#~ "解決策を探し続けています。そもそも、これらに対する「最適解」は一つであると" -#~ "は限らないのです。" +#~ "この理由は、標準ライブラリの機能は消えることがなく、非常に安定したものでなけ" +#~ "ればならないからです。上記の例については、Rustコミュニティが未だに最適な解決" +#~ "策を探し続けています。そもそも、これらに対する「最適解」は一つであるとは限ら" +#~ "ないのです。" #~ msgid "" #~ "Rust comes with a built-in package manager in the form of Cargo and this " -#~ "makes it trivial to download and compile third-party crates. A " -#~ "consequence of this is that the standard library can be smaller." +#~ "makes it trivial to download and compile third-party crates. A consequence " +#~ "of this is that the standard library can be smaller." #~ msgstr "" -#~ "Rustには、Cargoという外部クレートのダウンロードからコンパイルまでを簡単に" -#~ "行ってくれるパッケージマネージャが組み込まれています。これにより、標準ライ" -#~ "ブラリを小規模に保つことができています。" +#~ "Rustには、Cargoという外部クレートのダウンロードからコンパイルまでを簡単に行っ" +#~ "てくれるパッケージマネージャが組み込まれています。これにより、標準ライブラリ" +#~ "を小規模に保つことができています。" #~ msgid "" #~ "Discovering good third-party crates can be a problem. Sites like help with this by letting you compare health metrics for crates " -#~ "to find a good and trusted one." +#~ "lib.rs/> help with this by letting you compare health metrics for crates to " +#~ "find a good and trusted one." #~ msgstr "" -#~ "良い外部クレートを見つけるのは難しいときがあります。のよ" -#~ "うなサイトを使うことで、クレートの評価基準を参考にしながら比較を行うことが" -#~ "できます。" +#~ "良い外部クレートを見つけるのは難しいときがあります。のような" +#~ "サイトを使うことで、クレートの評価基準を参考にしながら比較を行うことができま" +#~ "す。" #~ msgid "" #~ "[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP " #~ "implementation used in major IDEs and text editors." #~ msgstr "" -#~ "[rust-analyzer](https://rust-analyzer.github.io/)は、主要IDEやテキストエ" -#~ "ディタで使用できる、サポートが充実しているLSPの実装です。" +#~ "[rust-analyzer](https://rust-analyzer.github.io/)は、主要IDEやテキストエディ" +#~ "タで使用できる、サポートが充実しているLSPの実装です。" #~ msgid "" -#~ "As we have seen, `if` is an expression in Rust. It is used to " -#~ "conditionally evaluate one of two blocks, but the blocks can have a value " -#~ "which then becomes the value of the `if` expression. Other control flow " -#~ "expressions work similarly in Rust." +#~ "As we have seen, `if` is an expression in Rust. It is used to conditionally " +#~ "evaluate one of two blocks, but the blocks can have a value which then " +#~ "becomes the value of the `if` expression. Other control flow expressions " +#~ "work similarly in Rust." #~ msgstr "" #~ "今まで見てきたように、Rust において `if` は式です。`if` 式のブロックは値を" -#~ "持っており、条件判定の結果に応じて評価されたブロックの値が `if` 式の値とな" -#~ "ります。Rust では他の制御フローの式も同様の動作をします。" +#~ "持っており、条件判定の結果に応じて評価されたブロックの値が `if` 式の値となり" +#~ "ます。Rust では他の制御フローの式も同様の動作をします。" #~ msgid "" -#~ "The same rule is used for functions: the value of the function body is " -#~ "the return value:" +#~ "The same rule is used for functions: the value of the function body is the " +#~ "return value:" #~ msgstr "" -#~ "同じルールが関数についても適用されます。関数の body ブロックの値が、その関" -#~ "数の返り値となります。" +#~ "同じルールが関数についても適用されます。関数の body ブロックの値が、その関数" +#~ "の返り値となります。" #~ msgid "" #~ "The point of this slide is to show that blocks have a type and value in " #~ "Rust. " #~ msgstr "" -#~ "このスライドのポイントは、Rust におけるブロックは型と値を持つということで" -#~ "す。" +#~ "このスライドのポイントは、Rust におけるブロックは型と値を持つということです。" #~ msgid "" -#~ "The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is " -#~ "closely related to the [`while let` loop](while-let-expressions.md). It " -#~ "will automatically call `into_iter()` on the expression and then iterate " -#~ "over it:" +#~ "The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is closely " +#~ "related to the [`while let` loop](while-let-expressions.md). It will " +#~ "automatically call `into_iter()` on the expression and then iterate over it:" #~ msgstr "" #~ "[`for` loop](https://doc.rust-lang.org/std/keyword.for.html) は、[`while " -#~ "let` loop](while-let-expressions.md) とよく似ています。`for` ループは " -#~ "`in` キーワードの右側にある式に対して自動的に `into_iter()` を呼び出し、そ" -#~ "の結果生成されたイテレータを用いて走査を行います。" +#~ "let` loop](while-let-expressions.md) とよく似ています。`for` ループは `in` " +#~ "キーワードの右側にある式に対して自動的に `into_iter()` を呼び出し、その結果生" +#~ "成されたイテレータを用いて走査を行います。" #~ msgid "You can use `break` and `continue` here as usual." #~ msgstr "" -#~ "`for` ループの中では、いつも通り `break` や `continue` を使うことができま" -#~ "す。" +#~ "`for` ループの中では、いつも通り `break` や `continue` を使うことができます。" #~ msgid "Index iteration is not a special syntax in Rust for just that case." #~ msgstr "" -#~ "Rust では、インデックスによる反復処理のために特別な構文は提供されていませ" -#~ "ん。" +#~ "Rust では、インデックスによる反復処理のために特別な構文は提供されていません。" #~ msgid "`(0..10)` is a range that implements an `Iterator` trait. " #~ msgstr "`(0..10)` は Range 型であり、`Iterator` トレイトを実装しています。" #~ msgid "" -#~ "`step_by` is a method that returns another `Iterator` that skips every " -#~ "other element. " +#~ "`step_by` is a method that returns another `Iterator` that skips every other " +#~ "element. " #~ msgstr "" -#~ "`step_by` は、元のイテレータとは別の、各要素をスキップする `Iterator` を返" -#~ "すメソッドです。" +#~ "`step_by` は、元のイテレータとは別の、各要素をスキップする `Iterator` を返す" +#~ "メソッドです。" #~ msgid "" #~ "Modify the elements in the vector and explain the compiler errors. Change " #~ "vector `v` to be mutable and the for loop to `for x in v.iter_mut()`." #~ msgstr "" -#~ "ベクタ内の要素を変更してみて、その結果生じるコンパイルエラーについて説明し" -#~ "てください。また、ベクタ `v` をミュータブルに、for ループを `for x in v." +#~ "ベクタ内の要素を変更してみて、その結果生じるコンパイルエラーについて説明して" +#~ "ください。また、ベクタ `v` をミュータブルに、for ループを `for x in v." #~ "iter_mut()` に変更してみましょう。" #~ msgid "`loop` expressions" @@ -26989,13 +26480,12 @@ msgstr "" #~ msgid "Here you must either `break` or `return` to stop the loop:" #~ msgstr "" -#~ "下の例で、ループから抜けるためには `break` あるいは `return` を使う必要が" -#~ "あります。" +#~ "下の例で、ループから抜けるためには `break` あるいは `return` を使う必要があり" +#~ "ます。" #~ msgid "Break the `loop` with a value (e.g. `break 8`) and print it out." #~ msgstr "" -#~ "例えば `break 8` のようにループを値と共に抜け、それを print してみましょ" -#~ "う。" +#~ "例えば `break 8` のようにループを値と共に抜け、それを print してみましょう。" #, fuzzy #~ msgid "The Luhn algorithm," @@ -27009,13 +26499,12 @@ msgstr "" #~ "Memory management: stack vs heap, manual memory management, scope-based " #~ "memory management, and garbage collection." #~ msgstr "" -#~ "メモリ管理: スタック vs ヒープ、手動でのメモリ管理、スコープに基づくメモ" -#~ "リ管理、ガベージコレクション。" +#~ "メモリ管理: スタック vs ヒープ、手動でのメモリ管理、スコープに基づくメモリ管" +#~ "理、ガベージコレクション。" #~ msgid "" #~ "Ownership: move semantics, copying and cloning, borrowing, and lifetimes." -#~ msgstr "" -#~ "所有権: ムーブセマンティクス、コピーとクローン、借用、ライフタイム。" +#~ msgstr "所有権: ムーブセマンティクス、コピーとクローン、借用、ライフタイム。" #, fuzzy #~ msgid "Structs and methods." @@ -27027,8 +26516,8 @@ msgstr "" #~ msgid "Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`." #~ msgstr "" -#~ "次のような新しい変数を宣言してみてください `let p = Point { x: 5, y: " -#~ "10.0 };`." +#~ "次のような新しい変数を宣言してみてください `let p = Point { x: 5, y: 10.0 };" +#~ "`." #~ msgid "Fix the code to allow points that have elements of different types." #~ msgstr "異なる型の要素を持つ点を許容するように、コードを修正してください。" @@ -27036,25 +26525,23 @@ msgstr "" #~ msgid "You can declare a generic type on your `impl` block:" #~ msgstr "`impl`に対して、ジェネリックな型を宣言することもできます:" -#~ msgid "" -#~ "Generic code is turned into non-generic code based on the call sites:" +#~ msgid "Generic code is turned into non-generic code based on the call sites:" #~ msgstr "" -#~ "ジェネリクスのコードは呼び出し箇所に基づいて、ジェネリックでないコードに変" -#~ "換されます:" +#~ "ジェネリクスのコードは呼び出し箇所に基づいて、ジェネリックでないコードに変換" +#~ "されます:" #~ msgid "behaves as if you wrote" #~ msgstr "上のコードは、次のように書いた時と同じように動作します" #~ msgid "" -#~ "Rust derive macros work by automatically generating code that implements " -#~ "the specified traits for a data structure." +#~ "Rust derive macros work by automatically generating code that implements the " +#~ "specified traits for a data structure." #~ msgstr "" -#~ "Rustのderiveマクロは、データ構造体に対して、指定されたトレイトを実装する" -#~ "コードを自動的に生成します。" +#~ "Rustのderiveマクロは、データ構造体に対して、指定されたトレイトを実装するコー" +#~ "ドを自動的に生成します。" #~ msgid "You can let the compiler derive a number of traits as follows:" -#~ msgstr "" -#~ "コンパイラには、以下のような多くのトレイトを導出させることができます:" +#~ msgstr "コンパイラには、以下のような多くのトレイトを導出させることができます:" #~ msgid "Traits can implement behavior in terms of other trait methods:" #~ msgstr "" @@ -27074,29 +26561,28 @@ msgstr "" #~ "With the blanket implementation, you no longer need `Equals` as a super " #~ "trait for `NotEqual`." #~ msgstr "" -#~ "ブランケット実装を用いれば、`Equals` を`NotEqual`のスーパートレイトとする" -#~ "必要はなくなります。" +#~ "ブランケット実装を用いれば、`Equals` を`NotEqual`のスーパートレイトとする必要" +#~ "はなくなります。" #~ msgid "`impl Trait` allows you to work with types which you cannot name." -#~ msgstr "" -#~ "`impl Trait`を用いれば、型名を明示せずに型を限定することができます。" +#~ msgstr "`impl Trait`を用いれば、型名を明示せずに型を限定することができます。" #~ msgid "" #~ "This example is great, because it uses `impl Display` twice. It helps to " #~ "explain that nothing here enforces that it is _the same_ `impl Display` " #~ "type. If we used a single `T: Display`, it would enforce the constraint " -#~ "that input `T` and return `T` type are the same type. It would not work " -#~ "for this particular function, as the type we expect as input is likely " -#~ "not what `format!` returns. If we wanted to do the same via `: Display` " -#~ "syntax, we'd need two independent generic parameters." +#~ "that input `T` and return `T` type are the same type. It would not work for " +#~ "this particular function, as the type we expect as input is likely not what " +#~ "`format!` returns. If we wanted to do the same via `: Display` syntax, we'd " +#~ "need two independent generic parameters." #~ msgstr "" #~ "この例は素晴らしい例です。なぜなら、 `impl Display`を2回用いているからで" -#~ "す。 ここでは `impl Display` の型が同一になることを強制するものはない、と" -#~ "いう説明をするのに役立ちます。もし単一の`T: Display`を用いた場合、入力の" -#~ "`T`と返り値の`T`が同一の型であることが強制されてしまいます。例で示した関数" -#~ "ではうまくいかないでしょう。なぜなら、我々が期待する入力の型は、`format!`" -#~ "が返すものではおそらくないからです。もしも同じことを`: Display`の構文で行" -#~ "いたい場合、2つの独立したジェネリックなパラメタが必要となるでしょう。" +#~ "す。 ここでは `impl Display` の型が同一になることを強制するものはない、という" +#~ "説明をするのに役立ちます。もし単一の`T: Display`を用いた場合、入力の`T`と返り" +#~ "値の`T`が同一の型であることが強制されてしまいます。例で示した関数ではうまくい" +#~ "かないでしょう。なぜなら、我々が期待する入力の型は、`format!`が返すものではお" +#~ "そらくないからです。もしも同じことを`: Display`の構文で行いたい場合、2つの独" +#~ "立したジェネリックなパラメタが必要となるでしょう。" #, fuzzy #~ msgid "Drawing A Simple GUI"