Skip to content

Commit 166bdba

Browse files
authored
Merge branch 'main' into resolve-todos-2
2 parents 56d08b8 + b90e960 commit 166bdba

File tree

151 files changed

+4992
-737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+4992
-737
lines changed

.drone.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: bundler
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
ignore:
9+
- dependency-name: html-proofer
10+
versions:
11+
- "> 3.15.3"

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-20.04
6+
steps:
7+
- uses: actions/checkout@v2
8+
- name: Set up Ruby
9+
uses: ruby/setup-ruby@v1
10+
with:
11+
ruby-version: 2.5.8
12+
bundler-cache: true
13+
- name: Set up coursier
14+
uses: laughedelic/coursier-setup@v1
15+
with:
16+
jvm: adopt:11
17+
- name: Run mdoc
18+
run: |
19+
./scripts/run-mdoc.sh
20+
rm -r /tmp/mdoc-out/
21+
- name: Jekyll build
22+
run: bundle exec jekyll build
23+
- name: HTMLProofer
24+
run: |
25+
# # Checking for docs.scala-lang/blob/master leads to a chicken and egg problem because of the edit links of new pages.
26+
bundle exec htmlproofer ./_site/\
27+
--only-4xx\
28+
--http-status-ignore "400,401,429"\
29+
--empty-alt-ignore\
30+
--allow-hash-href\
31+
--url-ignore '/https://github.com/scala/docs.scala-lang/blob/master/.*/,/www.oracle.com/'
32+

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ _site
88
vendor/bundle
99
.idea/
1010
/coursier
11-
/tut-tmp/
1211
.sass-cache/

Gemfile.lock

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ GEM
4545
jekyll (~> 3.0)
4646
jekyll-watch (2.2.1)
4747
listen (~> 3.0)
48-
kramdown (2.3.0)
48+
kramdown (2.3.1)
4949
rexml
5050
kramdown-parser-gfm (1.1.0)
5151
kramdown (~> 2.0)
@@ -54,15 +54,17 @@ GEM
5454
rb-fsevent (~> 0.10, >= 0.10.3)
5555
rb-inotify (~> 0.9, >= 0.9.10)
5656
mercenary (0.3.6)
57-
mini_portile2 (2.4.0)
58-
nokogiri (1.10.10)
59-
mini_portile2 (~> 2.4.0)
57+
mini_portile2 (2.5.0)
58+
nokogiri (1.11.1)
59+
mini_portile2 (~> 2.5.0)
60+
racc (~> 1.4)
6061
nokogumbo (2.0.2)
6162
nokogiri (~> 1.8, >= 1.8.4)
6263
parallel (1.19.2)
6364
pathutil (0.16.2)
6465
forwardable-extended (~> 2.6)
6566
public_suffix (4.0.5)
67+
racc (1.5.2)
6668
rainbow (3.0.0)
6769
rb-fsevent (0.10.4)
6870
rb-inotify (0.10.1)

_ba/tour/for-comprehensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ Ovdje je `n == 10` i `v == 10`. U prvoj iteraciji, `i == 0` i `j == 0` tako da `
5454
Bez `if` čuvara, ovo bi ispisalo sljedeće:
5555
```
5656
57-
(0, 0) (0, 1) (0, 2) (0, 3) (0, 4) (0, 5) (0, 6) (0, 7) (0, 8) (0, 9) (1, 1) ...
57+
(0, 0) (0, 1) (0, 2) (0, 3) (0, 4) (0, 5) (0, 6) (0, 7) (0, 8) (0, 9) (1, 0) ...
5858
```

_ba/tour/generic-classes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Konvencija je da se koristi slovo `A` kao identifikator tipa, mada se može kori
2222
```scala mdoc
2323
class Stack[A] {
2424
private var elements: List[A] = Nil
25-
def push(x: A) { elements = x :: elements }
25+
def push(x: A): Unit =
26+
elements = x :: elements
2627
def peek: A = elements.head
2728
def pop(): A = {
2829
val currentTop = peek

_config.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ keywords:
1515
- Document
1616
- Guide
1717

18-
scala-version: 2.13.4
19-
scala-212-version: 2.12.12
20-
scala-3-version: 3.0.0-M3
18+
scala-version: 2.13.5
19+
scala-212-version: 2.12.13
20+
scala-3-version: 3.0.0-RC1
2121
scala-3-plugin-version: 0.5.1
2222

2323
collections:
@@ -103,6 +103,17 @@ defaults:
103103
overview-name: "Scala 3 — Book"
104104
layout: multipage-overview
105105
permalink: "/scala3/book/:title.html"
106+
-
107+
scope:
108+
path: "_overviews/scala3-migration"
109+
values:
110+
scala3: true
111+
# num: 99 # to list them in the TOC, should be overwritten individually
112+
partof: scala3-migration
113+
type: section
114+
overview-name: "Scala 3 Migration Guide"
115+
layout: multipage-overview
116+
permalink: "/scala3/guides/migration/:title.html"
106117
-
107118
scope:
108119
path: "_overviews/scala3-macros"

_data/doc-nav-header.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
submenu:
44
- title: Current
55
url: https://www.scala-lang.org/api/current/
6-
- title: Nightly
7-
url: https://www.scala-lang.org/files/archive/nightly/2.13.x/api/2.13.x/
86
- title: All Versions
97
url: "/api/all.html"
108
- title: Learn

_es/overviews/core/actors.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,10 @@ la ejecución del argumento por nombre `fun`.
436436
## Actores remotos
437437

438438
Esta sección describe el API de los actores remotos. Su principal interfaz es el objecto
439-
[`RemoteActor`](https://www.scala-lang.org/api/2.9.1/scala/actors/remote/RemoteActor$.html) definido
440-
en el paquete `scala.actors.remote`. Este objeto facilita el conjunto de métodos necesarios para crear
441-
y establecer conexiones a instancias de actores remotos. En los fragmentos de código que se muestran a
442-
continuación se asume que todos los miembros de `RemoteActor` han sido importados; la lista completa
443-
de importaciones utilizadas es la siguiente:
439+
`RemoteActor` definido en el paquete `scala.actors.remote`. Este objeto facilita el conjunto
440+
de métodos necesarios para crear y establecer conexiones a instancias de actores remotos. En los
441+
fragmentos de código que se muestran a continuación se asume que todos los miembros de
442+
`RemoteActor` han sido importados; la lista completa de importaciones utilizadas es la siguiente:
444443

445444
import scala.actors._
446445
import scala.actors.Actor._
@@ -449,10 +448,10 @@ de importaciones utilizadas es la siguiente:
449448

450449
### Iniciando actores remotos
451450

452-
Un actore remot es identificado de manera unívoca por un
453-
[`Symbol`](https://www.scala-lang.org/api/2.9.1/scala/Symbol.html). Este símbolo es único para la instancia
454-
de la máquina virual en la que se está ejecutando un actor. Un actor remoto identificado con el nombre
455-
`myActor` puede ser creado del siguiente modo.
451+
Un actore remot es identificado de manera unívoca por un `Symbol`. Este símbolo
452+
es único para la instancia de la máquina virual en la que se está ejecutando un
453+
actor. Un actor remoto identificado con el nombre `myActor` puede ser creado del
454+
siguiente modo.
456455

457456
class MyActor extends Actor {
458457
def act() {

_es/tour/generic-classes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ A continuación se muestra un ejemplo:
1616

1717
class Stack[T] {
1818
var elems: List[T] = Nil
19-
def push(x: T) { elems = x :: elems }
19+
def push(x: T): Unit =
20+
elems = x :: elems
2021
def top: T = elems.head
2122
def pop() { elems = elems.tail }
2223
}

_getting-started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The Scala installer is a tool named `cs` that ensures that a JVM and standard Sc
2222

2323
<div class="main-download">
2424
<div id="download-step-one">
25-
<p>Follow <a href="https://get-coursier.io/docs/cli-overview.html#install-native-launcher" target="_blank">the instructions to install the <code>cs</code> launcher</a> then run:</p>
25+
<p>Follow <a href="https://get-coursier.io/docs/cli-installation.html#native-launcher" target="_blank">the instructions to install the <code>cs</code> launcher</a> then run:</p>
2626
<p><code>$ ./cs setup</code></p>
2727
</div>
2828
</div>

_getting-started/intellij-track/building-a-scala-project-with-intellij-and-sbt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ but here's a glance at what everything is for:
5555
=> `main`
5656
1. Right-click `scala` and select **New** => **Package**
5757
1. Name the package `example` and click **OK** (or just press the Enter or Return key).
58-
1. Right-click the package `example` and select **New** => **Scala class**.
58+
1. Right-click the package `example` and select **New** => **Scala class** (if you don't see this option, right-click the `SbtExampleProject`, click **Add Frameworks Support**, select **Scala** and proceed)
5959
1. Name the class `Main` and change the **Kind** to `Object`.
6060
1. Change the code in the class to the following:
6161

_getting-started/sbt-track/testing-scala-with-sbt-on-the-command-line.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ redirect_from: "/getting-started-sbt-track/testing-scala-with-sbt-on-the-command
1111

1212
There are multiple libraries and testing methodologies for Scala,
1313
but in this tutorial, we'll demonstrate one popular option from the ScalaTest framework
14-
called [FunSuite](https://www.scalatest.org/getting_started_with_fun_suite).
14+
called [AnyFunSuite](https://www.scalatest.org/scaladoc/3.2.2/org/scalatest/funsuite/AnyFunSuite.html).
1515
We assume you know [how to create a Scala project with sbt](getting-started-with-scala-and-sbt-on-the-command-line.html).
1616

1717
## Setup
@@ -46,9 +46,9 @@ sbt test
4646
named after the object we're testing.
4747

4848
```
49-
import org.scalatest.FunSuite
49+
import org.scalatest.funsuite.AnyFunSuite
5050
51-
class CubeCalculatorTest extends FunSuite {
51+
class CubeCalculatorTest extends AnyFunSuite {
5252
test("CubeCalculator.cube") {
5353
assert(CubeCalculator.cube(3) === 27)
5454
}
@@ -58,9 +58,9 @@ named after the object we're testing.
5858
Let's go over this line by line.
5959

6060
* `class CubeCalculatorTest` means we are testing the object `CubeCalculator`
61-
* `extends FunSuite` lets us use functionality of ScalaTest's FunSuite class
61+
* `extends AnyFunSuite` lets us use functionality of ScalaTest's AnyFunSuite class
6262
such as the `test` function
63-
* `test` is function that comes from FunSuite that collects
63+
* `test` is function that comes from AnyFunSuite that collects
6464
results from assertions within the function body.
6565
* `"CubeCalculator.cube"` is a name for the test. You can call it anything but
6666
one convention is "ClassName.methodName".
@@ -72,9 +72,9 @@ indeed 27. The `===` is part of ScalaTest and provides clean error messages.
7272
1. Add another test block with its own `assert` statement that checks for the cube of `0`.
7373

7474
```
75-
import org.scalatest.FunSuite
75+
import org.scalatest.funsuite.AnyFunSuite
7676
77-
class CubeCalculatorTest extends FunSuite {
77+
class CubeCalculatorTest extends AnyFunSuite {
7878
test("CubeCalculator.cube 3 should be 27") {
7979
assert(CubeCalculator.cube(3) === 27)
8080
}

_includes/footer.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
<script src="{{ site.baseurl }}/resources/js/vendor/unslider.js" type="text/javascript"></script>
4040

4141
<!-- Highlight -->
42-
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js" type="text/javascript"></script>
43-
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/scala.min.js" type="text/javascript"></script>
44-
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/java.min.js" type="text/javascript"></script>
42+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
43+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/languages/scala.min.js" type="text/javascript"></script>
44+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/languages/java.min.js" type="text/javascript"></script>
4545

4646
<!-- CodeMirror -->
4747
<script src="{{ site.baseurl }}/resources/js/vendor/codemirror/codemirror.js" type="text/javascript"></script>

_ja/cheatsheets/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Scala Cheatsheet
55
partof: cheatsheet
66

77
by: Kenji Ohtsuka
8-
about: Thanks to <a href="https://brenocon.com/">Brendan O'Connor</a>. このチートシートは Scala 構文 のクイックリファレンスとして作成されました。 Licensed by Brendan O'Connor under a CC-BY-SA 3.0 license.
8+
about: Thanks to <a href="https://brenocon.com/">Brendan O'Connor</a>. このチートシートは Scala 構文 のクイックリファレンスとして作成された。 Licensed by Brendan O'Connor under a CC-BY-SA 3.0 license.
99

1010
language: ja
1111
---

_ja/index.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,47 @@
11
---
2-
layout: inner-page-documentation
2+
layout: documentation
33
title: ドキュメント
44
language: ja
5-
partof: documentation
6-
discourse: true
5+
more-resources-label: その他のリソース
6+
77

88
# Content masthead links
9-
more-resources-label: その他のリソース
10-
sections:
9+
10+
scala3-sections:
11+
- title: "First steps"
12+
links:
13+
- title: "Scala 3 の新機能"
14+
description: "Scala 3 で追加されたさまざまな新機能の概要"
15+
icon: "fa fa-star"
16+
link: /ja/scala3/new-in-scala3.html
17+
- title: "Scala 3 をはじめる"
18+
description: "あなたのコンピューターに Scala 3 をインストールしてScalaコードを書きはじめよう!"
19+
icon: "fa fa-rocket"
20+
link: /ja/scala3/getting-started.html
21+
- title: "Scala 3 Book"
22+
description: "主要な言語仕様のイントロダクションをオンラインブックで読む"
23+
icon: "fa fa-book"
24+
link: /scala3/book/introduction.html
25+
- title: "More detailed information"
26+
links:
27+
- title: "Migration Guide"
28+
description: "Scala 2 から Scala 3 へ移行するためのガイド"
29+
icon: "fa fa-suitcase"
30+
link: /scala3/guides/migration/compatibility-intro.html
31+
- title: "Guides"
32+
description: "Scala 3 の言語仕様からピックアップして解説"
33+
icon: "fa fa-map"
34+
link: /ja/scala3/guides.html
35+
- title: "API"
36+
description: "Scala 3 の全バージョンのAPIドキュメント"
37+
icon: "fa fa-file-text"
38+
link: https://dotty.epfl.ch/api/index.html
39+
- title: "Language Reference"
40+
description: "Scala 3 の言語仕様"
41+
icon: "fa fa-book"
42+
link: https://dotty.epfl.ch/docs/reference/overview.html
43+
44+
scala2-sections:
1145

1246
- title: "最初のステップ"
1347
links:

_ja/overviews/collections/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Scala のコレクションは、体系的に可変および不変コレクシ
6060

6161
[![Mutable collection hierarchy][3]][3]
6262

63-
図の伝説:
63+
図の凡例:
6464

6565
[![Graph legend][4]][4]
6666

_ja/overviews/core/value-classes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ JVM は値クラスをサポートしないため、Scala は場合によって
108108

109109
メモリ割り当ては必要無い。
110110
値クラスが型引数として使われる場合もこのルールがあてはまる。
111-
例えば、`identify` を呼び出すだけでも `Meter` インスタンスの実体が作成されることが必要となる:
111+
例えば、`identity` を呼び出すだけでも `Meter` インスタンスの実体が作成されることが必要となる:
112112

113113
def identity[T](t: T): T = t
114114
identity(Meter(5.0))

_ja/scala3/contribute-to-docs.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
layout: inner-page-documentation
3+
overview-name: "Scala 3 Documentation"
4+
title: Contributing to the Docs
5+
language: ja
6+
scala3: true
7+
---
8+
9+
## 概要
10+
Scala 3 の高品質なドキュメンテーションを作るためのいくつかの試みが目下進行中である。
11+
特に次のようなドキュメントがある。
12+
13+
- Scala 3 book
14+
- Macros tutorial
15+
- Migration guide
16+
- Scala 3 language reference
17+
18+
ドキュメンテーションの種類に関わらずコミュニティからのコントリビューションを歓迎する。
19+
20+
21+
### コントリビューションの仕方
22+
さまざまな方法で私たちを支援することができる :
23+
- **ドキュメントのどこかで混乱するところがある** Issue をたてる。
24+
- **最新の状態を反映していないドキュメントがある** Issue をたてるか、PR をつくる。
25+
- **タイポの修正やその他ちょっとした文章の改善** PR をつくる。
26+
- **なにかを新しく追加したり大きな変更を加えたい** 議論できるよう Issue をたてる。
27+
28+
通常、ドキュメントプロジェクトのそれぞれには編集・改善用のリンクが含まれている。(このドキュメントについても同様で、目次の領域にある。) また、コントリビューションをはじめるために必要な情報は以下に記載されている。
29+
30+
## Scala 3 Book
31+
[Scala 3 Book][scala3-book] は Alvin Alexander 氏 が書いている。 この本は Scala 3 のすべての重要な機能の概説書である。これから Scala を使いはじめる読者を対象にしている。
32+
33+
- [Sources](https://github.com/scala/docs.scala-lang/tree/master/_overviews/scala3-book)
34+
- [Issues](https://github.com/scala/docs.scala-lang/issues)
35+
36+
## Macros Tutorial
37+
[Macros Tutorial](/scala3/guides/macros)は Nicolas Stucki 氏 が書いている。この本では Scala 3 のマクロとそのベストプラクティスについて詳しく説明している。
38+
39+
- [Sources](https://github.com/scala/docs.scala-lang/tree/master/_overviews/scala3-macros)
40+
- [Issues](https://github.com/scala/docs.scala-lang/issues)
41+
42+
## Migration Guide
43+
[Scala 3 Migration Guide](/scala3/guides/migration/compatibility-intro.html) は Scala 2 と Scala 3 の互換性、移行に役立つツールの紹介、そして詳しい移行のガイドを含んだ包括的なドキュメントである。
44+
45+
- [Contribution Overview](https://scalacenter.github.io/scala-3-migration-guide/docs/contributing.html)
46+
- [Source](https://github.com/scalacenter/scala-3-migration-guide)
47+
- [Issues](https://github.com/scalacenter/scala-3-migration-guide/issues)
48+
49+
50+
## Scala 3 Language Reference
51+
The [Dotty reference](https://dotty.epfl.ch/docs/reference/overview.html) は Scala 3 になる予定である。これにはさまざまな言語仕様に関する公式のプレゼンテーションや技術的情報が含まれている。
52+
53+
- [Sources](https://github.com/lampepfl/dotty/tree/master/docs/docs/reference)
54+
- [Issues](https://github.com/lampepfl/dotty/issues)
55+
56+
57+
[scala3-book]: {% link _overviews/scala3-book/introduction.md %}
58+

0 commit comments

Comments
 (0)