-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(ru): add Russian translation (#3709)
Co-authored-by: Ruslan Makarov <ruslan.makarov@gmail.com>
- Loading branch information
Showing
41 changed files
with
7,020 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
import { createRequire } from 'module' | ||
import { defineConfig, type DefaultTheme } from 'vitepress' | ||
|
||
const require = createRequire(import.meta.url) | ||
const pkg = require('vitepress/package.json') | ||
|
||
export const ru = defineConfig({ | ||
lang: 'ru-RU', | ||
description: 'Генератор статических сайтов на основе Vite и Vue.', | ||
|
||
themeConfig: { | ||
nav: nav(), | ||
|
||
sidebar: { | ||
'/ru/guide/': { base: '/ru/guide/', items: sidebarGuide() }, | ||
'/ru/reference/': { base: '/ru/reference/', items: sidebarReference() } | ||
}, | ||
|
||
editLink: { | ||
pattern: 'https://github.com/vuejs/vitepress/edit/main/docs/:path', | ||
text: 'Редактировать страницу' | ||
}, | ||
|
||
footer: { | ||
message: 'Опубликовано под лицензией MIT.', | ||
copyright: '© 2019 – настоящее время, Эван Ю' | ||
}, | ||
|
||
outline: { label: 'Содержание страницы' }, | ||
|
||
docFooter: { | ||
prev: 'Предыдущая страница', | ||
next: 'Следующая страница' | ||
}, | ||
|
||
lastUpdated: { | ||
text: 'Обновлено' | ||
}, | ||
|
||
darkModeSwitchLabel: 'Оформление', | ||
lightModeSwitchTitle: 'Переключить на светлую тему', | ||
darkModeSwitchTitle: 'Переключить на тёмную тему', | ||
sidebarMenuLabel: 'Меню', | ||
returnToTopLabel: 'Вернуться к началу', | ||
langMenuLabel: 'Изменить язык' | ||
} | ||
}) | ||
|
||
function nav(): DefaultTheme.NavItem[] { | ||
return [ | ||
{ | ||
text: 'Руководство', | ||
link: '/ru/guide/what-is-vitepress', | ||
activeMatch: '/ru/guide/' | ||
}, | ||
{ | ||
text: 'Справочник', | ||
link: '/ru/reference/site-config', | ||
activeMatch: '/ru/reference/' | ||
}, | ||
{ | ||
text: pkg.version, | ||
items: [ | ||
{ | ||
text: 'Изменения', | ||
link: 'https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md' | ||
}, | ||
{ | ||
text: 'Вклад', | ||
link: 'https://github.com/vuejs/vitepress/blob/main/.github/contributing.md' | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
||
function sidebarGuide(): DefaultTheme.SidebarItem[] { | ||
return [ | ||
{ | ||
text: 'Введение', | ||
collapsed: false, | ||
items: [ | ||
{ text: 'Что такое VitePress?', link: 'what-is-vitepress' }, | ||
{ text: 'Первые шаги', link: 'getting-started' }, | ||
{ text: 'Маршрутизация', link: 'routing' }, | ||
{ text: 'Развёртывание', link: 'deploy' } | ||
] | ||
}, | ||
{ | ||
text: 'Написание', | ||
collapsed: false, | ||
items: [ | ||
{ text: 'Расширения Markdown', link: 'markdown' }, | ||
{ text: 'Обработка ресурсов', link: 'asset-handling' }, | ||
{ text: 'Метаданные', link: 'frontmatter' }, | ||
{ text: 'Использование Vue в Markdown', link: 'using-vue' }, | ||
{ text: 'Интернационализация', link: 'i18n' } | ||
] | ||
}, | ||
{ | ||
text: 'Настройка', | ||
collapsed: false, | ||
items: [ | ||
{ text: 'Пользовательская тема', link: 'custom-theme' }, | ||
{ | ||
text: 'Расширение темы по умолчанию', | ||
link: 'extending-default-theme' | ||
}, | ||
{ | ||
text: 'Загрузка данных в режиме реального времени', | ||
link: 'data-loading' | ||
}, | ||
{ text: 'Совместимость с SSR', link: 'ssr-compat' }, | ||
{ text: 'Подключение к CMS', link: 'cms' } | ||
] | ||
}, | ||
{ | ||
text: 'Экспериментально', | ||
collapsed: false, | ||
items: [ | ||
{ text: 'Режим MPA', link: 'mpa-mode' }, | ||
{ text: 'Генерация карты сайта', link: 'sitemap-generation' } | ||
] | ||
}, | ||
{ text: 'Конфигурация и API', base: '/ru/reference/', link: 'site-config' } | ||
] | ||
} | ||
|
||
function sidebarReference(): DefaultTheme.SidebarItem[] { | ||
return [ | ||
{ | ||
text: 'Справочник', | ||
items: [ | ||
{ text: 'Конфигурация сайта', link: 'site-config' }, | ||
{ text: 'Конфигурация метаданных', link: 'frontmatter-config' }, | ||
{ text: 'Runtime API', link: 'runtime-api' }, | ||
{ text: 'Командная строка', link: 'cli' }, | ||
{ | ||
text: 'Тема по умолчанию', | ||
base: '/ru/reference/default-theme-', | ||
items: [ | ||
{ text: 'Обзор', link: 'config' }, | ||
{ text: 'Навигация', link: 'nav' }, | ||
{ text: 'Сайдбар', link: 'sidebar' }, | ||
{ text: 'Главная страница', link: 'home-page' }, | ||
{ text: 'Подвал', link: 'footer' }, | ||
{ text: 'Макет', link: 'layout' }, | ||
{ text: 'Значки', link: 'badge' }, | ||
{ text: 'Страница команды', link: 'team-page' }, | ||
{ | ||
text: 'Предыдущая и следующая страницы', | ||
link: 'prev-next-links' | ||
}, | ||
{ text: 'Ссылка для редактирования', link: 'edit-link' }, | ||
{ text: 'Последнее обновление', link: 'last-updated' }, | ||
{ text: 'Поиск', link: 'search' }, | ||
{ text: 'Carbon Ads (реклама)', link: 'carbon-ads' } | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
||
export const search: DefaultTheme.AlgoliaSearchOptions['locales'] = { | ||
ru: { | ||
placeholder: 'Поиск в документации', | ||
translations: { | ||
button: { | ||
buttonText: 'Поиск', | ||
buttonAriaLabel: 'Поиск' | ||
}, | ||
modal: { | ||
searchBox: { | ||
resetButtonTitle: 'Сбросить поиск', | ||
resetButtonAriaLabel: 'Сбросить поиск', | ||
cancelButtonText: 'Отменить поиск', | ||
cancelButtonAriaLabel: 'Отменить поиск' | ||
}, | ||
startScreen: { | ||
recentSearchesTitle: 'История поиска', | ||
noRecentSearchesText: 'Нет истории поиска', | ||
saveRecentSearchButtonTitle: 'Сохранить в истории поиска', | ||
removeRecentSearchButtonTitle: 'Удалить из истории поиска', | ||
favoriteSearchesTitle: 'Избранное', | ||
removeFavoriteSearchButtonTitle: 'Удалить из избранного' | ||
}, | ||
errorScreen: { | ||
titleText: 'Невозможно получить результаты', | ||
helpText: 'Вам может потребоваться проверить подключение к Интернету' | ||
}, | ||
footer: { | ||
selectText: 'выбрать', | ||
navigateText: 'перейти', | ||
closeText: 'закрыть', | ||
searchByText: 'поставщик поиска' | ||
}, | ||
noResultsScreen: { | ||
noResultsText: 'Нет результатов для', | ||
suggestedQueryText: 'Вы можете попытаться узнать', | ||
reportMissingResultsText: | ||
'Считаете, что поиск даёт ложные результаты?', | ||
reportMissingResultsLinkText: 'Нажмите на кнопку «Обратная связь»' | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const showModal = ref(false) | ||
</script> | ||
|
||
<template> | ||
<button class="modal-button" @click="showModal = true"> | ||
Показать модальное окно | ||
</button> | ||
|
||
<Teleport to="body"> | ||
<Transition name="modal"> | ||
<div v-show="showModal" class="modal-mask"> | ||
<div class="modal-container"> | ||
<p>Привет из модального окна!</p> | ||
<div class="model-footer"> | ||
<button class="modal-button" @click="showModal = false"> | ||
Закрыть | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</Transition> | ||
</Teleport> | ||
</template> | ||
|
||
<style scoped> | ||
.modal-mask { | ||
position: fixed; | ||
z-index: 200; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background-color: rgba(0, 0, 0, 0.5); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
transition: opacity 0.3s ease; | ||
} | ||
.modal-container { | ||
width: 300px; | ||
margin: auto; | ||
padding: 20px 30px; | ||
background-color: var(--vp-c-bg); | ||
border-radius: 2px; | ||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33); | ||
transition: all 0.3s ease; | ||
} | ||
.model-footer { | ||
margin-top: 8px; | ||
text-align: right; | ||
} | ||
.modal-button { | ||
padding: 4px 8px; | ||
border-radius: 4px; | ||
border-color: var(--vp-button-alt-border); | ||
color: var(--vp-button-alt-text); | ||
background-color: var(--vp-button-alt-bg); | ||
} | ||
.modal-button:hover { | ||
border-color: var(--vp-button-alt-hover-border); | ||
color: var(--vp-button-alt-hover-text); | ||
background-color: var(--vp-button-alt-hover-bg); | ||
} | ||
.modal-enter-from, | ||
.modal-leave-to { | ||
opacity: 0; | ||
} | ||
.modal-enter-from .modal-container, | ||
.modal-leave-to .modal-container { | ||
transform: scale(1.1); | ||
} | ||
</style> |
Oops, something went wrong.