diff --git a/.vitepress/config/ja.ts b/.vitepress/config/ja.ts index 260e8dc..f3e6903 100644 --- a/.vitepress/config/ja.ts +++ b/.vitepress/config/ja.ts @@ -56,3 +56,25 @@ export const ja = defineConfig({ returnToTopLabel: 'ページの先頭に戻る', }, }); + +export const jaSearchLocale: NonNullable = { + button: { + buttonText: '検索', + buttonAriaLabel: '検索する', + }, + modal: { + displayDetails: '詳細を表示', + resetButtonTitle: 'リセット', + backButtonTitle: '閉じる', + noResultsText: '該当する結果がありませんでした', + footer: { + selectText: 'で選択', + selectKeyAriaLabel: 'Enterキー', + navigateText: 'で移動', + navigateUpKeyAriaLabel: '上矢印キー', + navigateDownKeyAriaLabel: '下矢印キー', + closeText: 'で閉じる', + closeKeyAriaLabel: '閉じる', + }, + }, +}; diff --git a/.vitepress/config/shared.ts b/.vitepress/config/shared.ts index 7fe56fc..0769f33 100644 --- a/.vitepress/config/shared.ts +++ b/.vitepress/config/shared.ts @@ -1,5 +1,6 @@ import { defineConfig } from 'vitepress'; import aiscriptTmLanguage from 'aiscript-vscode/aiscript/syntaxes/aiscript.tmLanguage.json' with { type: 'json' }; +import { jaSearchLocale } from './ja'; import { createPlaygroundTransformer } from '../scripts/playground-transformer'; // https://vitepress.dev/reference/site-config @@ -12,6 +13,16 @@ export const shared = defineConfig({ socialLinks: [ { icon: 'github', link: 'https://github.com/aiscript-dev/aiscript' }, ], + search: { + provider: 'local', + options: { + locales: { + ja: { + translations: jaSearchLocale, + }, + } + } + }, }, head: [