Skip to content

Add scala3 docs translated in Japanese #1922

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

Merged
merged 30 commits into from
Mar 13, 2021
Merged

Add scala3 docs translated in Japanese #1922

merged 30 commits into from
Mar 13, 2021

Conversation

i10416
Copy link
Contributor

@i10416 i10416 commented Feb 12, 2021

Hi! I partly translated scala3 docs in Japanese!

If there's anything to change, please tell me.

TODO

  • improve getting-started guide
  • translate some sentences yet to be done
@i10416 i10416 changed the title [WIP] Add scala3 docs in ja Feb 12, 2021
@i10416
Copy link
Contributor Author

i10416 commented Feb 12, 2021

I can not figure out why Ci failed since it works well locally.

@griggt
Copy link
Contributor

griggt commented Feb 12, 2021

The CI failure may be related to the recent purge of old documentation: scala/scala-lang#453 (comment)

@i10416 i10416 changed the title [WIP] Add scala3 docs translated in Japanese Mar 2, 2021
通常、ドキュメントプロジェクトのそれぞれには編集・改善用のリンクが含まれています。(このドキュメントについても同様で、目次の領域にあります。) また、コントリビューションをはじめるために必要な情報は以下に記載されています。

## Scala 3 Book
[Scala 3 Book][scala3-book] は Alvin Alexander 氏 が書いています。 この本はScala 3 のすべての重要な機能の概説書です。これから Scala を使いはじめる読者を対象にしています。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[Scala 3 Book][scala3-book] は Alvin Alexander 氏 が書いています。 この本はScala 3 のすべての重要な機能の概説書です。これから Scala を使いはじめる読者を対象にしています。
[Scala 3 Book][scala3-book] は Alvin Alexander 氏 が書いています。 この本は Scala 3 のすべての重要な機能の概説書です。これから Scala を使いはじめる読者を対象にしています。
## Scala をインストールする

Scala をインストールするということはつまりさまざまなコマンドラインツールやビルドツールをインストールするということです。
Scalaのインストーラツールの"Coursier"を使うのがおすすめです。Coursierを使えばインストールが必要なものすべてを自��でインストールできます。 もちろん、手動でそれぞれのツールをインストールすることもできます。最低限 Java、sbt があれば Scala のコードを書き始められます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Scalaのインストーラツールの"Coursier"を使うのがおすすめです。Coursierを使えばインストールが必要なものすべてを自動でインストールできます。 もちろん、手動でそれぞれのツールをインストールすることもできます。最低限 Java、sbt があれば Scala のコードを書き始められます。
Scala のインストーラツールの "Coursier"を使うのがおすすめです。Coursier を使えばインストールが必要なものすべてを自動でインストールできます。 もちろん、手動でそれぞれのツールをインストールすることもできます。最低限 Java、sbt があれば Scala のコードを書き始められます。

## Scala をインストールする

Scala をインストールするということはつまりさまざまなコマンドラインツールやビルドツールをインストールするということです。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ひらがなが続いて区切りが分かりにくく思いました

Suggested change
Scala をインストールするということはつまりさまざまなコマンドラインツールやビルドツールをインストールするということです
Scala をインストールするということはつまり、さまざまなコマンドラインツールやビルドツールをインストールするということです

もし sbt でプロジェクトを作成する方法を既に知っているなら 「Scala 3 のインストール」 の章まで読み飛ばしてください。

コマンドライン、IDEのどちらからでも sbt プロジェクトを作成できます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
コマンドライン、IDEのどちらからでも sbt プロジェクトを作成できます。
コマンドライン、IDE のどちらからでも sbt プロジェクトを作成できます。
Comment on lines 104 to 107
### With IntelliJ IDEA

You can skip the rest of this page and go directly to [Building a Scala Project with IntelliJ and sbt](/getting-started/intellij-track/building-a-scala-project-with-intellij-and-sbt.html)
{% endcomment %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻訳漏れのようです

```
#### Coursierを使ってScala 3 用のコンパイラと REPL をインストールする(オプショナル)

以下では Scala 3 のコンパイラ、REPLと Scala 3 をインストールする手順を説明します。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
以下では Scala 3 のコンパイラ、REPLと Scala 3 をインストールする手順を説明します。
以下では Scala 3 のコンパイラ、REPL と Scala 3 をインストールする手順を説明します。

- **Dependent function types**. Scala 2 ではすでに引数の型に応じて返り値の型を変化させることができまし���。Scala 3 ではこのパターンをさらに抽象化することができ、[dependent function types][types-dependent]を表現することができます。 つまり `type F = (e: Entry) => e.Key` というふうに、返り値の型が引数によって変化するように書けます。

- **Polymorphic function types**. dependent function types のように Scala 2 では型パラメタを受け取るメソッドを定義することができました。 しかし、開発者はこれらのメソッドをさらに抽象化することはできませんでした。Scala 3 では、`[A] => List[A] => List[A]` といった書き方をする[polymorphic function types][types-polymorphic] を使って引数に加えて型引数をとるような関数を抽象化できます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Polymorphic function types**. dependent function types のように Scala 2 では型パラメタを受け取るメソッドを定義することができました。 しかし、開発者はこれらのメソッドをさらに抽象化することはできませんでした。Scala 3 では、`[A] => List[A] => List[A]` といった書き方をする[polymorphic function types][types-polymorphic] を使って引数に加えて型引数をとるような関数を抽象化できます。
- **Polymorphic function types**. dependent function types のように Scala 2 では型パラーメタを受け取るメソッドを定義することができました。 しかし、開発者はこれらのメソッドをさらに抽象化することはできませんでした。Scala 3 では、`[A] => List[A] => List[A]` といった書き方をする[polymorphic function types][types-polymorphic] を使って引数に加えて型引数をとるような関数を抽象化できます。
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「パラメタ」または「パラメータ」が一般的だと思うのですがどうでしょうか。

Copy link
Contributor

@exoego exoego Mar 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あ、本当ですね、パラメータにしたつもりが TYPO してました… 😅

Suggested change
- **Polymorphic function types**. dependent function types のように Scala 2 では型パラメタを受け取るメソッドを定義することができました。 しかし、開発者はこれらのメソッドをさらに抽象化することはできませんでした。Scala 3 では、`[A] => List[A] => List[A]` といった書き方をする[polymorphic function types][types-polymorphic] を使って引数に加えて型引数をとるような関数を抽象化できます。
- **Polymorphic function types**. dependent function types のように Scala 2 では型パラメータを受け取るメソッドを定義することができました。 しかし、開発者はこれらのメソッドをさらに抽象化することはできませんでした。Scala 3 では、`[A] => List[A] => List[A]` といった書き方をする[polymorphic function types][types-polymorphic] を使って引数に加えて型引数をとるような関数を抽象化できます。

日本語訳では "パラメータ" の訳が使われており、"パラメタ" は見当たらないようなので、パラメータにするのがよさそうです。



### 再構想: オブジェ��ト指向プログラミング
Scala は常に関数型プログラミングとオブジェクト指向プログラミングの間のフロンティアにあります。そしてScala 3 はその境界を両方に広げます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Scala は常に関数型プログラミングとオブジェクト指向プログラミングの間のフロンティアにあります。そしてScala 3 はその境界を両方に広げます。
Scala は常に関数型プログラミングとオブジェクト指向プログラミングの間のフロンティアにあります。そして Scala 3 はその境界を両方に広げます。

### 再構想: オブジェクト指向プログラミング
Scala は常に関数型プログラミングとオブジェクト指向プログラミングの間のフロンティアにあります。そしてScala 3 はその境界を両方に広げます。
先に言及した型システムの変更とcontextual abtstractions の再設計によって、関数型プログラミングを以前にも増して簡単に書けるようにな���ました。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
先に言及した型システムの変更とcontextual abtstractions の再設計によって、関数型プログラミングを以前にも増して簡単に書けるようになりました。
先に言及した型システムの変更 とcontextual abtstractions の再設計によって、関数型プログラミングを以前にも増して簡単に書けるようになりました。
- **Pass it on**. Traits は class のように 引数をとれるようになりました。詳しくは [parameters][oo-trait-parameters] をご覧ください。 これによってtraitはソフトウェアをモジュールに分解するツールとしてよりいっそうパワフルになりました。
- **Plan for extension**. 継承を意図していないクラスが継承されてしまうことはオブジェクト指向設計において長年の問題でした。この問題に対処するため Scala 3 では [open classes][oo-open]の概念を導入することで _明示的に_ クラスを継承可能であるとしめすようライブラリ作者に要求するようにしました。
- **Hide implementation details**. ふるまいを実装した Utility traits は推論される型に含まれるべきでない場合があります。Scala 3 ではそのようなtraitsに [transparent][oo-transparent] とマークすることで継承をユーザーに公開しないようにすることができます。
- **Composition over inheritance**. このフレーズはしばしば引用されますが、実装するのは面倒です。 しかしScala 3 の [export clauses][oo-export]を使えば楽になります。imports と対称的に、 export clauses はオブジェクトの特定のメンバーへアクセスするためのエイリアスを定義します。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Composition over inheritance**. このフレーズはしばしば引用されますが、実装するのは面倒です。 しかしScala 3 の [export clauses][oo-export]を使えば楽になります。imports と対称的に、 export clauses はオブジェクトの特定のメンバーへアクセスするためのエイリアスを定義します。
- **Composition over inheritance**. このフレーズはしばしば引用されますが、実装するのは面倒です。 しかし Scala 3 の [export clauses][oo-export]を使えば楽になります。imports と対称的に、 export clauses はオブジェクトの特定のメンバーへアクセスするためのエイリアスを定義します。
- **Plan for extension**. 継承を意図していないクラスが継承されてしまうことはオブジェクト指向設計において長年の問題でした。この問題に対処するため Scala 3 では [open classes][oo-open]の概念を導入することで _明示的に_ クラスを継承可能であるとしめすようライブラリ作者に要求するようにしました。
- **Hide implementation details**. ふるまいを実装した Utility traits は推論される型に含まれるべきでない場合があります。Scala 3 ではそのようなtraitsに [transparent][oo-transparent] とマークすることで継承をユーザーに公開しないようにすることができます。
- **Composition over inheritance**. このフレーズはしばしば引用されますが、実装するのは面倒です。 しかしScala 3 の [export clauses][oo-export]を使えば楽になります。imports と対称的に、 export clauses はオブジェクトの特定のメンバーへアクセスするためのエイリアスを定義します。
- **No more NPEs**. Scala 3 はかつてないほどnull安全です。: [explicit null][oo-explicit-null] によって `null` を型ヒエラルキーの外側に追い出しました。これによってエラーを静的にキャッチしやすくなります。また、 [safe initialization][oo-safe-init]の追加的なチェックで初期化されていないオブジェクトへのアクセスを検知できます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **No more NPEs**. Scala 3 はかつてないほどnull安全です。: [explicit null][oo-explicit-null] によって `null` を型ヒエラルキーの外側に追い出しました。これによってエラーを静的にキャッチしやすくなります。また、 [safe initialization][oo-safe-init]の追加的なチェックで初期化されていないオブジェクトへのアクセスを検知できます。
- **No more NPEs**. Scala 3 はかつてないほど null 安全です。: [explicit null][oo-explicit-null] によって `null` を型ヒエラルキーの外側に追い出しました。これによってエラーを静的にキャッチしやすくなります。また、 [safe initialization][oo-safe-init]の追加的なチェックで初期化されていないオブジェクトへのアクセスを検知できます。
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your corrections!

i10416 and others added 16 commits March 2, 2021 12:35
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Co-authored-by: TATSUNO Yasuhiro <ytatsuno.jp@gmail.com>
Copy link
Contributor

@exoego exoego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from Japanese speaker POV

@SethTisue
Copy link
Member

@eed3si9n want to give it a once-over, or shall we just merge it at this point?

@eed3si9n
Copy link
Member

eed3si9n commented Mar 8, 2021

@SethTisue I might be able to nipick a bunch of things, but I'm in favor of merging since it went through a good review by exoego-san already.

Something to note is that the tone is adopted by @ItoYo16u -san is a polite form. In Japanese there are different degrees of politeness built into the basic grammar, and when I lead the translation of Scala 2.x documentation (for instance at https://github.com/scala/docs.scala-lang/blob/master/_ja/overviews/collections/overview.md) I intentionally chose plain form (常体) often called da-dearu style (だ・である調). By convention, academic papers and technical reports are written using the plain form, including the Japanese translation for Odersky, Spoon, Venners 'Programming in Scala.'

On the other hand, the translation here uses polite form (敬体) or desu-masu style (です・ます調). The polite form is the business casual of the Japanese language, and blogs including corporate blogs like Google Japan and emails often use it. Ruby's entire reference manual is in polite form as well. It's the safe default, but in my opinion it sounds more like a corporate blog post and less like a technical document.

Again, I'm not vetoing this PR because of this, but I feel like this is something we should be aware of, and potentially revisit later.

@i10416
Copy link
Contributor Author

i10416 commented Mar 11, 2021

Thank you for your advice. I will rewrite in da-dearu style soon.

@i10416
Copy link
Contributor Author

i10416 commented Mar 13, 2021

I finished rewriting in plain form.

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ItoYo16u コントリビューションありがとうございます。Thanks for the contribution! 🙇

@eed3si9n eed3si9n merged commit f20a593 into scala:master Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants