Skip to content

Commit

Permalink
Merge pull request #2405 from bishabosha/inline-tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha authored May 26, 2022
2 parents 59fce6a + 2f54c51 commit c8a0eec
Show file tree
Hide file tree
Showing 30 changed files with 350 additions and 251 deletions.
2 changes: 0 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ scala-3-version: 3.1.2
collections:
contribute_resources:
output: false
install_tabs:
output: false
style:
output: true
overviews:
Expand Down
45 changes: 37 additions & 8 deletions _fr/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,43 @@ L'installateur Scala est un outil nommé [Coursier](https://get-coursier.io/docs
Il s'assure que la JVM est les outils standards de Scala sont installés sur votre système.
Installez-le sur votre système avec les instructions suivantes.

<div class="main-download">
<div class="recommended-install">
<div class="place-inline">
{% include tabsection.html language='fr' id='install-cs-setup-tabs' collection=site.install_tabs %}
</div>
<!-- TODO: translate 'Test your setup' from _includes/getting-started.md, embellish tabs -->
</div>
</div>
<!-- Display tabs for each OS -->
{% tabs install-cs-setup-tabs class=platform-os-options %}

<!-- macOS -->
{% tab macOS for=install-cs-setup-tabs %}
{% include code-snippet.html language='bash' codeSnippet=site.data.setup-scala.macOS-brew %}
{% altDetails cs-setup-macos-nobrew "Alternativement, si vous n'utilisez pas Homebrew:" %}
{% include code-snippet.html language='bash' codeSnippet=site.data.setup-scala.macOS-default %}
{% endaltDetails %}
{% endtab %}
<!-- end macOS -->

<!-- Linux -->
{% tab Linux for=install-cs-setup-tabs %}
{% include code-snippet.html language='bash' codeSnippet=site.data.setup-scala.linux %}
{% endtab %}
<!-- end Linux -->

<!-- Windows -->
{% tab Windows for=install-cs-setup-tabs %}
Téléchargez et exécutez [l'intallateur Scala pour Windows]({{site.data.setup-scala.windows-link}}) basé sur Coursier.
{% endtab %}
<!-- end Windows -->

<!-- Other -->
{% tab Other for=install-cs-setup-tabs defaultTab %}
<noscript>
<p><span style="font-style:italic;">JavaScript est désacivé. Cliquez sur l'onglet correspondant à votre système d'exploitation.</span></p>
</noscript>
Suivez
[les instructions pour installer la commande `cs`](https://get-coursier.io/docs/cli-installation)
puis exécutez `./cs setup`.
{% endtab %}
<!-- end Other -->

{% endtabs %}
<!-- End tabs -->

En plus de gérer les JVMs, `cs setup` installe aussi des utilitaires en ligne de commande :

Expand Down
43 changes: 35 additions & 8 deletions _includes/_ja/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,41 @@ Scala をインストールすると、コンパイラやビルドツールな
Scala のインストーラーは[Coursier](https://get-coursier.io/docs/cli-overview)というツールで、コマンドは`cs`です。このツールを使うと、JVM と標準 Scala ツールがシステムにインストールされます。
以下の手順でお使いのシステムにインストールしてください。

<div class="main-download">
<div class="recommended-install">
<div class="place-inline">
{% include tabsection.html language='ja' id='install-cs-setup-tabs' collection=site.install_tabs %}
</div>
<!-- TODO: translate 'Test your setup' from _includes/getting-started.md, embellish tabs -->
</div>
</div>
<!-- Display tabs for each OS -->
{% tabs install-cs-setup-tabs class=platform-os-options %}

<!-- macOS -->
{% tab macOS for=install-cs-setup-tabs %}
{% include code-snippet.html language='bash' codeSnippet=site.data.setup-scala.macOS-brew %}
{% altDetails cs-setup-macos-nobrew "または、Homebrewを使用しない場合は" %}
{% include code-snippet.html language='bash' codeSnippet=site.data.setup-scala.macOS-default %}
{% endaltDetails %}
{% endtab %}
<!-- end macOS -->

<!-- Linux -->
{% tab Linux for=install-cs-setup-tabs %}
{% include code-snippet.html language='bash' codeSnippet=site.data.setup-scala.linux %}
{% endtab %}
<!-- end Linux -->

<!-- Windows -->
{% tab Windows for=install-cs-setup-tabs %}
[the Scala installer for Windows]({{site.data.setup-scala.windows-link}})を、ダウンロードして実行してください。
{% endtab %}
<!-- end Windows -->

<!-- Other -->
{% tab Other for=install-cs-setup-tabs defaultTab %}
<noscript>
<p><span style="font-style:italic;">JavaScript is disabled, click the tab relevant for your OS.</span></p>
</noscript>
[手順に従って `cs` ランチャーをインストール](https://get-coursier.io/docs/cli-installation)し、その次に以下を実行します。`./cs setup`
{% endtab %}
<!-- end Other -->

{% endtabs %}
<!-- End tabs -->

`cs setup` は JVM の管理だけでなく、便利なコマンドラインツールもインストールします:

Expand Down
7 changes: 0 additions & 7 deletions _includes/alt-details.html

This file was deleted.

74 changes: 50 additions & 24 deletions _includes/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,56 @@ The Scala installer is a tool named [Coursier](https://get-coursier.io/docs/cli-
It ensures that a JVM and standard Scala tools are installed on your system.
Install it on your system with the following instructions.

{% capture scalaDemo %}$ scala -version
Scala code runner version {{site.scala-3-version}} -- Copyright 2002-2022, LAMP/EPFL{% endcapture %}

<div class="main-download">
<div class="recommended-install">
<div class="place-inline">
{% include tabsection.html language='en' id='install-cs-setup-tabs' collection=site.install_tabs %}
</div>
{% capture checkSetupDetail %}
<div class="wrap-inline">
<div class="wrap">
<p>Check your setup with the command <code>scala -version</code>, which should output:</p>
{% include code-snippet.html nocopy=true language='bash' codeSnippet=scalaDemo %}
<p>If that does not work, you may need to log out and log back in (or reboot) in order for the changes to take
effect.
</p>
</div>
</div>
{% endcapture %}
<div class="place-inline">
{% include alt-details.html id='testing-your-setup' title='Testing your setup' detail=checkSetupDetail %}
</div>
</div>
</div>
<!-- Display tabs for each OS -->
{% tabs install-cs-setup-tabs class=platform-os-options %}

<!-- macOS -->
{% tab macOS for=install-cs-setup-tabs %}
Run the following command in your terminal, following the on-screen instructions:
{% include code-snippet.html language='bash' codeSnippet=site.data.setup-scala.macOS-brew %}
{% altDetails cs-setup-macos-nobrew "Alternatively, if you don't use Homebrew:" %}
{% include code-snippet.html language='bash' codeSnippet=site.data.setup-scala.macOS-default %}
{% endaltDetails %}
{% endtab %}
<!-- end macOS -->

<!-- Linux -->
{% tab Linux for=install-cs-setup-tabs %}
Run the following command in your terminal, following the on-screen instructions:
{% include code-snippet.html language='bash' codeSnippet=site.data.setup-scala.linux %}
{% endtab %}
<!-- end Linux -->

<!-- Windows -->
{% tab Windows for=install-cs-setup-tabs %}
Download and execute [the Scala installer for Windows]({{site.data.setup-scala.windows-link}})
based on Coursier, and follow the on-screen instructions.
{% endtab %}
<!-- end Windows -->

<!-- Other -->
{% tab Other for=install-cs-setup-tabs defaultTab %}
<noscript>
<p><span style="font-style:italic;">JavaScript is disabled, click the tab relevant for your OS.</span></p>
</noscript>
Follow the documentation from Coursier on
[how to install and run `cs setup`](https://get-coursier.io/docs/cli-installation).
{% endtab %}
<!-- end Other -->

{% endtabs %}
<!-- End tabs -->

<!-- Alternative Detail - test the `scala` command -->
{% altDetails testing-your-setup 'Testing your setup' %}
Check your setup with the command `scala -version`, which should output:
```bash
$ scala -version
Scala code runner version {{site.scala-3-version}} -- Copyright 2002-2022, LAMP/EPFL
```
If that does not work, you may need to log out and log back in (or reboot) in order for the changes to take effect.
{% endaltDetails %}
<!-- end Alternative Detail -->


Along with managing JVMs, `cs setup` also installs useful command-line tools:
Expand Down
32 changes: 0 additions & 32 deletions _includes/tabsection.html

This file was deleted.

21 changes: 0 additions & 21 deletions _install_tabs/1-macos.html

This file was deleted.

11 changes: 0 additions & 11 deletions _install_tabs/2-linux.html

This file was deleted.

11 changes: 0 additions & 11 deletions _install_tabs/3-windows.html

This file was deleted.

15 changes: 0 additions & 15 deletions _install_tabs/4-other.html

This file was deleted.

20 changes: 0 additions & 20 deletions _install_tabs/fr-1-macos.html

This file was deleted.

10 changes: 0 additions & 10 deletions _install_tabs/fr-2-linux.html

This file was deleted.

10 changes: 0 additions & 10 deletions _install_tabs/fr-3-windows.html

This file was deleted.

15 changes: 0 additions & 15 deletions _install_tabs/fr-4-other.html

This file was deleted.

20 changes: 0 additions & 20 deletions _install_tabs/ja-1-macos.html

This file was deleted.

10 changes: 0 additions & 10 deletions _install_tabs/ja-2-linux.html

This file was deleted.

10 changes: 0 additions & 10 deletions _install_tabs/ja-3-windows.html

This file was deleted.

Loading

0 comments on commit c8a0eec

Please sign in to comment.