Skip to content

Commit 58cab10

Browse files
authored
Add basic config and pages for Russian language (#1228)
* Add basic config and pages for Russian language * Translate README.md to ru
1 parent 72085ff commit 58cab10

File tree

9 files changed

+370
-59
lines changed

9 files changed

+370
-59
lines changed

.vuepress/config.js

+14
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ import {
1515
navbarEs,
1616
navbarJa,
1717
navbarPtBR,
18+
navbarRU,
1819
navbarZhCN,
1920
sidebarDe,
2021
sidebarEn,
2122
sidebarEs,
2223
sidebarJa,
2324
sidebarPtBR,
25+
sidebarRU,
2426
sidebarZhCN,
2527
} from './configs/index.js';
2628

@@ -63,6 +65,11 @@ export default defineUserConfig({
6365
title: 'Nushell',
6466
description: 'Um novo tipo de shell.',
6567
},
68+
'/ru': {
69+
lang: 'ru',
70+
title: 'Nushell',
71+
description: 'Новый тип оболочки.',
72+
},
6673
},
6774
head: [
6875
['meta', { name: 'theme-color', content: '#3eaf7c' }],
@@ -127,6 +134,13 @@ export default defineUserConfig({
127134
navbar: navbarPtBR,
128135
sidebar: sidebarPtBR,
129136
},
137+
'/ru': {
138+
selectText: 'Языки',
139+
selectLanguageName: 'Русский язык',
140+
editLinkText: 'Отредактируйте эту страницу на GitHub',
141+
navbar: navbarRU,
142+
sidebar: sidebarRU,
143+
},
130144
'/zh-CN/': {
131145
selectText: '语言',
132146
selectLanguageName: '中文',

.vuepress/configs/navbar/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export * from './en.js';
33
export * from './es.js';
44
export * from './ja.js';
55
export * from './pt-BR.js';
6+
export * from './ru.js';
67
export * from './zh-CN.js';

.vuepress/configs/navbar/ru.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { NavbarConfig } from '@vuepress/theme-default';
2+
3+
export const navbarRU: NavbarConfig = [
4+
{ text: 'Книга', link: '/ru/book/' },
5+
// { text: "Contributor Book", link: "/contributor-book/" },
6+
{ text: 'Команды', link: '/commands/' },
7+
{ text: 'Cookbook', link: '/cookbook/' },
8+
{ text: 'Блог', link: '/blog/' },
9+
];

.vuepress/configs/sidebar/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export * from './en.js';
33
export * from './es.js';
44
export * from './ja.js';
55
export * from './pt-BR.js';
6+
export * from './ru.js';
67
export * from './zh-CN.js';

.vuepress/configs/sidebar/ru.ts

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
import type { SidebarConfig } from '@vuepress/theme-default';
2+
import { commandCategories } from './command_categories';
3+
4+
export const sidebarRU: SidebarConfig = {
5+
'/ru/book/': [
6+
{
7+
text: 'Введение',
8+
link: '/ru/book/README.md',
9+
collapsible: false,
10+
},
11+
// {
12+
// text: 'Начало работы',
13+
// link: '/ru/book/getting_started.md',
14+
// collapsible: false,
15+
// children: [
16+
// '/ru/book/installation.md',
17+
// '/ru/book/default_shell.md',
18+
// '/ru/book/quick_tour.md',
19+
// '/ru/book/moving_around.md',
20+
// '/ru/book/thinking_in_nu.md',
21+
// '/ru/book/cheat_sheet.md',
22+
// ],
23+
// },
24+
// {
25+
// text: 'Основы Nu',
26+
// link: '/nu_fundamentals.md',
27+
// collapsible: false,
28+
// children: [
29+
// '/ru/book/types_of_data.md',
30+
// '/ru/book/loading_data.md',
31+
// '/ru/book/pipelines.md',
32+
// '/ru/book/working_with_strings.md',
33+
// '/ru/book/working_with_lists.md',
34+
// '/ru/book/working_with_tables.md',
35+
// ],
36+
// },
37+
// {
38+
// text: 'Программирование в Nu',
39+
// link: '/programming_in_nu.md',
40+
// collapsible: false,
41+
// children: [
42+
// '/ru/book/custom_commands.md',
43+
// '/ru/book/aliases.md',
44+
// '/ru/book/operators.md',
45+
// '/ru/book/variables_and_subexpressions.md',
46+
// '/ru/book/control_flow.md',
47+
// '/ru/book/scripts.md',
48+
// '/ru/book/modules.md',
49+
// '/ru/book/overlays.md',
50+
// '/ru/book/command_signature.md',
51+
// '/ru/book/testing.md',
52+
// '/ru/book/style_guide.md',
53+
// ],
54+
// },
55+
// {
56+
// text: 'Nu как оболочка',
57+
// link: '/nu_as_a_shell.md',
58+
// collapsible: false,
59+
// children: [
60+
// '/ru/book/configuration.md',
61+
// '/ru/book/environment.md',
62+
// '/ru/book/stdout_stderr_exit_codes.md',
63+
// '/ru/book/escaping.md',
64+
// '/ru/book/3rdpartyprompts.md',
65+
// '/ru/book/shells_in_shells.md',
66+
// '/ru/book/line_editor.md',
67+
// '/ru/book/externs.md',
68+
// '/ru/book/custom_completions.md',
69+
// '/ru/book/coloring_and_theming.md',
70+
// '/ru/book/hooks.md',
71+
// '/ru/book/background_task.md',
72+
// ],
73+
// },
74+
// {
75+
// text: 'Переход в Nu',
76+
// link: '/coming_to_nu.md',
77+
// collapsible: false,
78+
// children: [
79+
// '/ru/book/coming_from_bash.md',
80+
// '/ru/book/coming_from_cmd.md',
81+
// '/ru/book/nushell_map.md',
82+
// '/ru/book/nushell_map_imperative.md',
83+
// '/ru/book/nushell_map_functional.md',
84+
// '/ru/book/nushell_operator_map.md',
85+
// ],
86+
// },
87+
// {
88+
// text: 'Примечания к дизайну',
89+
// link: '/design_notes.md',
90+
// collapsible: false,
91+
// children: [
92+
// '/ru/book/how_nushell_code_gets_run.md'
93+
// ],
94+
// },
95+
// {
96+
// text: '(Не очень) Продвинутый',
97+
// link: '/advanced.md',
98+
// collapsible: false,
99+
// children: [
100+
// '/ru/book/standard_library.md',
101+
// '/ru/book/dataframes.md',
102+
// '/ru/book/metadata.md',
103+
// '/ru/book/creating_errors.md',
104+
// '/ru/book/parallelism.md',
105+
// '/ru/book/plugins.md',
106+
// '/ru/book/explore.md',
107+
// ],
108+
// },
109+
],
110+
};

0 commit comments

Comments
 (0)