Skip to content

Commit

Permalink
Cheatsheets finished
Browse files Browse the repository at this point in the history
  • Loading branch information
heathermiller committed Jul 27, 2017
1 parent 2ae27bf commit 297b658
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 26 deletions.
8 changes: 5 additions & 3 deletions ba/cheatsheets/index.md → _ba/cheatsheets/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
layout: cheatsheet
istranslation: true
title: Scalacheat

partof: cheatsheet

by: Brendan O'Connor
about: Zahvaljujući <a href="http://brenocon.com/">Brendan O'Connor</a>u ovaj cheatsheet teži da bude kratki pregled sintakse Scale. Licenca pripada Brendan O'Connor-u, pod CC-BY-SA 3.0 licencom.

language: ba
---

###### Doprinio {{ page.by }}
{{ page.about }}

| | |
| ------ | ------ |
| <span id="variables" class="h2">varijable</span> | |
| `var x = 5` | varijabla. |
| <span class="label success">Dobro</span> `val x = 5`<br> <span class="label important">Loše</span> `x=6` | konstanta. |
Expand Down
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ collections:
zh-tw: # Taiwanese translations
output: true
permalink: /:collection/:path.html
fr: # French translations
output: true
permalink: /:collection/:path.html

defaults:
-
Expand Down
6 changes: 3 additions & 3 deletions _data/doc-nav-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
- title: Getting Started
url: http://google.com
- title: Tour of Scala
url: http://google.com
url: "/tour/tour-of-scala.html"
- title: Scala for Java Programmers
url: http://google.com
url: "/tutorials/scala-for-java-programmers.html"
- title: Reference
url: "#!"
submenu:
Expand All @@ -28,7 +28,7 @@
- title: Style Guide
url: "/style/index.html"
- title: Cheatsheet
url: https://www.scala-lang.org/contribute/
url: "/cheatsheets/index.html"
- title: Glossary
url: "/glossary/index.html"
- title: SIPs
Expand Down
3 changes: 3 additions & 0 deletions _data/docnames.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ scala-tour:

futures:
name: "Futures"

cheatsheet:
name: "Scala Cheatsheet"
8 changes: 5 additions & 3 deletions fr/cheatsheets/index.md → _fr/cheatsheets/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
layout: cheatsheet
istranslation: true
title: Scalacheat

partof: cheatsheet

by: Brendan O'Connor
about: Grâce à <a href="http://brenocon.com/">Brendan O'Connor</a>, ce memento vise à être un guide de référence rapide pour les constructions syntaxiques en Scala. Licencié par Brendan O'Connor sous licence CC-BY-SA 3.0.

language: fr
---

###### Contribué par {{ page.by }}
{{ page.about }}

| | |
| ------ | ------ |
| <span id="variables" class="h2">variables</span> | |
| `var x = 5` | variable |
| <span class="label success">Good</span> `val x = 5`<br> <span class="label important">Bad</span> `x=6` | constante |
Expand Down
9 changes: 6 additions & 3 deletions ja/cheatsheets/index.md → _ja/cheatsheets/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
layout: cheatsheet
istranslation: true
title: Scalacheat

partof: cheatsheet

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

language: ja
---

###### Contributed by {{ page.by }}
{{ page.about }}


| | |
| ------ | ------ |
| <span id="variables" class="h2">変数</span> | |
| `var x = 5` | 変数 |
| <span class="label success">Good</span> `val x = 5`<br> <span class="label important">Bad</span> `x=6` | 定数 |
Expand Down
25 changes: 24 additions & 1 deletion _layouts/cheatsheet.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
---
layout: inner-page-parent
layout: inner-page-parent-dropdown
---

<section class="full-width">
<div class="wrap">
<div class="content-primary cheatsheet">
<div class="inner-box">
{{content}}
{% if page.languages %}
<ul id="available-languages" style="display: none;">
<li><a href="{{ page.url }}">English</a></li>
{% for l in page.languages %}
{% capture intermediate %}{{ page.url | remove_first: l }}{% endcapture %}
{% capture rootTutorialURL %}{{ intermediate | remove_first: '/' }}{% endcapture %}
{% assign lang = site.data.languages[l] %}
<li><a href="{{ site.baseurl }}/{{ l }}/{{ rootTutorialURL }}" class="lang">{{ lang.name }}</a></li>
{% endfor %}
</ul>
{% elsif page.language %}
{% assign engPath = page.id | remove_first: "/" | remove_first: page.language | append: '.html' %}
{% assign engPg = site.overviews | where: 'partof', page.partof | first %}
{{ engPg.languages }}
<ul id="available-languages" style="display: none;">
<li><a href="{{ site.baseurl }}{{ engPath }}">English</a></li>
{% for l in engPg.languages %}
aHEYHEYHEY! {{ l }} <br>
{% assign lang = site.data.languages[l] %}
<li><a href="{{ site.baseurl }}/{{ l }}{{ engPath }}" class="lang">{{ lang.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
</div>
Expand Down
7 changes: 6 additions & 1 deletion cheatsheets/index.md → _overviews/cheatsheets/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
layout: cheatsheet
title: Scalacheat

partof: cheatsheet

by: Brendan O'Connor
about: Thanks to <a href="http://brenocon.com/">Brendan O'Connor</a>, this cheatsheet aims to be a quick reference of Scala syntactic constructions. Licensed by Brendan O'Connor under a CC-BY-SA 3.0 license.
languages: [ba, fr, ja, pl, pt-br]

languages: [ba, fr, ja, pl, pt-br, zh-cn]
permalink: /cheatsheets/index.html
---

<!-- ###### Contributed by {{ page.by }} -->
Expand Down
8 changes: 5 additions & 3 deletions pl/cheatsheets/index.md → _pl/cheatsheets/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
layout: cheatsheet
istranslation: true
title: Scalacheat

partof: cheatsheet

by: Filip Czaplicki
about: Podziękowania dla <a href="http://brenocon.com/">Brendan O'Connor</a>. Ten cheatsheet ma być szybkim podsumowaniem konstrukcji składniowych Scali. Licencjonowany przez Brendan O'Connor pod licencją CC-BY-SA 3.0.

language: pl
---

###### Contributed by {{ page.by }}
{{ page.about }}

| | |
| ------ | ------ |
| <span id="variables" class="h2">zmienne</span> | |
| `var x = 5` | zmienna |
| <span class="label success">Dobrze</span> `val x = 5`<br> <span class="label important">Źle</span> `x=6` | stała |
Expand Down
8 changes: 5 additions & 3 deletions pt-br/cheatsheets/index.md → _pt-br/cheatsheets/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
layout: cheatsheet
istranslation: true
title: Scalacheat

partof: cheatsheet

by: Reginaldo Russinholi
about: Agradecimentos a <a href="http://brenocon.com/">Brendan O'Connor</a>, este 'cheatsheet' se destina a ser uma referência rápida às construções sintáticas de Scala. Licenciado por Brendan O'Connor sobre a licença CC-BY-SA 3.0.

language: pt-br
---

###### Contribuição de {{ page.by }}
{{ page.about }}

| | |
| ------ | ------ |
| <span id="variables" class="h2">variáveis</span> | |
| `var x = 5` | variável |
| <span class="label success">Bom</span> `val x = 5`<br> <span class="label important">Ruim</span> `x=6` | constante |
Expand Down
13 changes: 7 additions & 6 deletions zh-cn/cheatsheets/index.md → _zh-cn/cheatsheets/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
layout: cheatsheet
istranslation: true
title: Scalacheat

partof: cheatsheet

by: Brendan O'Connor
about: 感谢 <a href="http://brenocon.com/">Brendan O'Connor</a>, 本速查表可以用于快速地查找Scala语法结构。Licensed by Brendan O'Connor under a CC-BY-SA 3.0 license.
languages: [zh-cn]

language: "zh-cn"
---

###### Contributed by {{ page.by }}
{{ page.about }}


| | |
| ------ | ------ |
| <span id="variables" class="h2">变量</span> | |
|  `var x = 5`                                                                                             | 可变量       |
| <span class="label success">Good</span> `val x = 5`<br> <span class="label important">Bad</span> `x=6` | 常量 |
Expand Down Expand Up @@ -84,5 +87,3 @@ languages: [zh-cn]
| `x.isInstanceOf[String]` | 类型检查 (运行时) |
| `x.asInstanceOf[String]` | 类型强制转换 (运行时) |
| `x: String` | 归属 (编译时) |


0 comments on commit 297b658

Please sign in to comment.