From 40962bb8e463303ea8cbd6849c577e60ed0c60b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=A9=D0=B0=D0=B2=D0=B5=D0=BB?= =?UTF-8?q?=D0=B5=D0=B2?= Date: Sun, 18 Aug 2024 03:41:32 +0300 Subject: [PATCH] config: update locale config (#20) --- .vitepress/config/plugins/index.ts | 1 - .../config/plugins/vitepress-search/index.ts | 21 ------------------- .vitepress/config/ru.ts | 19 +++++++++++++++-- 3 files changed, 17 insertions(+), 24 deletions(-) delete mode 100644 .vitepress/config/plugins/vitepress-search/index.ts diff --git a/.vitepress/config/plugins/index.ts b/.vitepress/config/plugins/index.ts index 15cf85f..e22a181 100644 --- a/.vitepress/config/plugins/index.ts +++ b/.vitepress/config/plugins/index.ts @@ -1,3 +1,2 @@ export { NolebaseEnhancedReadabilitiesOptions } from './NolebaseEnhancedReadabilities/index' export { NolebaseGitChangelogOptions } from './NolebaseGitChangelog/index' -export { VitePressSearchOptions } from './vitepress-search/index' diff --git a/.vitepress/config/plugins/vitepress-search/index.ts b/.vitepress/config/plugins/vitepress-search/index.ts deleted file mode 100644 index 4a38de9..0000000 --- a/.vitepress/config/plugins/vitepress-search/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -export const VitePressSearchOptions = { - locales: { - root: { - translations: { - button: { - buttonText: 'Поиск', - buttonAriaLabel: 'Поиск' - }, - modal: { - noResultsText: 'Нет результатов по запросу', - resetButtonTitle: 'Сбросить', - footer: { - selectText: 'для выбора', - navigateText: 'для навигации', - closeText: 'закрыть' - } - } - } - } - } -} diff --git a/.vitepress/config/ru.ts b/.vitepress/config/ru.ts index 2632d43..b428224 100644 --- a/.vitepress/config/ru.ts +++ b/.vitepress/config/ru.ts @@ -1,13 +1,28 @@ import { defineConfigWithTheme } from 'vitepress' import { nav, sidebar } from '../data/navigations' import { packages } from '../../package-lock.json' -import { VitePressSearchOptions } from './plugins' export const ru = defineConfigWithTheme({ lang: 'ru-RU', themeConfig: { search: { - options: VitePressSearchOptions + options: { + translations: { + button: { + buttonText: 'Поиск', + buttonAriaLabel: 'Поиск' + }, + modal: { + noResultsText: 'Нет результатов по запросу', + resetButtonTitle: 'Сбросить', + footer: { + selectText: 'для выбора', + navigateText: 'для навигации', + closeText: 'закрыть' + } + } + } + } }, nav: nav.root, sidebar: sidebar.root,