-
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
[A Swift Tour] 新規文章の追加、翻訳の改善 #315
Conversation
元のままでも意味はわかるんですが、この文で |
@tsubasarc
ここ自分の誤解が原因で元の文が変だと思って変更してしまっていました。
レビューコメントが見えていないのですが投稿できているでしょうか? |
@t-ae
すみません、レビューという言い方が間違ってました。 |
あれ?できないですか? |
@t-ae ごめんなさい! Suggestion しますね。 |
今、お二人Collaboratorに入れてみたのですが、これでreviewerに追加できるようなりますでしょうか? |
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.
翻訳文を改善
@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.
翻訳文を改善
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.
翻訳文を改善
Co-authored-by: Tsubasa ISHIHARA <tsubasa.git@gmail.com>
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.
ありがとうございます!すごいわかりやすくなったように感じます🙂
いくつかコメントさせていただきましたmm
welcome-to-swift/a-swift-tour.md
Outdated
|
||
もし列挙型が Raw Value を持つ場合、これらの値は宣言の一部として決定されます。これはつまり、特定の列挙ケースの全てのインスタンスは、必ず同じ Raw Value を持つということです。列挙ケースが関連値を持つもう 1 つの方法があります。これらはインスタンス生成時に値が決定され、列挙ケースのインスタンスごとに異なる値を持つ可能性があります。例えば、サーバから日の出時刻と日の入り時刻をリクエストする場合を考えてみてください。サーバはリクエスト情報に応じたレスポンスを返すか、リクエストが間違っている場合は間違っている内容を返します。 | ||
もし列挙型が Raw Value を持つ場合、これらの値は宣言の一部として決定されます。これはつまり、特定の列挙ケースの全てのインスタンスは、必ず同じ Raw Value を持つということです。もう一つの選択肢は、列挙ケースに関連づいた値を持たせることです。それらの値はインスタンス生成時に決定され、列挙ケースのインスタンスごとに異なる値を持つことができます。これらの値\(Associated Value\)は列挙ケースのインスタンスの格納プロパティのように振る舞います。例えば、サーバから日の出時刻と日の入り時刻をリクエストする場合を考えてみてください。サーバはリクエスト情報に応じたレスポンスを返すか、リクエストが間違っている場合は間違っているという内容を返します。 |
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.
Raw Valueについて全部の値が等しいみたいな印象を受けるので同じ型という方が良いかなあと思いました。
関連値は初出だと思うので、それっぽい表現があった方が良いかなあと個人的に思いました。
もし列挙型が Raw Value を持つ場合、これらの値は宣言の一部として決定されます。これはつまり、特定の列挙ケースの全てのインスタンスは、必ず同じ Raw Value を持つということです。もう一つの選択肢は、列挙ケースに関連づいた値を持たせることです。それらの値はインスタンス生成時に決定され、列挙ケースのインスタンスごとに異なる値を持つことができます。これらの値\(Associated Value\)は列挙ケースのインスタンスの格納プロパティのように振る舞います。例えば、サーバから日の出時刻と日の入り時刻をリクエストする場合を考えてみてください。サーバはリクエスト情報に応じたレスポンスを返すか、リクエストが間違っている場合は間違っているという内容を返します。 | |
もし列挙型が Raw Value を持つ場合、これらの値は宣言の一部として決定されます。これはつまり、特定の列挙ケースの全てのインスタンスは、必ず同じ型の Raw Value を持つということです。もう一つの選択肢は、列挙ケースに関連づいた値を持たせることです。それらの値はインスタンス生成時に決定され、列挙ケースのインスタンスごとに異なる値を持つことができます。これらの値\(Associated Value\)は列挙ケースのインスタンスの格納プロパティのように振る舞います。例えば、サーバから日の出時刻と日の入り時刻をリクエストする場合を考えてみてください。サーバはリクエスト情報に応じたレスポンスを返すか、リクエストが間違っている場合は間違っているという内容を返します。 |
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.
先例
## <a id="associated-values">関連値\(Associated Values\)</a> |
それ気になってるんですが、すると Raw Value
の方も漢字のやつで訳が欲しくなりませんか…?
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.
あーすいません。先例があったんですね。そうしましたらそのままで大丈夫です。
すると Raw Value の方も漢字のやつで訳が欲しくなりませんか…?
そうですね。Appleが公表している内容の中で適切なワードが見つかればそれを使いたいです(今は見つかっていない場合は英語表記のままというルールに沿っています)
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.
関連値は個別ドキュメントのほうで先例あったんですね… Raw Value に合わせて Associated Value にしていました。
Raw Valueについて全部の値が等しいみたいな印象を受けるので同じ型という方が良いかなあと思いました。
多分私がしていた誤解と同じ誤解をされていると思うのですが、ここで書かれている 全てのインスタンス
というのはケース自体ではなくケースを代入して作られた実体を指し示しているという認識です。
enum Enum: Int { case case1, case 2}
let c1_1 = Enum.case1
let c1_2 = Enum.case1
let c2 = Enum.case2
enumは値型なのでc1_1
とc1_2
は別のインスタンスとなりますが、これらは必ず同じ Raw Value を持っています。
c2
も同じ型の Raw Value を持っていますが、これは別のケースのインスタンスなので違う値になります。
原文の every instance of a particular enumeration case
はこの例の c1_1
と c1_2
のことを指すことになるのが自然だと思いますがどうでしょうか。
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.
そうですね!おっしゃる通りだと思います(すいません自分で書いておきながら...w)。suggestは気にしないでくださいmm
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.
ちなみにRaw Valueですが、WWDCでは「Raw値」となっていましたが...どうなんでしょう😅
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.
Raw値…実際使われてるのは見たことないですね。
公式翻訳を重視するのもいいですが、日本語コミュニティで広く使われている呼び方があるならそれを使うというのもありかなと思います。読者がコミュニティに流れてきたときに違和感なく溶け込めるので。
ところでREADME.mdによると
なお、英語のまま表記の大文字、小文字は、原文の記載に従います。
通常の英語と同様に文の開始は大文字、その他は小文字
例: 開始 -> Computed property、その他 -> computed property
とのことですが、Raw Valueでは守られていないようですね。
この文章はCONTRIBUTION.mdのほうに記載がないので、正規のルールならそちらに追加すべきかと思います。
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.
ありがとうございます!
このルール最近決まったので逆にそうなっていない所を修正したいと思ってました。なので、もし可能であれば一緒に直していただけると嬉しいですmm
issue立てました。
#317
後々の曖昧さを回避の為に、 ページ内で初めて取り上げられた用語を定義する。 Co-authored-by: t.ae <t-ae@users.noreply.github.com>
遅れましたが、Collaborator への invitation ありがとうございます 🙇🏽 |
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
@@ -419,7 +427,7 @@ test.simpleDescription() | |||
``` | |||
|
|||
> Experiment | |||
> radius と name をイニシャライザの引数に受けとる `Circle` という名前の `NameShape` の別のサブクラスを作ってみましょう。そして、 `Circle` クラスに `area()`、`simpleDescription()` メソッドを実装してみましょう。 | |||
> `radius` と `name` をイニシャライザの引数に受けとる `Circle` という名前の `NameShape` の別のサブクラスを作ってみましょう。そして、 `Circle` クラスに `area()`、`simpleDescription()` メソッドを実装してみましょう。 |
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.
原文ではバックティックのついていない箇所ですが、ここでは半径と名前を指すと同時に引数名を指定していると考えられます。
コードについての指定になるため、バックティックで囲うのが適切かと思い付けました。
@tsubasarc |
遅くなってすみません! |
if let
の同名省略の記述を追加(Swift5.7からなのでコメントアウトしています)判断に迷う箇所はコメントしていきます。