Skip to content

Commit 7318801

Browse files
committed
Add site-versioning.md in russian
1 parent f94a86d commit 7318801

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

_ru/scala3/guides/scaladoc/site-versioning.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ previous-page: blog
88
next-page: search-engine
99
---
1010

11-
Scaladoc provides a convenient way to switch between different versions of the documentation. The feature is useful if we want to expose older docs for users that didn't migrate to the new version of our library.
11+
Scaladoc предоставляет удобный способ переключения между различными версиями документации.
12+
Эта функция полезна, когда желательно оставить старые версии документации пользователям,
13+
которые ещё не перешли на новую версию библиотеки.
1214

13-
### How to setup it
15+
### Как это настроить
1416

15-
The feature was designed for easy scalability with no need to regenerate all scaladocs after adding a new version. To do so a new setting is introduced: `-versions-dictionary-url`. Its argument must be a URL to a JSON document holding information about the locations of specific versions. The JSON file has single property `versions` that holds the dictionary associating the labels of specific versions of the documentation to the URLs pointing to their index.html
17+
Эта функция была разработана для легкой масштабируемости без необходимости повторного создания всех scaladocs
18+
после добавления новой версии. Для этого вводится новая настройка: `-versions-dictionary-url`.
19+
Его аргумент должен быть URL-адресом документа JSON, содержащего информацию о расположении конкретных версий.
20+
Файл JSON должен содержать свойство `versions` со словарём,
21+
связывающий метки определенных версий документации с URL-адресами, указывающими на их `index.html`.
1622

17-
Example JSON file:
23+
Пример JSON-файла:
1824
```
1925
{
2026
"versions": {
@@ -24,17 +30,22 @@ Example JSON file:
2430
}
2531
```
2632

27-
This enforce us to provide the setting while generating docs for each of the versions, however it gives us more flexibility later. If you want to add a version of the API docs next to the previous 5 versions that you have already published, then you only need to upload the new docs to a web server and add a new entry to the JSON file. All versions of the site will now become aware of the new site version.
33+
Такие документы необходимо указывать для каждой из версий, однако позже это дает больше гибкости.
34+
Если необходимо добавить версию документов API рядом с предыдущими 5 версиями, которые уже опубликованы,
35+
нужно только загрузить новые документы на веб-сервер и добавить новую запись в файл JSON.
36+
Все версии сайта теперь узнают о новой версии.
2837

29-
The important thing to note is that there is only one JSON file to avoid redundancy and each scaladoc must set up its URL location beforehand, for example, in sbt:
38+
Важно отметить, что существует только один файл JSON, чтобы избежать избыточности,
39+
и каждый scaladoc должен заранее настроить свой URL-адрес, например, в sbt:
3040

3141
```
3242
doc / scalacOptions ++= Seq("-versions-dictionary-url", "https://dotty.epfl.ch/versions.json")
3343
```
3444

3545

36-
### How does it look from user perspective
46+
### Как это выглядит с точки зрения пользователя
3747

38-
Providing a JSON file via `-versions-dictionary-url` enables scaladoc to link between versions. It is also convenient to be able to change the revision label in the drop-down menu. Everything will change automatically.
48+
Предоставление файла JSON через `-versions-dictionary-url` позволяет scaladoc связывать версии.
49+
Также удобно иметь возможность изменить метку ревизии в выпадающем меню. Все изменится автоматически.
3950

4051
![]({{ site.baseurl }}/resources/images/scala3/scaladoc/nightly.gif)

0 commit comments

Comments
 (0)