Skip to content

Add Scaladoc pages translation in ru #2626

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
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
4 changes: 2 additions & 2 deletions _includes/sidebar-toc-singlepage-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ <h5 class="contents">Contents</h5>
{% assign lang = site.data.languages[l] %}
<li><a href="{{ site.baseurl }}/{{ l }}/{{ rootTutorialURL }}" class="lang">{{ lang.name }}</a></li>
{% endfor %}
</ul>
</ul>
{% elsif page.language %}
{% assign engPath = page.id | remove_first: "/" | remove_first: page.language | append: '.html' %}
{% assign engPg = site.documents | where: 'partof', page.partof | first %}
{% assign engPg = site.overviews | where: 'partof', page.partof | first %}
<ul id="available-languages" style="display: none;">
<li><a href="{{ site.baseurl }}{{ engPath }}">English</a></li>
{% for l in engPg.languages %}
Expand Down
1 change: 1 addition & 0 deletions _overviews/scala3-scaladoc/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: multipage-overview
title: Built-in blog
partof: scala3-scaladoc
languages: ["ru"]
num: 5
previous-page: static-site
next-page: site-versioning
Expand Down
5 changes: 3 additions & 2 deletions _overviews/scala3-scaladoc/docstrings.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: multipage-overview
title: Docstrings - specific Tags and Features
partof: scala3-scaladoc
languages: ["ru"]
num: 2
previous-page: index
next-page: linking
Expand Down Expand Up @@ -187,9 +188,9 @@ Concise is nice! Get to the point quickly, people have limited time to spend on
Omit unnecessary words. Prefer returns X rather than this method returns X, and does X,Y & Z rather than this method does X, Y and Z.
DRY - don’t repeat yourself. Resist duplicating the method description in the @return tag and other forms of repetitive commenting.

More details on writing Scaladoc
### More details on writing Scaladoc

Further information on the formatting and style recommendations can be found in Scala-lang scaladoc style guide.
Further information on the formatting and style recommendations can be found in [Scala-lang scaladoc style guide](https://docs.scala-lang.org/style/scaladoc.html).

## Linking to API

Expand Down
1 change: 1 addition & 0 deletions _overviews/scala3-scaladoc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: multipage-overview
title: Scaladoc
partof: scala3-scaladoc
languages: ["ru"]
num: 1
next-page: docstrings
---
Expand Down
1 change: 1 addition & 0 deletions _overviews/scala3-scaladoc/linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: multipage-overview
title: Linking documentation
partof: scala3-scaladoc
languages: ["ru"]
num: 3
previous-page: docstrings
next-page: static-site
Expand Down
1 change: 1 addition & 0 deletions _overviews/scala3-scaladoc/search-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: multipage-overview
title: Type-based search
partof: scala3-scaladoc
languages: ["ru"]
num: 7
previous-page: site-versioning
next-page: snippet-compiler
Expand Down
26 changes: 13 additions & 13 deletions _overviews/scala3-scaladoc/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: multipage-overview
title: Settings
partof: scala3-scaladoc
languages: ["ru"]
num: 9
previous-page: snippet-compiler
---
Expand Down Expand Up @@ -52,19 +53,18 @@ Example source links is:

Accepted formats:

\<sub-path>=\<source-link>
\<source-link>
`<sub-path>=<source-link>`

where \<source-link> is one of following:
where `<source-link>` is one of following:
- `github://<organization>/<repository>[/revision][#subpath]`
will match https://github.com/$organization/$repository/\[blob|edit]/$revision\[/$subpath]/$filePath\[$lineNumber]
when revision is not provided then requires revision to be specified as argument for scaladoc
- `gitlab://<organization>/<repository>`
will match https://gitlab.com/$organization/$repository/-/\[blob|edit]/$revision\[/$subpath]/$filePath\[$lineNumber]
when revision is not provided then requires revision to be specified as argument for scaladoc
- \<scaladoc-template>
- `<scaladoc-template>`

\<scaladoc-template> is a format for `doc-source-url` parameter from old scaladoc.
`<scaladoc-template>` is a format for `doc-source-url` parameter from old scaladoc.
NOTE: We only supports `€{FILE_PATH_EXT}`, `€{TPL_NAME}`, `€{FILE_EXT}`,
`€{FILE_PATH}`, and `€{FILE_LINE}` patterns.

Expand All @@ -81,15 +81,15 @@ Mapping between regexes matching classpath entries and external documentation.
Example external mapping is:
`-external-mappings:.*scala.*::scaladoc3::https://scala-lang.org/api/3.x/,.*java.*::javadoc::https://docs.oracle.com/javase/8/docs/api/`

A mapping is of the form '\<regex>::\[scaladoc3|scaladoc|javadoc]::\<path>'. You can supply several mappings, separated by commas, as shown in the example.
A mapping is of the form `<regex>::[scaladoc3|scaladoc|javadoc]::<path>`. You can supply several mappings, separated by commas, as shown in the example.

##### -social-links

Links to social sites. For example:

`-social-links:github::https://github.com/lampepfl/dotty,discord::https://discord.com/invite/scala,twitter::https://twitter.com/scala_lang`

Valid values are of the form: `\[github|twitter|gitter|discord]::link`. Scaladoc also supports `custom::link::white_icon_name::black_icon_name`. In this case icons must be present in `images/` directory.
Valid values are of the form: `[github|twitter|gitter|discord]::link`. Scaladoc also supports `custom::link::white_icon_name::black_icon_name`. In this case icons must be present in `images/` directory.

##### -skip-by-id

Expand Down Expand Up @@ -156,9 +156,9 @@ where `path` is a prefix of the path to source files where snippets are located
If the path is not present, the argument will be used as the default for all unmatched paths.

Available flags:
compile - Enables snippet checking.
nocompile - Disables snippet checking.
fail - Enables snippet checking, asserts that snippet doesn't compile.
- compile - Enables snippet checking.
- nocompile - Disables snippet checking.
- fail - Enables snippet checking, asserts that snippet doesn't compile.

The fail flag comes in handy for snippets that present that some action would eventually fail during compilation, e. g. [Opaques page]({{ site.scala3ref }}/other-new-features/opaques.html)

Expand All @@ -168,9 +168,9 @@ Example usage:

Which means:

all snippets in files under directory `my/path/nc` should not be compiled at all
all snippets in files under directory `my/path/f` should fail during compilation
all other snippets should compile successfully
- all snippets in files under directory `my/path/nc` should not be compiled at all
- all snippets in files under directory `my/path/f` should fail during compilation
- all other snippets should compile successfully

##### -Ysnippet-compiler-debug

Expand Down
1 change: 1 addition & 0 deletions _overviews/scala3-scaladoc/site-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: multipage-overview
title: Site versioning
partof: scala3-scaladoc
languages: ["ru"]
num: 6
previous-page: blog
next-page: search-engine
Expand Down
1 change: 1 addition & 0 deletions _overviews/scala3-scaladoc/snippet-compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: multipage-overview
title: Snippet checking
partof: scala3-scaladoc
languages: ["ru"]
num: 8
previous-page: search-engine
next-page: settings
Expand Down
1 change: 1 addition & 0 deletions _overviews/scala3-scaladoc/static-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: multipage-overview
title: Static documentation
partof: scala3-scaladoc
languages: ["ru"]
num: 4
previous-page: linking
next-page: blog
Expand Down
68 changes: 68 additions & 0 deletions _ru/scala3/contribute-to-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
layout: singlepage-overview
title: Вклад в документацию
partof: scala3-scaladoc
scala3: true
language: ru
---

## Обзор
В настоящее время предпринимается множество усилий по созданию высококачественной документации для Scala 3.
В частности, это следующие документы:

- Книга Scala 3
- Учебник по макросам
- Руководство по миграции
- Справочник по языку Scala 3

Мы приветствуем вклад сообщества в каждый аспект документации.


### Как я могу внести свой вклад?
В целом, есть много способов, которыми вы можете нам помочь:

- **Запутались в чем-то в любом из документов?** Откройте issue.
- **Нашли что-то неактуальное?** Откройте issue или создайте PR.
- **Опечатки и другие мелкие улучшения текста?** Создайте PR.
- **Хотите добавить что-то новое или внести большие изменения?** Отлично! Пожалуйста, откройте issue и давайте обсудим это.

Как правило, каждый из различных проектов документации содержит ссылки
(как и этот документ на панели оглавления — пока видимые только в desktop view) для их редактирования и улучшения.
Кроме того, ниже мы предоставим вам всю необходимую информацию для начала работы.


## Книга Scala 3
[Книга Scala 3][scala3-book] написана Alvin Alexander и содержит обзор всех важных функций Scala 3.
Она предназначена для читателей, которые только знакомятся со Scala.

- [Исходники](https://github.com/scala/docs.scala-lang/tree/main/_overviews/scala3-book)
- [Вопросы](https://github.com/scala/docs.scala-lang/issues)

## Учебник по макросам
[Учебник по макросам](/scala3/guides/macros) написан Nicolas Stucki и содержит подробную информацию о макросах в Scala 3 и best-practices.

- [Исходники](https://github.com/scala/docs.scala-lang/tree/main/_overviews/scala3-macros)
- [Вопросы](https://github.com/scala/docs.scala-lang/issues)

## Руководство по миграции
[Руководство по миграции на Scala 3](/scala3/guides/migration/compatibility-intro.html) содержит исчерпывающий обзор
совместимости между Scala 2 и Scala 3, презентацию по инструментам миграции и подробные руководства по миграции.

- [Исходники](https://github.com/scala/docs.scala-lang/tree/main/_overviews/scala3-migration)
- [Вопросы](https://github.com/scala/docs.scala-lang/issues)

## Руководство по содействию в разработке Scala 3
[Руководство по содействию в разработке Scala 3](/scala3/guides/contribution/contribution-intro.html)
содержит исчерпывающий обзор вклада в разработку и внутреннего устройства компилятора и библиотек Scala 3.

- [Исходники](https://github.com/scala/docs.scala-lang/tree/main/_overviews/scala3-contribution)
- [Вопросы](https://github.com/scala/docs.scala-lang/issues)

## Справочник по языку Scala 3
[Справочник по Scala 3]({{ site.scala3ref }}) содержит формальное представление и подробную техническую информацию о различных возможностях языка.

- [Исходники](https://github.com/lampepfl/dotty/tree/main/docs/_docs)
- [Вопросы](https://github.com/lampepfl/dotty/issues)


[scala3-book]: {% link _overviews/scala3-book/introduction.md %}
35 changes: 35 additions & 0 deletions _ru/scala3/guides/scaladoc/blog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: multipage-overview
title: Встроенный блог
partof: scala3-scaladoc
language: ru
num: 5
previous-page: static-site
next-page: site-versioning
---

Scaladoc позволяет включить в документацию простой блог.
На данный момент предоставляются только основные функции.
В будущем мы планируем включить более продвинутые функции, такие как теги или авторские страницы.

К блогу относятся немного иначе, чем к обычным статическим сайтам.
Эта статья поможет вам создать свой собственный блог.

## Правильная настройка каталога

Сообщения в блоге должны быть помещены в каталог `_blog/_posts`.


```
├── _blog
│ ├── _posts
│ │ └── 2016-12-05-implicit-function-types.md
│ └── index.html
```

Scaladoc загружает блог, если существует каталог `_blog`.

## Соглашение об именовании

Все имена файлов сообщений блога должны начинаться с даты в числовом формате, соответствующем `YYYY-MM-DD`.
Пример имени - `2022-06-17-dotty-compiler-bootstraps.md`.
Loading