Skip to content
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

docs(ru): start ru translation #2570

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
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
12 changes: 10 additions & 2 deletions docs/.vitepress/config/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@ import { frConfig } from './fr.mts'
import { zhConfig } from './zh.mts'
import { sharedConfig } from './shared.mts'
import { defineConfig } from 'vitepress'
import { ruConfig } from './ru.mts'

export default defineConfig({
...sharedConfig,

locales: {
root: { label: 'English', lang: 'en-US', link: '/', ...enConfig },
fr: { label: 'Français', lang: 'fr-FR', link: '/fr/', ...frConfig },
zh: { label: '简体中文 (校对中)', lang: 'zh-CN', link: '/zh/', ...zhConfig }
}
zh: {
label: '简体中文 (校对中)',
lang: 'zh-CN',
link: '/zh/',
...zhConfig
},
ru: { label: 'Русский', lang: 'ru-RU', link: '/ru/', ...ruConfig }
},

})
128 changes: 128 additions & 0 deletions docs/.vitepress/config/ru.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
export const META_URL = ''
export const META_TITLE = 'Vue Test Utils'
export const META_DESCRIPTION = 'Официальный набор инструментов тестирования для Vue.js 3'

export const ruConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
description: META_DESCRIPTION,
head: [
['meta', { property: 'og:url', content: META_URL }],
['meta', { property: 'og:title', content: META_TITLE }],
['meta', { property: 'og:description', content: META_DESCRIPTION }],
['meta', { property: 'twitter:url', content: META_URL }],
['meta', { property: 'twitter:title', content: META_TITLE }],
['meta', { property: 'twitter:description', content: META_DESCRIPTION }]
],
themeConfig: {
docFooter: {
prev: 'Предыдущая',
next: 'Следующая',
},
outlineTitle: "Содержание",
editLink: {
pattern: 'https://github.com/vuejs/test-utils/edit/main/docs/:path',
text: 'Предложить перевод страницы на GitHub'
},
nav: [
{ text: 'Руководство', link: '/ru/guide/' },
{ text: 'API', link: '/api/' },
{ text: 'Миграция с Vue 2', link: '/migration/' },
{
text: 'Changelog',
link: 'https://github.com/vuejs/test-utils/releases'
}
],
sidebar: {
'/': [
{
text: 'Установка',
link: '/ru/installation/'
},
{
text: 'Основы',
items: [
{ text: 'Приступая к изучению', link: '/ru/guide/' },
{
text: 'Ускоренный курс',
link: '/ru/guide/essentials/a-crash-course'
},
{
text: 'Условная отрисовка',
link: '/ru/guide/essentials/conditional-rendering'
},
{
text: 'Тестирование генерации событий',
link: '/ru/guide/essentials/event-handling'
},
{ text: 'Тестирование форм', link: '/ru/guide/essentials/forms' },
{
text: 'Передача данных в компоненты',
link: '/ru/guide/essentials/passing-data'
},
{
text: 'Пишем компоненты для легкого тестирования',
link: '/ru/guide/essentials/easy-to-test'
}
]
},
{
text: 'Углубленно',
items: [
{ text: 'Слоты', link: '/ru/guide/advanced/slots' },
{
text: 'Асинхронное поведение',
link: '/ru/guide/advanced/async-suspense'
},
{
text: 'Выполнение HTTP запросов',
link: '/ru/guide/advanced/http-requests'
},
{ text: 'Transitions', link: '/ru/guide/advanced/transitions' },
{
text: 'Экземпляр компонента',
link: '/ru/guide/advanced/component-instance'
},
{
text: 'Переиспользование и композиция',
link: '/ru/guide/advanced/reusability-composition'
},
{ text: 'Тестирование v-model', link: '/ru/guide/advanced/v-model' },
{ text: 'Тестирование Vuex', link: '/ru/guide/advanced/vuex' },
{ text: 'Тестирование Vue Router', link: '/ru/guide/advanced/vue-router' },
{ text: 'Тестирование Teleport', link: '/ru/guide/advanced/teleport' },
{
text: 'Заглушки и неглубокий Mount',
link: '/ru/guide/advanced/stubs-shallow-mount'
},
{
text: 'Тестирование Server-side Rendering',
link: '/ru/guide/advanced/ssr'
}
]
},
{
text: 'Дополнительные темы',
items: [
{ text: 'Плагины', link: '/guide/extending-vtu/plugins' },
{
text: 'Сообщество и обучение',
link: '/ru/guide/extending-vtu/community-learning'
}
]
},
{
text: 'Ответы на вопросы',
link: '/guide/faq/'
},
{
text: 'Миграция с Vue 2',
link: '/migration/'
},
{
text: 'API руководство',
link: '/api/'
}
]
}
}
}
3 changes: 2 additions & 1 deletion docs/.vitepress/theme/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import status from '../translation-status.json'
import './custom.css'
const i18nLabels = {
fr: 'La traduction est synchronisée avec les docs du ${date} dont le hash du commit est <code>${hash}</code>.',
zh: '该翻译已同步到了 ${date} 的版本,其对应的 commit hash 是 <code>${hash}</code>。<br /><mark>同时该文档仍处于校对中,如有任何疑问或想参与校对工作,请<a href="https://github.com/vuejs/test-utils/issues/2561" target="_blank" style="font-weight: bold; text-decoration: underline;">移步这里</a>了解更多。</mark>'
zh: '该翻译已同步到了 ${date} 的版本,其对应的 commit hash 是 <code>${hash}</code>。<br /><mark>同时该文档仍处于校对中,如有任何疑问或想参与校对工作,请<a href="https://github.com/vuejs/test-utils/issues/2561" target="_blank" style="font-weight: bold; text-decoration: underline;">移步这里</a>了解更多。</mark>',
ru: "Последняя дата обновления документации: ${date}"
}


Expand Down
4 changes: 4 additions & 0 deletions docs/.vitepress/translation-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"zh": {
"hash": "7c55128",
"date": "2024-11-28"
},
"ru": {
"hash": "96ef276",
"date": "2024-12-09"
}
}
Loading