Skip to content
Merged
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
22 changes: 22 additions & 0 deletions .vitepress/config/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,25 @@ export const ja = defineConfig({
returnToTopLabel: 'ページの先頭に戻る',
},
});

export const jaSearchLocale: NonNullable<DefaultTheme.LocalSearchOptions['translations']> = {
button: {
buttonText: '検索',
buttonAriaLabel: '検索する',
},
modal: {
displayDetails: '詳細を表示',
resetButtonTitle: 'リセット',
backButtonTitle: '閉じる',
noResultsText: '該当する結果がありませんでした',
footer: {
selectText: 'で選択',
selectKeyAriaLabel: 'Enterキー',
navigateText: 'で移動',
navigateUpKeyAriaLabel: '上矢印キー',
navigateDownKeyAriaLabel: '下矢印キー',
closeText: 'で閉じる',
closeKeyAriaLabel: '閉じる',
},
},
};
11 changes: 11 additions & 0 deletions .vitepress/config/shared.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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: [
Expand Down