Skip to content

Commit 4558890

Browse files
committed
Fix some translations
1 parent 39079fb commit 4558890

File tree

18 files changed

+19
-68
lines changed

18 files changed

+19
-68
lines changed

src/crates.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ places where `mod` declarations in the crate file are found, *before* running
1111
the compiler over it. In other words, modules do *not* get compiled
1212
individually, only crates get compiled.
1313
-->
14-
FIXME_EN: A crate is a compilation unit in Rust. Whenever `rustc some_file.rs` is called,
15-
FIXME_EN: `some_file.rs` is treated as the *crate file*. If `some_file.rs` has `mod`
16-
FIXME_EN: declarations in it, then the contents of the module files will get merged with
17-
FIXME_EN: the crate file *before* running the compiler over it. In other words, modules
18-
FIXME_EN: do *not* get compiled individually, only crates get compiled.
19-
FIXME_JA: クレイトはRustにおけるコンパイルの単位です。`rustc some_file.rs`が呼ばれると、`some_file.rs`は必ず*クレイトファイル*として扱われます。もし`some_file.rs``mod`宣言を含んでいるのならば、コンパイルの*前に*モジュールファイルの中身は、クレイトファイルと結合されます。言い換えると、それぞれのモジュールが独立にコンパイルされるということはありませんが、それぞれのクレートは互いに独立にコンパイルされるということです。
14+
クレイトはRustにおけるコンパイルの単位です。`rustc some_file.rs`が呼ばれると、`some_file.rs`は必ず*クレイトファイル*として扱われます。もし`some_file.rs``mod`宣言を含んでいるのならば、コンパイルの*前に*、そのモジュールファイルの中身が`mod`の位置に挿入されます。言い換えると、それぞれのモジュールが独立にコンパイルされるということはありませんが、それぞれのクレートは互いに独立にコンパイルされるということです。
2015

2116
<!--
2217
A crate can be compiled into a binary or into a library. By default, `rustc`

src/error.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ example, failing to read a file and then continuing to use that *bad* input
99
would clearly be problematic. Noticing and explicitly managing those errors
1010
saves the rest of the program from various pitfalls.
1111
-->
12-
FIXME_EN: Error handling is the process of handling the possibility of failure. For
13-
FIXME_EN: example, failing to read a file and then continuing to use that *bad* input
14-
FIXME_EN: would clearly be problematic. Error handling allows us to notice and handle
15-
FIXME_EN: those errors in an explicit fashion, saving the rest of the program from
16-
FIXME_EN: potential issues.
17-
FIXME_JA: エラーハンドリングとは失敗の起きる可能性を扱うプロセスのことです。例えば、ファイルを読み込むのに失敗した際、その*誤った*インプットを使い続けるのは明らかに問題です。エラーハンドリングによって、そのようなエラーに気づき、よりきれいな方法で扱い、残りのプログラムに問題が波及することを防ぐことができるようになります。
12+
エラーハンドリングとは失敗の起きる可能性を扱うプロセスのことです。例えば、ファイルを読み込むのに失敗した際、その*誤った*インプットを使い続けるのは明らかに問題です。そのようなエラーを通知して明示的に扱うことで、残りのプログラムに問題が波及することを防ぐことができるようになります。
1813

1914
There are various ways to deal with errors in Rust, which are described in the
2015
following subchapters. They all have more or less subtle differences and different

src/expression.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ assignments. The last expression in the block will be assigned to the
4242
place expression such as a local variable. However, if the last expression of the block ends with a
4343
semicolon, the return value will be `()`.
4444
-->
45-
FIXME_EN: Blocks are expressions too, so they can be used as [r-values][rvalue] in
46-
FIXME_EN: assignments. The last expression in the block will be assigned to the
47-
FIXME_EN: [l-value][lvalue]. However, if the last expression of the block ends with a
48-
FIXME_EN: semicolon, the return value will be `()`.
49-
FIXME_JA: コードブロックも文の一種です。よってブロックを丸ごと[右辺値][rvalue]として扱うことができます。その場合ブロック内の最後の式文が左辺値に代入されます。ただし、ブロック内の最後の式文が`;`で終わる場合は返り値は`()`になります。
45+
コードブロックも式の一種です。よってブロックを丸ごと値として扱うことができます。その場合ブロック内の最後の式が場所を表す式(例えばローカル変数)に代入されます。ただし、ブロック内の最後の式が`;`で終わる場合は返り値は`()`になります。
5046

5147
```rust,editable
5248
fn main() {

src/flow_control/if_let.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<!--
44
For some use cases, when matching enums, `match` is awkward. For example:
55
-->
6-
FIXME_EN: For some use cases, `match` is awkward. For example:
7-
FIXME_JA: 場合によっては`match`を使用すると不自然な書き方になってしまう場合があります。例えば...
6+
列挙型をマッチさせるとき、場合によっては`match`を使用すると不自然な書き方になってしまう場合があります。例えば...
87

98
```rust
109
// Make `optional` of type `Option<i32>`

src/flow_control/while.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<!--
44
The `while` keyword can be used to run a loop while a condition is true.
55
-->
6-
FIXME_EN: The `while` keyword can be used to loop until a condition is met.
7-
FIXME_JA: `while`キーワードは条件が満たされるまでのループのために使用します。
6+
`while`キーワードは条件が真である限り実行され続けるループのために使用します。
87

98
<!--
109
Let's write the infamous [FizzBuzz][fizzbuzz] using a `while` loop.

src/fn/closures/closure_examples/iter_find.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
first value which satisfies some condition. If none of the values satisfy the
66
condition, it returns `None`. Its signature:
77
-->
8-
FIXME_EN: `Iterator::find` is a function which when passed an iterator, will return
9-
FIXME_EN: the first element which satisfies the predicate as an `Option`. Its
10-
FIXME_EN: signature:
11-
FIXME_JA: `Iterator::find`はイテレータに渡される関数で、条件を満たす最初の値を`Option`として返します。型シグネチャは以下のようになります。
8+
`Iterator::find`はイテレータを辿る関数で、条件を満たす最初の値を探します。もし条件を満たす値がなければ`None`を返します。型シグネチャは以下のようになります。
129

1310
```rust,ignore
1411
pub trait Iterator {

src/fn/closures/input_functions.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ closure can be passed as a parameter.
1313

1414
「クロージャではない普通の関数を引数として渡すことは可能なのだろうか?」
1515

16-
FIXME_EN: about functions. And indeed they can! However, because a function can
17-
FIXME_EN: *never* capture variables, closures are strictly more flexible. Therefore, any
18-
FIXME_EN: function which can take a closure as an argument can also take a function.
19-
FIXME_JA: 可能です!とはいえ、通常の関数は*絶対に*周辺の変数を補足することができないので、クロージャの方がより柔軟な使い方ができます。ここから、クロージャを引数としてとる関数は、必ず通常の関数を引数としてとることができます。
16+
可能です!もしパラメータとしてクロージャを取る関数を定義すれば、そのクロージャのトレイト境界を満たす任意の関数をパラメータとして渡すことができます。
2017

2118
```rust,editable
2219
// Define a function which takes a generic `F` argument

src/hello/print.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,8 @@ Implementing the `fmt::Display` trait automatically implements the
126126
decimals to display)
127127
-->
128128
* 上の例を実行した際に生じるエラーを修復しましょう。
129-
* FIXME_EN: Add a `println!` macro that prints: `Pi is roughly 3.143`, using twenty-two
130-
FIXME_EN: divided by seven to generate the estimate for Pi. (Hint: you may need to
131-
* FIXME_JA: `println!`マクロを追加し、`Pi is rough ly 3.143`,という文字列を出力しましょう。
132-
FIXME_JA: ただし、3.143は22を7で割ることで作成してください。(ヒント: 10進数の数を出力する方法については、[`std::fmt`][fmt]をチェックする必要があるかもしれません。)
129+
* `println!`マクロを追加し、表示される小数部の桁数を調整して`Pi is roughly 3.142`という文字列を出力しましょう。
130+
ただし、円周率の値は`let pi = 3.141592`を使ってください。(ヒント: 小数部の桁数を調整する方法については、[`std::fmt`][fmt]をチェックする必要があるかもしれません。)
133131

134132
### See also:
135133

src/hello/print/print_debug.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ So `fmt::Debug` definitely makes this printable but sacrifices some
8181
elegance. Rust also provides "pretty printing" with `{:#?}`.
8282
-->
8383
`fmt::Debug`は確実にプリント可能にしてくれるのですが、一方である種の美しさを犠牲にしています。
84-
FIXME_EN: elegance. Manually implementing `fmt::Display` will fix that.
85-
FIXME_JA: `fmt::Display`を手動で実装すればその美しさを取り戻す事ができるでしょう。
84+
Rustは`{:#?}`による「見栄えの良いプリント」も提供します。
8685

8786
```rust,editable
8887
#[derive(Debug)]

src/macros/designators.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ fn main() {
6767
<!--
6868
These are some of the available designators:
6969
-->
70-
FIXME_EN: This is a list of all the designators:
71-
FIXME_JA: 以下が全識別子のリストです。
70+
使用できる識別子には以下のようなものがあります。
7271

7372
<!--
7473
* `block`

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy