Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

summaryを総括と訳した部分に関する修正 #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion second-edition/src/appendix-07-nightly-rust.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- # Appendix G - How Rust is Made and “Nightly Rust” -->

# 付録G - Rustが作られ方と“Nightly Rust”
## 付録G: Rustが作られ方と“Nightly Rust”

<!-- This appendix is about how Rust is made and how that affects you as a Rust -->
<!-- developer. We mentioned that the output in this book was generated by stable -->
Expand Down
11 changes: 5 additions & 6 deletions second-edition/src/ch10-02-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<!-- `summarize` method on an instance. Listing 10-12 shows the definition of a -->
<!-- `Summary` trait that expresses this behavior. -->

`NewsArticle``Tweet`インスタンスに格納される可能性のあるデータの総括を表示するメディア総括ライブラリを作成したいです
このために、各型から総括が必要で、インスタンスに対して`summarize`メソッドを呼び出すことでその総括を要求する必要があります
`NewsArticle` または `Tweet` インスタンスに保存されているデータのサマリを表示できるメディア アグリゲータ ライブラリを作成します
これをするには、各型のサマリーが必要で、インスタンスで `summarize` メソッドを呼び出してサマリーを要求する必要があります
リスト10-12は、この振る舞いを表現する`Summary`トレイトの定義を表示しています。

<!-- <span class="filename">Filename: src/lib.rs</span> -->
Expand Down Expand Up @@ -100,10 +100,9 @@ pub trait Summary {
<!-- followed by the entire text of the tweet, assuming that tweet content is -->
<!-- already limited to 280 characters. -->

今や`Summary`トレイトで欲しい振る舞いを定義したので、メディア総括機で型に実装することができます。
リスト10-13は見出し、著者、場所を使用して`summarize`の戻り値を生成する`NewsArticle`構造体の`Summary`トレイト実装を示しています。
`Tweet`構造体に関しては、ツイートの内容が既に280文字に限定されていることを想定して、
`summarize`をユーザ名にツイート全体のテキストが続く形で定義します。
今や `Summary` トレイトを使用して目的の動作を定義できたので、メディア アグリゲータで型に実装できます。
リスト10-13は、 `Summary` トレイトを `NewsArticle` 構造体上に実装したもので、ヘッドライン、著者、そして `Summarize` の戻り値を示しています。
`Tweet` 構造体に関しては、ツイートの内容が既に280文字に制限されていると仮定して、ユーザー名の後にツイートのテキスト全体が続くものとして `Summarize` を定義します。

<!-- <span class="filename">Filename: src/lib.rs</span> -->

Expand Down
2 changes: 1 addition & 1 deletion second-edition/src/ch10-03-lifetime-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ fn longest_with_an_announcement<'a, T>(x: &'a str, y: &'a str, ann: T) -> &'a st

<!-- ## Summary -->

## 総括
## まとめ

<!-- We covered a lot in this chapter! Now that you know about generic type -->
<!-- parameters, traits and trait bounds, and generic lifetime parameters, you’re -->
Expand Down
2 changes: 1 addition & 1 deletion second-edition/src/ch11-01-writing-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ error: test failed
<!-- The summary line displays at the end: overall, our test result is `FAILED`. -->
<!-- We had one test pass and one test fail. -->

総括の行が最後に出力されています: 総合的に言うと、テスト結果は`失敗`でした。
サマリー行が最後に出力されています: 総合的に言うと、テスト結果は`失敗`でした。
一つのテストが通り、一つが失敗したわけです。

<!-- Now that you’ve seen what the test results look like in different scenarios, -->
Expand Down
8 changes: 4 additions & 4 deletions second-edition/src/ch11-02-running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
<!-- output from the test that failed, `I got the value 8`, appears in the section -->
<!-- of the test summary output, which also shows the cause of the test failure. -->

この出力のどこにも`I got the value 4`という出力が見られないことに注意してください
この出力は、通るテストが走る際に出力されるものです。この出力はキャプチャされてしまったのです
失敗したテストからの出力である`I got the value 8`はテスト総括出力の区域に出現し、
ここには、テスト失敗の原因も表示されています
この出力のどこにも `I got the value 4` と表示されていないことに注意してください
これは、テストに合格した場合に出力されるものです
その出力はキャプチャされてしまいました。
失敗したテストのからの出力 `I got the value 8` がテストサマリー出力のセクションに表示され、テストが失敗した原因も示されます

<!-- If we want to see printed values for passing tests as well, we can disable the -->
<!-- output capture behavior by using the `--nocapture` flag: -->
Expand Down
4 changes: 2 additions & 2 deletions second-edition/src/ch11-03-test-organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

3つの区域の出力が単体テスト、結合テスト、ドックテストを含んでいます。単体テスト用の最初の区域は、
今まで見てきたものと同じです: 各単体テストに1行(リスト11-12で追加した`internal`という名前のもの)と、
単体テストの総括行です
単体テストのサマリー行です

<!-- The integration tests section starts with the line `Running -->
<!-- target/debug/deps/integration-test-ce99bcc2479f4607` (the hash at the end of -->
Expand All @@ -264,7 +264,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
結合テストの区域は、
`Running target/debug/deps/integration-test-ce99bcc2479f4607`という行で始まっています(最後のハッシュはあなたの出力とは違うでしょう)。
次に、この結合テストの各テスト関数用の行があり、`Doc-tests adder`区域が始まる直前に、
結合テストの結果用の総括行があります
結合テストの結果用のサマリー行があります

<!-- Similarly to how adding more unit test functions adds more result lines to the -->
<!-- unit tests section, adding more test functions to the integration test file -->
Expand Down
2 changes: 1 addition & 1 deletion second-edition/src/ch17-03-oo-design-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ Rustでは利用可能なことを確かめました。これらのパターン

<!-- ## Summary -->

## 総括
## まとめ

<!-- No matter whether or not you think Rust is an object-oriented language after -->
<!-- reading this chapter, you now know that you can use trait objects to get some -->
Expand Down
5 changes: 2 additions & 3 deletions second-edition/src/ch20-01-single-threaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,8 @@ message-body
<!-- CRLF sequence are any headers, another CRLF sequence, and the body of the -->
<!-- response. -->

1行目は、*ステータス行*で、レスポンスで使用されるHTTPバージョン、リクエストの結果を総括する数値のステータスコード、
ステータスコードをテキストで表現する理由フレーズを含みます。CRLFの後には、あらゆるヘッダ、別のCRLF、
レスポンスの本体があります。
最初の行は、レスポンスで使用されるHTTPバージョン、リクエストの結果を要約する数値ステータス・コード、そしてステータス・コードのテキスト記述を提供する理由句を含む *ステータス行* です。
CRLFシーケンスの後には、任意のヘッダ、別のCRLFシーケンス、そしてレスポンスの本体が続きます。

<!-- Here is an example response that uses HTTP version 1.1, has a status code of -->
<!-- 200, an OK reason phrase, no headers, and no body: -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ impl Worker {

<!-- ## Summary -->

## 総括
## まとめ

<!-- Well done! You’ve made it to the end of the book! We want to thank you for -->
<!-- joining us on this tour of Rust. You’re now ready to implement your own Rust -->
Expand Down