Skip to content

Add "A taste of scala" pages from "Scala3 book" in ru #2632

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 15 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions _includes/sidebar-toc-multipage-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ <h5 class="contents">Contents</h5>
{% assign localizedId = pg.id %}
{% for lpg in site.[page.language] %}
{% if lpg.id == localizedId %}
<li><a {% if page.title == lpg.title %}class="active"{% endif %} href="{{ site.baseurl }}{{ pg.url }}">{{ lpg.title }}</a>
{{ toc }}</li>
{% if pg.type %} <!-- if a type is set in a document, we add it as a class. Used in Scala book to diff between chapter and section -->
<li class="type-{{ pg.type }}"><a {% if page.title == lpg.title %}class="active"{% endif %} href="{{ site.baseurl }}{{ pg.url }}">{{ lpg.title }}</a>{{ toc }}</li>
{% else %}
<li><a {% if page.title == lpg.title %}class="active"{% endif %} href="{{ site.baseurl }}{{ pg.url }}">{{ lpg.title }}</a>{{ toc }}</li>
{% endif %}
{% endif %}
{% endfor %}
{% else %} <!-- this must be English, so get the other documents' titles -->
Expand Down
24 changes: 12 additions & 12 deletions _overviews/scala3-book/first-look-at-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: A First Look at Types
type: chapter
description: This page provides a brief introduction to Scala's built-in data types, including Int, Double, String, Long, Any, AnyRef, Nothing, and Null.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 17
previous-page: taste-summary
next-page: control-structures
Expand Down Expand Up @@ -139,17 +139,17 @@ As shown, enclose strings in double-quotes---or triple-quotes for multiline stri

Those data types and their ranges are:

| Data Type | Possible Values |
| ------------- | --------------- |
| Boolean | `true` or `false` |
| Byte | 8-bit signed two’s complement integer (-2^7 to 2^7-1, inclusive)<br/>-128 to 127 |
| Short | 16-bit signed two’s complement integer (-2^15 to 2^15-1, inclusive)<br/>-32,768 to 32,767
| Int | 32-bit two’s complement integer (-2^31 to 2^31-1, inclusive)<br/>-2,147,483,648 to 2,147,483,647 |
| Long | 64-bit two’s complement integer (-2^63 to 2^63-1, inclusive)<br/>(-2^63 to 2^63-1, inclusive) |
| Float | 32-bit IEEE 754 single-precision float<br/>1.40129846432481707e-45 to 3.40282346638528860e+38 |
| Double | 64-bit IEEE 754 double-precision float<br/>4.94065645841246544e-324 to 1.79769313486231570e+308 |
| Char | 16-bit unsigned Unicode character (0 to 2^16-1, inclusive)<br/>0 to 65,535 |
| String | a sequence of `Char` |
| Data Type | Possible Values |
|-----------|--------------------------------------------------------------------------------------------------|
| Boolean | `true` or `false` |
| Byte | 8-bit signed two’s complement integer (-2^7 to 2^7-1, inclusive)<br/>-128 to 127 |
| Short | 16-bit signed two’s complement integer (-2^15 to 2^15-1, inclusive)<br/>-32,768 to 32,767 |
| Int | 32-bit two’s complement integer (-2^31 to 2^31-1, inclusive)<br/>-2,147,483,648 to 2,147,483,647 |
| Long | 64-bit two’s complement integer (-2^63 to 2^63-1, inclusive)<br/>(-2^63 to 2^63-1, inclusive) |
| Float | 32-bit IEEE 754 single-precision float<br/>1.40129846432481707e-45 to 3.40282346638528860e+38 |
| Double | 64-bit IEEE 754 double-precision float<br/>4.94065645841246544e-324 to 1.79769313486231570e+308 |
| Char | 16-bit unsigned Unicode character (0 to 2^16-1, inclusive)<br/>0 to 65,535 |
| String | a sequence of `Char` |

## `BigInt` and `BigDecimal`

Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Collections
type: section
description: This page provides a high-level overview of the main features of the Scala 3 programming language.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 13
previous-page: taste-objects
next-page: taste-contextual-abstractions
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-contextual-abstractions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Contextual Abstractions
type: section
description: This section provides an introduction to Contextual Abstractions in Scala 3.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 14
previous-page: taste-collections
next-page: taste-toplevel-definitions
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-control-structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Control Structures
type: section
description: This section demonstrates Scala 3 control structures.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 8
previous-page: taste-vars-data-types
next-page: taste-modeling
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: First-Class Functions
type: section
description: This page provides an introduction to functions in Scala 3.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 11
previous-page: taste-methods
next-page: taste-objects
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Methods
type: section
description: This section provides an introduction to defining and using methods in Scala 3.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 10
previous-page: taste-modeling
next-page: taste-functions
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Domain Modeling
type: section
description: This section provides an introduction to data modeling in Scala 3.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 9
previous-page: taste-control-structures
next-page: taste-methods
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Singleton Objects
type: section
description: This section provides an introduction to the use of singleton objects in Scala 3.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 12
previous-page: taste-functions
next-page: taste-collections
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: The REPL
type: section
description: This section provides an introduction to the Scala REPL.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 6
previous-page: taste-hello-world
next-page: taste-vars-data-types
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Summary
type: section
description: This page provides a summary of the previous 'Taste of Scala' sections.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 16
previous-page: taste-toplevel-definitions
next-page: first-look-at-types
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-toplevel-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Toplevel Definitions
type: section
description: This page provides an introduction to top-level definitions in Scala 3
languages: [zh-cn]
languages: [ru, zh-cn]
num: 15
previous-page: taste-contextual-abstractions
next-page: taste-summary
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/taste-vars-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Variables and Data Types
type: section
description: This section demonstrates val and var variables, and some common Scala data types.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 7
previous-page: taste-repl
next-page: taste-control-structures
Expand Down
Loading