-
Notifications
You must be signed in to change notification settings - Fork 25
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
プリント文の翻訳 part 2 #342
プリント文の翻訳 part 2 #342
Conversation
…ion-words-in-print-part2
…ion-words-in-print-part2
``` | ||
|
||
特定のアイテムが含まれているかどうかを調べるには、`contains(_:)` メソッドを使用することができます。 | ||
|
||
```swift | ||
if favoriteGenres.contains("Funk") { | ||
print("I get up on the good foot.") | ||
print("James BrownのGet On The Good Footは最高です!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
意訳しました。
「いい足で起き上がる」だと意味が通じないので。
FunkといえばJames BrownのOn The Good Footなので、それがわかるようにしました。
https://www.youtube.com/watch?v=VgGwI12zMJg
language-guide/control-flow.md
Outdated
@@ -490,11 +490,11 @@ default: | |||
let stillAnotherPoint = (9, 0) | |||
switch stillAnotherPoint { | |||
case (let distance, 0), (0, let distance): | |||
print("On an axis, \(distance) from the origin") | |||
print("x 軸上または y 軸上にあり、原点から \(distance) 離れている。") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[self review] 意訳しています。
an axis
を「ある軸上」と訳すよりは具体的な軸に言及したほうがわかりやすいかなと思いました。
language-guide/functions.md
Outdated
@@ -62,10 +62,10 @@ Swift では、関数のパラメータと戻り値は非常に柔軟です。 | |||
|
|||
```swift | |||
func sayHelloWorld() -> String { | |||
return "hello, world" | |||
return "こんにちは、 world" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他の箇所で「Hello」を「こんにちは」で訳したので、ここは訳しました
違和感ある場合は言ってください!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
関数名がsayHelloWorldなのでhelloままでも良いかもしれないですね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
オッケーです。 "hello, world"
のままにしておきます 👍
// "hello, world" を出力し、 12 の値が返されます | ||
printWithoutCounting(string: "hello, world") | ||
// hello, world" but doesn't return a value | ||
// "hello, world" を出力しますが、値は返されません |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原文は以下のようです。
printAndCount(string: "hello, world")
// prints "hello, world" and returns a value of 12
printWithoutCounting(string: "hello, world")
// prints "hello, world" but doesn't return a value
https://docs.swift.org/swift-book/LanguageGuide/Functions.html
print
の英文が抜けていたので、翻訳は原文を参照しました。
@@ -312,7 +312,7 @@ func findIndex<T: Equatable>(of valueToFind: T, in array:[T]) -> Int? { | |||
|
|||
```swift | |||
let doubleIndex = findIndex(of: 9.3, in: [3.14159, 0.1, 0.25]) | |||
// doubleIndex は、9.3 が配列にないため、オプショナルの Int です。 | |||
// doubleIndex は、9.3 が配列にないため、オプショナルの Int 型で値はありません。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原文は以下です。
https://docs.swift.org/swift-book/LanguageGuide/Generics.html
let doubleIndex = findIndex(of: 9.3, in: [3.14159, 0.1, 0.25])
// doubleIndex is an optional Int with no value, because 9.3 isn't in the array
with no value
の情報が現状抜け落ちていたので補いました
language-guide/inheritance.md
Outdated
@@ -190,7 +190,7 @@ print("Car: \(car.description)") | |||
> NOTE | |||
> 継承した定数の格納プロパティまたは継承した読み取り専用計算プロパティにプロパティオブザーバを追加することはできません。これらのプロパティの値は変更できないため、オーバーライドの一部として `willSet` または `didSet` の実装を提供することは適切ではありません。 同じプロパティに対して、set のオーバーライドとプロパティオブザーバのオーバーライドの、両方を提供することはできないことにも注意してください。プロパティの値の変更を監視する必要があり、そのプロパティのカスタムの set を既に提供している場合は、カスタムの set 内から値の変更が簡単に監視できます。 | |||
|
|||
次の例では、`Car` のサブクラスの `AutomaticCar` という新しいクラスを定義しています。`AutomaticCar` クラスは、現在の速度に基づいて使用する適切なギアを自動的に選択する自動ギアボックスを備えた車を表します: | |||
次の例では、`Car` のサブクラスの `AutomaticCar` という新しいクラスを定義しています。`AutomaticCar` クラスは、現在の速度に基づいて使用する適切なギアを自動的に選択する自動ギアボックスを備えた車、オートマ車を表します: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 210で「オートマ車」の単語を使いたかったので、ここで初出させました。
language-guide/control-flow.md
Outdated
} | ||
// (1, 1) is inside the box | ||
// (1, 1) は箱の中にあります |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// (1, 1) は箱の中にあります | |
// (1, 1) はボックスの中にあります |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
表記ゆれ直します
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます!いくつかコメントしました🙇🏻♂️
language-guide/closures.md
Outdated
@@ -230,7 +230,7 @@ func loadPicture(from server: Server, completion: (Picture) -> Void, onFailure: | |||
loadPicture(from: someServer) { picture in | |||
someView.currentPicture = picture | |||
} onFailure: { | |||
print("Couldn't download the next picture.") | |||
print("画像がダウンロードできませんでした。") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print("画像がダウンロードできませんでした。") | |
print("画像をダウンロードできませんでした。") |
language-guide/closures.md
Outdated
@@ -458,13 +458,13 @@ func collectCustomerProviders(_ customerProvider: @autoclosure @escaping () -> S | |||
collectCustomerProviders(customersInLine.remove(at: 0)) | |||
collectCustomerProviders(customersInLine.remove(at: 0)) | |||
|
|||
print("Collected \(customerProviders.count) closures.") | |||
// Collected 2 closures. | |||
print("集められた \(customerProviders.count) 個のクロージャー。") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
集められたという表現がややわかりづらいかなあと思いました。配列には今何個のprovider があります的なニュアンスを上手く表現したいですね。
print("集められた \(customerProviders.count) 個のクロージャー。") | |
print("\(customerProviders.count) 個のクロージャーが保持されています。") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
わかりやすくなったと思います。 保持されています
良いと思います
language-guide/closures.md
Outdated
@@ -458,13 +458,13 @@ func collectCustomerProviders(_ customerProvider: @autoclosure @escaping () -> S | |||
collectCustomerProviders(customersInLine.remove(at: 0)) | |||
collectCustomerProviders(customersInLine.remove(at: 0)) | |||
|
|||
print("Collected \(customerProviders.count) closures.") | |||
// Collected 2 closures. | |||
print("集められた \(customerProviders.count) 個のクロージャー。") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
language-guide/collection-types.md
Outdated
@@ -306,19 +306,19 @@ var favoriteGenres: Set = ["Rock", "Classical", "Hip hop"] | |||
セットのアイテムの数を調べるために、読み取り専用の `count` プロパティをチェックします。 | |||
|
|||
```swift | |||
print("I have \(favoriteGenres.count) favorite music genres.") | |||
// I have 3 favorite music genres. | |||
print("私には \(favoriteGenres.count) 個の好きな音楽ジャンがあります。") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print("私には \(favoriteGenres.count) 個の好きな音楽ジャンがあります。") | |
print("私には \(favoriteGenres.count) 個の好きな音楽ジャンルがあります。") |
language-guide/collection-types.md
Outdated
print("I have \(favoriteGenres.count) favorite music genres.") | ||
// I have 3 favorite music genres. | ||
print("私には \(favoriteGenres.count) 個の好きな音楽ジャンがあります。") | ||
// 私には 3 個の好きな音楽ジャンがあります。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 私には 3 個の好きな音楽ジャンがあります。 | |
// 私には 3 個の好きな音楽ジャンルがあります。 |
language-guide/initialization.md
Outdated
} | ||
// This is a defined temperature unit, so initialization succeeded. | ||
// これは温度の単位として定義されているので、初期化は成功しました。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// これは温度の単位として定義されているので、初期化は成功しました。 | |
// これは温度の単位として定義されているので、初期化に成功しました。 |
language-guide/initialization.md
Outdated
|
||
let unknownUnit = TemperatureUnit(rawValue: "X") | ||
if unknownUnit == nil { | ||
print("This isn't a defined temperature unit, so initialization failed.") | ||
print("これは温度の単位としては定義されていないので、初期化は失敗しました。") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print("これは温度の単位としては定義されていないので、初期化は失敗しました。") | |
print("これは温度の単位としては定義されていないので、初期化に失敗しました。") |
language-guide/initialization.md
Outdated
} | ||
// This isn't a defined temperature unit, so initialization failed. | ||
// これは温度の単位としては定義されていないので、初期化は失敗しました。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// これは温度の単位としては定義されていないので、初期化は失敗しました。 | |
// これは温度の単位としては定義されていないので、初期化に失敗しました。 |
language-guide/nested-types.md
Outdated
@@ -43,10 +43,10 @@ struct BlackjackCard { | |||
// BlackjackCard のプロパティとメソッド | |||
let rank: Rank, suit: Suit | |||
var description: String { | |||
var output = "suit is \(suit.rawValue)," | |||
output += " value is \(rank.values.first)" | |||
var output = "スートは \(suit.rawValue)," |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var output = "スートは \(suit.rawValue)," | |
var output = "柄は \(suit.rawValue)," |
language-guide/nested-types.md
Outdated
@@ -71,7 +71,7 @@ struct BlackjackCard { | |||
```swift | |||
let theAceOfSpades = BlackjackCard(rank: .ace, suit: .spades) | |||
print("theAceOfSpades: \(theAceOfSpades.description)") | |||
// theAceOfSpades: suit is ♠, value is 1 or 11 | |||
// theAceOfSpades: スートは ♠, 数字は 1 と 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// theAceOfSpades: スートは ♠, 数字は 1 と 11 | |
// theAceOfSpades: 柄は ♠, 数字は 1 と 11 |
language-guide/error-handling.md
Outdated
} | ||
} | ||
|
||
do { | ||
try nourish(with: "Beet-Flavored Chips") | ||
} catch { | ||
print("Unexpected non-vending-machine-related error: \(error)") | ||
print("予期しない自動販売機とは関係ないのエラーが発生: \(error)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すいません誤字の修正とちょっとだけ変えてみました🙇🏻♂️
print("予期しない自動販売機とは関係ないのエラーが発生: \(error)") | |
print("予期せぬ自動販売機とは関係ないエラーが発生: \(error)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
誤字ぜんぜん気づかなかったです。
更新しました!
50bb671
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTMです👍🏻ありがとうございます!
apply t-ae san feedback Co-authored-by: t.ae <t-ae@users.noreply.github.com>
apply t-ae san feedback Co-authored-by: t.ae <t-ae@users.noreply.github.com>
@t-ae さん、提案いただいた修正、問題なさそうなのでそのまま取り込みました。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
Closes #143 <紐付けたいIssueの番号>
下記pull requestのpart 2です。
#335
TODO
下記タスクが終わった後にpull requestをready for reviewに変更します。
訳さなかったもの
functions.md
のこのprint文は意図的に翻訳していません。hello, world
は決り文句みたいなものですし、前後の文章とつながりはないです。なので訳さなくても問題ないと判断しました。
the-swift-programming-language-jp/language-guide/functions.md
Line 379 in b7abfc6