-
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
[Access Control] 誤訳修正、翻訳改善 #333
Conversation
|
||
さらに、同じモジュールで定義されているクラスの場合、特定のアクセスレベルコンテキストでアクセス可能な任意のクラスのメンバ\(メソッド、プロパティ、イニシャライザ、またはサブスクリプト\)をオーバーライドできます。別のモジュールで定義されているクラスの場合、open クラスのメンバをオーバーライドできます。 | ||
さらに、同じモジュールで定義されているクラスの場合、特定のアクセスコンテキストでアクセス可能な任意のクラスのメンバ\(メソッド、プロパティ、イニシャライザ、またはサブスクリプト\)をオーバーライドできます。別のモジュールで定義されているクラスの場合、そのクラスの open メンバをオーバーライドできます。 |
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.
原文ではaccess context
と access level context
が出てきて、ここでは access context
です。
使い分けがよく分かりませんが、とりあえず出てくるものに合わせました。
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.
ありがとうございます。access contextはクラス同士の話をしていて、access level contextは内部のメンバ同士の話をしているのかなと思いましたが、いまいちわからないですねw
|
||
### プロトコル継承\(Protocol Inheritance\) | ||
|
||
既存のプロトコルから継承する新しいプロトコルを定義する場合、新しいプロトコルは、継承元のプロトコルと同じアクセスレベルにしか設定できません。例えば、internal プロトコルから継承する public プロトコルを作成することはできません。 | ||
|
||
### プロトコル準拠\(Protocol Conformance\) | ||
|
||
型は、型自体よりもアクセスレベルの厳しいプロトコルに準拠できます。例えば、他のモジュールで使用できる public 型を定義できますが、internal プロトコルへ準拠した実装は internal プロトコルの定義モジュール内でのみ使用できます。 | ||
型は、型自体よりもアクセスレベルの厳しいプロトコルに準拠できます。例えば、他のモジュールで使用できる public 型を定義できますが、internal プロトコルへの準拠は internal プロトコルの定義モジュール内でのみ使用できます。 |
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.
原文 but whose conformance to an internal protocol can only be used within the internal protocol’s defining module.
準拠自体のアクセスレベルの話をしているようなので、プロトコルへ準拠した実装は
は違うと思います。
ある型が InternalProtocol
を実装しているとして、外部のモジュールからは InternalProtocol
に準拠していることを認識できないというような意図ではないかと思っています。
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細かい点についていくつかコメントしました。
|
||
さらに、同じモジュールで定義されているクラスの場合、特定のアクセスレベルコンテキストでアクセス可能な任意のクラスのメンバ\(メソッド、プロパティ、イニシャライザ、またはサブスクリプト\)をオーバーライドできます。別のモジュールで定義されているクラスの場合、open クラスのメンバをオーバーライドできます。 | ||
さらに、同じモジュールで定義されているクラスの場合、特定のアクセスコンテキストでアクセス可能な任意のクラスのメンバ\(メソッド、プロパティ、イニシャライザ、またはサブスクリプト\)をオーバーライドできます。別のモジュールで定義されているクラスの場合、そのクラスの open メンバをオーバーライドできます。 |
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.
ありがとうございます。access contextはクラス同士の話をしていて、access level contextは内部のメンバ同士の話をしているのかなと思いましたが、いまいちわからないですねw
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>
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です👍🏻ありがとうございます!
アクセスレベルの高低が逆になっているなどの誤訳があったので修正です。