Skip to content

Commit 03bf265

Browse files
EstrellaXDclaudehappy-otter
committed
docs: add i18n support with Chinese as default language
- Configure VitePress locales with zh-CN as root and en-US as /en/ - Translate all documentation to Chinese (31 files) - Create English documentation under /en/ directory - Add Chinese UI labels for navigation and pagination - Language switcher now available in site header Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
1 parent 7e9f3a7 commit 03bf265

63 files changed

Lines changed: 4775 additions & 1439 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.vitepress/config.ts

Lines changed: 208 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,22 @@ import { defineConfig } from 'vitepress'
22

33
const version = `v3.2`
44

5-
export default defineConfig({
6-
title: 'AutoBangumi',
7-
description: 'Automatic anime downloading and organization from RSS feeds',
8-
5+
// Shared configuration
6+
const sharedConfig = {
97
head: [
108
['link', { rel: 'icon', type: 'image/svg+xml', href: '/light-logo.svg' }],
119
['meta', { property: 'og:image', content: '/social.png' }],
1210
['meta', { property: 'og:site_name', content: 'AutoBangumi' }],
1311
['meta', { property: 'og:url', content: 'https://www.autobangumi.org' }],
1412
['script', { async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-3Z8W6WMN7J' }],
1513
['script', {}, `window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','G-3Z8W6WMN7J');`],
16-
],
14+
] as any,
1715

1816
themeConfig: {
1917
logo: {
2018
dark: '/dark-logo.svg',
2119
light: '/light-logo.svg',
2220
},
23-
24-
editLink: {
25-
pattern: 'https://github.com/EstrellaXD/Auto_Bangumi/edit/main/docs/:path',
26-
text: 'Edit this page on GitHub',
27-
},
28-
29-
search: {
30-
provider: 'local',
31-
},
32-
3321
socialLinks: [
3422
{ icon: 'github', link: 'https://github.com/EstrellaXD/Auto_Bangumi' },
3523
{
@@ -39,88 +27,218 @@ export default defineConfig({
3927
link: 'https://t.me/autobangumi',
4028
},
4129
],
30+
search: {
31+
provider: 'local',
32+
},
33+
},
34+
}
4235

43-
nav: [
44-
{ text: 'About', link: '/home/' },
45-
{ text: 'Quick Start', link: '/deploy/quick-start' },
46-
{ text: 'FAQ', link: '/faq/' },
47-
{ text: 'API', link: '/api/' },
36+
// Chinese sidebar (default)
37+
const zhSidebar = [
38+
{
39+
items: [
40+
{ text: '关于', link: '/home/' },
41+
{ text: '快速开始', link: '/deploy/quick-start' },
42+
{ text: '工作原理', link: '/home/pipline' },
43+
],
44+
},
45+
{
46+
text: '部署',
47+
items: [
48+
{ text: 'Docker CLI', link: '/deploy/docker-cli' },
49+
{ text: 'Docker Compose', link: '/deploy/docker-compose' },
50+
{ text: '群晖 NAS (DSM)', link: '/deploy/dsm' },
51+
{ text: '本地部署', link: '/deploy/local' },
52+
],
53+
},
54+
{
55+
text: '配置',
56+
items: [
57+
{ text: 'RSS 订阅设置', link: '/config/rss' },
58+
{ text: '程序设置', link: '/config/program' },
59+
{ text: '下载器设置', link: '/config/downloader' },
60+
{ text: '解析器设置', link: '/config/parser' },
61+
{ text: '通知设置', link: '/config/notifier' },
62+
{ text: '番剧管理设置', link: '/config/manager' },
63+
{ text: '代理设置', link: '/config/proxy' },
64+
{ text: '实验性功能', link: '/config/experimental' },
65+
],
66+
},
67+
{
68+
text: '功能',
69+
items: [
70+
{ text: 'RSS 管理', link: '/feature/rss' },
71+
{ text: '番剧管理', link: '/feature/bangumi' },
72+
{ text: '日历视图', link: '/feature/calendar' },
73+
{ text: '文件重命名', link: '/feature/rename' },
74+
{ text: '种子搜索', link: '/feature/search' },
4875
],
76+
},
77+
{
78+
text: '常见问题',
79+
items: [
80+
{ text: '常见问题', link: '/faq/' },
81+
{ text: '故障排除', link: '/faq/troubleshooting' },
82+
{ text: '网络问题', link: '/faq/network' },
83+
],
84+
},
85+
{
86+
text: 'API 参考',
87+
items: [
88+
{ text: 'REST API', link: '/api/' },
89+
],
90+
},
91+
{
92+
text: '更新日志',
93+
items: [
94+
{ text: '3.2 版本说明', link: '/changelog/3.2' },
95+
{ text: '3.1 版本说明', link: '/changelog/3.1' },
96+
{ text: '3.0 版本说明', link: '/changelog/3.0' },
97+
{ text: '2.6 版本说明', link: '/changelog/2.6' },
98+
],
99+
},
100+
{
101+
text: '开发者指南',
102+
items: [
103+
{ text: '参与贡献', link: '/dev/' },
104+
],
105+
},
106+
]
49107

50-
footer: {
51-
message: `AutoBangumi is released under the MIT License. (latest: ${version})`,
52-
copyright: 'Copyright © 2021-present @EstrellaXD & AutoBangumi Contributors',
53-
},
108+
// English sidebar
109+
const enSidebar = [
110+
{
111+
items: [
112+
{ text: 'About', link: '/en/home/' },
113+
{ text: 'Quick Start', link: '/en/deploy/quick-start' },
114+
{ text: 'How It Works', link: '/en/home/pipline' },
115+
],
116+
},
117+
{
118+
text: 'Deployment',
119+
items: [
120+
{ text: 'Docker CLI', link: '/en/deploy/docker-cli' },
121+
{ text: 'Docker Compose', link: '/en/deploy/docker-compose' },
122+
{ text: 'Synology NAS (DSM)', link: '/en/deploy/dsm' },
123+
{ text: 'Local Deployment', link: '/en/deploy/local' },
124+
],
125+
},
126+
{
127+
text: 'Configuration',
128+
items: [
129+
{ text: 'RSS Feed Setup', link: '/en/config/rss' },
130+
{ text: 'Program Settings', link: '/en/config/program' },
131+
{ text: 'Downloader Settings', link: '/en/config/downloader' },
132+
{ text: 'Parser Settings', link: '/en/config/parser' },
133+
{ text: 'Notification Settings', link: '/en/config/notifier' },
134+
{ text: 'Bangumi Manager', link: '/en/config/manager' },
135+
{ text: 'Proxy Settings', link: '/en/config/proxy' },
136+
{ text: 'Experimental Features', link: '/en/config/experimental' },
137+
],
138+
},
139+
{
140+
text: 'Features',
141+
items: [
142+
{ text: 'RSS Management', link: '/en/feature/rss' },
143+
{ text: 'Bangumi Management', link: '/en/feature/bangumi' },
144+
{ text: 'Calendar View', link: '/en/feature/calendar' },
145+
{ text: 'File Renaming', link: '/en/feature/rename' },
146+
{ text: 'Torrent Search', link: '/en/feature/search' },
147+
],
148+
},
149+
{
150+
text: 'FAQ',
151+
items: [
152+
{ text: 'Common Questions', link: '/en/faq/' },
153+
{ text: 'Troubleshooting', link: '/en/faq/troubleshooting' },
154+
{ text: 'Network Issues', link: '/en/faq/network' },
155+
],
156+
},
157+
{
158+
text: 'API Reference',
159+
items: [
160+
{ text: 'REST API', link: '/en/api/' },
161+
],
162+
},
163+
{
164+
text: 'Changelog',
165+
items: [
166+
{ text: '3.2 Release Notes', link: '/en/changelog/3.2' },
167+
{ text: '3.1 Release Notes', link: '/en/changelog/3.1' },
168+
{ text: '3.0 Release Notes', link: '/en/changelog/3.0' },
169+
{ text: '2.6 Release Notes', link: '/en/changelog/2.6' },
170+
],
171+
},
172+
{
173+
text: 'Developer Guide',
174+
items: [
175+
{ text: 'Contributing', link: '/en/dev/' },
176+
],
177+
},
178+
]
54179

55-
sidebar: [
56-
{
57-
items: [
58-
{ text: 'About', link: '/home/' },
59-
{ text: 'Quick Start', link: '/deploy/quick-start' },
60-
{ text: 'How It Works', link: '/home/pipline' },
61-
],
62-
},
63-
{
64-
text: 'Deployment',
65-
items: [
66-
{ text: 'Docker CLI', link: '/deploy/docker-cli' },
67-
{ text: 'Docker Compose', link: '/deploy/docker-compose' },
68-
{ text: 'Synology NAS (DSM)', link: '/deploy/dsm' },
69-
{ text: 'Local Deployment', link: '/deploy/local' },
70-
],
71-
},
72-
{
73-
text: 'Configuration',
74-
items: [
75-
{ text: 'RSS Feed Setup', link: '/config/rss' },
76-
{ text: 'Program Settings', link: '/config/program' },
77-
{ text: 'Downloader Settings', link: '/config/downloader' },
78-
{ text: 'Parser Settings', link: '/config/parser' },
79-
{ text: 'Notification Settings', link: '/config/notifier' },
80-
{ text: 'Bangumi Manager', link: '/config/manager' },
81-
{ text: 'Proxy Settings', link: '/config/proxy' },
82-
{ text: 'Experimental Features', link: '/config/experimental' },
83-
],
84-
},
85-
{
86-
text: 'Features',
87-
items: [
88-
{ text: 'RSS Management', link: '/feature/rss' },
89-
{ text: 'Bangumi Management', link: '/feature/bangumi' },
90-
{ text: 'Calendar View', link: '/feature/calendar' },
91-
{ text: 'File Renaming', link: '/feature/rename' },
92-
{ text: 'Torrent Search', link: '/feature/search' },
93-
],
94-
},
95-
{
96-
text: 'FAQ',
97-
items: [
98-
{ text: 'Common Questions', link: '/faq/' },
99-
{ text: 'Troubleshooting', link: '/faq/troubleshooting' },
100-
{ text: 'Network Issues', link: '/faq/network' },
101-
],
102-
},
103-
{
104-
text: 'API Reference',
105-
items: [
106-
{ text: 'REST API', link: '/api/' },
107-
],
108-
},
109-
{
110-
text: 'Changelog',
111-
items: [
112-
{ text: '3.2 Release Notes', link: '/changelog/3.2' },
113-
{ text: '3.1 Release Notes', link: '/changelog/3.1' },
114-
{ text: '3.0 Release Notes', link: '/changelog/3.0' },
115-
{ text: '2.6 Release Notes', link: '/changelog/2.6' },
180+
export default defineConfig({
181+
title: 'AutoBangumi',
182+
description: '基于 RSS 的全自动番剧下载与整理工具',
183+
...sharedConfig,
184+
185+
locales: {
186+
root: {
187+
label: '简体中文',
188+
lang: 'zh-CN',
189+
themeConfig: {
190+
nav: [
191+
{ text: '关于', link: '/home/' },
192+
{ text: '快速开始', link: '/deploy/quick-start' },
193+
{ text: '常见问题', link: '/faq/' },
194+
{ text: 'API', link: '/api/' },
116195
],
196+
sidebar: zhSidebar,
197+
editLink: {
198+
pattern: 'https://github.com/EstrellaXD/Auto_Bangumi/edit/main/docs/:path',
199+
text: '在 GitHub 上编辑此页',
200+
},
201+
footer: {
202+
message: `AutoBangumi 基于 MIT 许可证发布。(最新版本: ${version})`,
203+
copyright: 'Copyright © 2021-present @EstrellaXD & AutoBangumi Contributors',
204+
},
205+
docFooter: {
206+
prev: '上一页',
207+
next: '下一页',
208+
},
209+
outline: {
210+
label: '目录',
211+
},
212+
lastUpdated: {
213+
text: '最后更新于',
214+
},
215+
returnToTopLabel: '返回顶部',
216+
sidebarMenuLabel: '菜单',
217+
darkModeSwitchLabel: '主题',
218+
langMenuLabel: '切换语言',
117219
},
118-
{
119-
text: 'Developer Guide',
120-
items: [
121-
{ text: 'Contributing', link: '/dev/' },
220+
},
221+
en: {
222+
label: 'English',
223+
lang: 'en-US',
224+
link: '/en/',
225+
themeConfig: {
226+
nav: [
227+
{ text: 'About', link: '/en/home/' },
228+
{ text: 'Quick Start', link: '/en/deploy/quick-start' },
229+
{ text: 'FAQ', link: '/en/faq/' },
230+
{ text: 'API', link: '/en/api/' },
122231
],
232+
sidebar: enSidebar,
233+
editLink: {
234+
pattern: 'https://github.com/EstrellaXD/Auto_Bangumi/edit/main/docs/:path',
235+
text: 'Edit this page on GitHub',
236+
},
237+
footer: {
238+
message: `AutoBangumi is released under the MIT License. (latest: ${version})`,
239+
copyright: 'Copyright © 2021-present @EstrellaXD & AutoBangumi Contributors',
240+
},
123241
},
124-
],
242+
},
125243
},
126244
})

0 commit comments

Comments
 (0)