Skip to content

Commit 11ed757

Browse files
committed
feat: add vitepress ja config
1 parent ba8fbde commit 11ed757

File tree

4 files changed

+117
-2
lines changed

4 files changed

+117
-2
lines changed

docs/.vitepress/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from "vitepress";
22
import en from "./en";
33
import zh from "./zh";
4+
import ja from "./ja";
45
import shared from "./shared";
56

67
// https://vitepress.dev/reference/site-config
@@ -9,5 +10,6 @@ export default defineConfig({
910
locales: {
1011
root: { label: "English", ...en },
1112
zh: { label: "简体中文", ...zh },
13+
ja: { label: "日本語", ...ja },
1214
},
1315
});

docs/.vitepress/ja.ts

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
import { defineConfig, type DefaultTheme } from "vitepress";
2+
3+
export default defineConfig({
4+
lang: "ja",
5+
description: "OpenAPI 3.0および3.1のスキーマをTypeScriptで使用する方法。",
6+
themeConfig: {
7+
nav: [
8+
{
9+
text: "バージョン",
10+
items: [
11+
{ text: "7.x", link: "/ja/introduction" },
12+
{ text: "6.x", link: "/6.x/introduction" },
13+
],
14+
},
15+
],
16+
sidebar: {
17+
"/ja/": [
18+
{
19+
text: "openapi-typescript (7.x)",
20+
items: [
21+
{ text: "イントロダクション", link: "/ja/introduction" },
22+
{ text: "CLI", link: "/ja/cli" },
23+
{ text: "Node.js API", link: "/ja/node" },
24+
{ text: "使用例", link: "/ja/examples" },
25+
{ text: "6.xからのマイグレーション", link: "/ja/migration-guide" },
26+
{ text: "高度な機能", link: "/ja/advanced" },
27+
{ text: "概要", link: "/ja/about" },
28+
],
29+
},
30+
{
31+
text: "openapi-fetch",
32+
items: [
33+
{ text: "始める", link: "/ja/openapi-fetch/" },
34+
{
35+
text: "ミドルウェア & 認証",
36+
link: "/ja/openapi-fetch/middleware-auth",
37+
},
38+
{ text: "テスト", link: "/ja/openapi-fetch/testing" },
39+
{ text: "使用例", link: "/ja/openapi-fetch/examples" },
40+
{ text: "API", link: "/ja/openapi-fetch/api" },
41+
{ text: "概要", link: "/ja/openapi-fetch/about" },
42+
],
43+
},
44+
{
45+
text: "openapi-react-query",
46+
items: [
47+
{ text: "始める", link: "/ja/openapi-react-query/" },
48+
{ text: "useQuery", link: "/ja/openapi-react-query/use-query" },
49+
{ text: "useMutation", link: "/ja/openapi-react-query/use-mutation " },
50+
{ text: "useSuspenseQuery", link: "/ja/openapi-react-query/use-suspense-query" },
51+
{ text: "概要", link: "/ja/openapi-react-query/about" },
52+
],
53+
},
54+
],
55+
},
56+
57+
docFooter: {
58+
prev: "前のページ",
59+
next: "次のページ",
60+
},
61+
outline: {
62+
label: "目次",
63+
},
64+
footer: {
65+
message:
66+
'<a href="https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE">MITライセンス</a> に基づいて配布されています',
67+
},
68+
},
69+
});
70+
71+
export const jaSearch: DefaultTheme.AlgoliaSearchOptions["locales"] = {
72+
ja: {
73+
placeholder: "ドキュメントを検索",
74+
translations: {
75+
button: {
76+
buttonText: "検索",
77+
buttonAriaLabel: "検索",
78+
},
79+
modal: {
80+
searchBox: {
81+
resetButtonTitle: "クエリをクリア",
82+
resetButtonAriaLabel: "クエリをクリア",
83+
cancelButtonText: "キャンセル",
84+
cancelButtonAriaLabel: "キャンセル",
85+
},
86+
startScreen: {
87+
recentSearchesTitle: "最近の検索",
88+
noRecentSearchesText: "最近の検索履歴はありません",
89+
saveRecentSearchButtonTitle: "最近の検索に保存",
90+
removeRecentSearchButtonTitle: "最近の検索から削除",
91+
favoriteSearchesTitle: "お気に入り",
92+
removeFavoriteSearchButtonTitle: "お気に入りから削除",
93+
},
94+
errorScreen: {
95+
titleText: "結果を取得できません",
96+
helpText: "ネットワーク接続を確認してください",
97+
},
98+
footer: {
99+
selectText: "選択",
100+
navigateText: "移動",
101+
closeText: "閉じる",
102+
},
103+
noResultsScreen: {
104+
noResultsText: "関連する結果が見つかりません",
105+
suggestedQueryText: "別のクエリを試してみてください",
106+
reportMissingResultsText: "このクエリに結果があるべきだと思いますか?",
107+
reportMissingResultsLinkText: "フィードバックを送信",
108+
},
109+
},
110+
},
111+
},
112+
};

docs/.vitepress/shared.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { UserConfig } from "vitepress";
22
import { zhSearch } from "./zh";
3+
import { jaSearch } from "./ja";
34

45
const HOSTNAME = "https://openapi-ts.dev";
56

@@ -31,7 +32,7 @@ const shared: UserConfig = {
3132
appId: "NA92XVKBVS",
3233
apiKey: "4f3ce9ca7edc3b83c209e6656ab29eb8",
3334
indexName: "openapi-ts",
34-
locales: { ...zhSearch },
35+
locales: { ...zhSearch, ...jaSearch },
3536
},
3637
},
3738
socialLinks: [

0 commit comments

Comments
 (0)