Skip to content

Full Russian translation #1469

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
188 changes: 90 additions & 98 deletions .vuepress/configs/sidebar/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,103 +8,95 @@ export const sidebarRU: SidebarConfig = {
link: '/ru/book/README.md',
collapsible: false,
},
// {
// text: 'Начало работы',
// link: '/ru/book/getting_started.md',
// collapsible: false,
// children: [
// '/ru/book/installation.md',
// '/ru/book/default_shell.md',
// '/ru/book/quick_tour.md',
// '/ru/book/moving_around.md',
// '/ru/book/thinking_in_nu.md',
// '/ru/book/cheat_sheet.md',
// ],
// },
// {
// text: 'Основы Nu',
// link: '/nu_fundamentals.md',
// collapsible: false,
// children: [
// '/ru/book/types_of_data.md',
// '/ru/book/loading_data.md',
// '/ru/book/pipelines.md',
// '/ru/book/working_with_strings.md',
// '/ru/book/working_with_lists.md',
// '/ru/book/working_with_tables.md',
// ],
// },
// {
// text: 'Программирование в Nu',
// link: '/programming_in_nu.md',
// collapsible: false,
// children: [
// '/ru/book/custom_commands.md',
// '/ru/book/aliases.md',
// '/ru/book/operators.md',
// '/ru/book/variables_and_subexpressions.md',
// '/ru/book/control_flow.md',
// '/ru/book/scripts.md',
// '/ru/book/modules.md',
// '/ru/book/overlays.md',
// '/ru/book/command_signature.md',
// '/ru/book/testing.md',
// '/ru/book/style_guide.md',
// ],
// },
// {
// text: 'Nu как оболочка',
// link: '/nu_as_a_shell.md',
// collapsible: false,
// children: [
// '/ru/book/configuration.md',
// '/ru/book/environment.md',
// '/ru/book/stdout_stderr_exit_codes.md',
// '/ru/book/escaping.md',
// '/ru/book/3rdpartyprompts.md',
// '/ru/book/shells_in_shells.md',
// '/ru/book/line_editor.md',
// '/ru/book/externs.md',
// '/ru/book/custom_completions.md',
// '/ru/book/coloring_and_theming.md',
// '/ru/book/hooks.md',
// '/ru/book/background_task.md',
// ],
// },
// {
// text: 'Переход в Nu',
// link: '/coming_to_nu.md',
// collapsible: false,
// children: [
// '/ru/book/coming_from_bash.md',
// '/ru/book/coming_from_cmd.md',
// '/ru/book/nushell_map.md',
// '/ru/book/nushell_map_imperative.md',
// '/ru/book/nushell_map_functional.md',
// '/ru/book/nushell_operator_map.md',
// ],
// },
// {
// text: 'Примечания к дизайну',
// link: '/design_notes.md',
// collapsible: false,
// children: [
// '/ru/book/how_nushell_code_gets_run.md'
// ],
// },
// {
// text: '(Не очень) Продвинутый',
// link: '/advanced.md',
// collapsible: false,
// children: [
// '/ru/book/standard_library.md',
// '/ru/book/dataframes.md',
// '/ru/book/metadata.md',
// '/ru/book/creating_errors.md',
// '/ru/book/parallelism.md',
// '/ru/book/plugins.md',
// '/ru/book/explore.md',
// ],
// },
{
text: 'Начало работы',
link: '/ru/book/getting_started.md',
collapsible: false,
children: [
'/ru/book/installation.md',
'/ru/book/default_shell.md',
'/ru/book/quick_tour.md',
'/ru/book/moving_around.md',
'/ru/book/thinking_in_nu.md',
'/ru/book/cheat_sheet.md',
],
},
{
text: 'Основы Nu',
link: '/nu_fundamentals.md',
collapsible: false,
children: [
'/ru/book/types_of_data.md',
'/ru/book/loading_data.md',
'/ru/book/pipelines.md',
'/ru/book/working_with_strings.md',
'/ru/book/working_with_lists.md',
'/ru/book/working_with_tables.md',
],
},
{
text: 'Программирование в Nu',
link: '/programming_in_nu.md',
collapsible: false,
children: [
'/ru/book/custom_commands.md',
'/ru/book/aliases.md',
'/ru/book/operators.md',
'/ru/book/variables_and_subexpressions.md',
'/ru/book/control_flow.md',
'/ru/book/scripts.md',
'/ru/book/modules.md',
'/ru/book/overlays.md',
'/ru/book/command_signature.md',
'/ru/book/testing.md',
'/ru/book/style_guide.md',
],
},
{
text: 'Nu как оболочка',
link: '/nu_as_a_shell.md',
collapsible: false,
children: [
'/ru/book/configuration.md',
'/ru/book/environment.md',
'/ru/book/stdout_stderr_exit_codes.md',
'/ru/book/escaping.md',
'/ru/book/3rdpartyprompts.md',
'/ru/book/shells_in_shells.md',
'/ru/book/line_editor.md',
'/ru/book/externs.md',
'/ru/book/custom_completions.md',
'/ru/book/coloring_and_theming.md',
'/ru/book/hooks.md',
'/ru/book/background_task.md',
],
},
{
text: 'Переход на Ин',
link: '/book/coming_to_nu.md',
collapsible: false,
children: [
'/ru/book/coming_from_bash.md',
'/ru/book/coming_from_cmd.md',
'/ru/book/nushell_map.md',
'/ru/book/nushell_map_imperative.md',
'/ru/book/nushell_map_functional.md',
'/ru/book/nushell_operator_map.md',
],
},
{
text: '(Не очень) Продвинутый',
link: '/advanced.md',
collapsible: false,
children: [
'/ru/book/standard_library.md',
'/ru/book/dataframes.md',
'/ru/book/metadata.md',
'/ru/book/creating_errors.md',
'/ru/book/parallelism.md',
'/ru/book/plugins.md',
'/ru/book/explore.md',
],
},
],
};
46 changes: 27 additions & 19 deletions ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,60 @@
home: true
heroImage: null
heroText: Nushell
tagline: Новый тип оболочки
actionText: Начать
tagline: A new type of shell
actionText: Приступим
actionLink: /book/
features:
- title: Конвейеры для управления любой ОС
details: Nu работает на Linux, macOS, BSD и Windows. Выучите его один раз, а затем используйте везде.
- title: Все есть данные
details: Конвейеры Nu используют структурированные данные, поэтому вы можете спокойно выбирать, фильтровать и сортировать их каждый раз одним и тем же способом. Перестаньте парсить строки и начните решать проблемы.
- title: Мощные плагины
details: Nu легко расширяется с помощью мощной системы плагинов.
- title: Пайплайны для управления любой ОС
details: Nu работает на Linux, macOS, BSD, и Windows. Выучите его один раз, используйте его везде.
- title: Всё есть данные
details: Пайплайны в Nu используют структурированные данные, поэтому вы можете безопасно отбирать, фильтровать и сортировать их каждый раз одним и тем же способом. Давайте перестанем разбирать строки и начнём решать реальные проблемы.
- title: Мощная система плагинов
details: Дополнять Nu можно с помощью мощной системы плагинов.
---

<img src="https://www.nushell.sh/frontpage/ls-example.png" alt="Снимок экрана, показывающий использование команды ls" class="hero"/>
<img src="https://www.nushell.sh/frontpage/ls-example.png" alt="Screenshot showing using the ls command" class="hero"/>

### Nu работает с существующими данными

Nu говорит на языках [JSON, YAML, SQLite, Excel, и других](/book/loading_data.html) из коробки. В конвейер Nu легко внести данные, будь они в файле, базе данных или веб-API:
Nu "говорит" на [JSON, YAML, SQLite, Excel, и др.](/book/loading_data.html) из коробки. Обработать ваши данные в пейплайне очень просто, будь они в файле, базе данных, либо же в API:

<img src="https://www.nushell.sh/frontpage/fetch-example.png" alt="Снимок экрана, показывающий выборку с помощью веб-API" class="hero"/>
<img src="https://www.nushell.sh/frontpage/fetch-example.png" alt="Screenshot showing fetch with a web API" class="hero"/>

### Nu имеет отличные сообщения об ошибках
### Nu имеет прекрасные сообщения об ошибках

Nu оперирует типизированными данными, поэтому отлавливает ошибки, которые другие оболочки не могут. А когда что-то ломается, Nu точно сообщает, где и почему:
Nu работает с типизированными данными, поэтому отлавливает ошибки, которые не замечают другие оболочки. А когда что-то ломается, Nu точно скажет вам, где и почему:

<img src="https://www.nushell.sh/frontpage/miette-example.png" alt="Снимок экрана, показывающий, как Nu ловит ошибку типа" class="hero"/>
<img src="https://www.nushell.sh/frontpage/miette-example.png" alt="Screenshot showing Nu catching a type error" class="hero"/>

## Получить Nu
## Я хочу это!

Nushell доступен в виде [загружаемых двоичных файлов](https://github.com/nushell/nushell/releases), [через ваш любимый менеджер пакетов](https://repology.org/project/nushell/versions), в [Действие GitHub](https://github.com/marketplace/actions/setup-nu), а также в виде [исходного кода](https://github.com/nushell/nushell). Прочитайте [подробные инструкции по установке](/book/installation.html) или сразу приступайте к работе:
Nushell можно получить [в виде бинарного файла](https://github.com/nushell/nushell/releases), [с помощью вашего любимого пакетного менеджера](https://repology.org/project/nushell/versions), в [в GitHub Action](https://github.com/marketplace/actions/setup-nu), или в виде [исходного кода](https://github.com/nushell/nushell). См. [подробную инструкцию по установке](/book/installation.html) или начните уже сейчас:

#### macOS / Linux:

##### Homebrew

```shell
$ brew install nushell
```

##### Nix profile

```shell
$ nix profile install nixpkgs#nushell
```

#### Windows:

```shell
$ winget install nushell
```

После установки запустите Nu, набрав `nu`.
После установки, запустите Nu с помощью `nu`.

## Сообщество

Присоединяйтесь к нам [в Discord](https://discord.gg/NtAbbGn), если у вас есть вопросы о Nu!
Присоединяйтесь к нам [в Discord](https://discord.gg/NtAbbGn) если у вас есть любые вопросы о Nu!

Вы можете помочь улучшить этот сайт, [оставив отзыв](https://github.com/nushell/nushell.github.io/issues) или [отправив PR](https://github.com/nushell/nushell.github.io/pulls).
Вы можете улучшить этот сайт [предоставив нам обратную связь](https://github.com/nushell/nushell.github.io/issues) или [отправив PR](https://github.com/nushell/nushell.github.io/pulls).
99 changes: 99 additions & 0 deletions ru/book/3rdpartyprompts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# How to configure 3rd party prompts

## nerdfonts

nerdfonts are not required but they make the presentation much better.

[site](https://www.nerdfonts.com)

[repo](https://github.com/ryanoasis/nerd-fonts)

## oh-my-posh

[site](https://ohmyposh.dev/)

[repo](https://github.com/JanDeDobbeleer/oh-my-posh)

If you like [oh-my-posh](https://ohmyposh.dev/), you can use oh-my-posh with Nushell with a few steps. It works great with Nushell. How to setup oh-my-posh with Nushell:

1. Install Oh My Posh and download oh-my-posh's themes following [guide](https://ohmyposh.dev/docs/installation/linux).
2. Download and install a [nerd font](https://github.com/ryanoasis/nerd-fonts).
3. Generate the .oh-my-posh.nu file. By default it will be generated to your home directory. You can use `--config` to specify a theme, other wise, oh-my-posh comes with a default theme.
4. Initialize oh-my-posh prompt by adding in ~/.config/nushell/config.nu(or the path output by `$nu.config-path`) to source ~/.oh-my-posh.nu.

```nu
# Generate the .oh-my-posh.nu file
> oh-my-posh init nu --config ~/.poshthemes/M365Princess.omp.json

# Initialize oh-my-posh.nu at shell startup by adding this line in your config.nu file
> source ~/.oh-my-posh.nu
```

For MacOS users:

1. You can install oh-my-posh by `brew`, just following the [guide here](https://ohmyposh.dev/docs/installation/macos)
2. Download and install a [nerd font](https://github.com/ryanoasis/nerd-fonts).
3. Set the PROMPT_COMMAND in the file output by `$nu.config-path`, here is a code snippet:

```nu
let posh_dir = (brew --prefix oh-my-posh | str trim)
let posh_theme = $'($posh_dir)/share/oh-my-posh/themes/'
# Change the theme names to: zash/space/robbyrussel/powerline/powerlevel10k_lean/
# material/half-life/lambda Or double lines theme: amro/pure/spaceship, etc.
# For more [Themes demo](https://ohmyposh.dev/docs/themes)
$env.PROMPT_COMMAND = { || oh-my-posh prompt print primary --config $'($posh_theme)/zash.omp.json' }
# Optional
$env.PROMPT_INDICATOR = $"(ansi y)$> (ansi reset)"
```

## Starship

[site](https://starship.rs/)

[repo](https://github.com/starship/starship)

1. Follow the links above and install Starship.
2. Install nerdfonts depending on your preferences.
3. Use the config example below. Make sure to set the `STARSHIP_SHELL` environment variable.

::: tip
An alternate way to enable Starship is described in the [Starship Quick Install](https://starship.rs/#nushell) instructions.

The link above is the official integration of Starship and Nushell and is the simplest way to get
Starship running without doing anything manual:

- Starship will create its own configuration / environment setup script
- you simply have to create it in `env.nu` and `use` it in `config.nu`
:::

Here's an example config section for Starship:

```nu
$env.STARSHIP_SHELL = "nu"

def create_left_prompt [] {
starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)'
}

# Use nushell functions to define your right and left prompt
$env.PROMPT_COMMAND = { || create_left_prompt }
$env.PROMPT_COMMAND_RIGHT = ""

# The prompt indicators are environmental variables that represent
# the state of the prompt
$env.PROMPT_INDICATOR = ""
$env.PROMPT_INDICATOR_VI_INSERT = ": "
$env.PROMPT_INDICATOR_VI_NORMAL = "〉"
$env.PROMPT_MULTILINE_INDICATOR = "::: "
```

Now restart Nu.

```
nushell on 📙 main is 📦 v0.60.0 via 🦀 v1.59.0
```

## Purs

[repo](https://github.com/xcambar/purs)
2 changes: 1 addition & 1 deletion ru/book/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Nu берет пример со многих знакомых мест: трад
Книга разделена на главы, которые далее разбиты на разделы.
Вы можете нажать на заголовки глав, чтобы получить более подробную информацию о них.

- [Начало работы (EN)](/book/getting_started.md) научит вас, как установить Nushell, и покажет вам, что к чему. В ней также объясняются некоторые принципы проектирования, по которым Nushell отличается от типичных оболочек, таких как bash.
- [Начало работы (RU)](getting_started.md) научит вас, как установить Nushell, и покажет вам, что к чему. В ней также объясняются некоторые принципы проектирования, по которым Nushell отличается от типичных оболочек, таких как bash.
- [Основы Nu (EN)](/book/nu_fundamentals.md) объясняет основные понятия языка Nushell.
- [Программирование в Nu (EN)](/book/programming_in_nu.md) более глубоко погружает в особенности языка и показывает несколько способов организации и структурирования вашего кода.
- [Nu как оболочка (EN)](/book/nu_as_a_shell.md) В центре внимания - возможности оболочки, в первую очередь конфигурация и окружение.
Expand Down
Loading
Loading